diff --git a/tck/docs/JakartaServerPages3.1-ReleaseNotes.html b/tck/docs/JakartaServerPages3.1-ReleaseNotes.html new file mode 100644 index 00000000..db198313 --- /dev/null +++ b/tck/docs/JakartaServerPages3.1-ReleaseNotes.html @@ -0,0 +1,97 @@ + + + + + Jakarta Server Pages TCK Release Notes + + + +
+

Jakarta EE Server Pages Technology Compatibility Kit, Version 3.1
+ Release Notes, May 2021

+
+

Kit Contents

+

The Jakarta EE Server Pages, Version 3.1 Technology Compatibility Kit + (TCK) includes the following items:

+ +
+

Platform Notes

+

The Jakarta EE Server Pages TCK tests have been built with JDK 8 (1.8) + and tested with JavaTM + Platform, Standard Edition 8 and 11.

+

The Jakarta EE Server Pages TCK tests have been run on the following + platforms:

+ +

The Jakarta EE Server Pages TCK tests have been run against the Eclipse + Jakarta EE Server Pages Compatible Implementation Version 3.1.

+
+

Installing, Setting Up, and Running the + Jakarta EE Server Pages TCK

+

Refer to the Jakarta EE Server Pages TCK 3.1 User's Guide (HTML, + PDF) + for complete instructions on installing, setting up, and running the + Jakarta EE Server Pages TCK.

+

The online version of the JT Harness version 5.0 documentation is + available here.

+
+

Copyright © 2013, 2021 Oracle and/or its affiliates. All + rights reserved.

+ + diff --git a/tck/docs/assertions/JakartaServerPagesJavadocAssertions.html b/tck/docs/assertions/JakartaServerPagesJavadocAssertions.html new file mode 100644 index 00000000..901b86a6 --- /dev/null +++ b/tck/docs/assertions/JakartaServerPagesJavadocAssertions.html @@ -0,0 +1,4607 @@ + + + + + +JavaDoc Assertion Detail + + +
+
+

Jakarta Server Pages - 3.1
+ JavaDoc Assertion Detail +

+
+ + + + + + + + + + + +
TotalsTotalActiveDeprecatedRemoved
+ # of Assertions + 440414125
+ # of Required Assertions + 436410125
+ # of Optional Assertions + 4400
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IDReturnMethod/FieldDescriptionRequiredDeprecatedTestable
JSP:JAVADOC:1ErrorDatajakarta.servlet.jsp.ErrorData.ErrorData
+ + ( + Throwable + ,
int + ,
String + ,
String + ) +
Creates a new ErrorData object + + true +
+
true
JSP:JAVADOC:2Throwablejakarta.servlet.jsp.ErrorData.getThrowable
+
Returns the Throwable that caused the error + + true +
+
true
JSP:JAVADOC:3intjakarta.servlet.jsp.ErrorData.getStatusCode
+
Returns the status code of the error + + true +
+
true
JSP:JAVADOC:4Stringjakarta.servlet.jsp.ErrorData.getRequestURI
+
Returns the request URI + + true +
+
true
JSP:JAVADOC:5Stringjakarta.servlet.jsp.ErrorData.getServletName
+
Returns the name of the servlet invoked + + true +
+
true
JSP:JAVADOC:6SkipPageExceptionjakarta.servlet.jsp.SkipPageException.SkipPageException
+
Creates a SkipPageException with no message. + + true +
+
true
JSP:JAVADOC:7SkipPageExceptionjakarta.servlet.jsp.SkipPageException.SkipPageException
+ + ( + String + ) +
Creates a SkipPageException with the provided message. + + true +
+
true
JSP:JAVADOC:8SkipPageExceptionjakarta.servlet.jsp.SkipPageException.SkipPageException
+ + ( + String + ,
Throwable + ) +
Creates a SkipPageException with the provided message and root cause. + + true +
+
true
JSP:JAVADOC:9SkipPageExceptionjakarta.servlet.jsp.SkipPageException.SkipPageException
+ + ( + Throwable + ) +
Creates a SkipPageException with the provided root cause. + + true +
+
true
JSP:JAVADOC:10PageContextjakarta.servlet.jsp.PageContext.PageContext
+
+
+
true +
+
true
JSP:JAVADOC:11voidjakarta.servlet.jsp.PageContext.initialize
+ + ( + Servlet + ,
ServletRequest + ,
ServletResponse + ,
String + ,
boolean + ,
int + ,
boolean + ) +
The initialize method is called to initialize an uninitialized PageContext so that it may be used by a JSP Implementation class to service an incoming request and response within it's _jspService() method. + This method is typically called from JspFactory.getPageContext() in order to initialize state. This method is required to create an initial JspWriter, and associate the "out" name in page scope with this newly created object. This method should not be used by page or tag library authors. + + true +
+
false
JSP:JAVADOC:12voidjakarta.servlet.jsp.PageContext.initialize
+ + ( + Servlet + ,
ServletRequest + ,
ServletResponse + ,
String + ,
boolean + ,
int + ,
boolean + ) +
throws + IOException
+
during creation of JspWritertrue +
+
false
JSP:JAVADOC:13voidjakarta.servlet.jsp.PageContext.initialize
+ + ( + Servlet + ,
ServletRequest + ,
ServletResponse + ,
String + ,
boolean + ,
int + ,
boolean + ) +
throws + IllegalStateException
+
if out not correctly initializedtrue +
+
false
JSP:JAVADOC:14voidjakarta.servlet.jsp.PageContext.initialize
+ + ( + Servlet + ,
ServletRequest + ,
ServletResponse + ,
String + ,
boolean + ,
int + ,
boolean + ) +
throws + IllegalArgumentException
+
If one of the given parameters is invalidtrue +
+
false
JSP:JAVADOC:15voidjakarta.servlet.jsp.PageContext.release
+
This method shall "reset" the internal state of a PageContext, releasing all internal references, and preparing the PageContext for potential reuse by a later invocation of initialize(). + This method is typically called from JspFactory.releasePageContext(). Subclasses shall envelope this method. This method should not be used by page or tag library authors. + + true +
+
false
JSP:JAVADOC:16HttpSessionjakarta.servlet.jsp.PageContext.getSession
+
The current value of the session object (an HttpSession). + + true +
+
true
JSP:JAVADOC:17Objectjakarta.servlet.jsp.PageContext.getPage
+
The current value of the page object (In a Servlet environment this is an isntance of jakarta.servlet.Servlet). + + true +
+
true
JSP:JAVADOC:18ServletRequestjakarta.servlet.jsp.PageContext.getRequest
+
The current value of the request object (a ServletRequest). + + true +
+
true
JSP:JAVADOC:19ServletResponsejakarta.servlet.jsp.PageContext.getResponse
+
The current value of the response object (a ServletResponse). + + true +
+
true
JSP:JAVADOC:20Exceptionjakarta.servlet.jsp.PageContext.getException
+
The current value of the exception object (an Exception). + + true +
+
true
JSP:JAVADOC:21ServletConfigjakarta.servlet.jsp.PageContext.getServletConfig
+
The ServletConfig instance. + + true +
+
true
JSP:JAVADOC:22ServletContextjakarta.servlet.jsp.PageContext.getServletContext
+
The ServletContext instance. + + true +
+
true
JSP:JAVADOC:23voidjakarta.servlet.jsp.PageContext.forward
+ + ( + String + ) +
This method is used to re-direct, or "forward" the current ServletRequest and ServletResponse to another active component in the application. If the relativeUrlPath begins with a "/" then the URL specified is calculated relative to the DOCROOT of the ServletContext for this JSP. true +
+
true
JSP:JAVADOC:24voidjakarta.servlet.jsp.PageContext.forward
+ + ( + String + ) +
This method is used to re-direct, or "forward" the current ServletRequest and ServletResponse to another active component in the application. If the path does not begin with a "/" then the URL specified is calculated relative to the URL of the request that was mapped to the calling JSP. true +
+
true
JSP:JAVADOC:25voidjakarta.servlet.jsp.PageContext.forward
+ + ( + String + ) +
It is only valid to call this method from a Thread executing within a _jspService(...) method of a JSP. Once this method has been called successfully, it is illegal for the calling Thread to attempt to modify the ServletResponse object. Any such attempt to do so, shall result in undefined behavior. Typically, callers immediately return from _jspService(...) after calling this method.true +
+
false
JSP:JAVADOC:26voidjakarta.servlet.jsp.PageContext.forward
+ + ( + String + ) +
throws + ServletException
+
if the page that was forwarded to throws a ServletExceptiontrue +
+
true
JSP:JAVADOC:27voidjakarta.servlet.jsp.PageContext.forward
+ + ( + String + ) +
throws + IOException
+
if an I/O error occurred while forwardingtrue +
+
true
JSP:JAVADOC:29voidjakarta.servlet.jsp.PageContext.forward
+ + ( + String + ) +
throws + IllegalStateException
+
if ServletResponse is not in a state where a forward can be performedtrue +
+
true
JSP:JAVADOC:31voidjakarta.servlet.jsp.PageContext.include
+ + ( + String + ) +
Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread. The output of the target resources processing of the request is written directly to the ServletResponse output stream. The current JspWriter "out" for this JSP is flushed as a side-effect of this call, prior to processing the include. If the relativeUrlPath begins with a "/" then the URL specified is calculated relative to the DOCROOT of the ServletContext for this JSP. true +
+
true
JSP:JAVADOC:32voidjakarta.servlet.jsp.PageContext.include
+ + ( + String + ) +
Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread. The output of the target resources processing of the request is written directly to the ServletResponse output stream. The current JspWriter "out" for this JSP is flushed as a side-effect of this call, prior to processing the include. If the path does not begin with a "/" then the URL specified is calculated relative to the URL of the request that was mapped to the calling JSP. true +
+
true
JSP:JAVADOC:33voidjakarta.servlet.jsp.PageContext.include
+ + ( + String + ) +
It is only valid to call this method from a Thread executing within a _jspService(...) method of a JSP.true +
+
false
JSP:JAVADOC:34voidjakarta.servlet.jsp.PageContext.include
+ + ( + String + ) +
throws + ServletException
+
if the inclusion throws a ServletException ??????true +
+
true
JSP:JAVADOC:35voidjakarta.servlet.jsp.PageContext.include
+ + ( + String + ) +
throws + IOException
+
if an I/O error occurred while includingtrue +
+
true
JSP:JAVADOC:38voidjakarta.servlet.jsp.PageContext.include
+ + ( + String + ,
boolean + ) +
Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread. If the relativeUrlPath begins with a "/" then the URL specified is calculated relative to the DOCROOT of the ServletContext for this JSP. true +
+
true
JSP:JAVADOC:39voidjakarta.servlet.jsp.PageContext.include
+ + ( + String + ,
boolean + ) +
Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread. If the path does not begin with a "/" then the URL specified is calculated relative to the URL of the request that was mapped to the calling JSP. true +
+
true
JSP:JAVADOC:40voidjakarta.servlet.jsp.PageContext.include
+ + ( + String + ,
boolean + ) +
Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread. + The output of the target resources processing of the request is written directly to the current JspWriter returned by a call to getOut(). If flush is true, The current JspWriter "out" for this JSP is flushed as a side-effect of this call, prior to processing the include. + true +
+
true
JSP:JAVADOC:385voidjakarta.servlet.jsp.PageContext.include
+ + ( + String + ,
boolean + ) +
Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread. + The output of the target resources processing of the request is written directly to the current JspWriter returned by a call to getOut(). If flush is false, "out" is not flushed. + true +
+
true
JSP:JAVADOC:41voidjakarta.servlet.jsp.PageContext.include
+ + ( + String + ,
boolean + ) +
It is only valid to call this method from a Thread executing within a _jspService(...) method of a JSP.true +
+
false
JSP:JAVADOC:42voidjakarta.servlet.jsp.PageContext.include
+ + ( + String + ,
boolean + ) +
throws + ServletException
+
if the page that was forwarded to throws a ServletException ???>???true +
+
true
JSP:JAVADOC:43voidjakarta.servlet.jsp.PageContext.include
+ + ( + String + ,
boolean + ) +
throws + IOException
+
if an I/O error occurred while includingtrue +
+
true
JSP:JAVADOC:46voidjakarta.servlet.jsp.PageContext.handlePageException
+ + ( + Exception + ) +
This method is intended to process an unhandled "page" level exception by forwarding the exception to the specified error page for this JSP.true +
+
true
JSP:JAVADOC:47voidjakarta.servlet.jsp.PageContext.handlePageException
+ + ( + Exception + ) +
If forwarding is not possible (for example because the response has already been committed) an implementation dependent mechanism should be used to invoke the error page (e.g. 'including' the error page instead).true +
+
false
JSP:JAVADOC:48voidjakarta.servlet.jsp.PageContext.handlePageException
+ + ( + Exception + ) +
A JSP implementation class shall typically clean up any local state prior to invoking this and will return immediately thereafter. It is illegal to generate any output to the client, or to modify any ServletResponse state after invoking this call. This method is kept for backwards compatiblity reasons. Newly generated code should use PageContext.handlePageException(Throwable).true +
+
false
JSP:JAVADOC:49voidjakarta.servlet.jsp.PageContext.handlePageException
+ + ( + Exception + ) +
throws + ServletException
+
if an error occurs while invoking the error pagetrue +
+
false
JSP:JAVADOC:50voidjakarta.servlet.jsp.PageContext.handlePageException
+ + ( + Exception + ) +
throws + IOException
+
if an I/O error occurred while invoking the error pagetrue +
+
false
JSP:JAVADOC:51voidjakarta.servlet.jsp.PageContext.handlePageException
+ + ( + Exception + ) +
throws + NullPointerException
+
if the exception is nulltrue +
+
true
JSP:JAVADOC:53voidjakarta.servlet.jsp.PageContext.handlePageException
+ + ( + Throwable + ) +
This method is identical to the handlePageException(Exception), except that it accepts a Throwable. + This is the preferred method to use as it allows proper implementation of the errorpage semantics. This method is intended to process an unhandled "page" level exception by redirecting the exception to either the specified error page for this JSP. + true +
+
true
JSP:JAVADOC:54voidjakarta.servlet.jsp.PageContext.handlePageException
+ + ( + Throwable + ) +
This method is identical to the handlePageException(Exception), except that it accepts a Throwable. + This is the preferred method to use as it allows proper implementation of the errorpage semantics. If no error page was specified, the result is implementation specific. + true +
+
false
JSP:JAVADOC:55voidjakarta.servlet.jsp.PageContext.handlePageException
+ + ( + Throwable + ) +
A JSP implementation class shall typically clean up any local state prior to invoking this and will return immediately thereafter. It is illegal to generate any output to the client, or to modify any ServletResponse state after invoking this call.true +
+
false
JSP:JAVADOC:56voidjakarta.servlet.jsp.PageContext.handlePageException
+ + ( + Throwable + ) +
throws + ServletException
+
if an error occurs while invoking the error pagetrue +
+
false
JSP:JAVADOC:57voidjakarta.servlet.jsp.PageContext.handlePageException
+ + ( + Throwable + ) +
throws + IOException
+
if an I/O error occurred while invoking the error pagetrue +
+
false
JSP:JAVADOC:58voidjakarta.servlet.jsp.PageContext.handlePageException
+ + ( + Throwable + ) +
throws + NullPointerException
+
if the exception is nulltrue +
+
true
JSP:JAVADOC:59voidjakarta.servlet.jsp.PageContext.handlePageException
+ + ( + Throwable + ) +
throws + SecurityException
+
if target resource cannot be accessed by callertrue +
+
true
JSP:JAVADOC:60BodyContentjakarta.servlet.jsp.PageContext.pushBody
+
Return a new BodyContent object, save the current "out" JspWriter, and update the value of the "out" attribute in the page scope attribute namespace of the PageContext + + true +
+
true
JSP:JAVADOC:61JspWriterjakarta.servlet.jsp.PageContext.popBody
+
Return the previous JspWriter "out" saved by the matching pushBody(), and update the value of the "out" attribute in the page scope attribute namespace of the JspConxtext + + true +
+
true
JSP:JAVADOC:62ErrorDatajakarta.servlet.jsp.PageContext.getErrorData
+
Provides convenient access to error information. + + true +
+
true
JSP:JAVADOC:63voidjakarta.servlet.jsp.JspWriter.newLine
+
Write a line separator. + The line separator string is defined by the system property line.separator, and is not necessarily a single newline ('\n') character. + + true +
+
true
JSP:JAVADOC:64voidjakarta.servlet.jsp.JspWriter.newLine
+
throws + IOException
+
If an I/O error occurstrue +
+
false
JSP:JAVADOC:65voidjakarta.servlet.jsp.JspWriter.print
+ + ( + boolean + ) +
Print a boolean value. + + + The string produced by is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the method. + + true +
+
true
JSP:JAVADOC:66voidjakarta.servlet.jsp.JspWriter.print
+ + ( + boolean + ) +
throws + IOException
+
If an error occured while writingtrue +
+
false
JSP:JAVADOC:67voidjakarta.servlet.jsp.JspWriter.print
+ + ( + char + ) +
Print a character. + + The character is translated into one or more bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the method. + + true +
+
true
JSP:JAVADOC:68voidjakarta.servlet.jsp.JspWriter.print
+ + ( + char + ) +
throws + IOException
+
If an error occured while writingtrue +
+
false
JSP:JAVADOC:69voidjakarta.servlet.jsp.JspWriter.print
+ + ( + int + ) +
Print an integer. + + + The string produced by is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the method. + + + true +
+
true
JSP:JAVADOC:70voidjakarta.servlet.jsp.JspWriter.print
+ + ( + int + ) +
throws + IOException
+
If an error occured while writingtrue +
+
false
JSP:JAVADOC:71voidjakarta.servlet.jsp.JspWriter.print
+ + ( + long + ) +
Print a long integer. + + + The string produced by is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the method. + + + true +
+
true
JSP:JAVADOC:72voidjakarta.servlet.jsp.JspWriter.print
+ + ( + long + ) +
throws + IOException
+
If an error occured while writingtrue +
+
false
JSP:JAVADOC:73voidjakarta.servlet.jsp.JspWriter.print
+ + ( + float + ) +
Print a floating-point number. + + + The string produced by is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the method. + + + true +
+
true
JSP:JAVADOC:74voidjakarta.servlet.jsp.JspWriter.print
+ + ( + float + ) +
throws + IOException
+
If an error occured while writingtrue +
+
false
JSP:JAVADOC:75voidjakarta.servlet.jsp.JspWriter.print
+ + ( + double + ) +
Print a double-precision floating-point number. + + + The string produced by is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the method. + + + true +
+
true
JSP:JAVADOC:76voidjakarta.servlet.jsp.JspWriter.print
+ + ( + double + ) +
throws + IOException
+
If an error occured while writingtrue +
+
false
JSP:JAVADOC:77voidjakarta.servlet.jsp.JspWriter.print
+ + ( + char[] + ) +
Print an array of characters. + + The characters are converted into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the method. + + true +
+
true
JSP:JAVADOC:78voidjakarta.servlet.jsp.JspWriter.print
+ + ( + char[] + ) +
throws + IOException
+
If an error occured while writingtrue +
+
false
JSP:JAVADOC:79voidjakarta.servlet.jsp.JspWriter.print
+ + ( + char[] + ) +
throws + NullPointerException
+
If <code>s</code> is <code>null</code>true +
+
true
JSP:JAVADOC:80voidjakarta.servlet.jsp.JspWriter.print
+ + ( + String + ) +
Print a string. + + If the argument is null then the string "null" is printed. Otherwise, the string's characters are converted into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the method. + + true +
+
true
JSP:JAVADOC:81voidjakarta.servlet.jsp.JspWriter.print
+ + ( + String + ) +
throws + IOException
+
If an error occured while writingtrue +
+
false
JSP:JAVADOC:82voidjakarta.servlet.jsp.JspWriter.print
+ + ( + Object + ) +
Print an object. + + + The string produced by the method is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the method. + + + true +
+
true
JSP:JAVADOC:83voidjakarta.servlet.jsp.JspWriter.print
+ + ( + Object + ) +
throws + IOException
+
If an error occured while writingtrue +
+
false
JSP:JAVADOC:84voidjakarta.servlet.jsp.JspWriter.println
+
Terminate the current line by writing the line separator string. + The line separator string is defined by the system property line.separator, and is not necessarily a single newline character ('\n'). + + true +
+
true
JSP:JAVADOC:85voidjakarta.servlet.jsp.JspWriter.println
+
throws + IOException
+
If an error occured while writingtrue +
+
false
JSP:JAVADOC:86voidjakarta.servlet.jsp.JspWriter.println
+ + ( + boolean + ) +
Print a boolean value and then terminate the line. + + + This method behaves as though it invokes and then . + + true +
+
true
JSP:JAVADOC:87voidjakarta.servlet.jsp.JspWriter.println
+ + ( + boolean + ) +
throws + IOException
+
If an error occured while writingtrue +
+
false
JSP:JAVADOC:88voidjakarta.servlet.jsp.JspWriter.println
+ + ( + char + ) +
Print a character and then terminate the line. + + + This method behaves as though it invokes and then . + + true +
+
true
JSP:JAVADOC:89voidjakarta.servlet.jsp.JspWriter.println
+ + ( + char + ) +
throws + IOException
+
If an error occured while writingtrue +
+
false
JSP:JAVADOC:90voidjakarta.servlet.jsp.JspWriter.println
+ + ( + int + ) +
Print an integer and then terminate the line. + + + This method behaves as though it invokes and then . + + true +
+
true
JSP:JAVADOC:91voidjakarta.servlet.jsp.JspWriter.println
+ + ( + int + ) +
throws + IOException
+
If an error occured while writingtrue +
+
false
JSP:JAVADOC:92voidjakarta.servlet.jsp.JspWriter.println
+ + ( + long + ) +
Print a long integer and then terminate the line. + + + This method behaves as though it invokes and then . + + true +
+
true
JSP:JAVADOC:93voidjakarta.servlet.jsp.JspWriter.println
+ + ( + long + ) +
throws + IOException
+
If an error occured while writingtrue +
+
false
JSP:JAVADOC:94voidjakarta.servlet.jsp.JspWriter.println
+ + ( + float + ) +
Print a floating-point number and then terminate the line. + + + This method behaves as though it invokes and then . + + true +
+
true
JSP:JAVADOC:95voidjakarta.servlet.jsp.JspWriter.println
+ + ( + float + ) +
throws + IOException
+
If an error occured while writingtrue +
+
false
JSP:JAVADOC:96voidjakarta.servlet.jsp.JspWriter.println
+ + ( + double + ) +
Print a double-precision floating-point number and then terminate the line. + + + This method behaves as though it invokes and then . + + true +
+
true
JSP:JAVADOC:97voidjakarta.servlet.jsp.JspWriter.println
+ + ( + double + ) +
throws + IOException
+
If an error occured while writingtrue +
+
false
JSP:JAVADOC:98voidjakarta.servlet.jsp.JspWriter.println
+ + ( + char[] + ) +
Print an array of characters and then terminate the line. + This method behaves as though it invokes print(char[]) and then println(). + + true +
+
true
JSP:JAVADOC:99voidjakarta.servlet.jsp.JspWriter.println
+ + ( + char[] + ) +
throws + IOException
+
If an error occured while writingtrue +
+
false
JSP:JAVADOC:100voidjakarta.servlet.jsp.JspWriter.println
+ + ( + String + ) +
Print a String and then terminate the line. + + + This method behaves as though it invokes and then . + + true +
+
true
JSP:JAVADOC:101voidjakarta.servlet.jsp.JspWriter.println
+ + ( + String + ) +
throws + IOException
+
If an error occured while writingtrue +
+
false
JSP:JAVADOC:102voidjakarta.servlet.jsp.JspWriter.println
+ + ( + Object + ) +
Print an Object and then terminate the line. + + + This method behaves as though it invokes and then . + + true +
+
true
JSP:JAVADOC:103voidjakarta.servlet.jsp.JspWriter.println
+ + ( + Object + ) +
throws + IOException
+
If an error occured while writingtrue +
+
false
JSP:JAVADOC:104voidjakarta.servlet.jsp.JspWriter.clear
+
Clear the contents of the buffer. + If the buffer has been already been flushed then the clear operation shall throw an IOException to signal the fact that some data has already been irrevocably written to the client response stream. + + true +
+
true
JSP:JAVADOC:105voidjakarta.servlet.jsp.JspWriter.clear
+
throws + IOException
+
If an I/O error occurstrue +
+
true
JSP:JAVADOC:106voidjakarta.servlet.jsp.JspWriter.clearBuffer
+
Clears the current contents of the buffer. + Unlike clear(), this method will not throw an IOException if the buffer has already been flushed. It merely clears the current content of the buffer and returns. + + true +
+
true
JSP:JAVADOC:107voidjakarta.servlet.jsp.JspWriter.clearBuffer
+
throws + IOException
+
If an I/O error occurstrue +
+
false
JSP:JAVADOC:108voidjakarta.servlet.jsp.JspWriter.flush
+
Flush the stream. + If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams. The method may be invoked indirectly if the buffer size is exceeded. Once a stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. + + true +
+
true
JSP:JAVADOC:109voidjakarta.servlet.jsp.JspWriter.flush
+
throws + IOException
+
If an I/O error occurstrue +
+
true
JSP:JAVADOC:110voidjakarta.servlet.jsp.JspWriter.close
+
Close the stream, flushing it first. + This method needs not be invoked explicitly for the initial JspWriter as the code generated by the JSP container will automatically include a call to close(). Closing a previously-closed stream, unlike flush(), has no effect. + + true +
+
true
JSP:JAVADOC:111voidjakarta.servlet.jsp.JspWriter.close
+
throws + IOException
+
If an I/O error occurstrue +
+
false
JSP:JAVADOC:112intjakarta.servlet.jsp.JspWriter.getBufferSize
+
This method returns the size of the buffer used by the JspWriter. + + true +
+
true
JSP:JAVADOC:113intjakarta.servlet.jsp.JspWriter.getRemaining
+
This method returns the number of unused bytes in the buffer. + + true +
+
true
JSP:JAVADOC:114booleanjakarta.servlet.jsp.JspWriter.isAutoFlush
+
This method indicates whether the JspWriter is autoFlushing. + + true +
+
true
JSP:JAVADOC:115JspTagExceptionjakarta.servlet.jsp.JspTagException.JspTagException
+ + ( + String + ) +
Constructs a new JspTagException with the specified message. + The message can be written to the server log and/or displayed for the user. + + true +
+
true
JSP:JAVADOC:116JspTagExceptionjakarta.servlet.jsp.JspTagException.JspTagException
+
Constructs a new JspTagException with no message. + + true +
+
true
JSP:JAVADOC:117JspTagExceptionjakarta.servlet.jsp.JspTagException.JspTagException
+ + ( + String + ,
Throwable + ) +
Constructs a new JspTagException when the JSP Tag needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation, including a description message. + + true +
+
true
JSP:JAVADOC:118JspTagExceptionjakarta.servlet.jsp.JspTagException.JspTagException
+ + ( + Throwable + ) +
Constructs a new JSP Tag exception when the JSP Tag needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation. + The exception's message is based on the localized message of the underlying exception. This method calls the getLocalizedMessage method on the Throwable exception to get a localized exception message. When subclassing JspTagException, this method can be overridden to create an exception message designed for a specific locale. + + true +
+
true
JSP:JAVADOC:119JspFactoryjakarta.servlet.jsp.JspFactory.JspFactory
+
+
+
true +
+
true
JSP:JAVADOC:120voidjakarta.servlet.jsp.JspFactory.setDefaultFactory
+ + ( + JspFactory + ) +
set the default factory for this implementation. + It is illegal for any principal other than the JSP Engine runtime to call this method. + + true +
+
false
JSP:JAVADOC:121JspFactoryjakarta.servlet.jsp.JspFactory.getDefaultFactory
+
Returns the default factory for this implementation. + + true +
+
true
JSP:JAVADOC:122PageContextjakarta.servlet.jsp.JspFactory.getPageContext
+ + ( + Servlet + ,
ServletRequest + ,
ServletResponse + ,
String + ,
boolean + ,
int + ,
boolean + ) +
obtains an instance of an implementation dependent jakarta.servlet.jsp.PageContext abstract class for the calling Servlet and currently pending request and response. + This method is typically called early in the processing of the _jspService() method of a JSP implementation class in order to obtain a PageContext object for the request being processed. Invoking this method shall result in the PageContext.initialize() method being invoked. The PageContext returned is properly initialized. All PageContext objects obtained via this method shall be released by invoking releasePageContext(). + + + true +
+
true
JSP:JAVADOC:123voidjakarta.servlet.jsp.JspFactory.releasePageContext
+ + ( + PageContext + ) +
called to release a previously allocated PageContext object. + Results in PageContext.release() being invoked. This method should be invoked prior to returning from the _jspService() method of a JSP implementation class. + + true +
+
true
JSP:JAVADOC:124JspEngineInfojakarta.servlet.jsp.JspFactory.getEngineInfo
+
called to get implementation-specific information on the current JSP engine. + + + true +
+
false
JSP:JAVADOC:125JspExceptionjakarta.servlet.jsp.JspException.JspException
+
Construct a JspException + + true +
+
true
JSP:JAVADOC:126JspExceptionjakarta.servlet.jsp.JspException.JspException
+ + ( + String + ) +
Constructs a new JSP exception with the specified message. + The message can be written to the server log and/or displayed for the user. + + true +
+
true
JSP:JAVADOC:127JspExceptionjakarta.servlet.jsp.JspException.JspException
+ + ( + String + ,
Throwable + ) +
Constructs a new JSP exception when the JSP needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation, including a description message. + + true +
+
true
JSP:JAVADOC:128JspExceptionjakarta.servlet.jsp.JspException.JspException
+ + ( + Throwable + ) +
Constructs a new JSP exception when the JSP needs to throw an exception and include a message about the "root cause" exception that interfered with its normal operation. + The exception's message is based on the localized message of the underlying exception. This method calls the getLocalizedMessage method on the Throwable exception to get a localized exception message. When subclassing JspException, this method can be overridden to create an exception message designed for a specific locale. + + true +
+
true
JSP:JAVADOC:129Throwablejakarta.servlet.jsp.JspException.getRootCause
+
Returns the exception that caused this JSP exception. + + true +
+
true
JSP:JAVADOC:130JspEngineInfojakarta.servlet.jsp.JspEngineInfo.JspEngineInfo
+
+
+
true +
+
true
JSP:JAVADOC:131Stringjakarta.servlet.jsp.JspEngineInfo.getSpecificationVersion
+
Return the version number of the JSP specification that is supported by this JSP engine. + Specification version numbers that consists of positive decimal integers separated by periods ".", for example, "2.0" or "1.2.3.4.5.6.7". This allows an extensible number to be used to represent major, minor, micro, etc versions. The version number must begin with a number. + + true +
+
true
JSP:JAVADOC:132JspContextjakarta.servlet.jsp.JspContext.JspContext
+
+
+
true +
+
true
JSP:JAVADOC:380JspWriterjakarta.servlet.jsp.JspContext.popBody
+
Return the previous JspWriter 'out' saved by the matching pushBody() and update the value of the 'out' attribute in the page scope attribute namespace of the JspContext. + + true +
+
true
JSP:JAVADOC:381JspWriterjakarta.servlet.jsp.JspContext.pushBody
+ + ( + Writer + ) +
Return a new JspWriter object that sends output to the provided writer.true +
+
true
JSP:JAVADOC:133voidjakarta.servlet.jsp.JspContext.setAttribute
+ + ( + String + ,
Object + ) +
Register the name and value specified with page scope semantics. + + true +
+
true
JSP:JAVADOC:396voidjakarta.servlet.jsp.JspContext.setAttribute
+ + ( + String + ,
Object + ) +
If the value passed is null, this has the same effect as calling removeAttribute(name, PageContext.PAGE_SCOPE). + + true +
+
true
JSP:JAVADOC:134voidjakarta.servlet.jsp.JspContext.setAttribute
+ + ( + String + ,
Object + ) +
throws + NullPointerException
+
if the name is nulltrue +
+
true
JSP:JAVADOC:135voidjakarta.servlet.jsp.JspContext.setAttribute
+ + ( + String + ,
Object + ,
int + ) +
register the name and value specified with appropriate scope semantics. + + true +
+
true
JSP:JAVADOC:397voidjakarta.servlet.jsp.JspContext.setAttribute
+ + ( + String + ,
Object + ,
int + ) +
If the value passed in is null this has the same effect as calling removeAttribute(name, scope). + + true +
+
true
JSP:JAVADOC:136voidjakarta.servlet.jsp.JspContext.setAttribute
+ + ( + String + ,
Object + ,
int + ) +
throws + NullPointerException
+
if the name is nulltrue +
+
true
JSP:JAVADOC:398voidjakarta.servlet.jsp.JspContext.setAttribute
+ + ( + String + ,
Object + ,
int + ) +
throws + IllegalArgumentException
+
if the scope is invalidtrue +
+
true
JSP:JAVADOC:399voidjakarta.servlet.jsp.JspContext.setAttribute
+ + ( + String + ,
Object + ,
int + ) +
throws + IllegalStateException
+
If the scope is PageContext.SESSION_SCOPE but the page that was requested does not participate in a session or the session has been invalidated.true +
+
true
JSP:JAVADOC:137voidjakarta.servlet.jsp.JspContext.setAttribute
+ + ( + String + ,
Object + ,
int + ) +
throws + IllegalArgumentException
+
if the scope is invalidtrue +
+
true
JSP:JAVADOC:138Objectjakarta.servlet.jsp.JspContext.getAttribute
+ + ( + String + ) +
Returns the object associated with the name in the page scope or null if not found. + + true +
+
true
JSP:JAVADOC:139Objectjakarta.servlet.jsp.JspContext.getAttribute
+ + ( + String + ) +
throws + NullPointerException
+
if the name is nulltrue +
+
true
JSP:JAVADOC:141Objectjakarta.servlet.jsp.JspContext.getAttribute
+ + ( + String + ,
int + ) +
Return the object associated with the name in the specified scope or null if not found. + + true +
+
true
JSP:JAVADOC:142Objectjakarta.servlet.jsp.JspContext.getAttribute
+ + ( + String + ,
int + ) +
throws + NullPointerException
+
if the name is nulltrue +
+
true
JSP:JAVADOC:143Objectjakarta.servlet.jsp.JspContext.getAttribute
+ + ( + String + ,
int + ) +
throws + IllegalArgumentException
+
if the scope is invalidtrue +
+
true
JSP:JAVADOC:390Objectjakarta.servlet.jsp.JspContext.getAttribute
+ + ( + String + ,
int + ) +
throws + IllegalStateException
+
if the scope is PageContext.SESSION_SCOPE but the page that was requested does not participate in a session or the session has been invalidatedtrue +
+
true
JSP:JAVADOC:144Objectjakarta.servlet.jsp.JspContext.findAttribute
+ + ( + String + ) +
Searches for the named attribute in page, request, session (if valid), and application scope(s) in order and returns the value associated or null. + + true +
+
true
JSP:JAVADOC:387Objectjakarta.servlet.jsp.JspContext.findAttribute
+ + ( + String + ) +
throws + NullPointerException
+
If the name is null + + true +
+
true
JSP:JAVADOC:145voidjakarta.servlet.jsp.JspContext.removeAttribute
+ + ( + String + ) +
Remove the object reference associated with the given name from all scopes. Does nothing if there is no such object. + + true +
+
true
JSP:JAVADOC:391voidjakarta.servlet.jsp.JspContext.removeAttribute
+ + ( + String + ) +
throws + NullPointerException
+
if the name is null + + true +
+
true
JSP:JAVADOC:146voidjakarta.servlet.jsp.JspContext.removeAttribute
+ + ( + String + ,
int + ) +
Remove the object reference associated with the specified name in the given scope. Does nothing if there is no such object. + + true +
+
true
JSP:JAVADOC:392voidjakarta.servlet.jsp.JspContext.removeAttribute
+ + ( + String + ,
int + ) +
throws + IllegalArgumentException
+
If the scope is invalid + + true +
+
true
JSP:JAVADOC:393voidjakarta.servlet.jsp.JspContext.removeAttribute
+ + ( + String + ,
int + ) +
throws + NullPointerException
+
If the name is null + + true +
+
true
JSP:JAVADOC:394voidjakarta.servlet.jsp.JspContext.removeAttribute
+ + ( + String + ,
int + ) +
throws + IllegalStateException
+
If the scope is PageContext.SESSION_SCOPE but the page that was requested does not particpate in a session or the session has been invalidated. + + true +
+
true
JSP:JAVADOC:147intjakarta.servlet.jsp.JspContext.getAttributesScope
+ + ( + String + ) +
Get the scope where a given attribute is defined. + + true +
+
true
JSP:JAVADOC:389intjakarta.servlet.jsp.JspContext.getAttributesScope
+ + ( + String + ) +
throws + NullPointerException
+
if the name is null + + true +
+
true
JSP:JAVADOC:148Enumerationjakarta.servlet.jsp.JspContext.getAttributeNamesInScope
+ + ( + int + ) +
Enumerate all the attributes in a given scope + + true +
+
true
JSP:JAVADOC:387Enumerationjakarta.servlet.jsp.JspContext.getAttributeNamesInScope
+ + ( + int + ) +
throws + IllegalArgumentException
+
if the scope is invalid + + true +
+
true
JSP:JAVADOC:388Enumerationjakarta.servlet.jsp.JspContext.getAttributeNamesInScope
+ + ( + int + ) +
throws + IllegalStateException
+
If the scope is PageContext.SESSION_SCOPE but the page that was requested does not participate in a session or the session has been invalidated. + + true +
+
true
JSP:JAVADOC:149JspWriterjakarta.servlet.jsp.JspContext.getOut
+
The current value of the out object (a JspWriter). + + true +
+
true
JSP:JAVADOC:150ExpressionEvaluatorjakarta.servlet.jsp.JspContext.getExpressionEvaluator
+
Provides programmatic access to the ExpressionEvaluator. + The JSP Container must return a valid instance of an ExpressionEvaluator that can parse EL expressions. + + true +
+
true
JSP:JAVADOC:151VariableResolverjakarta.servlet.jsp.JspContext.getVariableResolver
+
Returns an instance of a VariableResolver that provides access to the implicit objects specified in the JSP specification using this JspContext as the context object + + true +
+
true
JSP:JAVADOC:152voidjakarta.servlet.jsp.JspPage.jspInit
+
The jspInit() method is invoked when the JSP page is initialized. + It is the responsibility of the JSP implementation (and of the class mentioned by the extends attribute, if present) that at this point invocations to the getServletConfig() method will return the desired value. A JSP page can override this method by including a definition for it in a declaration element. A JSP page should redefine the init() method from Servlet. + + true +
+
false
JSP:JAVADOC:153voidjakarta.servlet.jsp.JspPage.jspDestroy
+
The jspDestroy() method is invoked when the JSP page is about to be destroyed. + A JSP page can override this method by including a definition for it in a declaration element. A JSP page should redefine the destroy() method from Servlet. + + true +
+
false
JSP:JAVADOC:154voidjakarta.servlet.jsp.HttpJspPage._jspService
+ + ( + HttpServletRequest + ,
HttpServletResponse + ) +
The _jspService() method corresponds to the body of the JSP page. + This method is defined automatically by the JSP container and should never be defined by the JSP page author. If a superclass is specified using the extends attribute, that superclass may choose to perform some actions in its service() method before or after calling the _jspService() method. See using the extends attribute in the JSP_Engine chapter of the JSP specification. + + true +
+
false
JSP:JAVADOC:155voidjakarta.servlet.jsp.HttpJspPage._jspService
+ + ( + HttpServletRequest + ,
HttpServletResponse + ) +
throws + ServletException
+
Thrown if an error occurred during the processing of the JSP and that the container should take appropriate action to clean up the request.true +
+
false
JSP:JAVADOC:156voidjakarta.servlet.jsp.HttpJspPage._jspService
+ + ( + HttpServletRequest + ,
HttpServletResponse + ) +
throws + IOException
+
Thrown if an error occurred while writing the response for this page.true +
+
false
JSP:JAVADOC:157ELParseExceptionjakarta.servlet.jsp.el.ELParseException.ELParseException
+
Creates an ELParseException with no detail message. + + true +
+
true
JSP:JAVADOC:158ELParseExceptionjakarta.servlet.jsp.el.ELParseException.ELParseException
+ + ( + String + ) +
Creates an ELParseException with the provided detail message. + + true +
+
true
JSP:JAVADOC:159ELExceptionjakarta.servlet.jsp.el.ELException.ELException
+
Creates an ELException with no detail message. + + true +
+
true
JSP:JAVADOC:160ELExceptionjakarta.servlet.jsp.el.ELException.ELException
+ + ( + String + ) +
Creates an ELException with the provided detail message. + + true +
+
true
JSP:JAVADOC:161ELExceptionjakarta.servlet.jsp.el.ELException.ELException
+ + ( + Throwable + ) +
Creates an ELException with the given root cause + + true +
+
true
JSP:JAVADOC:162ELExceptionjakarta.servlet.jsp.el.ELException.ELException
+ + ( + String + ,
Throwable + ) +
Creates an ELException with the given detail message and root cause. + + true +
+
true
JSP:JAVADOC:163Throwablejakarta.servlet.jsp.el.ELException.getRootCause
+
Returns the root cause + + true +
+
true
JSP:JAVADOC:165Methodjakarta.servlet.jsp.el.FunctionMapper.resolveFunction
+ + ( + String + ,
String + ) +
Resolves the specified local name and prefix into a Java.lang.Method. + Returns null if the prefix and local name are not found. + + true +
+
true
JSP:JAVADOC:384Objectjakarta.servlet.jsp.el.VariableResolver.resolveVariable
+ + ( + String + ) +
Resolves the specified variable. + Returns null if the variable is not found. + + true +
+
true
JSP:JAVADOC:167Objectjakarta.servlet.jsp.el.VariableResolver.resolveVariable
+ + ( + String + ,
Object + ) +
throws + ELException
+
if a failure occurred while trying to resolve the given variabletrue +
+
false
JSP:JAVADOC:379ExpressionEvaluatorjakarta.servlet.jsp.el.ExpressionEvaluator.ExpressionEvaluator
+
Default constructor.true +
+
false
JSP:JAVADOC:168Expressionjakarta.servlet.jsp.el.ExpressionEvaluator.parseExpression
+ + ( + String + ,
Class + ,
FunctionMapper + ,
String + ) +
Prepare an expression for later evaluation.true +
+
true
JSP:JAVADOC:169Expressionjakarta.servlet.jsp.el.ExpressionEvaluator.parseExpression
+ + ( + String + ,
Class + ,
FunctionMapper + ,
String + ) +
This method should perform syntactic validation of the expression; if in doing so it detects errors, it should raise an ELParseException. + + false +
+
false
JSP:JAVADOC:170Expressionjakarta.servlet.jsp.el.ExpressionEvaluator.parseExpression
+ + ( + String + ,
Class + ,
FunctionMapper + ,
String + ) +
throws + ELException
+
Thrown if parsing errors were found.false +
+
false
JSP:JAVADOC:171Objectjakarta.servlet.jsp.el.ExpressionEvaluator.evaluate
+ + ( + String + ,
Class + ,
VariableResolver + ,
FunctionMapper + ,
String + ) +
Evaluates an expression.true +
+
true
JSP:JAVADOC:172Objectjakarta.servlet.jsp.el.ExpressionEvaluator.evaluate
+ + ( + String + ,
Class + ,
VariableResolver + ,
FunctionMapper + ,
String + ) +
This method may perform some syntactic validation and, if so, it should raise an ELParseException error if it encounters syntactic errors. EL evaluation errors should cause an ELException to be raised.false +
+
false
JSP:JAVADOC:173Objectjakarta.servlet.jsp.el.ExpressionEvaluator.evaluate
+ + ( + String + ,
Class + ,
VariableResolver + ,
FunctionMapper + ,
String + ) +
throws + ELException
+
Thrown if the expression evaluation failed.true +
+
true
JSP:JAVADOC:378Expressionjakarta.servlet.jsp.el.Expression.Expression
+
Default constructortrue +
+
false
JSP:JAVADOC:174Objectjakarta.servlet.jsp.el.Expression.evaluate
+ + ( + VariableResolver + ) +
Evaluates an expression that was previously prepared.true +
+
true
JSP:JAVADOC:175Objectjakarta.servlet.jsp.el.Expression.evaluate
+ + ( + VariableResolver + ) +
In some implementations preparing an expression involves full syntactic validation, but others may not do so. Evaluating the expression may raise an ELParseException as well as other ELExceptions due to run-time evaluation. + + false +
+
false
JSP:JAVADOC:176Objectjakarta.servlet.jsp.el.Expression.evaluate
+ + ( + VariableResolver + ) +
throws + ELException
+
Thrown if the expression evaluation failed.true +
+
true
JSP:JAVADOC:177VariableInfojakarta.servlet.jsp.tagext.VariableInfo.VariableInfo
+ + ( + String + ,
String + ,
boolean + ,
int + ) +
Constructor These objects can be created (at translation time) by the TagExtraInfo instances. + + true +
+
true
JSP:JAVADOC:178Stringjakarta.servlet.jsp.tagext.VariableInfo.getVarName
+
Returns the name of the scripting variable + + true +
+
true
JSP:JAVADOC:179Stringjakarta.servlet.jsp.tagext.VariableInfo.getClassName
+
Returns the type of this variable + + true +
+
true
JSP:JAVADOC:180booleanjakarta.servlet.jsp.tagext.VariableInfo.getDeclare
+
Returns whether this is a new variable. + If so, in some languages this will require a declaration. + + true +
+
true
JSP:JAVADOC:181intjakarta.servlet.jsp.tagext.VariableInfo.getScope
+
Returns the lexical scope of the variable. + + + + + true +
+
true
JSP:JAVADOC:182ValidationMessagejakarta.servlet.jsp.tagext.ValidationMessage.ValidationMessage
+ + ( + String + ,
String + ) +
Create a ValidationMessage. + The message String should be non-null. The value of id may be null, if the message is not specific to any XML element, or if no jsp:id attributes were passed on. If non-null, the value of id must be the value of a jsp:id attribute for the PageData passed into the validate() method. + + true +
+
true
JSP:JAVADOC:183Stringjakarta.servlet.jsp.tagext.ValidationMessage.getId
+
Get the jsp:id. + Null means that there is no information available. + + true +
+
true
JSP:JAVADOC:184Stringjakarta.servlet.jsp.tagext.ValidationMessage.getMessage
+
Get the localized validation message. + + true +
+
true
JSP:JAVADOC:185TagVariableInfojakarta.servlet.jsp.tagext.TagVariableInfo.TagVariableInfo
+ + ( + String + ,
String + ,
String + ,
boolean + ,
int + ) +
Constructor for TagVariableInfo + + true +
+
true
JSP:JAVADOC:187Stringjakarta.servlet.jsp.tagext.TagVariableInfo.getNameGiven
+
The body of the <name-given> element + + true +
+
true
JSP:JAVADOC:188Stringjakarta.servlet.jsp.tagext.TagVariableInfo.getNameFromAttribute
+
The body of the <name-from-attribute> element. + This is the name of an attribute whose (translation-time) value will give the name of the variable. One of or is required. + + true +
+
true
JSP:JAVADOC:189Stringjakarta.servlet.jsp.tagext.TagVariableInfo.getClassName
+
The body of the <class-name> element. + + true +
+
true
JSP:JAVADOC:190booleanjakarta.servlet.jsp.tagext.TagVariableInfo.getDeclare
+
The body of the <declare> element + + true +
+
true
JSP:JAVADOC:191intjakarta.servlet.jsp.tagext.TagVariableInfo.getScope
+
The body of the <scope> element + + true +
+
true
JSP:JAVADOC:193TagSupportjakarta.servlet.jsp.tagext.TagSupport.TagSupport
+
Default constructor, all subclasses are required to define only a public constructor with the same signature, and to call the superclass constructor. + This constructor is called by the code generated by the JSP translator. + + true +
+
true
JSP:JAVADOC:194Tagjakarta.servlet.jsp.tagext.TagSupport.findAncestorWithClass
+ + ( + Tag + ,
Class + ) +
Find the instance of a given class type that is closest to a given instance. + This method uses the getParent method from the Tag interface. This method is used for coordination among cooperating tags. The current version of the specification only provides one formal way of indicating the observable type of a tag handler: its tag handler implementation class, described in the tag-class subelement of the tag element. This is extended in an informal manner by allowing the tag library author to indicate in the description subelement an observable type. The type should be a subtype of the tag handler implementation class or void. This addititional constraint can be exploited by a specialized container that knows about that specific tag library, as in the case of the JSP standard tag library. When a tag library author provides information on the observable type of a tag handler, client programmatic code should adhere to that constraint. Specifically, the Class passed to findAncestorWithClass should be a subtype of the observable type. + + true +
+
true
JSP:JAVADOC:195intjakarta.servlet.jsp.tagext.TagSupport.doStartTag
+
Default processing of the start tag, returning SKIP_BODY. + + + true +
+
true
JSP:JAVADOC:196intjakarta.servlet.jsp.tagext.TagSupport.doStartTag
+
throws + JspException
+
if an error occurs while processing this tagtrue +
+
false
JSP:JAVADOC:197intjakarta.servlet.jsp.tagext.TagSupport.doEndTag
+
Default processing of the end tag returning EVAL_PAGE. + + + true +
+
true
JSP:JAVADOC:198intjakarta.servlet.jsp.tagext.TagSupport.doEndTag
+
throws + JspException
+
if an error occurs while processing this tagtrue +
+
false
JSP:JAVADOC:199intjakarta.servlet.jsp.tagext.TagSupport.doAfterBody
+
Default processing for a body + + + true +
+
true
JSP:JAVADOC:200intjakarta.servlet.jsp.tagext.TagSupport.doAfterBody
+
throws + JspException
+
if an error occurs while processing this tagtrue +
+
false
JSP:JAVADOC:201voidjakarta.servlet.jsp.tagext.TagSupport.release
+
Release state. + + + true +
+
false
JSP:JAVADOC:202voidjakarta.servlet.jsp.tagext.TagSupport.setParent
+ + ( + Tag + ) +
Set the nesting tag of this tag. + + + true +
+
true
JSP:JAVADOC:203Tagjakarta.servlet.jsp.tagext.TagSupport.getParent
+
The Tag instance most closely enclosing this tag instance. + + + true +
+
true
JSP:JAVADOC:204voidjakarta.servlet.jsp.tagext.TagSupport.setId
+ + ( + String + ) +
Set the id attribute for this tag. + + true +
+
true
JSP:JAVADOC:205Stringjakarta.servlet.jsp.tagext.TagSupport.getId
+
The value of the id attribute of this tag; or null. + + true +
+
true
JSP:JAVADOC:206voidjakarta.servlet.jsp.tagext.TagSupport.setPageContext
+ + ( + PageContext + ) +
Set the page context. + + + true +
+
true
JSP:JAVADOC:207voidjakarta.servlet.jsp.tagext.TagSupport.setValue
+ + ( + String + ,
Object + ) +
Associate a value with a String key. + + true +
+
true
JSP:JAVADOC:208Objectjakarta.servlet.jsp.tagext.TagSupport.getValue
+ + ( + String + ) +
Get a the value associated with a key. + + true +
+
true
JSP:JAVADOC:209voidjakarta.servlet.jsp.tagext.TagSupport.removeValue
+ + ( + String + ) +
Remove a value associated with a key. + + true +
+
true
JSP:JAVADOC:210Enumerationjakarta.servlet.jsp.tagext.TagSupport.getValues
+
Enumerate the keys for the values kept by this tag handler. + + true +
+
true
JSP:JAVADOC:211TagLibraryValidatorjakarta.servlet.jsp.tagext.TagLibraryValidator.TagLibraryValidator
+
+
+
true +
+
true
JSP:JAVADOC:212voidjakarta.servlet.jsp.tagext.TagLibraryValidator.setInitParameters
+ + ( + Map + ) +
Set the init data in the TLD for this validator. + Parameter names are keys, and parameter values are the values. + + true +
+
true
JSP:JAVADOC:213Mapjakarta.servlet.jsp.tagext.TagLibraryValidator.getInitParameters
+
Get the init parameters data as an immutable Map. + Parameter names are keys, and parameter values are the values. + + true +
+
true
JSP:JAVADOC:214ValidationMessage[]jakarta.servlet.jsp.tagext.TagLibraryValidator.validate
+ + ( + String + ,
String + ,
PageData + ) +
Validate a JSP page. + This will get invoked once per directive in the JSP page. This method will return null if the page is valid; otherwise the method should return an array of ValidationMessage objects. An array of length zero is also interpreted as no errors. + + true +
+
true
JSP:JAVADOC:386ValidationMessage[]jakarta.servlet.jsp.tagext.TagLibraryValidator.validate
+ + ( + String + ,
String + ,
PageData + ) +
Validate a JSP page. + This will get invoked once per directive in the JSP page. An array of length greater than zero is interpreted as an error (translation error occurs). + + true +
+
true
JSP:JAVADOC:215voidjakarta.servlet.jsp.tagext.TagLibraryValidator.release
+
Release any data kept by this instance for validation purposes + + true +
+
true
JSP:JAVADOC:216Stringjakarta.servlet.jsp.tagext.TagLibraryInfo.getURI
+
The value of the uri attribute from the taglib directive for this library. + + true +
+
true
JSP:JAVADOC:218Stringjakarta.servlet.jsp.tagext.TagLibraryInfo.getPrefixString
+
The prefix assigned to this taglib from the taglib directive + + true +
+
true
JSP:JAVADOC:219Stringjakarta.servlet.jsp.tagext.TagLibraryInfo.getShortName
+
The preferred short name (prefix) as indicated in the TLD. + This may be used by authoring tools as the preferred prefix to use when creating an taglib directive for this library. + + true +
+
true
JSP:JAVADOC:220Stringjakarta.servlet.jsp.tagext.TagLibraryInfo.getReliableURN
+
The "reliable" URN indicated in the TLD (the uri element). + This may be used by authoring tools as a global identifier to use when creating a taglib directive for this library. + + true +
+
true
JSP:JAVADOC:221Stringjakarta.servlet.jsp.tagext.TagLibraryInfo.getInfoString
+
Information (documentation) for this TLD. + + true +
+
true
JSP:JAVADOC:222Stringjakarta.servlet.jsp.tagext.TagLibraryInfo.getRequiredVersion
+
A string describing the required version of the JSP container. + + + true +
+
true
JSP:JAVADOC:223TagInfo[]jakarta.servlet.jsp.tagext.TagLibraryInfo.getTags
+
An array describing the tags that are defined in this tag library. + + true +
+
true
JSP:JAVADOC:224TagFileInfo[]jakarta.servlet.jsp.tagext.TagLibraryInfo.getTagFiles
+
An array describing the tag files that are defined in this tag library. + + true +
+
true
JSP:JAVADOC:225TagInfojakarta.servlet.jsp.tagext.TagLibraryInfo.getTag
+ + ( + String + ) +
Get the TagInfo for a given tag name, looking through all the tags in this tag library. + Returns null if no tag is found. + + true +
+
true
JSP:JAVADOC:226TagFileInfojakarta.servlet.jsp.tagext.TagLibraryInfo.getTagFile
+ + ( + String + ) +
Get the TagFileInfo for a given tag name, looking through all the tag files in this tag library. + Returns null if no tag file is found. + + true +
+
true
JSP:JAVADOC:227FunctionInfo[]jakarta.servlet.jsp.tagext.TagLibraryInfo.getFunctions
+
An array describing the functions that are defined in this tag library. + + true +
+
true
JSP:JAVADOC:228FunctionInfojakarta.servlet.jsp.tagext.TagLibraryInfo.getFunction
+ + ( + String + ) +
Get the FunctionInfo for a given function name, looking through all the functions in this tag library. + + true +
+
true
JSP:JAVADOC:229TagInfojakarta.servlet.jsp.tagext.TagInfo.TagInfo
+ + ( + String + ,
String + ,
String + ,
String + ,
TagLibraryInfo + ,
TagExtraInfo + ,
TagAttributeInfo[] + ) +
Constructor for TagInfo from data in the JSP 2.0 format for TLD. + This class is to be instantiated only from the TagLibrary code under request from some JSP code that is parsing a TLD (Tag Library Descriptor). Note that, since TagLibibraryInfo reflects both TLD information and taglib directive information, a TagInfo instance is dependent on a taglib directive. This is probably a design error, which may be fixed in the future. + + true +
+
true
JSP:JAVADOC:230TagInfojakarta.servlet.jsp.tagext.TagInfo.TagInfo
+ + ( + String + ,
String + ,
String + ,
String + ,
TagLibraryInfo + ,
TagExtraInfo + ,
TagAttributeInfo[] + ,
String + ,
String + ,
String + ,
TagVariableInfo[] + ) +
Constructor for TagInfo from data in the JSP 1.2 format for TLD. + This class is to be instantiated only from the TagLibrary code under request from some JSP code that is parsing a TLD (Tag Library Descriptor). Note that, since TagLibibraryInfo reflects both TLD information and taglib directive information, a TagInfo instance is dependent on a taglib directive. This is probably a design error, which may be fixed in the future. + + true +
+
true
JSP:JAVADOC:231TagInfojakarta.servlet.jsp.tagext.TagInfo.TagInfo
+ + ( + String + ,
String + ,
String + ,
String + ,
TagLibraryInfo + ,
TagExtraInfo + ,
TagAttributeInfo[] + ,
String + ,
String + ,
String + ,
TagVariableInfo[] + ,
boolean + ) +
Constructor for TagInfo from data in the JSP 2.0 format for TLD. + This class is to be instantiated only from the TagLibrary code under request from some JSP code that is parsing a TLD (Tag Library Descriptor). Note that, since TagLibibraryInfo reflects both TLD information and taglib directive information, a TagInfo instance is dependent on a taglib directive. This is probably a design error, which may be fixed in the future. + + true +
+
true
JSP:JAVADOC:232Stringjakarta.servlet.jsp.tagext.TagInfo.getTagName
+
The name of the Tag. + + true +
+
true
JSP:JAVADOC:233TagAttributeInfo[]jakarta.servlet.jsp.tagext.TagInfo.getAttributes
+
Attribute information (in the TLD) on this tag. + The return is an array describing the attributes of this tag, as indicated in the TLD. or a zero-length array if the tag has no attributes. + + true +
+
true
JSP:JAVADOC:234VariableInfo[]jakarta.servlet.jsp.tagext.TagInfo.getVariableInfo
+ + ( + TagData + ) +
Information on the scripting objects created by this tag at runtime. + This is a convenience method on the associated TagExtraInfo class. Default is null if the tag has no "id" attribute, otherwise, {"id", Object} + + true +
+
true
JSP:JAVADOC:235booleanjakarta.servlet.jsp.tagext.TagInfo.isValid
+ + ( + TagData + ) +
Translation-time validation of the attributes. + This is a convenience method on the associated TagExtraInfo class. + + true +
+
true
JSP:JAVADOC:236ValidationMessage[]jakarta.servlet.jsp.tagext.TagInfo.validate
+ + ( + TagData + ) +
Translation-time validation of the attributes. + This is a convenience method on the associated TagExtraInfo class. + + true +
+
true
JSP:JAVADOC:237voidjakarta.servlet.jsp.tagext.TagInfo.setTagExtraInfo
+ + ( + TagExtraInfo + ) +
Set the instance for extra tag information + + true +
+
true
JSP:JAVADOC:238TagExtraInfojakarta.servlet.jsp.tagext.TagInfo.getTagExtraInfo
+
The instance (if any) for extra tag information + + true +
+
true
JSP:JAVADOC:239Stringjakarta.servlet.jsp.tagext.TagInfo.getTagClassName
+
Name of the class that provides the handler for this tag. + + true +
+
true
JSP:JAVADOC:240Stringjakarta.servlet.jsp.tagext.TagInfo.getBodyContent
+
The bodycontent information for this tag. If the bodycontent is not defined for thsi tag, the defaul of JSP will be returned. + + true +
+
true
JSP:JAVADOC:241Stringjakarta.servlet.jsp.tagext.TagInfo.getInfoString
+
The information string for the tag. + + true +
+
true
JSP:JAVADOC:242voidjakarta.servlet.jsp.tagext.TagInfo.setTagLibrary
+ + ( + TagLibraryInfo + ) +
Set the TagLibraryInfo property. + Note that a TagLibraryInfo element is dependent not just on the TLD information but also on the specific taglib instance used. This means that a fair amount of work needs to be done to construct and initialize TagLib objects. If used carefully, this setter can be used to avoid having to create new TagInfo elements for each taglib directive. + + true +
+
true
JSP:JAVADOC:243TagLibraryInfojakarta.servlet.jsp.tagext.TagInfo.getTagLibrary
+
The instance of TabLibraryInfo we belong to. + + true +
+
true
JSP:JAVADOC:244Stringjakarta.servlet.jsp.tagext.TagInfo.getDisplayName
+
Get the displayName or null if not defined. + + true +
+
true
JSP:JAVADOC:245Stringjakarta.servlet.jsp.tagext.TagInfo.getSmallIcon
+
Get the path to the small icon + + true +
+
true
JSP:JAVADOC:246Stringjakarta.servlet.jsp.tagext.TagInfo.getLargeIcon
+
Get the path to the large icon + + true +
+
true
JSP:JAVADOC:247TagVariableInfo[]jakarta.servlet.jsp.tagext.TagInfo.getTagVariableInfos
+
Get TagVariableInfo objects associated with this TagInfo + + true +
+
true
JSP:JAVADOC:248booleanjakarta.servlet.jsp.tagext.TagInfo.hasDynamicAttributes
+
Get dynamicAttributes associated with this TagInfo + + true +
+
true
JSP:JAVADOC:258TagFileInfojakarta.servlet.jsp.tagext.TagFileInfo.TagFileInfo
+ + ( + String + ,
String + ,
TagInfo + ) +
Constructor for TagFileInfo from data in the JSP 2.0 format for TLD. + This class is to be instantiated only from the TagLibrary code under request from some JSP code that is parsing a TLD (Tag Library Descriptor). Note that, since TagLibibraryInfo reflects both TLD information and taglib directive information, a TagFileInfo instance is dependent on a taglib directive. This is probably a design error, which may be fixed in the future. + + true +
+
true
JSP:JAVADOC:259Stringjakarta.servlet.jsp.tagext.TagFileInfo.getName
+
The unique action name of this tag. + + true +
+
true
JSP:JAVADOC:260Stringjakarta.servlet.jsp.tagext.TagFileInfo.getPath
+
Where to find the .tag file implementing this action. + + true +
+
true
JSP:JAVADOC:261TagInfojakarta.servlet.jsp.tagext.TagFileInfo.getTagInfo
+
Returns information about this tag, parsed from the directives in the tag file. + + true +
+
true
JSP:JAVADOC:262TagExtraInfojakarta.servlet.jsp.tagext.TagExtraInfo.TagExtraInfo
+
+
+
true +
+
true
JSP:JAVADOC:263VariableInfo[]jakarta.servlet.jsp.tagext.TagExtraInfo.getVariableInfo
+ + ( + TagData + ) +
information on scripting variables defined by the tag associated with this TagExtraInfo instance. + Request-time attributes are indicated as such in the TagData parameter. + + true +
+
true
JSP:JAVADOC:264booleanjakarta.servlet.jsp.tagext.TagExtraInfo.isValid
+ + ( + TagData + ) +
Translation-time validation of the attributes. + Request-time attributes are indicated as such in the TagData parameter. Note that the preferred way to do validation is with the validate() method, since it can return more detailed information. + + + true +
+
true
JSP:JAVADOC:265ValidationMessage[]jakarta.servlet.jsp.tagext.TagExtraInfo.validate
+ + ( + TagData + ) +
Translation-time validation of the attributes. + Request-time attributes are indicated as such in the TagData parameter. Because of the higher quality validation messages possible, this is the preferred way to do validation (although isValid() still works). JSP 2.0 and higher containers call validate() instead of isValid(). The default implementation of this method is to call isValid(). If isValid() returns false, a generic ValidationMessage[] is returned indicating isValid() returned false. + + true +
+
true
JSP:JAVADOC:266voidjakarta.servlet.jsp.tagext.TagExtraInfo.setTagInfo
+ + ( + TagInfo + ) +
Set the TagInfo for this class. + + true +
+
true
JSP:JAVADOC:267TagInfojakarta.servlet.jsp.tagext.TagExtraInfo.getTagInfo
+
Get the TagInfo for this class. + + true +
+
true
JSP:JAVADOC:268TagDatajakarta.servlet.jsp.tagext.TagData.TagData
+ + ( + Object[][] + ) +
Constructor for TagData. + A typical constructor may be static final Object[][] att = {{"connection", "conn0"}, {"id", "query0"}}; static final TagData td = new TagData(att); All values must be Strings except for those holding the distinguished object REQUEST_TIME_VALUE. + + true +
+
true
JSP:JAVADOC:269TagDatajakarta.servlet.jsp.tagext.TagData.TagData
+ + ( + Hashtable + ) +
Constructor for a TagData. + If you already have the attributes in a hashtable, use this constructor. + + true +
+
true
JSP:JAVADOC:270Stringjakarta.servlet.jsp.tagext.TagData.getId
+
The value of the tag's id attribute. + + true +
+
true
JSP:JAVADOC:271Objectjakarta.servlet.jsp.tagext.TagData.getAttribute
+ + ( + String + ) +
The value of the attribute. If a static value is specified for an attribute that accepts a request-time attribute expression then that static value is returned even if the value is provided in the body of an action. The distinguised object REQUEST_TIME_VALUE is only returned if the value is specified as a request-time attribute expression or via the jsp:attribute action with a body that contains dynamic content (scripts, scripting expressions, EL expressions, standard actions, or custom actions).true +
+
true
JSP:JAVADOC:272voidjakarta.servlet.jsp.tagext.TagData.setAttribute
+ + ( + String + ,
Object + ) +
Set the value of an attribute. + + true +
+
true
JSP:JAVADOC:273Stringjakarta.servlet.jsp.tagext.TagData.getAttributeString
+ + ( + String + ) +
Get the value for a given attribute. + + true +
+
true
JSP:JAVADOC:274Stringjakarta.servlet.jsp.tagext.TagData.getAttributeString
+ + ( + String + ) +
throws + ClassCastException
+
if attribute value is not a Stringtrue +
+
true
JSP:JAVADOC:275Enumerationjakarta.servlet.jsp.tagext.TagData.getAttributes
+
Enumerates the attributes. + + true +
+
true
JSP:JAVADOC:276TagAttributeInfojakarta.servlet.jsp.tagext.TagAttributeInfo.TagAttributeInfo
+ + ( + String + ,
boolean + ,
String + ,
boolean + ) +
Constructor for TagAttributeInfo. + This class is to be instantiated only from the TagLibrary code under request from some JSP code that is parsing a TLD (Tag Library Descriptor). + + true +
+
true
JSP:JAVADOC:277TagAttributeInfojakarta.servlet.jsp.tagext.TagAttributeInfo.TagAttributeInfo
+ + ( + String + ,
boolean + ,
String + ,
boolean + ,
boolean + ) +
JSP 2.0 Constructor for TagAttributeInfo. + This class is to be instantiated only from the TagLibrary code under request from some JSP code that is parsing a TLD (Tag Library Descriptor). + + true +
+
true
JSP:JAVADOC:278Stringjakarta.servlet.jsp.tagext.TagAttributeInfo.getName
+
The name of this attribute. + + true +
+
true
JSP:JAVADOC:279Stringjakarta.servlet.jsp.tagext.TagAttributeInfo.getTypeName
+
The type (as a String) of this attribute. + + true +
+
true
JSP:JAVADOC:280booleanjakarta.servlet.jsp.tagext.TagAttributeInfo.canBeRequestTime
+
Whether this attribute can hold a request-time value. + + true +
+
true
JSP:JAVADOC:281booleanjakarta.servlet.jsp.tagext.TagAttributeInfo.isRequired
+
Whether this attribute is required. + + true +
+
true
JSP:JAVADOC:282TagAttributeInfojakarta.servlet.jsp.tagext.TagAttributeInfo.getIdAttribute
+ + ( + TagAttributeInfo[] + ) +
Convenience static method that goes through an array of TagAttributeInfo objects and looks for "id". + + true +
+
true
JSP:JAVADOC:283booleanjakarta.servlet.jsp.tagext.TagAttributeInfo.isFragment
+
Whether this attribute is of type JspFragment + + true +
+
true
JSP:JAVADOC:284Stringjakarta.servlet.jsp.tagext.TagAttributeInfo.toString
+
Returns a String representation of this TagAttributeInfo, suitable for debugging purposes. + + true +
+
true
JSP:JAVADOC:285TagAdapterjakarta.servlet.jsp.tagext.TagAdapter.TagAdapter
+ + ( + SimpleTag + ) +
Creates a new TagAdapter that wraps the given SimeplTag and returns the parent tag when getParent() is called. + + true +
+
true
JSP:JAVADOC:286voidjakarta.servlet.jsp.tagext.TagAdapter.setPageContext
+ + ( + PageContext + ) +
Must not be called. + + true +
+
true
JSP:JAVADOC:287voidjakarta.servlet.jsp.tagext.TagAdapter.setPageContext
+ + ( + PageContext + ) +
throws + UnsupportedOperationException
+
Must not be calledtrue +
+
true
JSP:JAVADOC:288voidjakarta.servlet.jsp.tagext.TagAdapter.setParent
+ + ( + Tag + ) +
Must not be called. + The parent of this tag is always getAdaptee().getParent(). + + true +
+
true
JSP:JAVADOC:289voidjakarta.servlet.jsp.tagext.TagAdapter.setParent
+ + ( + Tag + ) +
throws + UnsupportedOperationException
+
Must not be called.true +
+
true
JSP:JAVADOC:290Tagjakarta.servlet.jsp.tagext.TagAdapter.getParent
+
Returns the value passed to setParent(). + This will either be the enclosing Tag (if parent implements Tag), or an adapter to the enclosing Tag (if parent does not implement Tag). + + true +
+
true
JSP:JAVADOC:291JspTagjakarta.servlet.jsp.tagext.TagAdapter.getAdaptee
+
Gets the tag that is being adapted to the Tag interface. + This should be an instance of SimpleTag in JSP 2.0, but room is left for other kinds of tags in future spec versions. + + true +
+
true
JSP:JAVADOC:292intjakarta.servlet.jsp.tagext.TagAdapter.doStartTag
+
Must not be called. + + true +
+
false
JSP:JAVADOC:293intjakarta.servlet.jsp.tagext.TagAdapter.doStartTag
+
throws + JspException
+
never throwntrue +
+
false
JSP:JAVADOC:294intjakarta.servlet.jsp.tagext.TagAdapter.doStartTag
+
throws + UnsupportedOperationException
+
Must not be calledtrue +
+
false
JSP:JAVADOC:295intjakarta.servlet.jsp.tagext.TagAdapter.doEndTag
+
Must not be called. + + true +
+
false
JSP:JAVADOC:296intjakarta.servlet.jsp.tagext.TagAdapter.doEndTag
+
throws + JspException
+
never throwntrue +
+
false
JSP:JAVADOC:297intjakarta.servlet.jsp.tagext.TagAdapter.doEndTag
+
throws + UnsupportedOperationException
+
Must not be calledtrue +
+
false
JSP:JAVADOC:298voidjakarta.servlet.jsp.tagext.TagAdapter.release
+
Must not be called. + + true +
+
false
JSP:JAVADOC:299voidjakarta.servlet.jsp.tagext.TagAdapter.release
+
throws + UnsupportedOperationException
+
Must not be calledtrue +
+
false
JSP:JAVADOC:300SimpleTagSupportjakarta.servlet.jsp.tagext.SimpleTagSupport.SimpleTagSupport
+
+
+
true +
+
true
JSP:JAVADOC:301voidjakarta.servlet.jsp.tagext.SimpleTagSupport.doTag
+
Default processing of the tag does nothing. + + + true +
+
true
JSP:JAVADOC:302voidjakarta.servlet.jsp.tagext.SimpleTagSupport.doTag
+
throws + JspException
+
Subclasses can throw JspException to indicate an error occurred while processing this tag.true +
+
false
JSP:JAVADOC:303voidjakarta.servlet.jsp.tagext.SimpleTagSupport.doTag
+
throws + IOException
+
Subclasses can throw IOException if there was an error writing to the output streamtrue +
+
false
JSP:JAVADOC:304voidjakarta.servlet.jsp.tagext.SimpleTagSupport.doTag
+
throws + SkipPageException
+
If the page that (either directly or indirectly) invoked this tag is to cease evaluation. A Simple Tag Handler generated from a tag file must throw this exception if an invoked Classic Tag Handler returned SKIP_PAGE or if an invoked Simple Tag Handler threw SkipPageException or if an invoked Jsp Fragment threw a SkipPageException.true +
+
true
JSP:JAVADOC:305voidjakarta.servlet.jsp.tagext.SimpleTagSupport.setParent
+ + ( + JspTag + ) +
Sets the parent of this tag, for collaboration purposes. + + true +
+
true
JSP:JAVADOC:306JspTagjakarta.servlet.jsp.tagext.SimpleTagSupport.getParent
+
Returns the parent of this tag, for collaboration purposes. + + true +
+
true
JSP:JAVADOC:307voidjakarta.servlet.jsp.tagext.SimpleTagSupport.setJspContext
+ + ( + JspContext + ) +
Stores the provided JSP context in the protected jspContext field. + + + true +
+
true
JSP:JAVADOC:308JspContextjakarta.servlet.jsp.tagext.SimpleTagSupport.getJspContext
+
Returns the page context passed in by the container via setJspContext. + + true +
+
true
JSP:JAVADOC:309voidjakarta.servlet.jsp.tagext.SimpleTagSupport.setJspBody
+ + ( + JspFragment + ) +
Stores the provided JspFragment. + + + true +
+
true
JSP:JAVADOC:310JspFragmentjakarta.servlet.jsp.tagext.SimpleTagSupport.getJspBody
+
Returns the body passed in by the container via setJspBody + + true +
+
true
JSP:JAVADOC:311JspTagjakarta.servlet.jsp.tagext.SimpleTagSupport.findAncestorWithClass
+ + ( + JspTag + ,
Class + ) +
Find the instance of a given class type that is closest to a given instance. + This method uses the getParent method from the Tag and/or SimpleTag interfaces. This method is used for coordination among cooperating tags. For every instance of TagAdapter encoutnered will traversing the ancestors the tag handler returned by TagAdapter.getAdatpee() - instead of the TagAdapter itself - is compared to klass. If the tag handler matches it - and not its TagAdapter - is returned. The current version of the specification only provides one formal way of indicating the observable type of a tag handler: its tag handler implementation class, described in the tag-class subelement of the tag element. This is extended in an informal manner by allowing the tag library author to indicate in the description subelement an observable type. The type should be a subtype of the tag handler implementation class or void. This addititional constraint can be exploited by a specialized container that knows about that specific tag library, as in the case of the JSP standard tag library. When a tag library author provides information on the observable type of a tag handler, client programmatic code should adhere to that constraint. Specifically, the Class passed to findAncestorWithClass should be a subtype of the observable type. + + true +
+
true
JSP:JAVADOC:312PageDatajakarta.servlet.jsp.tagext.PageData.PageData
+
+
+
true +
+
true
JSP:JAVADOC:313InputStreamjakarta.servlet.jsp.tagext.PageData.getInputStream
+
Returns an input stream on the XML view of a JSP page. The stream is encoded in UTF-8. + Recall tht the XML view of a JSP page has the include directives expanded. + + true +
+
true
JSP:JAVADOC:314FunctionInfojakarta.servlet.jsp.tagext.FunctionInfo.FunctionInfo
+ + ( + String + ,
String + ,
String + ) +
Constructor for FunctionInfo. + + true +
+
true
JSP:JAVADOC:315Stringjakarta.servlet.jsp.tagext.FunctionInfo.getName
+
The name of the function. + + true +
+
true
JSP:JAVADOC:316Stringjakarta.servlet.jsp.tagext.FunctionInfo.getFunctionClass
+
The class of the function. + + true +
+
true
JSP:JAVADOC:317Stringjakarta.servlet.jsp.tagext.FunctionInfo.getFunctionSignature
+
The signature of the function. + + true +
+
true
JSP:JAVADOC:318BodyTagSupportjakarta.servlet.jsp.tagext.BodyTagSupport.BodyTagSupport
+
Default constructor, all subclasses are required to only define a public constructor with the same signature, and to call the superclass constructor. + This constructor is called by the code generated by the JSP translator. + + true +
+
true
JSP:JAVADOC:319intjakarta.servlet.jsp.tagext.BodyTagSupport.doStartTag
+
Default processing of the start tag returning EVAL_BODY_BUFFERED + + + true +
+
true
JSP:JAVADOC:320intjakarta.servlet.jsp.tagext.BodyTagSupport.doStartTag
+
throws + JspException
+
if an error occurred while processing this tagtrue +
+
false
JSP:JAVADOC:321intjakarta.servlet.jsp.tagext.BodyTagSupport.doEndTag
+
Default processing of the end tag returning EVAL_PAGE. + + + true +
+
true
JSP:JAVADOC:322intjakarta.servlet.jsp.tagext.BodyTagSupport.doEndTag
+
throws + JspException
+
if an error occurred while processing this tagtrue +
+
false
JSP:JAVADOC:323voidjakarta.servlet.jsp.tagext.BodyTagSupport.setBodyContent
+ + ( + BodyContent + ) +
Prepare for evaluation of the body: stash the bodyContent away. + + + + + true +
+
true
JSP:JAVADOC:324voidjakarta.servlet.jsp.tagext.BodyTagSupport.doInitBody
+
Prepare for evaluation of the body just before the first body evaluation: no action. + + + + + true +
+
true
JSP:JAVADOC:325voidjakarta.servlet.jsp.tagext.BodyTagSupport.doInitBody
+
throws + JspException
+
if an error occurred while processing this tagtrue +
+
false
JSP:JAVADOC:326intjakarta.servlet.jsp.tagext.BodyTagSupport.doAfterBody
+
After the body evaluation: do not reevaluate and continue with the page. + By default nothing is done with the bodyContent data (if any). + + + + true +
+
true
JSP:JAVADOC:327intjakarta.servlet.jsp.tagext.BodyTagSupport.doAfterBody
+
throws + JspException
+
if an error occurred while processing this tagtrue +
+
false
JSP:JAVADOC:328voidjakarta.servlet.jsp.tagext.BodyTagSupport.release
+
Release state. + + + true +
+
false
JSP:JAVADOC:329BodyContentjakarta.servlet.jsp.tagext.BodyTagSupport.getBodyContent
+
Get current bodyContent. + + true +
+
true
JSP:JAVADOC:330JspWriterjakarta.servlet.jsp.tagext.BodyTagSupport.getPreviousOut
+
Get surrounding out JspWriter. + + true +
+
true
JSP:JAVADOC:331voidjakarta.servlet.jsp.tagext.BodyContent.flush
+
Redefined flush() so it is not legal. + It is not valid to flush a BodyContent because there is no backing stream behind it. + + true +
+
false
JSP:JAVADOC:332voidjakarta.servlet.jsp.tagext.BodyContent.flush
+
throws + IOException
+
always throwntrue +
+
true
JSP:JAVADOC:333voidjakarta.servlet.jsp.tagext.BodyContent.clearBody
+
Clear the body without throwing any exceptions. + + true +
+
true
JSP:JAVADOC:334Readerjakarta.servlet.jsp.tagext.BodyContent.getReader
+
Return the value of this BodyContent as a Reader. + + true +
+
true
JSP:JAVADOC:335Stringjakarta.servlet.jsp.tagext.BodyContent.getString
+
Return the value of the BodyContent as a String. + + true +
+
true
JSP:JAVADOC:336voidjakarta.servlet.jsp.tagext.BodyContent.writeOut
+ + ( + Writer + ) +
Write the contents of this BodyContent into a Writer. + Subclasses may optimize common invocation patterns. + + true +
+
true
JSP:JAVADOC:337voidjakarta.servlet.jsp.tagext.BodyContent.writeOut
+ + ( + Writer + ) +
throws + IOException
+
if an I/O error occurred while writing the contents of this BodyContent to the given Writertrue +
+
false
JSP:JAVADOC:338JspWriterjakarta.servlet.jsp.tagext.BodyContent.getEnclosingWriter
+
Get the enclosing JspWriter. + + true +
+
true
JSP:JAVADOC:339voidjakarta.servlet.jsp.tagext.TryCatchFinally.doCatch
+ + ( + Throwable + ) +
Invoked if a Throwable occurs while evaluating the BODY inside a tag or in any of the following methods: Tag.doStartTag(), Tag.doEndTag(), IterationTag.doAfterBody() and BodyTag.doInitBody(). + This method is not invoked if the Throwable occurs during one of the setter methods. This method may throw an exception (the same or a new one) that will be propagated further up the nest chain. If an exception is thrown, doFinally() will be invoked. This method is intended to be used to respond to an exceptional condition. + + true +
+
true
JSP:JAVADOC:340voidjakarta.servlet.jsp.tagext.TryCatchFinally.doCatch
+ + ( + Throwable + ) +
throws + Throwable
+
Throwable if the exception is to be rethrown further up the next chaintrue +
+
false
JSP:JAVADOC:341voidjakarta.servlet.jsp.tagext.TryCatchFinally.doFinally
+
Invoked in all cases after doEndTag() for any class implementing Tag, IterationTag or BodyTag. + This method is invoked even if an exception has occurred in the BODY of the tag, or in any of the following methods: Tag.doStartTag(), Tag.doEndTag(), IterationTag.doAfterBody() and BodyTag.doInitBody(). This method is not invoked if the Throwable occurs during one of the setter methods. This method should not throw an Exception. This method is intended to maintain per-invocation data integrity and resource management actions. + + true +
+
true
JSP:JAVADOC:342voidjakarta.servlet.jsp.tagext.Tag.setPageContext
+ + ( + PageContext + ) +
Set the current page context. + This method is invoked by the JSP page implementation object prior to doStartTag(). This value is *not* reset by doEndTag() and must be explicitly reset by a page implementation if it changes between calls to doStartTag(). + + true +
+
true
JSP:JAVADOC:343voidjakarta.servlet.jsp.tagext.Tag.setParent
+ + ( + Tag + ) +
Set the parent (closest enclosing tag handler) of this tag handler. + Invoked by the JSP page implementation object prior to doStartTag(). This value is *not* reset by doEndTag() and must be explicitly reset by a page implementation. + + true +
+
true
JSP:JAVADOC:344Tagjakarta.servlet.jsp.tagext.Tag.getParent
+
Get the parent (closest enclosing tag handler) for this tag handler. + The getParent() method can be used to navigate the nested tag handler structure at runtime for cooperation among custom actions; for example, the findAncestorWithClass() method in TagSupport provides a convenient way of doing this. The current version of the specification only provides one formal way of indicating the observable type of a tag handler: its tag handler implementation class, described in the tag-class subelement of the tag element. This is extended in an informal manner by allowing the tag library author to indicate in the description subelement an observable type. The type should be a subtype of the tag handler implementation class or void. This addititional constraint can be exploited by a specialized container that knows about that specific tag library, as in the case of the JSP standard tag library. + + + true +
+
true
JSP:JAVADOC:345intjakarta.servlet.jsp.tagext.Tag.doStartTag
+
Process the start tag for this instance. + This method is invoked by the JSP page implementation object. The doStartTag method assumes that the properties pageContext and parent have been set. It also assumes that any properties exposed as attributes have been set too. When this method is invoked, the body has not yet been evaluated. When a Tag returns EVAL_BODY_INCLUDE the result of evaluating the body (if any) is included into the current "out" JspWriter as it happens and then doEndTag() is invoked. + true +
+
true
JSP:JAVADOC:346intjakarta.servlet.jsp.tagext.Tag.doStartTag
+
Process the start tag for this instance. + This method is invoked by the JSP page implementation object. The doStartTag method assumes that the properties pageContext and parent have been set. It also assumes that any properties exposed as attributes have been set too. When this method is invoked, the body has not yet been evaluated. Returning BodyTag.EVAL_BODY_BUFFERED is only valid if the tag handler implements BodyTag. + true +
+
true
JSP:JAVADOC:347intjakarta.servlet.jsp.tagext.Tag.doStartTag
+
Process the start tag for this instance. + This method is invoked by the JSP page implementation object. The doStartTag method assumes that the properties pageContext and parent have been set. It also assumes that any properties exposed as attributes have been set too. When this method is invoked, the body has not yet been evaluated. When SKIP_PAGE is returned, the processing of the page will cease and no remainder tag methods, such as doEndTag() will be called within this JSP page implementation object. + true +
+
true
JSP:JAVADOC:348intjakarta.servlet.jsp.tagext.Tag.doStartTag
+
The JSP container will recynchronize the values of any AT_EBING and NESTED variables (defined by the associated TagExtraInfo or TLD) after the invocation of doStartTag() except for a tag handler implementing BodyTag whose doStartTag() method returns BodyTag.EVAL_BODY_BUFFERED. true +
+
true
JSP:JAVADOC:349intjakarta.servlet.jsp.tagext.Tag.doStartTag
+
throws + JspException
+
if an error occurred while processing this tagtrue +
+
false
JSP:JAVADOC:350intjakarta.servlet.jsp.tagext.Tag.doEndTag
+
Process the end tag for this instance. + This method is invoked by the JSP page implementation object on all Tag handlers. This method will be called after returning from doStartTag. The body of the action may or may not have been evaluated, depending on the return value of doStartTag. If this method returns EVAL_PAGE, the rest of the page continues to be evaluated. + true +
+
true
JSP:JAVADOC:351intjakarta.servlet.jsp.tagext.Tag.doEndTag
+
Process the end tag for this instance. + This method is invoked by the JSP page implementation object on all Tag handlers. This method will be called after returning from doStartTag. The body of the action may or may not have been evaluated, depending on the return value of doStartTag. If this method returns SKIP_PAGE, the rest of the page is not evaluated, the request is completed, and the doEndTag() methods of enclosing tags are not invoked. If this request was forwarded or included from another page (or Servlet), only the current page evaluation is stopped. + true +
+
true
JSP:JAVADOC:352intjakarta.servlet.jsp.tagext.Tag.doEndTag
+
Process the end tag for this instance. + This method is invoked by the JSP page implementation object on all Tag handlers. This method will be called after returning from doStartTag. The body of the action may or may not have been evaluated, depending on the return value of doStartTag. If this method returns EVAL_PAGE, the rest of the page continues to be evaluated. If this method returns SKIP_PAGE, the rest of the page is not evaluated, the request is completed, and the doEndTag() methods of enclosing tags are not invoked. If this request was forwarded or included from another page (or Servlet), only the current page evaluation is stopped. The JSP container will resynchronize any variable values that are indicated as so in TagExtraInfo after the invocation of doEndTag(). + + true +
+
true
JSP:JAVADOC:353intjakarta.servlet.jsp.tagext.Tag.doEndTag
+
The JSP container will resynchronize the values of any AT_BEGIN and AT_END variables (defined by the assocaited TagExtraInfo or TLD) after the invocation of doEndTag().true +
+
true
JSP:JAVADOC:354intjakarta.servlet.jsp.tagext.Tag.doEndTag
+
throws + JspException
+
if an error occurred while processing this tagtrue +
+
true
JSP:JAVADOC:355voidjakarta.servlet.jsp.tagext.Tag.release
+
Called on a Tag handler to release state. + The page compiler guarantees that JSP page implementation objects will invoke this method on all tag handlers, but there may be multiple invocations on doStartTag and doEndTag in between. + + true +
+
false
JSP:JAVADOC:356voidjakarta.servlet.jsp.tagext.SimpleTag.doTag
+
Called by the container to invoke this tag. + The implementation of this method is provided by the tag library developer, and handles all tag processing, body iteration, etc. + + true +
+
true
JSP:JAVADOC:400voidjakarta.servlet.jsp.tagext.SimpleTag.doTag
+
The JSP container will recynchronize any AT_BEGIN and AT_END variables (defined by the associated tag file TagExtraInfo or TLD) after the invocation of doTag().true +
+
true
JSP:JAVADOC:357voidjakarta.servlet.jsp.tagext.SimpleTag.doTag
+
throws + JspException
+
If an error occurred while processing this tag.true +
+
false
JSP:JAVADOC:358voidjakarta.servlet.jsp.tagext.SimpleTag.doTag
+
throws + IOException
+
If there was an error writing to the output stream.true +
+
false
JSP:JAVADOC:359voidjakarta.servlet.jsp.tagext.SimpleTag.doTag
+
throws + SkipPageException
+
If the page that (either directly or indirectly) invoked this tag is to cease evaluation. A Simple Tag Handler generated from a tag file must throw this exception if an invoked Classic Tag Handler returned SKIP_PAGE or if an invoked Simple Tag Handler threw SkipPageException or if an invoked Jsp Fragment threw a SkipPageException.true +
+
true
JSP:JAVADOC:360voidjakarta.servlet.jsp.tagext.SimpleTag.setParent
+ + ( + JspTag + ) +
Sets the parent of this tag, for collaboration purposes. + + true +
+
true
JSP:JAVADOC:361JspTagjakarta.servlet.jsp.tagext.SimpleTag.getParent
+
Returns the parent of this tag, for collaboration purposes. + + true +
+
true
JSP:JAVADOC:362voidjakarta.servlet.jsp.tagext.SimpleTag.setJspContext
+ + ( + JspContext + ) +
Stores the provided JSP context in the protected jspContext field. + + + true +
+
true
JSP:JAVADOC:363voidjakarta.servlet.jsp.tagext.SimpleTag.setJspBody
+ + ( + JspFragment + ) +
Provides the body of this tag as a JspFragment object, able to be invoked zero or more times by the tag handler. + This method is invoked by the JSP page implementation object prior to doTag(). + + true +
+
true
JSP:JAVADOC:403JspFragmentjakarta.servlet.jsp.tagext.JspFragment.JspFragment
+
+
+
true +
+
true
JSP:JAVADOC:404JspContextjakarta.servlet.jsp.tagext.JspFragment.getJspContext
+
Returns the JspContext that is bound to this JspFragment.true +
+
true
JSP:JAVADOC:382voidjakarta.servlet.jsp.tagext.JspFragment.invoke
+ + ( + Writer + ) +
Executes the fragment and directs all output to the given Writer, or the JspWriter returned by the getOut() method of the JspContext associated with the fragment if out is null.true +
+
true
JSP:JAVADOC:401voidjakarta.servlet.jsp.tagext.JspFragment.invoke
+ + ( + Writer + ) +
throws + JspException
+
Thrown if an error occured while invoking this fragment.true +
+
true
JSP:JAVADOC:402voidjakarta.servlet.jsp.tagext.JspFragment.invoke
+ + ( + Writer + ) +
throws + IOException
+
If there was an error writing to the stream.true +
+
true
JSP:JAVADOC:367voidjakarta.servlet.jsp.tagext.JspFragment.invoke
+ + ( + Writer + ) +
throws + SkipPageException
+
Thrown if the page that (either directly or indirectly) invoked the tag handler that invoked this fragment is to cease evaluation. The container must throw this exception if a Classic Tag Handler returned Tag.SKIP_PAGE or if a Simple Tag Handler threw SkipPageException.true +
+
true
JSP:JAVADOC:368intjakarta.servlet.jsp.tagext.IterationTag.doAfterBody
+
Process body (re)evaluation. + This method is invoked by the JSP Page implementation object after every evaluation of the body into the BodyEvaluation object. The method is not invoked if there is no body evaluation. + true +
+
true
JSP:JAVADOC:369intjakarta.servlet.jsp.tagext.IterationTag.doAfterBody
+
Process body (re)evaluation. + This method is invoked by the JSP Page implementation object after every evaluation of the body into the BodyEvaluation object. If doAfterBody returns EVAL_BODY_AGAIN, a new evaluation of the body will happen (followed by another invocation of doAfterBody). + true +
+
true
JSP:JAVADOC:386intjakarta.servlet.jsp.tagext.IterationTag.doAfterBody
+
Process body (re)evaluation. + This method is invoked by the JSP Page implementation object after every evaluation of the body into the BodyEvaluation object. If doAfterBody returns SKIP_PAGE no more body evaluations will occur and the doEndTag method will be invoked. + true +
+
true
JSP:JAVADOC:370intjakarta.servlet.jsp.tagext.IterationTag.doAfterBody
+
throws + JspException
+
+
+
true +
+
false
JSP:JAVADOC:371intjakarta.servlet.jsp.tagext.IterationTag.doAfterBody
+
+ The JSP container will resynchronize the values of any AT_BEGIN and NESTED variables (defined by the associated TagExtraInfo or TLD) after the invocation of doAfterBody(). + true +
+
true
JSP:JAVADOC:372voidjakarta.servlet.jsp.tagext.DynamicAttributes.setDynamicAttribute
+ + ( + String + ,
String + ,
Object + ) +
Called when a tag declared to accept dynamic attributes is passed an attribute that is not declared in the Tag Library Descriptor. + + true +
+
true
JSP:JAVADOC:373voidjakarta.servlet.jsp.tagext.DynamicAttributes.setDynamicAttribute
+ + ( + String + ,
String + ,
Object + ) +
throws + JspException
+
if the tag handler wishes to signal that it does not accept the given attribute. The container must not call doStartTag() or doTag() for this tag.true +
+
false
JSP:JAVADOC:374voidjakarta.servlet.jsp.tagext.BodyTag.setBodyContent
+ + ( + BodyContent + ) +
Set the bodyContent property. + This method is invoked by the JSP page implementation object at most once per action invocation. This method will be invoked before doInitBody. This method will not be invoked for empty tags or for non-empty tags whose doStartTag() method returns SKIP_BODY or EVAL_BODY_INCLUDE. When setBodyContent is invoked, the value of the implicit object out has already been changed in the pageContext object. The BodyContent object passed will have not data on it but may have been reused (and cleared) from some previous invocation. The BodyContent object is available and with the appropriate content until after the invocation of the doEndTag method, at which case it may be reused. + true +
+
true
JSP:JAVADOC:375voidjakarta.servlet.jsp.tagext.BodyTag.doInitBody
+
Prepare for evaluation of the body. + This method is invoked by the JSP page implementation object after setBodyContent and before the first time the body is to be evaluated. + true +
+
true
JSP:JAVADOC:376voidjakarta.servlet.jsp.tagext.BodyTag.doInitBody
+
Prepare for evaluation of the body. + This method will not be invoked for empty tags or for non-empty tags whose doStartTag() method returns SKIP_BODY or EVAL_BODY_INCLUDE. + true +
+
true
JSP:JAVADOC:377voidjakarta.servlet.jsp.tagext.BodyTag.doInitBody
+
The JSP container will resynchronize the values if AT_BEGIN and NESTED variabled (defined by the associated TagExtraInfo or TLD) after the invfocation of doInitBody().true +
+
true
JSP:JAVADOC:378voidjakarta.servlet.jsp.tagext.BodyTag.doInitBody
+
throws + JspException
+
If an error occurred while processing this tagtrue +
+
false
JSP:JAVADOC:406voidjakarta.servlet.jsp.HttpJspPage._jspService
+ + ( + HttpServletRequest + ,
HttpServletResponse + ) +
The _jspService()method corresponds to the body of the JSP page. + This method is defined automatically by the JSP container and should never be defined by the JSP page author. If a superclass is specified using the extends attribute, that superclass may choose to perform some actions in its service() method before or after calling the _jspService() method. See using the extends attribute in the JSP_Engine chapter of the JSP specification. + + true +
+
true
JSP:JAVADOC:407voidjakarta.servlet.jsp.HttpJspPage._jspService
+ + ( + HttpServletRequest + ,
HttpServletResponse + ) +
throws + ServletException
+
Thrown if an error occurred during the processing of the JSP and that the container should take appropriate action to clean up the request.true +
+
true
JSP:JAVADOC:408voidjakarta.servlet.jsp.HttpJspPage._jspService
+ + ( + HttpServletRequest + ,
HttpServletResponse + ) +
throws + IOException
+
Thrown if an error occurred while writing the response for this page.true +
+
true
JSP:JAVADOC:409voidjakarta.servlet.jsp.JspApplicationContext.addELContextListener
+ + ( + ELContextListener + ) +
Registers a ELContextListeners so that context objects can be added whenever a new ELContext is created. + + At a minimum, the ELContext objects created will contain a reference to the JspContext for this request, which is added by the JSP container. This is sufficient for all the default ELResolvers listed in #addELResolver. Note that JspContext.class is used as the key to ELContext.putContext() for the JspContext object reference. This method is generally used by frameworks and applications that register their own ELResolver that needs context other than JspContext. The listener will typically add the necessary context to the ELContext provided in the event object. Registering a listener that adds context allows the ELResolvers in the stack to access the context they need when they do a resolution. + + true +
+
true
JSP:JAVADOC:410voidjakarta.servlet.jsp.JspApplicationContext.addELResolver
+ + ( + ELResolver + ) +
Adds an ELResolver to affect the way EL variables and properties are resolved for EL expressions appearing in JSP pages and tag files. + + + + + + + For example, in the EL expression ${employee.lastName}, an ELResolver determines what object "employee" references and how to find its "lastName" property. When evaluating an expression, the JSP container will consult a set of standard resolvers as well as any resolvers registered via this method. The set of resolvers are consulted in the following order: jakarta.servlet.jsp.el.ImplicitObjectELResolver ELResolvers registered via this method, in the order in which they are registered. jakarta.el.MapELResolverjakarta.el.ListELResolverjakarta.el.ArrayELResolverjakarta.el.BeanELResolverjakarta.servlet.jsp.el.ScopedAttributeELResolver It is illegal to register an ELResolver after the application has received any request from the client. If an attempt is made to register an ELResolver after that time, an IllegalStateException is thrown. This restriction is in place to allow the JSP container to optimize for the common case where no additional ELResolvers are in the chain, aside from the standard ones. It is permissible to add ELResolvers before or after initialization to a CompositeELResolver that is already in the chain. It is not possible to remove an ELResolver registered with this method, once it has been registered. + + true +
+
true
JSP:JAVADOC:411ExpressionFactoryjakarta.servlet.jsp.JspApplicationContext.getExpressionFactory
+
Returns a factory used to create ValueExpressions and MethodExpressions so that EL expressions can be parsed and evaluated. + + true +
+
true
JSP:JAVADOC:412VariableResolverjakarta.servlet.jsp.JspContext.getVariableResolver
+
Returns an instance of a VariableResolver that provides access to the implicit objects specified in the JSP specification using this JspContext as the context object. + + truetruetrue
JSP:JAVADOC:413JspFactoryjakarta.servlet.jsp.JspFactory.getDefaultFactory
+
Returns the default factory for this implementation. + + true +
+
true
JSP:JAVADOC:414JspEngineInfojakarta.servlet.jsp.JspFactory.getEngineInfo
+
called to get implementation-specific information on the current JSP engine. + + + true +
+
true
JSP:JAVADOC:415JspApplicationContextjakarta.servlet.jsp.JspFactory.getJspApplicationContext
+ + ( + ServletContext + ) +
Obtains the JspApplicationContext instance associated with the web application for the given ServletContext. + + true +
+
true
JSP:JAVADOC:416PageContextjakarta.servlet.jsp.JspFactory.getPageContext
+ + ( + Servlet + ,
ServletRequest + ,
ServletResponse + ,
String + ,
boolean + ,
int + ,
boolean + ) +
obtains an instance of an implementation dependent jakarta.servlet.jsp.PageContext abstract class for the calling Servlet and currently pending request and response. + This method is typically called early in the processing of the _jspService() method of a JSP implementation class in order to obtain a PageContext object for the request being processed. Invoking this method shall result in the PageContext.initialize() method being invoked. The PageContext returned is properly initialized. All PageContext objects obtained via this method shall be released by invoking releasePageContext(). + + + true +
+
true
JSP:JAVADOC:417JspFactoryjakarta.servlet.jsp.JspFactory.JspFactory
+
Sole constructor. + (For invocation by subclass constructors, typically implicit.) + + true +
+
true
JSP:JAVADOC:418voidjakarta.servlet.jsp.JspFactory.releasePageContext
+ + ( + PageContext + ) +
called to release a previously allocated PageContext object. + Results in PageContext.release() being invoked. This method should be invoked prior to returning from the _jspService() method of a JSP implementation class. + + true +
+
true
JSP:JAVADOC:419voidjakarta.servlet.jsp.JspFactory.setDefaultFactory
+ + ( + JspFactory + ) +
set the default factory for this implementation. + It is illegal for any principal other than the JSP Engine runtime to call this method. + + true +
+
true
JSP:JAVADOC:420Classjakarta.servlet.jsp.el.ImplicitObjectELResolver.getCommonPropertyType
+ + ( + ELContext + ,
Object + ) +
If the base object is null, returns String.class. + Otherwise, returns null. + + true +
+
true
JSP:JAVADOC:421Iteratorjakarta.servlet.jsp.el.ImplicitObjectELResolver.getFeatureDescriptors
+ + ( + ELContext + ,
Object + ) +
If the base object is null, and the property matches the name of a JSP implicit object, returns an Iterator containing FeatureDescriptor objects with information about each JSP implicit object resolved by this resolver. + + + + Otherwise, returns null. The Iterator returned must contain one instance of java.beans.FeatureDescriptor for each of the EL implicit objects defined by the JSP spec. Each info object contains information about a single implicit object, and is initialized as follows: displayName - The name of the implicit object. name - Same as displayName property. shortDescription - A suitable description for the implicit object. Will vary by implementation. expert - false hidden - false preferred - true In addition, the following named attributes must be set in the returned FeatureDescriptors: ELResolver#TYPE - The runtime type of the implicit object. ELResolver#RESOLVABLE_AT_DESIGN_TIME - true. + + true +
+
true
JSP:JAVADOC:422Classjakarta.servlet.jsp.el.ImplicitObjectELResolver.getType
+ + ( + ELContext + ,
Object + ,
Object + ) +
If the base object is null, and the property matches the name of a JSP implicit object, returns null to indicate that no types are ever accepted to setValue(). + The propertyResolved property of the ELContext object must be set to true by this resolver before returning if an implicit object is matched. If this property is not true after this method is called, the caller should ignore the return value. + + true +
+
true
JSP:JAVADOC:423Objectjakarta.servlet.jsp.el.ImplicitObjectELResolver.getValue
+ + ( + ELContext + ,
Object + ,
Object + ) +
If the base object is null, and the property matches the name of a JSP implicit object, returns the implicit object. + The propertyResolved property of the ELContext object must be set to true by this resolver before returning if an implicit object is matched. If this property is not true after this method is called, the caller should ignore the return value. + + true +
+
true
JSP:JAVADOC:424ImplicitObjectELResolverjakarta.servlet.jsp.el.ImplicitObjectELResolver.ImplicitObjectELResolver
+
+
+
true +
+
true
JSP:JAVADOC:425booleanjakarta.servlet.jsp.el.ImplicitObjectELResolver.isReadOnly
+ + ( + ELContext + ,
Object + ,
Object + ) +
If the base object is null, and the property matches the name of a JSP implicit object, returns true to indicate that implicit objects cannot be overwritten. + The propertyResolved property of the ELContext object must be set to true by this resolver before returning if an implicit object is matched. If this property is not true after this method is called, the caller should ignore the return value. + + true +
+
true
JSP:JAVADOC:426voidjakarta.servlet.jsp.el.ImplicitObjectELResolver.setValue
+ + ( + ELContext + ,
Object + ,
Object + ,
Object + ) +
If the base object is null, and the property matches the name of a JSP implicit object, throws PropertyNotWritableException to indicate that implicit objects cannot be overwritten. + The propertyResolved property of the ELContext object must be set to true by this resolver before returning if an implicit object is matched. If this property is not true after this method is called, the caller should ignore the return value. + + true +
+
true
JSP:JAVADOC:427Classjakarta.servlet.jsp.el.ScopedAttributeELResolver.getCommonPropertyType
+ + ( + ELContext + ,
Object + ) +
If the base object is null, returns String.class. + Otherwise, returns null. + + true +
+
true
JSP:JAVADOC:428Iteratorjakarta.servlet.jsp.el.ScopedAttributeELResolver.getFeatureDescriptors
+ + ( + ELContext + ,
Object + ) +
If the base object is null, returns an Iterator containing FeatureDescriptor objects with information about each scoped attribute resolved by this resolver. + + + + Otherwise, returns null. The Iterator returned must contain one instance of java.beans.FeatureDescriptor for each scoped attribute found in any scope. Each info object contains information about a single scoped attribute, and is initialized as follows: displayName - The name of the scoped attribute. name - Same as displayName property. shortDescription - A suitable description for the scoped attribute. Should include the attribute's current scope (page, request, session, application). Will vary by implementation. expert - false hidden - false preferred - true In addition, the following named attributes must be set in the returned FeatureDescriptors: ELResolver#TYPE - The current runtime type of the scoped attribute. ELResolver#RESOLVABLE_AT_DESIGN_TIME - true. + + true +
+
true
JSP:JAVADOC:429Classjakarta.servlet.jsp.el.ScopedAttributeELResolver.getType
+ + ( + ELContext + ,
Object + ,
Object + ) +
If the base object is null, returns Object.class to indicate that any type is valid to set for a scoped attribute. + The propertyResolved property of the ELContext object must be set to true by this resolver before returning if base is null. If this property is not true after this method is called, the caller should ignore the return value. + + true +
+
true
JSP:JAVADOC:430Objectjakarta.servlet.jsp.el.ScopedAttributeELResolver.getValue
+ + ( + ELContext + ,
Object + ,
Object + ) +
If the base object is null, searches the page, request, session and application scopes for an attribute with the given name and returns it, or null if no attribute exists with the current name. + The propertyResolved property of the ELContext object must be set to true by this resolver before returning if base is null. If this property is not true after this method is called, the caller should ignore the return value. + + true +
+
true
JSP:JAVADOC:431booleanjakarta.servlet.jsp.el.ScopedAttributeELResolver.isReadOnly
+ + ( + ELContext + ,
Object + ,
Object + ) +
If the base object is null, returns false to indicate that scoped attributes are never read-only. + The propertyResolved property of the ELContext object must be set to true by this resolver before returning if base is null. If this property is not true after this method is called, the caller should ignore the return value. + + true +
+
true
JSP:JAVADOC:432ScopedAttributeELResolverjakarta.servlet.jsp.el.ScopedAttributeELResolver.ScopedAttributeELResolver
+
+
+
true +
+
true
JSP:JAVADOC:433voidjakarta.servlet.jsp.el.ScopedAttributeELResolver.setValue
+ + ( + ELContext + ,
Object + ,
Object + ,
Object + ) +
If the base object is null, sets an existing scoped attribute to the new value, or creates a new scoped attribute if one does not exist by this name. + If the provided attribute name matches the key of an attribute in page scope, request scope, session scope, or application scope, the corresponding attribute value will be replaced by the provided value. Otherwise, a new page scope attribute will be created with the given name and value. The propertyResolved property of the ELContext object must be set to true by this resolver before returning if base is null. If this property is not true after this method is called, the caller should ignore the return value. + + true +
+
true
JSP:JAVADOC:434voidjakarta.servlet.jsp.tagext.JspIdConsumer.setJspId
+ + ( + String + ) +
Called by the container generated code to set a value for the jspId attribute. + An unique identification string, relative to this page, is generated at translation time. + + true +
+
true
JSP:JAVADOC:435TagAttributeInfojakarta.servlet.jsp.tagext.TagAttributeInfo.TagAttributeInfo
+ + ( + String + ,
boolean + ,
String + ,
boolean + ,
boolean + ,
String + ,
boolean + ,
boolean + ,
String + ,
String + ) +
JSP 2.1 Constructor for TagAttributeInfo. + This class is to be instantiated only from the TagLibrary code under request from some JSP code that is parsing a TLD (Tag Library Descriptor). + + true +
+
true
JSP:JAVADOC:436booleanjakarta.servlet.jsp.tagext.TagAttributeInfo.isDeferredValue
+
Returns true if this attribute is to be passed a ValueExpression so that expression evaluation can be deferred. + If this method returns true, then getTypeName() must return "jakarta.el.ValueExpression". The getExpectedType() method can be used to retrieve the expected type this value expression will be constructed with. + + true +
+
true
JSP:JAVADOC:437booleanjakarta.servlet.jsp.tagext.TagAttributeInfo.isDeferredMethod
+
Returns true if this attribute is to be passed a MethodExpression so that expression evaluation can be deferred. + If this method returns true, then getTypeName() must return "jakarta.el.MethodExpression". The getMethodSignature() method can be used to retrieve the expected method signature this method expression will be constructed with. + + true +
+
true
JSP:JAVADOC:438Stringjakarta.servlet.jsp.tagext.TagAttributeInfo.getExpectedTypeName
+
Returns the name of the expected type (as a String) of this deferred value attribute. + This method returns null if isDeferredValue() returns false. + + true +
+
true
JSP:JAVADOC:439Stringjakarta.servlet.jsp.tagext.TagAttributeInfo.getMethodSignature
+
Returns the expected method signature of this deferred method attribute. + This method returns null if isDeferredMethod() returns false. + + true +
+
true
JSP:JAVADOC:440TagLibraryInfo[]jakarta.servlet.jsp.tagext.TagLibraryInfo.getTagLibraryInfos
+
Returns an array of TagLibraryInfo objects representing the entire set of tag libraries (including this TagLibraryInfo) imported by taglib directives in the translation unit that references this TagLibraryInfo. + If a tag library is imported more than once and bound to different prefices, only the TagLibraryInfo bound to the first prefix must be included in the returned array. + + true +
+
true
+ + diff --git a/tck/docs/assertions/JakartaServerPagesSpecAssertions.html b/tck/docs/assertions/JakartaServerPagesSpecAssertions.html new file mode 100644 index 00000000..21c51430 --- /dev/null +++ b/tck/docs/assertions/JakartaServerPagesSpecAssertions.html @@ -0,0 +1,4997 @@ + + + + + +Specification Assertion Detail + + +
+
+

Jakarta Server Pages - 3.1
+ Specification Assertion Detail +

+
+ + + + + + + + + + + +
TotalsTotalActiveDeprecatedRemoved
+ # of Assertions + 986960917
+ # of Required Assertions + 982956917
+ # of Optional Assertions + 4400
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
IDChapterSectionDescriptionRequiredDependencyImplementation SpecificDefined byStatusTestable
JSP:SPEC:2710N/AWhen used as a tag attribute value, the #{expr} syntax is evaluated by the container only if the the jsp-version element specified in the TLD has the value 2.1 or higher. If the version specified is less than 2.1, then the {expr} syntax is simply processed as a String literal. [EvaluationOf#{expr}]true +
+
falsetechnologyactivetrue
JSP:SPEC:2720N/AWhen used in template text, the #{ character sequence triggers a translation error, unless specifically allowed through a configuration setup. [TemplateTextPoundTranslationError] true +
+
falsetechnologyactivetrue
JSP:SPEC:2730N/AThe #{ character sequence triggers a translation error if used for a tag attribute of a tag library where the jsp-version is greater than or equal to 2.1, and for which the attribute is not marked as a deferred expression in the TLD. [TagLibraryPoundTranslationError]true +
+
falsetechnologyactivetrue
JSP:SPEC:113.6It is illegal JSP syntax, which must result in a translation error, to use both an XML element attribute and a <jsp:attribute> standard action to pass the value of the same attribute.true +
+
falsetechnologyactivetrue
JSP:SPEC:213.6A translation error will result if the custom action invocation has <jsp:attribute> elements but does not define the body using a <jsp:body> element.true +
+
falsetechnologyactivetrue
JSP:SPEC:313.8White space within the body text of a document is not significant, but is preserved.true +
+
falsetechnologyactivetrue
JSP:SPEC:414.1Fatal translation failures shall result in the failure of subsequent client requests for the translation target with the appropriate error specification: For HTTP protocols the error status code 500 (Server Error) is returned.true +
+
falsetechnologyactivefalse
JSP:SPEC:26114.3A JSP container must detect if a JSP error page is self-referencing and throw a translation error. [SelfReferencingErrorPage]true +
+
falsetechnologyactivetrue
JSP:SPEC:515.1HTML comments present within a particular translation unit are treated as uninterpreted template text by the JSP container.true +
+
falsetechnologyactivetrue
JSP:SPEC:615.1The body content of a JSP comment is ignored completely.true +
+
falsetechnologyactivetrue
JSP:SPEC:26215.2The body of the content of a comment in an XML document is ignored completely. [CommentsDocumentsXml]true +
+
falsetechnologyactivetrue
JSP:SPEC:26315.2Comments in JSP documents do not nest. [CommentsDocumentsNotNest]true +
+
falsetechnologyactivetrue
JSP:SPEC:26416There is no special quoting mechanism within EL expressions; use a literal ?${? if the literal ${ is desired and expressions are enabled for the page (similarly, use a literal ?#{? if the literal #{ is desired). [QuotingWithinElExpressions]true +
+
falsetechnologyactivetrue
JSP:SPEC:716For JSP's in standard syntax, a literal %> is quoted by %\>, a literal <% is quoted by <\%, a single quote (') is quotes as \', a double quite (") is quoted as \", a backslash (\) is quoted as \\, additionally, the entities \' and \" are available to describe single and double quotes.true +
+
falsetechnologyactivetrue
JSP:SPEC:26516Only when the EL is enabled for a page, a literal $ can be quoted by \$, and a literal # can be quoted by \#. [QuotingELSymbolsInTemplateText]true +
+
falsetechnologyactivetrue
JSP:SPEC:26616Only when the EL is enabled for a page, a literal $ can be quoted by \$, and a literal # can be quoted by \#. [QuotingELSymbolsInAttributes]true +
+
falsetechnologyactivetrue
JSP:SPEC:818.2Objects with page scope are accessible only within the target page they are created. All references to such an object shall be released after the response is sent back to the client from the JSP page or the request is forwareded somwhere else. References to objects with page scope are stored in the 'pageContext' object.true +
+
falsetechnologyactivetrue
JSP:SPEC:918.2Objects with request scope are accessible from pages processing the same request where they were created. References to the object shall be released after the request is processed. In particular, if the request is forwarded to a resource in the same runtime, the object is still reachable. References to objects with request scope are stored in the 'request' object.true +
+
falsetechnologyactivetrue
JSP:SPEC:1018.2Objects with session scope are accessible from pages processing requests that in the same session as the one in which they were created. It is not legal to define an object with session scope from within a page that is not session-aware. All references to the object shall be released after the associated session ends. References to objects with session scope are stored in the 'session' object associated with the page activation.true +
+
falsetechnologyactivetrue
JSP:SPEC:1118.2Objects with application scope are accessible from pages processing requests that are in the same application as the one in which they were created. Objects with application scope can be defined (and reached) from pages that are not session-aware. References to objects with application scope are stored in the 'application' object associated with a page activation. The 'application' object is the servlet context obtained from the servlet configuration object. All references to the object shall be released when the runtime environment reclaims the ServletContext.true +
+
falsetechnologyactivetrue
JSP:SPEC:1218.3The 'request' implicit object is an instance of jakarta.servlet.ServletRequest; if the protocol used is HTTP, then the request object is an instance of jakarta.servlet.http.HttpServletRequest (request scope).true +
+
falsetechnologyactivetrue
JSP:SPEC:1318.3The 'response' implicit object is an instance of jakarta.servlet.ServletResponse; if the protocol used is HTTP, then the response object is an instance of jakarta.servlet.http.HttpServletResponse (page scope)true +
+
falsetechnologyactivetrue
JSP:SPEC:1418.3The 'pageContext' implicit object is an instance of jakarta.servlet.jsp.PageContext (page scope).true +
+
falsetechnologyactivetrue
JSP:SPEC:1518.3The 'session' implicit object is an instance of jakarta.servlet.http.HttpSession and is only valid for HTTP protocols (session scope).true +
+
falsetechnologyactivetrue
JSP:SPEC:1618.3The 'application' implicit object is an instance of jakarta.servlet.ServletContext (same object as that returned from getServletConfig().getContext(); application scope).true +
+
falsetechnologyactivetrue
JSP:SPEC:1718.3The 'exception' implicit object is an instance of java.lang.Throwable (page scope) and is only available in errro pages.true +
+
falsetechnologyactivetrue
JSP:SPEC:18110White space may or may not be present after '<@%' and before '%>' within JSP directives.true +
+
falsetechnologyactivetrue
JSP:SPEC:19110Directives do not produce any output into the current 'out' stream.true +
+
falsetechnologyactivetrue
JSP:SPEC:20110.1The page directive can appear multiple times, and is position independent within a given translation unit.true +
+
falsetechnologyactivetrue
JSP:SPEC:21110.1A translation error will occur if the page directive defines duplicate attribute/values within a given translation unit, unless the values for the duplicate attributes are identical for all occurrences. The import and pageEncoding attributes are exempt from this rule and can appear multiple times.true +
+
falsetechnologyactivetrue
JSP:SPEC:22110.1The 'isScriptingEnabled' attribute of the page directive, if true, allows the presence of scripting elements (scriptlets, expressions, declarations) within a given translation unit.true +
+
falsetechnologydeprecatedtrue
JSP:SPEC:23110.1The 'isScriptingEnabled' attribute of the page directive, if false, disallows the presence of scripting elements (scriptlets, expressions, declarations) within a given translation unit and will generate a translation error if they are present.true +
+
falsetechnologydeprecatedtrue
JSP:SPEC:24110.1The default value for 'isScriptingEnabled' of the page directive, if not specified, is true.true +
+
falsetechnologydeprecatedtrue
JSP:SPEC:25110.1The 'isELEnabled' attribute of the page directive, if true, directs the container to evaluate EL expressions.true +
+
falsetechnologydeprecatedtrue
JSP:SPEC:26110.1The 'isELEnabled' attribute of the page directive , if false, will result in EL expressions not being evaluated by the container.true +
+
falsetechnologydeprecatedtrue
JSP:SPEC:27110.1If the JSP is part of a Web application that is using a Servlet 2.3 deployment descriptor, the default value for the 'isELEnabled' attribute of the page directive is false.true +
+
falsetechnologydeprecatedtrue
JSP:SPEC:28110.1If the JSP is part of a Web application that is using a Servlet 2.4 deployment descriptor, the default value for the 'isELEnabled' attribute of the page directive is true.true +
+
falsetechnologydeprecatedtrue
JSP:SPEC:29110.1All scripting languages, specifiable by the page directive's 'language' attribute, must provide some implicit objects that a JSP page author can use in declarations, scriptlets, and expressions (see Section JSP.1.3.8 for list of available implicit objects)true +
+
truetechnologyactivefalse
JSP:SPEC:30110.1All scripting languages, specifiable by the page directive's 'language' attribute, must expose the Java technology object model to the script environment, especially implicit variables, JavaBeans components properties, and public methods.true +
+
truetechnologyactivefalse
JSP:SPEC:31110.1It is a fatal translation error for a page directive with a non-"java" language attribute to appear after the first scripting has been encountered.true +
+
falsetechnologyactivetrue
JSP:SPEC:32110.1The only required scripting language value for the 'language' attribute is "java".true +
+
falsetechnologyactivetrue
JSP:SPEC:33110.1The 'extends' attribute of the page directive specifies a fully qualified Java programming language class name, that names the superclass of the class to which this JSP page is transformedtrue +
+
falsetechnologyactivetrue
JSP:SPEC:34110.1The 'import' attribute of the page directive specifies the fully qualified Java programming language type name denoting a particular type, or of a package name following by the ".*" string, denoting all the public types declared in that package, that shall be imported by the translated JSP page implementation and is thus available to the scripting language.true +
+
falsetechnologyactivetrue
JSP:SPEC:35110.1Packages java.lang.*, jakarta.servlet.*, jakarta.servlet.jsp.*, jakarta.servlet.http.* are imported implicitly by the JSP container. [DefaultImports]true +
+
falsetechnologyactivetrue
JSP:SPEC:267No packages other than java.lang.*, jakarta.servlet.*, jakarta.servlet.jsp.*, jakarta.servlet.http.* may be implicitly imported. [NoOtherPackagesImplicitlyImported]true +
+
falsetechnologyactivetrue
JSP:SPEC:36110.1The 'session' attribute of the page directive, when true, indicates that the JSP page requires participation in an HTTP session.true +
+
falsetechnologyactivetrue
JSP:SPEC:37110.1The 'session' attribute of the page directive, when false, indicates that the JSP page does not participate in an HTTP session; the 'session' implicit object is not available to the page, and any reference to it within the translation unit will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:38110.1If the 'session' attribute of the page directive is not specified by a page directive, then the page will, by default, participate in an HTTP session (default value of true).true +
+
falsetechnologyactivetrue
JSP:SPEC:39110.1If the 'buffer' attribute of the page directive is not specified, no buffering will be performed and all output will be written directly through to the ServletResponse PrintWriter.true +
+
falsetechnologyactivetrue
JSP:SPEC:40110.1The size value specified by the 'buffer' attribute of the page directive must be in kilobytes, and the suffix "kb" is mandatory.true +
+
falsetechnologyactivetrue
JSP:SPEC:41110.1The container must allocate a buffer at least as large as that specified by the 'buffer' attribute of the page directive.true +
+
falsetechnologyactivetrue
JSP:SPEC:42110.1The default buffer size of 8kb will be used if the 'buffer' attribute of the page directive is not specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:43110.1If the 'autoFlush' attribute of the page directive is true, the output will be automatically flushed when the buffer is filled.true +
+
falsetechnologyactivetrue
JSP:SPEC:44110.1If the 'autoFlush' attribute of the page directive is false, an exception will be raised to indicate a buffer overflow when the buffer is filled.true +
+
falsetechnologyactivetrue
JSP:SPEC:45110.1It is a translation error to set the 'autoFlush' attribute of the page directive to false, if the 'buffer' attribute is set to none.true +
+
falsetechnologyactivetrue
JSP:SPEC:46110.1If the 'isThreadSafe' attribute of the page directive is false, the container must serialize requests to the JSP (it should behave like an SingleThreadModel servlet).true +
+
falsetechnologyactivetrue
JSP:SPEC:47110.1The 'info' attribute of the page directive specifies an arbitrary string that is incorporated into the translated page, that can subsequently be obtained from the page's implementation of Servlet.getServletInfo().true +
+
falsetechnologyactivetrue
JSP:SPEC:48110.1The 'isErrorPage' attribute of the page directive. when true, will cause the implicit script language variable "exception" to be defined and its value is a reference to the offending Throwable from the source JSP page in error.true +
+
falsetechnologyactivetrue
JSP:SPEC:49110.1If the 'isErrorPage' attribute of the page directive is defined as false, then the implicit script language variable "exception" will not be available, and any such reference to this variable will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:50110.1The 'errorPage' attribute of the page directive, specifies the URL, either page-relative or context-relative, of a resource to which any Java programming language Throwable object(s) thrown but not caught by the page implementation are forwarded for error processing. The following request attributes will be made available within the error page:true +
+
falsetechnologyactivetrue
JSP:SPEC:50.114.3jakarta.servlet.jsp.jspException - throw Throwable object of the offending exception (for backwards compatibility with JSP 1.2)true +
+
falsetechnologyactivetrue
JSP:SPEC:50.214.3jakarta.servlet.error.exception - as per the Servlet specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:50.314.3jakarta.servlet.error.status_code - as per the Servlet specificationtrue +
+
falsetechnologyactivetrue
JSP:SPEC:50.414.3jakarta.servlet.error.exception_type - as per the Servlet specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:50.514.3jakarta.servlet.error.message - as per the Servlet specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:50.614.3jakarta.servlet.error.request_uri - as per the Servlet specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:50.714.3jakarta.servlet.error.servlet_name - as per the Servlet specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:50.814.3An instance of jakarta.servlet.jsp.ErrorData must be provided to the error page via PageContext.getErrorData().true +
+
falsetechnologyactivetrue
JSP:SPEC:51110.1If the 'errorPage' attribute of the page directive is defined, it will take presendence over any error pages defined in the web application's deployment descriptor.true +
+
falsetechnologyactivetrue
JSP:SPEC:52110.1The character encoding (Content-Type response header) can be in the form of TYPE, or TYPE; Charset=CHARSET, with an optional white space after the ';'. Charset, if present, must be the IANA value for a character encoding. Similarly, if TYPE is a MIME type, see the IANA registry for values.true +
+
falsetechnologyactivetrue
JSP:SPEC:53110.1The default Content-Type for JSP Pages in classic syntax is "text/html;charset=ISO-8859-1".true +
+
falsetechnologyactivetrue
JSP:SPEC:54110.1If a charset portion of the value provided to the 'contentType' attribute is not specified, but the page encoding for the JSP page is specified, then the charset used will be that of the specified page encoding.true +
+
falsetechnologyactivetrue
JSP:SPEC:55110.1If a charset is not provided as part of the 'contentType' attribute value, and the page encoding does not specifiy a type, then the default charset is ISO-8859-1 for JSP pages in classic syntax.true +
+
falsetechnologyactivetrue
JSP:SPEC:56110.1If a charset is not provided as part of the 'contentType' attribute value, and the page encoding does not specifiy a type, then the default charset is UTF-8 for JSP pages in XML syntax.true +
+
falsetechnologyactivetrue
JSP:SPEC:57110.1The 'pageEncoding' attribute of the page directive specifies the character encoding of the page. The value is in the form of CHARSET which my be the IANA value for a character encoding. If no 'pageEncoding' attribute is specified, the default of ISO-8859-1 will be used.true +
+
falsetechnologyactivetrue
JSP:SPEC:26811.10If the isELIgnored attribute is true, EL expressions (of the form ${...} and #{...}) are ignored by the container. If false, EL expressions (of the form ${...} and #{...}) are recognized when they appear in template text or action attributes. [isELIgnored]true +
+
falsetechnologyactivetrue
JSP:SPEC:269110.1The deferredSyntaxAllowedAsLiteral page directive attribute indicates if the character sequence #{ is allowed or not when used as a String literal in this page and translation unit. If false (the default value), a translation error occurs when the character sequence is used as a String literal. [DeferredSyntaxAllowedAsLiteralPageDirective] true +
+
falsetechnologyactivetrue
JSP:SPEC:270110.1The trimDirectiveWhitespaces page attribute directive indicates how whitespaces in template text should be handled. If true, template text that contains only whitespaces is removed from the output. The default is not to trim whitespaces. [TrimDirectiveWhitespacesPageDirective]true +
+
falsetechnologyactivetrue
JSP:SPEC:58110.2It is a translation error for the taglib directive to appear after actions that use the prefix specified by the directive.true +
+
falsetechnologyactivetrue
JSP:SPEC:59110.2The 'uri' attribute of the taglib directive specifies either an absolute or relative URI that uniquely identifies the tag library descriptor associated with this prefix.true +
+
falsetechnologyactivetrue
JSP:SPEC:60110.2The 'tagdir' attribute of the taglib directive indicates that the specified prefix is to be used to identify tag extensions installed in the /WEB-INF/tags directory or a subdirectory.true +
+
falsetechnologyactivetrue
JSP:SPEC:61110.2A translation error must occur if the value provided to the 'tagdir' attribute of the taglib directive doesn't start with '/WEB-INF/tags' and point to a directory that exists within the web application.true +
+
falsetechnologyactivetrue
JSP:SPEC:62110.2A translation error must occur if the 'prefix' attribute of the taglib directive is not present.true +
+
falsetechnologyactivetrue
JSP:SPEC:63110.2A translation error must occur if both the 'tagdir' and 'uri' attributes are present in the same taglib directive.true +
+
falsetechnologyactivetrue
JSP:SPEC:64110.2The 'prefix' attribute of the taglib directive is used to distinguish a custom action, e.g <myPrefix:myTag>.true +
+
falsetechnologyactivetrue
JSP:SPEC:65110.2The value provided to the 'prefix' attribute of the taglib directive must follow the naming convention specified in the XML namespaces specification.true +
+
falsetechnologyactivefalse
JSP:SPEC:66110.2It is illegal to provide an empty prefix to the taglib directive.true +
+
falsetechnologyactivefalse
JSP:SPEC:67110.2A translation error will occur if the tag name provided in the custom action isn't found in the taglibrary designated by the prefix.true +
+
falsetechnologyactivetrue
JSP:SPEC:68110.3A JSP container can include a mechanism for being notified if an included file changes, so the container can recompile the JSP page. However, the JSP 2.0 specification does not have a way of directing the JSP container that included files have changed.false +
+
truetechnologyactivefalse
JSP:SPEC:69110.3The 'file' attribute of the include directive specifies the resource to be imported either relative to web appliation context path, or relative to the page performing the include.true +
+
falsetechnologyactivetrue
JSP:SPEC:257110.3With respect to the standard and XML syntaxes, a file included via the include directive can use either the same syntax as the including page, or a different syntax. the semantics for mixed syntax includes are described in Section JSP.1.10.5.true +
+
falsetechnologyactivetrue
JSP:SPEC:70110.3The include directive includes content at translation time meaning the bytes of the included resource are directly inserted into the page. true +
+
falsetechnologyactivefalse
JSP:SPEC:258110.4With respect to the standard and XML syntaxes, just as with the include directive, implicit includes can use either the same syntax as the including page, or a different syntax. The semantics for mixed syntax includes are described in Section JSP.1.10.5.true +
+
falsetechnologyactivetrue
JSP:SPEC:259110.5For translation-time includes, included content can use either the same syntax as the including page, or a different syntax. The following semantics for translation-time includes apply.true +
+
falsetechnologyactivefalse
JSP:SPEC:259.1110.5The JSP container must detect the syntax for each JSP file individually and parse each JSP file according to the syntax in which it is written.true +
+
falsetechnologyactivefalse
JSP:SPEC:259.2110.5A JSP file written using the XML syntax must be well-formed according to the "XML" and "Namespaces in XML" specifications, otherwise a translation error must occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:259.3110.5When including a JSP document (written in the XML syntax), in the resulting XML View of the translation unit the root element of the included segment must have the default namespace reset to "". This is so that any namespaces associated with the empty prefix in the including document are not carried over to the included document.true +
+
falsetechnologyactivetrue
JSP:SPEC:259.4110.5When a taglib directive is encountered in a standard syntax page, the namespace is applied globally, and is added to the <jsp:root> element of the resulting XML View of the translation unit.true +
+
falsetechnologyactivetrue
JSP:SPEC:259.5110.5If a taglib directive is encountered in a standard syntax page that attempts to redefine a prefix that is already defined in the current scope (by a JSP segment in either syntax), a translation error must occur unless that prefix is being redefined to the same namespace URI.true +
+
falsetechnologyactivetrue
JSP:SPEC:71112All JSP containers must support scripting elements based on the Java programming language.true +
+
falsetechnologyactivetrue
JSP:SPEC:72112Any other scripting languages that are supported by a particular JSP container must support: The manipulation of Java objects; Invocation of methods on Java objects; Catching of Java language excepitons.true +
+
truetechnologyactivefalse
JSP:SPEC:73112.1A declaration (<%! DECL_BODY %>) must be a complete declarative statment, or sequence thereof, according to the syntax of the scripting language specified, otherwise a translation error will occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:74112.1Declartaions do not produce any output into the current out stream.true +
+
falsetechnologyactivetrue
JSP:SPEC:75112.1Declarations are initialized when the JSP page is initialized and are made available to other delcarations, scriptlets, and expressions.true +
+
falsetechnologyactivetrue
JSP:SPEC:76112.2Scriptlets (<% SCRIPTLET_BODY %>) can contain any code framents that are valid for the scripting language specified by the 'language' attribute of the page directive, and are executed at request time in the order that they appear on the JSP page.true +
+
falsetechnologyactivetrue
JSP:SPEC:77112.3An expression element in a JSP page is a scripting language expression that is evaluated and the result is coerced to a String and emitted into the current JspWriter (out) object.true +
+
falsetechnologyactivetrue
JSP:SPEC:78112.3If the result of the expression cannot be coerced to a String, the following must happen: If the problem is detected at translation time, a translation time error shall occur. If the coercion cannot be detected during translation, a ClassCastException shall be raised at request time.true +
+
falsetechnologyactivefalse
JSP:SPEC:79112.3Expressions are evaluated left to right in the JSP page. true +
+
falsetechnologyactivetrue
JSP:SPEC:80112.3If an expression appears in more than one run-time attribute, they are evaluated left-to-right in the element.true +
+
falsetechnologyactivetrue
JSP:SPEC:81112.3A translation error will occur if the expression is not a complete expression in the scripting language in which it is written.true +
+
falsetechnologyactivetrue
JSP:SPEC:82114.1Request-time attribute values in the form of '<%= scriptlet_expr %>' are only usable by actions, and cannot be used in directives.true +
+
falsetechnologyactivetrue
JSP:SPEC:83114.1A translation error will occur if a request-time attribute expression does not appear by itself (multiple expressions, and mixing of expressions and string constands are not permitted).true +
+
falsetechnologyactivetrue
JSP:SPEC:84114.1Any attempt to provide an attribute value via a request-time expression that doesn't accept request-time expressions, will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:85114.2.1A type conversion failure for a static attribute lead to a failure at either request or translation time.true +
+
falsetechnologyactivefalse
JSP:SPEC:86114.2.1Conversion of string values to a JavaBean property is done via setAsText(string-literal).true +
+
falsetechnologyactivetrue
JSP:SPEC:87114.2.1Conversion of string values to boolean or Boolean is performed as indicated in java.lang.Boolean.valueOf(String).true +
+
falsetechnologyactivetrue
JSP:SPEC:88114.2.1Conversion of string values to byte or Byte is performed as indiciated in java.lang.Byte.valueOf(String).true +
+
falsetechnologyactivetrue
JSP:SPEC:89114.2.1Conversion of string values to char or Character is performed as indicated in String.charAt(0).true +
+
falsetechnologyactivetrue
JSP:SPEC:90114.2.1Conversion of string values to double or Double is performed as indiciated in java.lang.Double.valueOf(String).true +
+
falsetechnologyactivetrue
JSP:SPEC:91114.2.1Conversion of string values to int or Integer is performed as indiciated in java.lang.Integer.valueOf(String).true +
+
falsetechnologyactivetrue
JSP:SPEC:92114.2.1Conversion of string values to float or Float is performed as indicated in java.lang.Float.valueOf(String).true +
+
falsetechnologyactivetrue
JSP:SPEC:93114.2.1Conversion of string values to long or Long is perfomed as indicated in java.lang.Long.valueOf(String).true +
+
falsetechnologyactivetrue
JSP:SPEC:94114.2.1Conversion of string values to short or Short is performed as indicated in java.lang.Short.valueOf(String).true +
+
falsetechnologyactivetrue
JSP:SPEC:95114.2.1Conversion of string values to Object is performed as if new String(string).true +
+
falsetechnologyactivetrue
JSP:SPEC:96114.2.2No type conversion is perfomed against reqeust-time expressions, they are provided to the element as is.true +
+
falsetechnologyactivetrue
JSP:SPEC:9721An EL expression that is evaluated immediately is represented in JSP with the syntax ${}, while an EL expression whose evaluation is deferred is represented with the syntax #{}true +
+
falsetechnologyactivetrue
JSP:SPEC:9822.2If EL is being evaluated by the container, a translation error will occur if an EL expression is provided as a value to an attribute that does not accept request-time expressions.true +
+
falsetechnologydeprecatedtrue
JSP:SPEC:27422The EL can be used directly in template text, be it inside the body of a custom or standard actions or in template text outside of any action. [ELTemplateText]true +
+
falsetechnologyactivetrue
JSP:SPEC:9922EL expressions will not be evaluated if the tag body is 'tagdependent'.true +
+
falsetechnologyactivetrue
JSP:SPEC:27522Only the ${} syntax is allowed for expressions in template text. A translation error will result if #{} is used in template text unless #{} is turned off via a backwards compatibility mechanism.[ELTemplateTextRestriction]true +
+
falsetechnologyactivetrue
JSP:SPEC:27623.1The type of a static attribute is always java.lang.String.[ElExpressionStaticAttributeType]true +
+
falsetechnologyactivetrue
JSP:SPEC:27723.1The value of a static attribute must be a String literal. It is illegal to specify an expression. [ElExpressionStaticAttributeValue]true +
+
falsetechnologyactivetrue
JSP:SPEC:27823.2If the type of a dynamic attribute is not specified in the TLD, defaults to java.lang.Object.[ElExpressionDynamicAttributeType]true +
+
falsetechnologyactivetrue
JSP:SPEC:27923.2The value of a dynamic attribute can be a String literal, a scriptlet expression, or an EL expression using the ${} syntax. [ElExpressionDynamicAttributeValue]true +
+
falsetechnologyactivetrue
JSP:SPEC:28023.2After evaluation of a dynamic attribute, the value is coerced to the expected type. The resulting value is passed in to the setter method for the tag attribute.[ElExpressionDynamicAttributeEvaluation]true +
+
falsetechnologyactivetrue
JSP:SPEC:28123.3If type of a deferred-value attribute is not specified in the TLD, defaults to java.lang.Object.[ElDeferredValueType]true +
+
falsetechnologyactivetrue
JSP:SPEC:28223.3The value of a deferred-value attribute can be a String literal or an EL expression using the #{} syntax. [ElDeferredValueValue]true +
+
falsetechnologyactivetrue
JSP:SPEC:28323.3The result of parsing the expression of a deferred-value attribute is passed directly to the setter method of the tag attribute, whose argument type must be jakarta.el.ValueExpression. [ElDeferredValueProcessing] true +
+
falsetechnologyactivetrue
JSP:SPEC:28423.3When a deferred-value attribute is evaluated by the tag handler, the value is coerced to the expected type. [ElDeferredValueCoercion]true +
+
falsetechnologyactivetrue
JSP:SPEC:28523.3If a static value is provided for a deferred-value attribute, it is converted to a ValueExpression where isLiteralText() returns true.[ElDeferredValueStatic Evaluation]true +
+
falsetechnologyactivetrue
JSP:SPEC:28623.4If the method signature for a deferred-method attribute is not defined in the TLD, it defaults to void method().[ElDeferredMethodSignature]true +
+
falsetechnologyactivetrue
JSP:SPEC:28723.4The value of a deferred-method attribute can be a String literal or an EL expression using the #{} syntax. [ElDeferredMethodValue]true +
+
falsetechnologyactivetrue
JSP:SPEC:28823.4A String literal can be provided to a deferred-method attribute, as long as the return type of the deferred method signature is not void. A MethodExpression is created, which when invoked, returns the String literal coerced to expected return type.[ElDeferredMethodStringLiteral]true +
+
falsetechnologyactivetrue
JSP:SPEC:28923.4A translation error occurs if the return type of a string literal value for a deferred-method attribute is void or if the string literal cannot be coerced to the return type of the deferred method signature.[ElDeferredMethodStringLiteralError]true +
+
falsetechnologyactivetrue
JSP:SPEC:29023.5The value of a deferred-expression-or-dynamic attribute can be a String literal, a scriptlet expression, or an EL expression using the ${} or #{} syntax. [AllowedDynamicAttributeValueTypes]true +
+
falsetechnologyactivetrue
JSP:SPEC:29123.5The setter method argument of a deferred-expression-or dynamic attribute must be of type java.lang.Object. [ DynamicAttributeSetterMethod]true +
+
falsetechnologyactivetrue
JSP:SPEC:10022.2A container must support EL expressions provided in template text be it inside the body of a custom or standard action, or in template text outside of any action.true +
+
falsetechnologydeprecatedtrue
JSP:SPEC:10123.2The boolean literals in the EL are 'true' and 'false'true +
+
falsetechnologyactivetrue
JSP:SPEC:10223.2EL integer literals are equivelant to Java integer literals.true +
+
falsetechnologyactivetrue
JSP:SPEC:10323.2EL floating point literals are equivelant to Java floating point literals.true +
+
falsetechnologyactivetrue
JSP:SPEC:10423.2String literals are encapsulated by either double or single quotes (''' or '"' respectively). Quotes need to be escaped in the String if the string value enclosed is the same type of quote. Escaping definitions are the same as those defined in JSP.1.6.true +
+
falsetechnologyactivetrue
JSP:SPEC:10523.2The EL null literal is defined as 'null'.true +
+
falsetechnologyactivetrue
JSP:SPEC:10623.4The EL follows ECMAScript in unifying the treatment of the "." and "[]" operators. To evaluate expr-a[expr-b]:true +
+
falsetechnologyactivefalse
JSP:SPEC:106.123.4Evaluate expr-a into value-a, if value-a is null, return null.true +
+
falsetechnologyactivetrue
JSP:SPEC:106.223.4Evaluate expr-b into value-b, if value-b is null, return null.true +
+
falsetechnologyactivetrue
JSP:SPEC:106.323.4If value-a is a Map, then if !value-a.containsKey(value-b) then return null, otherwise, return the value of value-a.get(value-b).true +
+
falsetechnologyactivetrue
JSP:SPEC:106.423.4If value-a is a List or array:true +
+
falsetechnologyactivetrue
JSP:SPEC:106.4.123.4If value-b cannot be coerced into an int (using coercion rules) an error occurs.true +
+
falsetechnologyactivetrue
JSP:SPEC:106.4.223.4If value-a.get(value-b) or Array.get(value-a, value-b) throws an ArrayIndexOutofBoundException or IndexOutOfBoundsException, return null.true +
+
falsetechnologyactivetrue
JSP:SPEC:106.4.323.4If value-a.get(value-b) or Array.get(value-a, value-b) throws other exception, error.true +
+
falsetechnologyactivetrue
JSP:SPEC:106.4.423.4Otherwise, return value-a.get(value-b) or Array.get(value-a, value-b) as appropriate.true +
+
falsetechnologyactivetrue
JSP:SPEC:106.523.4Otherwise (a JavaBeans object, coerce value-b to Stringtrue +
+
falsetechnologyactivetrue
JSP:SPEC:106.5.123.4If value-b is a readable property of value-a, return the result of the getter call.true +
+
falsetechnologyactivetrue
JSP:SPEC:106.5.223.4If value-b is not a readable property of value-a, return error.true +
+
falsetechnologyactivetrue
JSP:SPEC:106.5.323.4If the getter call throws an Exception: error.true +
+
falsetechnologyactivetrue
JSP:SPEC:10723.5.1Binary operators - A { +,-,* } Btrue +
+
falsetechnologyactivefalse
JSP:SPEC:107.123.5.1If A or B is null, return 0true +
+
falsetechnologyactivetrue
JSP:SPEC:107.223.5.1If A or B is Float, Double, or a String containing ".", "e", or "E", coerce both A and B to Double and apply operator.true +
+
falsetechnologyactivetrue
JSP:SPEC:107.323.5.1Otherwise coerce both A and B to Long and apply operator.true +
+
falsetechnologyactivetrue
JSP:SPEC:107.423.5.1If application of operator against A and B results in an exception, error.true +
+
falsetechnologyactivetrue
JSP:SPEC:10823.5.2Binary operator - A { / or div } Btrue +
+
falsetechnologyactivefalse
JSP:SPEC:108.123.5.2If A or B is null, return 0true +
+
falsetechnologyactivetrue
JSP:SPEC:108.223.5.2Coerce both A and B to Double and apply operator.true +
+
falsetechnologyactivetrue
JSP:SPEC:108.323.5.2If application of operator against A and B results in an exception, error.true +
+
falsetechnologyactivetrue
JSP:SPEC:10923.5.3Binary Operator - A { % or mod } Btrue +
+
falsetechnologyactivefalse
JSP:SPEC:109.123.5.3If application of operator against A and B results in an exception, error.true +
+
falsetechnologyactivetrue
JSP:SPEC:109.223.5.3Otherwise coerce both A and B to Long and apply operator.true +
+
falsetechnologyactivetrue
JSP:SPEC:109.323.5.3If A or B is Float, Double, or a String containing ".", "e", or "E", coerce both A and B to Double and apply operator.true +
+
falsetechnologyactivetrue
JSP:SPEC:109.423.5.3If A or B is null, return 0true +
+
falsetechnologyactivetrue
JSP:SPEC:11023.5.4Unary minus operator - -Atrue +
+
falsetechnologyactivefalse
JSP:SPEC:110.123.5.4If A is null, return 0true +
+
falsetechnologyactivetrue
JSP:SPEC:110.223.5.4If A is a String:true +
+
falsetechnologyactivetrue
JSP:SPEC:110.2.123.5.4If A contains ".", "e", or "E", coerce to a Double and apply operator.true +
+
falsetechnologyactivetrue
JSP:SPEC:110.2.223.5.4If operation results in exception, error.true +
+
falsetechnologyactivetrue
JSP:SPEC:110.2.323.5.4If A is Byte, Short, Integer, Long, Float, Double, retain type and apply operatortrue +
+
falsetechnologyactivetrue
JSP:SPEC:110.2.423.5.4If application of operator results in exception, error.true +
+
falsetechnologyactivetrue
JSP:SPEC:110.2.523.5.4Otherwise error if operator cannot be applied to the given expression.true +
+
falsetechnologyactivetrue
JSP:SPEC:110.323.5.4If A is Byte, Short, Integer, Long, Float, Double:true +
+
falsetechnologyactivetrue
JSP:SPEC:110.3.123.5.4retain the type and apply the operator.true +
+
falsetechnologyactivetrue
JSP:SPEC:110.3.223.5.4If application of operator results in exception, error.true +
+
falsetechnologyactivetrue
JSP:SPEC:11123.5.6Relational operators - A { <,>,<=,=>,lt,gt,le,ge } Btrue +
+
falsetechnologyactivetrue
JSP:SPEC:111.123.5.6If A and B are equal, and operator is <=, le, >=, or ge, return true, otherwise return false.true +
+
falsetechnologyactivetrue
JSP:SPEC:111.223.5.6If A or B is null, return false.true +
+
falsetechnologyactivetrue
JSP:SPEC:111.323.5.6If A or B is Float or Double coerce both A and B to Double and apply operator.true +
+
falsetechnologyactivetrue
JSP:SPEC:111.423.5.6If A or B is Byte, Short, Character, Integer, or Long, coerce both A and B to Long and apply operator.true +
+
falsetechnologyactivetrue
JSP:SPEC:111.823.5.6If A or B is String coerce both A and B to String, compare lexically.true +
+
falsetechnologyactivetrue
JSP:SPEC:111.523.5.6If A is Comparable, and A.compareTo(B) throws an exception, error; otherwise return the result of A.compareTo(B)true +
+
falsetechnologyactivetrue
JSP:SPEC:111.623.5.6If B is Comparable, and B.compareTo(A) throws an exception, error; otherwise return the result of B.compareTo(A)true +
+
falsetechnologyactivetrue
JSP:SPEC:111.723.5.6Otherwise return error.true +
+
falsetechnologyactivetrue
JSP:SPEC:11223.5.7Relation Operatos - A { ==, !=, eq, ne } Btrue +
+
falsetechnologyactivefalse
JSP:SPEC:112.123.5.7If A == B, apply operator.true +
+
falsetechnologyactivetrue
JSP:SPEC:112.223.5.7If A or B is null, return false for == (eq), true for != (ne)true +
+
falsetechnologyactivetrue
JSP:SPEC:112.323.5.7If A or B is Float or Double coerce both A and B to Double and apply operator.true +
+
falsetechnologyactivetrue
JSP:SPEC:112.423.5.7If A or B is Byte, Short, Character, Integer, or Long, coerce both A and B to Long and apply operator.true +
+
falsetechnologyactivetrue
JSP:SPEC:112.523.5.7If A or B is Boolean coerce both A and B to Boolean apply operator.true +
+
falsetechnologyactivetrue
JSP:SPEC:112.623.5.7If A or B is String coerce both A and B to String, if error occurs calling A.equals(B), error; otherwise apply operator to result of A.equals(B).true +
+
falsetechnologyactivetrue
JSP:SPEC:112.6.123.5.7If error occurs calling A.equals(B), error otherwise apply operator to result of A.equals(B).true +
+
falsetechnologyactivetrue
JSP:SPEC:112.6.223.5.7Otherwise apply operator to result of A.equals(B).true +
+
falsetechnologyactivetrue
JSP:SPEC:11323.6.1Binary Operator - A { &&, ||, and, or } Btrue +
+
falsetechnologyactivefalse
JSP:SPEC:113.123.6.1Coerce both A and B to Boolean and apply operator.true +
+
falsetechnologyactivetrue
JSP:SPEC:11423.6.2Unary operator - { !, not } Atrue +
+
falsetechnologyactivefalse
JSP:SPEC:114.123.6.2Coerce A to Boolean and apply operator.true +
+
falsetechnologyactivetrue
JSP:SPEC:11523.7Empty operator - empty Atrue +
+
falsetechnologyactivefalse
JSP:SPEC:115.123.7If A is null, return truetrue +
+
falsetechnologyactivetrue
JSP:SPEC:115.223.7If A is an emtpy String, return true.true +
+
falsetechnologyactivetrue
JSP:SPEC:115.323.7If A is an empty array, then return true.true +
+
falsetechnologyactivetrue
JSP:SPEC:115.423.7If A is an emtpy Map, then return true.true +
+
falsetechnologyactivetrue
JSP:SPEC:115.523.7If A is an empty List, then return true.true +
+
falsetechnologyactivetrue
JSP:SPEC:115.623.7Otherwise return falsetrue +
+
falsetechnologyactivetrue
JSP:SPEC:11623.9Operator precedence (highest to lowest) - [] . then (), then -(unary) not ! emtpy, then * / div % mod, then + - (binary), then < > <= >= lt gt le ge, then == != eq ne, then && and, then || or.true +
+
falsetechnologyactivetrue
JSP:SPEC:11724The following words are reserved by the EL, and, or, not, eq, ne, lt, gt, le, ge, true, false, null, instanceof, empty, div, mod and should not be used as identifiers without being quoted.true +
+
falsetechnologyactivefalse
JSP:SPEC:11825If no scope qualifier is added to provided EL expression, the EL will lookup the attribute based on the behavior of PageContext.findAttribute(String), i.e, it will search the PageContext for the attribute first in the page, then request, then session, followed by application scopes and will return the value, otherwise null will be returned.true +
+
falsetechnologyactivetrue
JSP:SPEC:11926.2If the function class, as described in the TLD, is not a public non-abstract class, a translation error will occur.true +
+
falsetechnologyremovedtrue
JSP:SPEC:12026.2If the method, as described in the TLD, is not a public static method, a translation error will occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:12126.2If two functions within the same tag library have the same name, a translation error will occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:12226.4EL function invocation semantics:true +
+
falsetechnologyactivetrue
JSP:SPEC:122.126.4If the function has no namespace associated, then, if the function is used in an attribute value, assume the namespace as that of the custom action; if the function is used elsewhere, this shall be a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:122.226.4Locate the TLD associated with the namespace. If none can be found, a translation error shall occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:122.326.4Locate the function element with a name subelement with the provided function name. If none can be found, a translation error shall occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:122.426.4Locate the public class with name equal to the value of the funcion-class element. Locate the public static method with name and signature equal to the value of the function-signature element. If any of these don't exist, a translation error shall occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:122.526.4Evaluate each argument to the corresponding type indicated in the signature.true +
+
falsetechnologyactivetrue
JSP:SPEC:122.626.4Evaluate the public static Java method. The resulting type is that of the return value in the function-signature element.true +
+
falsetechnologyactivetrue
JSP:SPEC:12322.3The 'pageContext' implicit object corresponse to the PageContext object.true +
+
falsetechnologyactivetrue
JSP:SPEC:12422.3The 'pageScope' implicit object allows access to page scoped attribute values.true +
+
falsetechnologyactivetrue
JSP:SPEC:12522.3The 'requestScope' implicit object allows access to request scoped attribute values.true +
+
falsetechnologyactivetrue
JSP:SPEC:12622.3The 'sessionScope' implicit object allows access to session scoped attribute values.true +
+
falsetechnologyactivetrue
JSP:SPEC:12722.3The 'applicationScope' implicit object allows access to application scoped attribute values.true +
+
falsetechnologyactivetrue
JSP:SPEC:12822.3The 'param' implicit object allows access to a single parameter value (obtained via ServletRequest.getParameter(String name)).true +
+
falsetechnologyactivetrue
JSP:SPEC:12922.3The 'paramValues' implicit allows access to a String[] of all values for the specified parameter (obtained via ServletRequest.getParameterValues(String name)).true +
+
falsetechnologyactivetrue
JSP:SPEC:13022.3The 'header' implicit object allows access to a single request-header value (obtained by calling HttpServletRequest.getHeader(String name)).true +
+
falsetechnologyactivetrue
JSP:SPEC:13122.3The 'headerValues' implicit object returns the a String[] of all values for the specified header (obtained via HttpServletRequest.getHeaders(String name)).true +
+
falsetechnologyactivetrue
JSP:SPEC:13222.3The 'cookie' implicit object provides access the the named cookie.true +
+
falsetechnologyactivetrue
JSP:SPEC:132.122.3If there are multiple cookies identified by the same name, the implementation must return the first cookie in the array, but the cookie order provided to the implementation is currently not specified.true +
+
truetechnologyactivefalse
JSP:SPEC:13322.3The 'initParam' implicit object provides access to context initialization parameters (obtained via ServletContext.getInitParameter(String name)).true +
+
falsetechnologyactivetrue
JSP:SPEC:13428.1To coerce a value X to type Ytrue +
+
falsetechnologyactivetrue
JSP:SPEC:134.128.1If X is of a primitive type, Let X be the equivalent 'boxed form' of X, otherwise, Let X be the same as X.true +
+
falsetechnologyactivetrue
JSP:SPEC:134.228.1If Y is of a primitive type, Let Y be the equivalent 'boxed form' of Y. Otherwise, let Y be the same as Y.true +
+
falsetechnologyactivetrue
JSP:SPEC:134.328.1Apply conversion rules.true +
+
falsetechnologyactivetrue
JSP:SPEC:134.428.1If Y is a primitive type, then the result is found by 'unboxing' the result of the coercion. If the result of the coercion is null, then error.true +
+
falsetechnologyactivetrue
JSP:SPEC:134.528.1If Y is not a primitive type, the the result is the result of the coercion.true +
+
falsetechnologyactivetrue
JSP:SPEC:13528.2Coerce A to Stringtrue +
+
falsetechnologyactivetrue
JSP:SPEC:135.128.2If A is a String: return Atrue +
+
falsetechnologyactivetrue
JSP:SPEC:135.228.2If A is null, return and empty String ("").true +
+
falsetechnologyactivetrue
JSP:SPEC:135.328.2If A.toString() throws exception, error.true +
+
falsetechnologyactivetrue
JSP:SPEC:135.428.2Otherwise return A.toString()true +
+
falsetechnologyactivetrue
JSP:SPEC:13628.3Coerce A to Number type Ntrue +
+
falsetechnologyactivetrue
JSP:SPEC:136.128.3If A is null or "", return 0true +
+
falsetechnologyactivetrue
JSP:SPEC:136.228.3If A is Character, convert to short, apply numeric rules below.true +
+
falsetechnologyactivetrue
JSP:SPEC:136.328.3If A is a Boolean, then error.true +
+
falsetechnologyactivetrue
JSP:SPEC:136.428.3If A is Number type N, return Atrue +
+
falsetechnologyactivetrue
JSP:SPEC:136.528.3If A is a Number, coerce quietly to type Ntrue +
+
truetechnologyactivetrue
JSP:SPEC:136.628.3If A is String, and N.valueOf(A) throws exception, then error.true +
+
falsetechnologyactivetrue
JSP:SPEC:136.728.3If A is String, and N.valueOf(A) does not throw an exception, return the value.true +
+
falsetechnologyactivetrue
JSP:SPEC:136.828.3All other types will result in an error.true +
+
falsetechnologyactivetrue
JSP:SPEC:13728.4Coerce A to Charactertrue +
+
falsetechnologyactivetrue
JSP:SPEC:137.128.4If A is null or "". return (char) 0true +
+
falsetechnologyactivetrue
JSP:SPEC:137.228.4If A is Character, then return Atrue +
+
falsetechnologyactivetrue
JSP:SPEC:137.328.4If A is Boolean, error.true +
+
falsetechnologyactivetrue
JSP:SPEC:137.428.4If A is Number, coerce quietly to type Short, then return a Character whose numeric value is equivalent to that Short.true +
+
falsetechnologyactivetrue
JSP:SPEC:137.528.4If A is String, return A.charAt(0)true +
+
falsetechnologyactivetrue
JSP:SPEC:137.628.4All other types will result in an error.true +
+
falsetechnologyactivetrue
JSP:SPEC:13828.5Coerce A to Booleantrue +
+
falsetechnologyactivetrue
JSP:SPEC:138.128.5If A is null or "", return falsetrue +
+
falsetechnologyactivetrue
JSP:SPEC:138.228.5Otherwise if A is Boolean, return Atrue +
+
falsetechnologyactivetrue
JSP:SPEC:138.328.5Otherwise if A is String, and Boolean.valueOf(A) throws exception, error.true +
+
falsetechnologyactivetrue
JSP:SPEC:138.428.5Otherwise if A is String , and Bollean.valueOf(A) does not throw exception, return it.true +
+
falsetechnologyactivetrue
JSP:SPEC:138.528.5Any other type, return error.true +
+
falsetechnologyactivetrue
JSP:SPEC:13928.6Coerce A to any other type Ttrue +
+
falsetechnologyactivetrue
JSP:SPEC:139.128.6If A is null, return null.true +
+
falsetechnologyactivetrue
JSP:SPEC:139.228.6If A is assignable to T, coerce quietly.true +
+
falsetechnologyactivetrue
JSP:SPEC:139.328.6If A is String, and T has no Property Editor, then if A is "" return null, otherwise error.true +
+
falsetechnologyactivetrue
JSP:SPEC:139.428.6If A is String, and T's PropertyEditor throws exception, then if A is "" return null, otherwise error.true +
+
falsetechnologyactivetrue
JSP:SPEC:139.528.6Otherwise, apply T's PropertyEditortrue +
+
falsetechnologyactivetrue
JSP:SPEC:139.628.6Otherwise, errortrue +
+
falsetechnologyactivetrue
JSP:SPEC:14033A jsp-property-group will apply a set of properties to a specific group of resources identified via a URL pattern. If a resource matches URL patterns in more than one group, the pattern that is the most specific applies (follows the rules for URL pattern matching as defined in the Servlet Specification).true +
+
falsetechnologyactivetrue
JSP:SPEC:29229the setter method argument must be of type java.lang.Object. [ DynamicAttributeSetterMethod P1] true +
+
falsetechnologyactivefalse
JSP:SPEC:293210No function mapper needs to be provided at function evaluation time.[FunctionMappingInformation]true +
+
falsetechnologyactivefalse
JSP:SPEC:294If an exception is thrown during the method evaluation of a function, the exception must be wrapped in an ELException and the ELException must be thrown. [FunctionMappingELException]true +
+
falsetechnologyactivetrue
JSP:SPEC:14133.2EL expression evaluation can be activated for a group of JSP resources as specified by the URL pattern using the <el-ignored> subelement of the <jsp-property-group> element. If the value provided is true, EL expressions will be evaluated.true +
+
falsetechnologyactivetrue
JSP:SPEC:14233.2EL expression evaluation can be deactivated for a group of JSP resources as specified by the URL pattern using the <el-ignored> subelement of the <jsp-property-group> element. If the value provided is false, EL expressions will be treated as template text (or uninterpreted attribute values).true +
+
falsetechnologyactivetrue
JSP:SPEC:25233.2The container will not evaluated EL-like constructs (${expr}) found in deployed web applications based on Servlet 2.3 or earlier.true +
+
falsetechnologyactivetrue
JSP:SPEC:25433.2If are JSP page matches a URL of a property group and the el-ignored element is not specified, and the web application is 2.4 or later, than any EL expressions encounterd will be evaluated.true +
+
falsetechnologyactivetrue
JSP:SPEC:25533.2If a JSP page that matches a URL pattern of a property group specifies the isELIgnored attribute, this attribute will take precedence over any setting in the JSP property group.true +
+
falsetechnologyactivetrue
JSP:SPEC:14333.3Scripting elements can be allowed for a group of JSP resources as specified by the URL pattern using the <scripting-invalid> subelement of the <jsp-property-group> element. If the value is true, scripting elements such as scriptlets, classic expressions, and declarations will be allowed.true +
+
falsetechnologyactivetrue
JSP:SPEC:14433.3Scripting elements can be disallowed for a group of JSP resources as specified by the URL pattern using the <scripting-invalid> subelement of the <jsp-property-group> element. If the value is false, scripting elements such as scriptlets, classic expressions, and declarations present within this group will result in translation errors for any page containing such elements.true +
+
falsetechnologyactivetrue
JSP:SPEC:25633.3If a JSP page matches a URL pattern of a JSP property group and the property group contains no scripting-invalid element, scripting will be allowed in the page and no translation error will occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:25333.4The <page-encoding> element is used to set the pageEncoding property of a group of JSP pages.true +
+
falsetechnologyactivetrue
JSP:SPEC:14533.4A translation error will occur if the target translation unit specifies a different page encoding than that specified in the <page-encoding> subelement of the <jsp-property-group> element.true +
+
falsetechnologyactivetrue
JSP:SPEC:14633.4A translation error will not occur if the target translation unit specifies the same page encoding as that specified in the <page-encoding> subelement of the <jsp-property-group> element (provided no other issues exist within the translation unit).true +
+
falsetechnologyactivetrue
JSP:SPEC:14733.5The <include-prelude> subelement of the <jsp-property-group> element defines a context-relative path to a resource within the web application that will be automatically included into the beginning of all JSP resources of the particular group.true +
+
falsetechnologyactivetrue
JSP:SPEC:14833.5The <include-coda> subelement of the <jsp-property-group> element defines a context-relative path to a resource within the web application that will be automatically included into the end of all JSP resources of the particular group.true +
+
falsetechnologyactivetrue
JSP:SPEC:14933.5In both cases, <include-prelude> and <include-coda>, if there are multiple entries of these elements they will be included into the JSP page in the order they appear within the <jsp-property-group> element.true +
+
falsetechnologyactivetrue
JSP:SPEC:15033.6The <is-xml> subelement of the <jsp-property-group> element is used to denote that a group of files are JSP doucments, and thus must be interpreted as XML documents.true +
+
falsetechnologyactivetrue
JSP:SPEC:150.133.6If 'true', the files denoted must be interpreted as XML documents.true +
+
falsetechnologyactivetrue
JSP:SPEC:150.233.6If 'false', the files in the associated property group are assumed not to be JSP documents.true +
+
falsetechnologyactivetrue
JSP:SPEC:150.333.6If the <is-xml> subelement is false within one property-group, but another property-group identifying the same set of files sets <is-xml> to true, then the files will be processed as XML documents.true +
+
falsetechnologyactivetrue
JSP:SPEC:29533.7A translation error occurs if the #{ character sequence is used as a String literal (in template text of a JSP 2.1+ container or as an attribute value for a tag-library where jsp-version is 2.1+). [TranslationError#{Sequence]true +
+
falsetechnologyactivetrue
JSP:SPEC:29633.7Allowing the character sequence #{ when used as a String literal can be done by setting the deferred-syntax-allowed-as-literal element to true in the JSP configuration. [DeferredSyntaxAllowedAsLiteralElement]true +
+
falsetechnologyactivetrue
JSP:SPEC:29733.8Enabling the trimming of whitespaces can be done by setting the trim-directive-whitespaces element to true in the JSP configuration. [TrimDirectiveWhitespacesElement]true +
+
falsetechnologyactivetrue
JSP:SPEC:24941For JSP pages in standard syntax, the page character encoding is determined from the followed sources:true +
+
falsetechnologyactivefalse
JSP:SPEC:249.141A JSP configuration element page-encoding value whoe URL pattern matches the page.true +
+
falsetechnologyactivetrue
JSP:SPEC:249.241The pageEncoding attribute of the page directive of the page.true +
+
falsetechnologyactivetrue
JSP:SPEC:249.2.141It is a translation-time error to name different encodings in the pageEncoding attribute of the page directive of a JSP page and in a JSP configuration element whos URL pattern matches the page.true +
+
falsetechnologyactivetrue
JSP:SPEC:249.341The charset value of the contentType attribute of the page directive. This is used to determine the page character encoding if neither a JSP configuration element page-encoding nor the pageEncoding attribute are provided.true +
+
falsetechnologyactivetrue
JSP:SPEC:249.441If neither the JSP configuration page-encoding element, nor the pageEncoding attribute, nor the charset of the contentType attribute are present, ISO-8859-1 will be used as the encoding for the page.true +
+
falsetechnologyactivetrue
JSP:SPEC:249.541Files included using the include directive are read using the character encoding of the including page.true +
+
falsetechnologyactivetrue
JSP:SPEC:25042The JSP container will call ServletResponse.setContentType() after determining the content type as follows:true +
+
falsetechnologyactivefalse
JSP:SPEC:250.142If the TYPE value of the contentType attribute is present in the current translation unit, this TYPE will be used to set the initial response content type.true +
+
falsetechnologyactivetrue
JSP:SPEC:250.242If the contentType attribute is omitted in a JSP page using standard syntax, the initial content type is 'text/html'.true +
+
falsetechnologyactivetrue
JSP:SPEC:250.342If the contentType attribute is omitted in a JSP document, the initial content type is 'text/xml'.true +
+
falsetechnologyactivetrue
JSP:SPEC:250.442The intial response encoding will be the CHARSET value of the contentType attribute of the page directive.true +
+
falsetechnologyactivetrue
JSP:SPEC:250.542For JSP documents, where the contentType attribute is not present, or is present, but doesn't specify a chaset, the response encoding will be UTF-8.true +
+
falsetechnologyactivetrue
JSP:SPEC.250.642For JSP pages in standard syntax that do not have a contentType attribute, or the attribute is present without a charset specification:true +
+
falsetechnologyactivefalse
JSP:SPEC:250.6.142The response encoding used will be that of the pageEncoding attribute or that specified by the JSP configuration element page-encoding whise URL pattern matches the page.true +
+
falsetechnologyactivetrue
JSP:SPEC:250.6.242If the page has no pageEncoding attribute, or there is no matching jsp configuration, the response encoding will be ISO-8859-1.true +
+
falsetechnologyactivetrue
JSP:SPEC:25142The XML view character encoding is always UTF-8true +
+
falsetechnologyactivefalse
JSP:SPEC:249.541For JSP documents, the page character encoding is determined as described in section 4.3.3 and appendix F.1 of the XML specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:249.641The pageEncoding of a JSP document can also be described via the JSP configuration element page-encoding or a pageEncoding attribute of the page directive of the page, as long as long as they are consistent with the encoding as determined in section 4.3.3 and appendix F.1 of the XML specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:249.741It is translation-time error to name different encodings in two or more of the following: the XML prolog of a JSP page, the pageEncoding attribute of the page directive of the JSP page, and in a JSP configuration element whose URL pattern matches the page.true +
+
falsetechnologyactivetrue
JSP:SPEC:249.841The JSP container must raise a translation-time error if an unsupported page character encoding is requested.true +
+
falsetechnologyactivetrue
JSP:SPEC:29841.1For tag files in standard syntax, the page character encoding is determined from a BOM or the pageEncoding attribute of the tag directive of the tag file (in this precedence order), or is ISO-8859-1 if neither is specified. [PageCharacterEncodingDetermination]true +
+
falsetechnologyactivefalse
JSP:SPEC:29941.1When using a BOM, it is legal to describe the character encoding in a JSP configuration element page-encoding or a pageEncoding attribute of the page directive of the page, as long as they are consistent. [BOMCharacterEncodingDescription ]true +
+
falsetechnologyactivetrue
JSP:SPEC:30041.2For JSP documents in XML syntax, it is legal to also describe the character encoding in a JSP configuration element page-encoding or a pageEncoding attribute of the page directive of the document, as long as they are consistent. [BOMLegalCharacterEncoding]true +
+
falsetechnologyactivetrue
JSP:SPEC:15151If the <jsp:useBean> action is used within a scriptless context, then the variable exported will be available via EL expressions.true +
+
falsetechnologyactivetrue
JSP:SPEC:15251If both 'type' and 'class' attributes of the <jsp:useBean> standard action are present, and 'class' is not assignable to 'type', a translation error will occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:15351A translation error will occur of both the 'beanName' and 'class' attributes are specified within the same useBean action.true +
+
falsetechnologyactivetrue
JSP:SPEC:15451The 'beanName' attribute can accept dynamic attribute values (RT or EL).true +
+
falsetechnologyactivetrue
JSP:SPEC:15551The 'beanName' attribute of the <jsp:useBean> action must be of the form "a.b.c", which can resolve to:true +
+
falsetechnologyactivetrue
JSP:SPEC:155.151A java class that will be resolved in the current ClassLoadertrue +
+
falsetechnologyactivetrue
JSP:SPEC:155.251A serialized bean instance in the form similar to a/b/c.ser that will be resolved in the current ClassLoader.true +
+
falsetechnologyactivetrue
JSP:SPEC:155.351If the resource identified by 'beanName' attribute of the <jsp:useBean> action cannot be resolved, a request-time exception, as indicated in the semantics of the instantiate() method of the java.beans.Beans class, will be raised.true +
+
falsetechnologyactivetrue
JSP:SPEC:15651The 'id' attribute of the <jsp:useBean> actions provides the name used to identify the object instance in the specified scopes namespace, and also the scripting variable name declared and initialized with that reference.true +
+
falsetechnologyactivetrue
JSP:SPEC:156.151The name specified is case sensitive.true +
+
falsetechnologyactivetrue
JSP:SPEC:15751The value's provided to the 'id' attribute of the <jsp:useBean> action must be unique within the given translation unit. Any duplicate id's found, will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:15851The 'scope' attribute of the <jsp:useBean> action specifies the scope or namespace within which the object reference is available.true +
+
falsetechnologyactivetrue
JSP:SPEC:158.151If the 'scope' attribute is not specified, the default scope will be 'page'.true +
+
falsetechnologyactivetrue
JSP:SPEC:158.251If a value of 'page' is provided to the 'scope' attribute, the object will be exported to the page scope.true +
+
falsetechnologyactivetrue
JSP:SPEC:158.351If a value of 'request' is provided to the 'scope' attribute, the object will be exported to the request scope.true +
+
falsetechnologyactivetrue
JSP:SPEC:158.451If a value of 'session' is provided to the 'scope' attribute, the object will be exported to the session scope.true +
+
falsetechnologyactivetrue
JSP:SPEC:158.551If a value of 'application' is provided to the 'scope' attribute, the object will be exported to the application scope.true +
+
falsetechnologyactivetrue
JSP:SPEC:158.651If the value provided to the 'scope' attribute is not one of 'page', 'request', 'session', or 'application', a translation error will occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:15951A translation error will occur if the <jsp:useBean> action attempts to export an object to the session scope and sessions have been disabled for the target page.true +
+
falsetechnologyactivetrue
JSP:SPEC:16051For all scopes, it is illegal to change the value of an instance object associated with a particular scope, such that its new runtime type is a subset of the type(s) of the object previously so associated.true +
+
truetechnologyactivefalse
JSP:SPEC:16151Sematics: The actions performed in jsp:useBean action are:true +
+
falsetechnologyactivefalse
JSP:SPEC:161.151The action searches for objects in scope, the search is done synchronized per scope namespace to avoid non-deterministic behavior.true +
+
falsetechnologyactivefalse
JSP:SPEC:161.251A scripting language variable of the specified type (if given) or class (if type is not give) is defined with the given 'id' int he current lexical scope of the scripting language.true +
+
falsetechnologyactivetrue
JSP:SPEC:161.351If the 'class' attribute of the action is provided a value that referrs to an Abstract class, an Interface, or a class with no public no-arg constructor, the implementation may throw a java.lang.InstantiationException, or may raise a translation error.true +
+
truetechnologyactivetrue
JSP:SPEC:161.451If the object, as identified by the 'id' and 'scope' attributes of the action is found, and the object is not castable to the type as specified by the 'type' attribute, a java.lang.ClassCastException shall occur. The action will cease processing at this point.true +
+
falsetechnologyactivetrue
JSP:SPEC:161.551If the jsp:useBean has a non-empty body, it will be ignored (i.e. template text, as well as standard and custom actions will not be processed) and the action will cease processing.true +
+
falsetechnologyactivetrue
JSP:SPEC:161.651If the specified object is not found in the specified scope, and neither 'class' nor 'beanName' are given, a java.lang.InstantiationException shall occur and the action will cease processing.true +
+
falsetechnologyactivetrue
JSP:SPEC:161.751If the specified object is not found in the specified scope, and the 'class' attribute specifies a non-abstract class that defines a public no-args constructor, then the class is instantiated and the object reference is associated with a scripting variable name as identified by the 'id' attribute and exported to the scope as indicated by the 'scope' attribute.true +
+
falsetechnologyactivetrue
JSP:SPEC:161.7.151If the action has a non-empty body, then the body will be processed. Template text will be passed through, and standard and custom actions will be processed by the container.true +
+
falsetechnologyactivetrue
JSP:SPEC:161.851If the specified object is not found in the specified scope, and the 'beanName' attribute is specified, then the method instantiate() of java.beans.Beans will be invoked with the ClassLoader of the Servlet object with the value of the 'beanName' attribute as the argument. If the method succeeds, the object refernece is associated with the scripting variable identified by the 'id' attribute and expored to the scope as indicated by the 'scope' attribute.true +
+
falsetechnologyactivetrue
JSP:SPEC:161.8.151If the action has a non-empty body, then the body will be processed. Template text will be passed through, and standard and custom actions will be processed by the container.true +
+
falsetechnologyactivetrue
JSP:SPEC:161.8.1.1511The body of the action can be specified via the <jsp:body> action.true +
+
falsetechnologyactivetrue
JSP:SPEC:16252The <jsp:setProperty> action sets the values of properties in a Bean.true +
+
falsetechnologyactivefalse
JSP:SPEC:162.152The 'name' attribute specifies the name of a Bean instance defined by a <jsp:useBean> action or some other action. true +
+
falsetechnologyactivetrue
JSP:SPEC:162.1.152The Bean instance must contain the property that is being set.true +
+
falsetechnologyactivefalse
JSP:SPEC:162.1.252If the object in which the property will be set was not introduced before the jsp:setProperty call, the container implementation is recommended, but not required to raise a translation error.false +
+
truetechnologyactivefalse
JSP:SPEC:162.252The 'property' attribute specifies the bean property whose value is to be set.true +
+
falsetechnologyactivetrue
JSP:SPEC:162.2.152If '*' is provided to the property attribute, the action will iterate over the current ServletRequest parameters matching parameter names and value types(s) to property names and setter method type(s), setting each matched property to the value of the matching parameter.true +
+
falsetechnologyactivetrue
JSP:SPEC:162.2.252If a parameter has a value of "", the corresponding property is not modified.true +
+
falsetechnologyactivetrue
JSP:SPEC:162.352The 'param' attribute specifies the name of the request parameter whose value will be given to a Bean property.true +
+
falsetechnologyactivetrue
JSP:SPEC:162.452If the 'param' attribute is omitted from the action, the request parameter name is assumed to be the same as the Bean property name.true +
+
falsetechnologyactivetrue
JSP:SPEC:162.552If the param is not set in the Request object, or if it has the value of "", the action has no effect (a noop).true +
+
falsetechnologyactivetrue
JSP:SPEC:162.652A translation error will occur if both the 'param' and 'value' attributes both specified within the same action.true +
+
falsetechnologyactivetrue
JSP:SPEC:162.752The 'value' attribute specifies the value to assign to the given property.true +
+
falsetechnologyactivetrue
JSP:SPEC:162.7.152The 'value' attribute can accept request-time expressions (RT and EL).true +
+
falsetechnologyactivetrue
JSP:SPEC:162.7.2510The 'value' attribute can be described via the <jsp:attribute> standard action.true +
+
falsetechnologyactivetrue
JSP:SPEC:162.852A translation error will occur if the 'property' attribute value is '*', and any other attributes are provided to the action.true +
+
falsetechnologyactivetrue
JSP:SPEC:162.952When assigning values from a parameter in the request object, the conversions described in JSP.1.14.2.1 are applied, using the target property to determine the target type.true +
+
falsetechnologyactivetrue
JSP:SPEC:162.1052When assigning from a value given as a String constant, the conversions described in JSP.1.14.2.1 are applied, using the target property to determine the target type.true +
+
falsetechnologyactivetrue
JSP:SPEC:162.1152When assigning from a value given as a request-time attribute, no type conversions are applied, as indicated in Section JSP.1.14.2.2true +
+
falsetechnologyactivetrue
JSP:SPEC:162.1252When assinging values to indexed properties the values must be an array; the rules, as indicated in Section JSP.1.14.2.2 apply.true +
+
falsetechnologyactivetrue
JSP:SPEC:16353The <jsp:getProperty> action places the value of a Bean instance property, converted to a String, into the implicit out object.true +
+
falsetechnologyactivetrue
JSP:SPEC:163.153The 'name' attribute specifies the name of the Bean instance from which the property is obtained.true +
+
falsetechnologyactivetrue
JSP:SPEC:163.253The 'property' attribute specifies the name of the property to access within the specified Bean instance.true +
+
falsetechnologyactivetrue
JSP:SPEC:163.353If the object referenced by the 'name' attribute was not 'introduced' via <jsp:useBean> or a custom action with an associated VariableInfo entry, the container implementation, is recommended (but nore required) to raise a translation error, since this page implementation is in violation of the specification.false +
+
truetechnologyactivefalse
JSP:SPEC:163.453The conversion to String is done as in the println() methods, i.e. the toString() method of the object is used for Object instances, and primitive types are converted directly.true +
+
falsetechnologyactivetrue
JSP:SPEC:163.553A translation error will occur if the 'property' attribute is not specified within the action.true +
+
falsetechnologyactivetrue
JSP:SPEC:16454The <jsp:include> action provides for inclusion of static and dynamic resources in the same context as the current page.true +
+
falsetechnologyactivetrue
JSP:SPEC:164.154The 'page' attribute specifies a relative URL (either page or context relative) to a resource within the same web application context.true +
+
falsetechnologyactivetrue
JSP:SPEC:164.254The 'flush' attribute, if true, will immediately flush the buffer prior to inclusion.true +
+
falsetechnologyactivetrue
JSP:SPEC:164.354The 'flush' attribute, if false, will not flush the buffer prior to inclusion.true +
+
falsetechnologyactivetrue
JSP:SPEC:164.454The default value for the 'flush' attribute is false.true +
+
falsetechnologyactivetrue
JSP:SPEC:164.554A translation error will occur of the 'page' attribute is not specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:164.654An included page only has access to the JspWriter object (out).true +
+
falsetechnologyactivetrue
JSP:SPEC:164.754Any attempt by an included page to set headers, will be ignored by the container.true +
+
falsetechnologyactivetrue
JSP:SPEC:164.854An include action may use <jsp:param> action present as body content to provide request parameters for the included resource.true +
+
falsetechnologyactivetrue
JSP:SPEC:164.954The 'page' attribute can accept request-time expressions (either classic RT or EL).true +
+
falsetechnologyactivetrue
JSP:SPEC:164.10510The 'page' attribute can be described via the <jsp:attribute> standard action.true +
+
falsetechnologyactivetrue
JSP:SPEC:16555The <jsp:forward> action will forward the current request to the target resource, be it a static resource, a JSP page, or a servlet class in the same context as the current page.true +
+
falsetechnologyactivetrue
JSP:SPEC:165.155The 'page' attribute specifies the target resource (either via a page relative or context relative path) to which to dispatch the current request to.true +
+
falsetechnologyactivetrue
JSP:SPEC:165.255The request object will be adjusted according to the value of the page attribute.true +
+
falsetechnologyactivefalse
JSP:SPEC:165.355If the page is buffered, the buffer is cleard prior to forwarding.true +
+
falsetechnologyactivetrue
JSP:SPEC:165.455If the page output is buffered, and the buffer was flushed, and attempt to forward the request will result in an IllegalStateExceptiontrue +
+
falsetechnologyactivetrue
JSP:SPEC:165.555If the page output was unbuffered and anything has been written to it, an attempt to forward the request will result in an IllegalStateException.true +
+
falsetechnologyactivetrue
JSP:SPEC:165.655The forward action can accept <jsp:param> actions as body content to provide request parameters for the target resource.true +
+
falsetechnologyactivetrue
JSP:SPEC:165.755A translation error will occur of the 'page' attribute is omitted from the action.true +
+
falsetechnologyactivetrue
JSP:SPEC:165.855The 'page' attribute accepts request-time expressions (either classic RT or EL expressions).true +
+
falsetechnologyactivetrue
JSP:SPEC:165.9510The 'page' attribute can be described via the <jsp:attribute> standard action.true +
+
falsetechnologyactivetrue
JSP:SPEC:16656The <jsp:param> action specifies key/value information.true +
+
falsetechnologyactivetrue
JSP:SPEC:166.156The 'name' attribute specifies the name of the parameter.true +
+
falsetechnologyactivetrue
JSP:SPEC:166.256The 'value' attribute specifies the value for this particular parameter.true +
+
falsetechnologyactivetrue
JSP:SPEC:166.356A translation error will occur if the <jsp:param> action is not a child of a <jsp:include>, <jsp:forward>, <jsp:invoke>, <jsp:doBody>, or a <jsp:params> action.true +
+
falsetechnologyactivetrue
JSP:SPEC:166.456If used in conjunction with <jsp:include> the target resource will see the original request object including the augmented parameters provided by the <jsp:param> action, with the new parameters taking precendence over the originals.true +
+
falsetechnologyactivetrue
JSP:SPEC:166.1056If used in conjunction with <jsp:forward>, the target resource will see the original request object including the augmented parameters provided by the <jsp:param> action, with the new parameters taking precendence over the originals.true +
+
falsetechnologyactivetrue
JSP:SPEC:166.556If used in conjuntion with <jsp:include> or <jsp:forward>, the new parameters will not apply after the action returns.true +
+
falsetechnologyactivetrue
JSP:SPEC:166.656The 'value' attribute can accept request-time (either classic RT or EL) expressions.true +
+
falsetechnologyactivetrue
JSP:SPEC:166.756A translation error will occur if either the 'name' or 'value' attributes is not specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:166.8510The 'value' attribute can be described via the <jsp:attribute> standard action.true +
+
falsetechnologyactivetrue
JSP:SPEC:166.9510The 'name' attribute can be described via the <jsp:attribute> standard action.true +
+
falsetechnologyactivetrue
JSP:SPEC:16757The <jsp:plugin> action enables an JSP page author to generate plugin re-lated HTML.true +
+
falsetechnologyactivefalse
JSP:SPEC:167.157Depending on the browser's user-agent, the action will generate either an HTML OBJECT or EMBED tag.true +
+
truetechnologyactivetrue
JSP:SPEC:167.257The <jsp:params> action specifies a set of parameters (each parameter is defined by a one or more <jsp:param> actions).true +
+
falsetechnologyactivetrue
JSP:SPEC:167.2.157A translation error will occur of the <jsp:params> action is present, but contains no <jsp:param> sub-actions.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.2.258A translation error will occur if the <jsp:params> action is used in any other context outside of the <jsp:plugin> action.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.357The <jsp:fallback> attribute specifies alternate text if the plugin cannot be started.true +
+
falsetechnologyactivefalse
JSP:SPEC:167.3.157The alternate text generated by the <jsp:fallback> action is provided as body content.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.3.2511The body of the <jsp:fallback> attribute can be provided via the <jsp:body> action.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.3.359The use of <jsp:fallback> in any other context (either independent action or child or another) will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.457The 'type' attribute will specifiy the type of component that will generally be either an applet or a Bean.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.4.157A translation error will occur if a value other than 'bean' or 'applet' is provided to the actiontrue +
+
falsetechnologyactivetrue
JSP:SPEC:167.557The 'code' attribute specifies the code attribute of the object per the HTML specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.657The 'codebase' attribute specifies the codebase of the object per the HTML specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.757The 'align' attribute provides the alignment of the object per the HTML specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.857The 'archive' attribute provides the archive used by the object per the HTML specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.957The 'height' attribute specifies the height of the object per the HTML specificationtrue +
+
falsetechnologyactivetrue
JSP:SPEC:167.9.157The 'height' attribute accepts request-time (either classic RT or EL) expressions.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.9.2510The 'height' attribute can be described via the <jsp:attribute> standard action.true +
+
falsetechnologyremovedtrue
JSP:SPEC:167.1057The 'hspace' attribute specifies the hspace of the object per the HTML specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.1157The 'jreversion' attribute specifies the version of JRE required for the object to fuction properly.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.11.157If the 'jreversion' attribute is not specified, the default version present in the generated HTML will be "1.2".true +
+
falsetechnologyactivefalse
JSP:SPEC:167.1257The 'name' attribute specifies the logical name for the embedded object per the HTML specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.1357The 'vspace' attribute specifies the vspace to be used by the embedded object per the HTML specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.1457The 'title' attribute specifies the title of the embedded object per the HTML specification.true +
+
falsetechnologyremovedtrue
JSP:SPEC:167.1557The 'width' attribute specifies the width of the embedded object per the HTML specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.15.157The 'width' attribute can accep request-time (either classic RT or EL) expressions.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.15.2510The 'width' attribute can be described via the <jsp:attribute> standard action.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.1657The 'nspluginurl' attribute specifies the URL where the JRE plugin can be downloaded for netscape.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.16.157If the 'nspluginurl' attribute is not specified, the url returned in the generated HTML is implementation specific.true +
+
truetechnologyactivefalse
JSP:SPEC:167.1757The 'iepluginurl' attribute specifies the URL where the JRE plugin for IE can be downloaded.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.17.157If the 'iepluginurl' attribute is not specified, the url returned in the generated HTML is implementation specific.true +
+
truetechnologyactivefalse
JSP:SPEC:167.1857A translation error will occur if the 'code' attribute is not specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.1957A translation error will occur if the 'codebase' attribute is not specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.2057All of the attributes of the jsp:plugin action can be described using the jsp:attribute action.true +
+
falsetechnologyactivetrue
JSP:SPEC:167.2157The body of the jsp:params action can be provided using the jsp:body action.true +
+
falsetechnologyactivetrue
JSP:SPEC:168510The <jsp:attribute> action allows a page author to define the value of a tag handler attribute in an XML element instead of in the value of the XML attribute.true +
+
falsetechnologyactivefalse
JSP:SPEC:168.1510The 'name' attribute specifies the name of the attribute of the attribute for the tag being invoked.true +
+
falsetechnologyactivetrue
JSP:SPEC:168.1.1510If the attribute does not accept dynamic attributes, and the specified attribute name doesn't exist in the surrounding action, a translation error will occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:168.1.2510A translation error will occur if both an XML element attribute and a <jsp:attribute> element are used to specify the value for the same attribute.true +
+
falsetechnologyactivetrue
JSP:SPEC:168.1.3510A translation error will occur if the 'name' attribute is not specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:168.1.4510If the value provided to the 'name' attribute is a QName with a prefix that doesn't match that of the applicable action, and the action does not accept dynamic attributes, or the parent action is not jsp:element, a translation error will occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:168.2510Any attempt to use the <jsp:attribute> action outside of a JSP standard action, or a JSP custom action must result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:168.3510JSP containers must support the use of <jsp:attribute> for both Classic and Simple Tag Handlers.true +
+
falsetechnologyactivetrue
JSP:SPEC:168.4510For custom action (both Classic and Simple) attribute types of type jakarta.servlet.jsp.tagext.JspFragment, the container must create a JspFragment out of the body of the <jsp:attribute> action and pass it to the tag handler.true +
+
falsetechnologyactivetrue
JSP:SPEC:168.5510A translation error will occur if the attribute type is jakarta.servlet.jsp.tagext.JspFragment, and the body of the <jsp:attribute> action is not scriptless.true +
+
falsetechnologyactivetrue
JSP:SPEC:168.6510If the custom action accepts dynamic attributes, and the name of the attribute is not one explicity indeicated for the tag, then the container will evaluate the body of <jsp:attribute> and assign the computed value to the attribute using the dynamic attribute machinery.true +
+
falsetechnologyactivetrue
JSP:SPEC:168.7510For standard or custom actions attributes that accept a runtime expression value, the container must evaluate the body of the <jsp:attribute> action and use the result of theis evaluation as the value of the attribute.true +
+
falsetechnologyactivetrue
JSP:SPEC:168.8510A translation error must occur if the body of the <jsp:attribute> action contains anything but template text when the standard or custom action attributes do not accept dynamic values.true +
+
falsetechnologyactivetrue
JSP:SPEC:168.9510If the enclosing action is <jsp:element> then the values of the name attribute and the body of the attribute will be used to construct the element dynamically.true +
+
falsetechnologyactivetrue
JSP:SPEC:168.10510If the body of the <jsp:attribute> is empty, it is the equivalent of specifying "" (an empty String) as the value of the attributetrue +
+
falsetechnologyactivetrue
JSP:SPEC:168.11510A translation-time error must occur if jsp:attribute is used to define the value of an attfibute of jsp:attribute.true +
+
falsetechnologyactivetrue
JSP:SPEC:168.12510Attribute names must be accetped and have the appropriate attribute set when jsp:attribute specifies the attribute name using a QName.true +
+
falsetechnologyactivetrue
JSP:SPEC:168.13510If the trim attribute is not specified, then by default, strings will be trimmed at translation time, and not at runtime.true +
+
falsetechnologyactivetrue
JSP:SPEC:168.14510If the value of the trim attribute is true, strings will be trimmed at translation time, and not at runtime.true +
+
falsetechnologyactivetrue
JSP:SPEC:168.15510If the value of the trim attribute is false, strings will not be trimmed at translation or runtime.true +
+
falsetechnologyactivetrue
JSP:SPEC:169511The body of the <jsp:body> action can be specified via the <jsp:body> action.true +
+
falsetechnologyremovedtrue
JSP:SPEC:248511The <jsp:body> allows for the explicit definition of a body for a custom action.true +
+
falsetechnologyremovedtrue
JSP:SPEC:248.1511If one or more <jsp:attribute> elements appear in the body of a tag invocation but no <jsp:body> element appears or an empty <jsp:body> element appears, it is the equivalent of the tag having an empty body.true +
+
falsetechnologyactivetrue
JSP:SPEC:248.2511It is illegal to use <jsp:body> to provide a body to the <jsp:body> and <jsp:attribute> actions.true +
+
falsetechnologyactivetrue
JSP:SPEC:248.3511It is illegal for the <jsp:body> action to be present in a translation unit without a valid standard action or custom action as a parent.true +
+
falsetechnologyactivetrue
JSP:SPEC:170511The <jsp:body> allows for the explicit definition of a body for a custom action.true +
+
falsetechnologyremovedtrue
JSP:SPEC:170.1511The 'value' attribute allows the author to provide the body of the action as an attribute value.true +
+
falsetechnologyremovedtrue
JSP:SPEC:170.1.1511The value of this attribute must evaluate to an instance of jakarta.servlet.jsp.tagext.JspFragment, otherwise a JspException must result.true +
+
falsetechnologyremovedtrue
JSP:SPEC:170.1.2511If the 'value' attribute of <jsp:body> is specified and the action has a body, translation error must occur.true +
+
falsetechnologyremovedtrue
JSP:SPEC:170.1.3511If the 'value' attribute of <jsp:body> is not specified, and the action has no body, a translation error must occur.true +
+
falsetechnologyremovedtrue
JSP:SPEC:170.1.4511The 'value' attribute can accept dynamic attribute values (both EL and RT).true +
+
falsetechnologyremovedtrue
JSP:SPEC:170.2511If the 'value' attribute is used to specify the value of a custom action defined using a Classic Tag Handler, the container must generate code to invoke the fragment, sending the output to the current JspWriter, and passing in a Map of paramters for all AT_BEGIN and NESTED variables provided by the tag handler.true +
+
falsetechnologyremovedtrue
JSP:SPEC:170.3511Any attempt to use the value attribute to define the body of a standard action must result in a translation error.true +
+
falsetechnologyremovedtrue
JSP:SPEC:171512The <jsp:invoke> action will invoke the specified fragment and write the result to the current JspWriter, or to a scoped variable.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.1512The 'fragment' attribute specifies the name used to identify this fragment during this tag invocation.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.2512The 'varReader' attribute specifies the scoped attribute in which to store the result of the fragment invocation. true +
+
falsetechnologyactivetrue
JSP:SPEC:171.2.1512The type of the scoped attribute must be java.io.Reader.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.3512The 'var' attribute specifies the scoped attribute in which to store the result of the fragment invocation.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.3.1512The type of the scoped attribute must be java.lang.String.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.4512The 'scope' attribute specifies the scope in which to store the attribute specified by the 'varReader' or 'var' attributes.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.4.1512A value of 'page' will result in the attribute being stored in the page scope.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.4.2512A value of 'request' will result in the attribute being stored in the request scope.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.4.3512A value of 'session' will result in the attribute being stored in the session scope.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.4.4512A value of 'application' will result in the attribute being stroed in the application scope.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.4.5512If the 'scope' attribute is not specified, the default value of 'page' will be used.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.4.6512/XXX FIXME What happens if client not in session and session scope is specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.4.7512A translation error will occur if the scope attribute is provided an invalid value.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.5512A translation error will occur of the <jsp:invoke> is present outside of a tag file context.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.6512.2If neither 'var' nor 'varReader' attribute is specified, the result of the invocation will be written to the current JspWriter.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.7512.2When the 'varReader' attribute is specified, the object must produce the content sent by the fragment to the provided writer.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.8512.2When the 'var' attribute is specified, the object must store the content sent by the fragment in a String object.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.9512A translation error must occur of both 'var' and 'varReader' are specified within the same action.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.10512.2When 'varReader' attribute is specified, the Reader exported must be resettable, such that if its reset() method is called, the result of the invoked fragment must be able to be read again without re-executing the fragment.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.11512.3A translation error will occur if there is not a one-to-one correlation between the number of <jsp:param> elements present within the body of the <jsp:invoke> action and the required variables as defined by the 'variable' directive.true +
+
falsetechnologyremovedtrue
JSP:SPEC:171.12512.3A translation error must not occur because a <jsp:param> element appears without a corresponding variable directive.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.13512.3A translation error will occur if the body of the <jsp:invoke> action contains body content other than white space and <jsp:param> subelements.true +
+
falsetechnologyactivetrue
JSP:SPEC:171.14512A translation error will occur of the 'fragment' attribute is not specified for a particular <jsp:invoke> action.true +
+
falsetechnologyactivetrue
JSP:SPEC:172513The <jsp:doBody> standard action invokes the body of a tag.true +
+
falsetechnologyactivetrue
JSP:SPEC:172.1513The 'varReader' attribute specifies the scoped attribute in which to store the result of the body invocation.true +
+
falsetechnologyactivetrue
JSP:SPEC:172.1.1513The type of the scoped attribute must be java.io.Reader.true +
+
falsetechnologyactivetrue
JSP:SPEC:172.2513The 'var' attribute specifies the scoped attribute in which to store the result of the body invocation.true +
+
falsetechnologyactivetrue
JSP:SPEC:172.2.1513The type of the scoped attribute must be java.lang.String.true +
+
falsetechnologyactivetrue
JSP:SPEC:172.3513The 'scope' attribute specifies the scope in which to store the attribute specified by the 'varReader' attribute.true +
+
falsetechnologyactivetrue
JSP:SPEC:172.3.1513A value of 'page' will result in the attribute being stored in the page scope.true +
+
falsetechnologyactivetrue
JSP:SPEC:172.3.2513A value of 'request' will result in the attribute being stored in the request scope.true +
+
falsetechnologyactivetrue
JSP:SPEC:172.3.3513A value of 'session' will result in the attribute being stored in the session scope.true +
+
falsetechnologyactivetrue
JSP:SPEC:172.3.4513A value of 'application' will result in the attribute being stroed in the application scope.true +
+
falsetechnologyactivetrue
JSP:SPEC:172.3.5513If the 'scope' attribute is not specified, the default value of 'page' will be used.true +
+
falsetechnologyactivetrue
JSP:SPEC:172.3.6513/XXX FIXME What happens if client not in session and session scope is specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:172.3.7513A translation error will occur if the 'scope' attribute is provided an invalid value.true +
+
falsetechnologyactivetrue
JSP:SPEC:172.4513A translation error will occur if the 'var' and 'varReader' attributes are both specified within the same action.true +
+
falsetechnologyactivetrue
JSP:SPEC:172.5513A translation error will occur if the <jsp:doBody> action contains body content other than white space and <jsp:param> subelements.true +
+
falsetechnologyactivetrue
JSP:SPEC:172.6512A translation error will occur if there is not a one-to-one correlation between the number of <jsp:param> elements present within the body of the <jsp:doBody> action and the required fragment inputs as defined by the 'variable' directive.true +
+
falsetechnologyremovedtrue
JSP:SPEC:172.7512A translation error must not occur because a <jsp:param> element appears without a corresponding variable directive.true +
+
falsetechnologyactivetrue
JSP:SPEC:172.8512A translation error must occur if a <jsp:param> is specified with the same name as a variable with a scope of AT_BEGIN, or NESTED.true +
+
falsetechnologyactivetrue
JSP:SPEC:172.9512A translation error must not occur because a <jsp:param> is specified with the same name as a variable with a scope of AT_END.true +
+
falsetechnologyactivetrue
JSP:SPEC:17361A JSP document is identified though the following algorithm in order or precedence:true +
+
falsetechnologyactivetrue
JSP:SPEC:173.161If a <jsp-property-group> explicitly identifies a set of files as JSP Documents (through the use of <is-xml>), then that indication overrides any other determination.true +
+
falsetechnologyactivetrue
JSP:SPEC:173.261If there is no explicit association and the extension is ".jspx", then the file is a JSP document.true +
+
falsetechnologyactivetrue
JSP:SPEC:173.361If the file is explicitly or implicitly defined as a JSP page and the top element is a jsp:root element, then the file is identified as a JSP doucment (provided for backwards compatibility).true +
+
falsetechnologyactivetrue
JSP:SPEC:173.461It is a translation error for a file that id identified as a JSP document to not be a well-formed XML document.true +
+
falsetechnologyactivetrue
JSP:SPEC:17461RT expressions must be expressed in JSP Documents using the following syntax: "%= expr %".true +
+
falsetechnologyactivetrue
JSP:SPEC:174.161Whitespace after the starting '%=' and before the ending '%" is optional.true +
+
falsetechnologyactivetrue
JSP:SPEC:174.2112.3If an expression appears in more than one run-time attribute, they are evaluated left-to-right in the element.true +
+
falsetechnologyactivetrue
JSP:SPEC:17561It is legal to use any prefix for JSP standard actions within JSP documents as long as the require URI, 'http://java.sun.com/JSP/page" is associated with the specified prefix.true +
+
falsetechnologyactivetrue
JSP:SPEC:17663.2JSP documents and tag files in XML syntax need not have a jsp:root element as its root element.true +
+
falsetechnologyactivetrue
JSP:SPEC:17763.2The jsp:root element can only appear as the root element in a JSP document or in a tag file in XMLsyntax; otherwise a translation error shall occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:17861.4The jsp:directive.page, a child element of the jsp:root element, defines page level properties with the same semantics as the page directive in JSP syntax.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.1110.1jsp:directive.page can appear multiple times, and is position independent within a given translation unit.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.2110.1A translation error will occur if jsp:directive.page defines duplicate attribute/values within a given translation unit, with the exception of the import attribute.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.3110.1The 'isScriptingEnabled' attribute of jsp:directive.page, if true, allows the presence of scripting elements (scriptlets, expressions, declarations) within a given translation unit.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.4110.1The 'isScriptingEnabled' attribute of jsp:directive.page, if false, disallows the presence of scripting elements (scriptlets, expressions, declarations) within a given translation unit and will generate a translation error if they are present.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.5110.1The default value for 'isScriptingEnabled' of jsp:directive.page, if not specified, is true.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.6110.1The 'isELEnabled' attribute of jsp:directive.page, if true, directs the container to evaluate EL expressions.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.7110.1The 'isELEnabled' attribute of jsp:directive.page , if false, will result in EL expression not being evaluated by the container.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.8110.1If the JSP is part of a Web application that is using a Servlet 2.3 or lower deployment descriptor, the default value for the 'isELEnabled' attribute of jsp:directive.page is false.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.9110.1If the JSP is part of a Web application that is using a Servlet 2.4 deployment descriptor, the default value for the 'isELEnabled' attribute of jsp:directive.page is true.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.10110.1All scripting languages, specifiable by jsp:directive.page's 'language' attribute, must provide some implicit objects that a JSP page author can use in declarations, scriptlets, and expressions (see Section JSP.1.3.8 for list of available implicit objects)true +
+
truetechnologyactivefalse
JSP:SPEC:178.11110.1All scripting languages, specifiable by jsp:directive.page's 'language' attribute, must expose the Java technology object model to the script environment, especially implicit variables, JavaBeans components properties, and public methods.true +
+
truetechnologyactivefalse
JSP:SPEC:178.12110.1It is a fatal translation error for a page directive with a non-"java" language attribute to appear after the first scripting has been encountered.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.13110.1The only required scripting language value for the 'language' attribute is "java".true +
+
falsetechnologyactivetrue
JSP:SPEC:178.14110.1The 'extends' attribute of jsp:directive.page specifies a fully qualified Java programming language class name, that names the superclass of the class to which this JSP page is transformedtrue +
+
falsetechnologyactivetrue
JSP:SPEC:178.15110.1The 'import' attribute of jsp:directive.page specifies the fully qualified Java programming language type name denoting a particular type, or of a package name following by the ".*" string, denoting all the public types declared in that package, that shall be imorted by the translated JSP page implementation and is thus available to the scripting language.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.16110.1The default import list for a JSP page is java.lang.*, jakarta.servlet.*, jakarta.servlet.jsp.*, jakarta.servlet.http.*true +
+
falsetechnologyactivetrue
JSP:SPEC:178.17110.1The 'session' attribute of jsp:directive.page, when true, indicates that the JSP page requires participation in an HTTP session.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.18110.1The 'session' attribute of jsp:directive.page, when false, indicates that the JSP page does not participate in an HTTP session; the 'session' implicit object is not available to the page, and any reference to it within the translation unit will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.19110.1If the 'session' attribute of jsp:directive.page is not specified, then the page will, by default, participate in an HTTP session (default value of true).true +
+
falsetechnologyactivetrue
JSP:SPEC:178.20110.1If the 'buffer' attribute of jsp:directive.page is not specified, no buffering will be performed and all output will be written directly through to the ServletResponse PrintWriter.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.21110.1The size value specified by the 'buffer' attribute of jsp:directive.page must be in kilobytes, and the suffix "kb" is mandatory.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.22110.1The container must allocate a buffer at least as large as that specified by the 'buffer' attribute of jsp:directive.page.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.23110.1The default buffer size of 8kb will be used if the 'buffer' attribute of the page directive is not specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.24110.1If the 'autoFlush' attribute of the page directive is true, the output will be automatically flushed when the buffer is filled.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.25110.1If the 'autoFlush' attribute of the page directive is false, an exception will be raised to indicate a buffer overflow.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.26110.1It is illegal to set the 'autoFlush' attribute of jsp:directive.page to false, if the 'buffer' attribute is set to none.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.27110.1If the 'isThreadSafe' attribute of jsp:directive.page is false, the container must serialize requests to the JSP (it should behave like an STM servlet).true +
+
falsetechnologyactivetrue
JSP:SPEC:178.28110.1The 'info' attribute of jsp:directive.page specifies an arbitrary string that is incorporated into the translated page, that can subsequently be obtained from the page's implementation of Servlet.getServletInfo().true +
+
falsetechnologyactivetrue
JSP:SPEC:178.29110.1The 'isErrorPage' attribute of jsp:directive.page. when true, will cause the implicit script language variable "exception" to be defined and its value is a reference to the offending Throwable from the source JSP page in error.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.30110.1If the 'isErrorPage' attribute of jsp:directive.page is defined as false, then the implicit script language variable "exception" will not be available, and any such reference to this variable will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.31110.1The 'errorPage' attribute of jsp:directive.page, specifies the URL, either page-relative or context-relative, of a resource to which any Java programming language Throwable object(s) thrown but not caught by the page implementation are forwarded for error processing. The following request attributes will be made available within the error page:true +
+
falsetechnologyactivetrue
JSP:SPEC:178.31.114.3jakarta.servlet.jsp.jspException - throw Throwable object of the offending exception (for backwards compatibility with JSP 1.2)true +
+
falsetechnologyactivetrue
JSP:SPEC:178.31.214.3jakarta.servlet.error.exception - as per the Servlet specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.31.314.3jakarta.servlet.error.status_code - as per the Servlet specificationtrue +
+
falsetechnologyactivetrue
JSP:SPEC:178.31.414.3jakarta.servlet.error.exception_type - as per the Servlet specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.31.514.3jakarta.servlet.error.message - as per the Servlet specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.31.614.3jakarta.servlet.error.request_uri - as per the Servlet specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.31.714.3jakarta.servlet.error.servlet_name - as per the Servlet specification.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.31.814.3An instance of jakarta.servlet.jsp.ErrorData must be provided to the error page.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.32110.1If the 'errorPage' attribute of jsp:directive.page is defined, it will take presendence over any error pages defined in the web application's deployment descriptor.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.33110.1The character encoding (Content-Type response header) can be in the form of TYPE, or TYPE; Charset=CHARSET, with an optional white space after the ';'. Charset, if present, must be the IANA value for a character encoding. Similarly, if TYPE is a MIME type, see the IANA registry for values.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.34110.1The default Content-Type for JSP Pages in XML syntax is "text/xml".true +
+
falsetechnologyactivetrue
JSP:SPEC:178.35110.1If a charset portion of the value provided to the 'contentType' attribute is not specified, but the page encoding for the JSP page is specified, then the charset used will be that of the specified page encoding.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.36110.1If a charset is not provided as part of the 'contentType' attribute value, and the page encoding does not specifiy a type, then the default charset is ISO-8859-1 for JSP pages in classic syntax.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.37110.1If a charset is not provided as part of the 'contentType' attribute value, and the page encoding does not specifiy a type, then the default charset is UTF-8 for JSP pages in XML syntax.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.38110.1The 'pageEncoding' attribute of jsp:directive.page specifies the character encoding of the page. The value is in the form of CHARSET which my be the IANA value for a character encoding. If no 'pageEncoding' attribute is specified, the default of ISO-8859-1 will be used.true +
+
falsetechnologyactivetrue
JSP:SPEC:178.3961.1A JSP container must support the presence of the jsp:directive.page element within a JSP page.true +
+
falsetechnologyactivetrue
JSP:SPEC:17961.5The jsp:directive.include element, like the include directive, is used to subsitute test and/or code during JSP page translation and has the same semantics as the include directive for JSP pages.true +
+
falsetechnologyactivetrue
JSP:SPEC:179.161.5The jsp:directive:include element can appear anywhere within a JSP document.true +
+
falsetechnologyactivetrue
JSP:SPEC:179.2110.5A JSP container can include a mechanism for being notified if an included file changes, so the container can recompile the JSP page. However, the JSP 2.0 specification does not have a way of directing the JSP container that included files have changed.false +
+
truetechnologyactivefalse
JSP:SPEC:179.3110.5The 'file' attribute of jsp:directive.include specifies the resource to be imported either relative to web appliation context path, or relative to the page performing the include.true +
+
falsetechnologyactivetrue
JSP:SPEC:179.4110.5The jsp:directive.include element includes content at translation time meaning the bytes of the included resource are directly inserted into the page.true +
+
falsetechnologyactivetrue
JSP:SPEC:179.561.1A JSP container must support the presence of the jsp:directive.include element within a JSP page.true +
+
falsetechnologyactivetrue
JSP:SPEC:18061.6The jsp:declaration element is used to declare scripting language constructs that are available to all other scripting elements and follows the same semantics as declarations in standard JSP syntax.true +
+
falsetechnologyactivetrue
JSP:SPEC:180.1112.1A declaration (<jsp:declaration>DECL_BODY</jsp:declaration>) must be a complete declarative statment, or sequence thereof, according to the syntax of the scripting language specified, otherwise a translation error will occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:180.2112.1Declartaions do not produce any output into the current out stream.true +
+
falsetechnologyactivetrue
JSP:SPEC:180.3112.1Declarations are initialized when the JSP page is initialized and are made available to other delcarations, scriptlets, and expressions.true +
+
falsetechnologyactivetrue
JSP:SPEC:180.461.1A JSP container must support the presence of the jsp:declaration element within a JSP page.true +
+
falsetechnologyactivetrue
JSP:SPEC:180.561.1A JSP container must support the presence of the jsp:declaration element within a JSP page.true +
+
falsetechnologyremovedtrue
JSP:SPEC:18161.7The jsp:scriptlet element are program fragments with the same semantics as scriptlets in standard JSP syntax.true +
+
falsetechnologyactivetrue
JSP:SPEC:181.1112.2Scriptlets (<jsp:scriptlet>SCR_BODY</jsp:scriptlet>) can contain any code framents that are valid for the scripting language specified by the 'language' attribute of the page directive, and are executed at request time in the order that they appear on the JSP page.true +
+
falsetechnologyactivetrue
JSP:SPEC:181.261.1A JSP container must support the presence of the jsp:scriptlet element within a JSP page.true +
+
falsetechnologyactivetrue
JSP:SPEC:18261.8The jsp:expression element is used to describe complete expressions in the scripting language that get evaluated at response time. The semantics are the same as expressions in standard JSP syntax.true +
+
falsetechnologyactivetrue
JSP:SPEC:182.1112.3The result of the expression is coerced to a String and emitted into the current JspWriter (out) object.true +
+
falsetechnologyactivetrue
JSP:SPEC:182.2112.3If the result of the expression cannot be coerced to a String, the following must happen: If the problem is detected at translation time, a translation time error shall occur. If the coercion cannot be detected during translation, a ClassCaseException shall be raised at request time.true +
+
falsetechnologyactivefalse
JSP:SPEC:182.3112.3Expressions are evaluated left to right in the JSP document.true +
+
falsetechnologyactivetrue
JSP:SPEC:182.4112.3A translation error will occur if the expression is not a complete expression in the scripting language in which it is written.true +
+
falsetechnologyactivetrue
JSP:SPEC:182.561.1A JSP container must support the presence of the jsp:expression element within a JSP page.true +
+
falsetechnologyactivetrue
JSP:SPEC:18361.9The jsp:element element is used to dynamically define an XML elementtrue +
+
falsetechnologyactivetrue
JSP:SPEC:183.161.9The name of the element can be provided via the 'name' attribute.true +
+
falsetechnologyactivetrue
JSP:SPEC:183.261.9The value of the 'name' attribute can be provided via the jsp:attribute element.true +
+
falsetechnologyactivetrue
JSP:SPEC:183.361.9The body of the jsp:element element will be the body of the generated element.true +
+
falsetechnologyactivetrue
JSP:SPEC:183.461.9The body of the jsp:element element can be provided by the jsp:body element.true +
+
falsetechnologyactivetrue
JSP:SPEC:183.521.1JSP containers must support the presence of the jsp:element within standard JSP pages.true +
+
falsetechnologyactivetrue
JSP:SPEC:18461.12The jsp:text element can be used to enclose template text that will be emitted to the current JspWriter (retaining any whitespace within the element).true +
+
falsetechnologyactivetrue
JSP:SPEC:184.161.1JSP contianer's must support the presence of jsp:text elements within standard JSP files.true +
+
falsetechnologyactivetrue
JSP:SPEC:18561.13Any elements that are not standard or custom actions are to be passed to the current JspWriter after whitespace processing.true +
+
falsetechnologyactivetrue
JSP:SPEC:18662.1The following steps must be taken by containers when converting a JSP document to it's internal XML view:true +
+
falsetechnologyactivefalse
JSP:SPEC:186.162.1Expand all include directives into the JSP framgments they include.true +
+
falsetechnologyactivetrue
JSP:SPEC:186.262.1Add the jsp:id attributetrue +
+
falsetechnologyactivetrue
JSP:SPEC:18762.2The following steps must be taken by a container to convert a JSP page into its XML view:true +
+
falsetechnologyactivetrue
JSP:SPEC:187.162.2Expand all include directives into the JSP framgments the include.true +
+
falsetechnologyactivetrue
JSP:SPEC:187.262.2Add a jsp:root element as the root, with appropriate xmlns:jsp attribute, and convert the taglib directive into xmlns:attributes of the jsp:root element.true +
+
falsetechnologyactivetrue
JSP:SPEC:187.362.2Convert declarations, scriptlets, and expressions into their equivalent XML forms.true +
+
falsetechnologyactivetrue
JSP:SPEC:187.3.152.7JSP declarations are translated into jsp:declaration elements.true +
+
falsetechnologyactivetrue
JSP:SPEC:187.3.252.8JSP scriptlets are translated into jsp:scriptlet elements.true +
+
falsetechnologyactivetrue
JSP:SPEC:187.3.362.9JSP expressions are translated into jsp:expression elements.true +
+
falsetechnologyactivetrue
JSP:SPEC:187.462.2Convert request-time attribute expressions into their equivalent XML forms.true +
+
falsetechnologyactivetrue
JSP:SPEC:187.562.2Convert JSP quotations to XML quitations.true +
+
falsetechnologyactivetrue
JSP:SPEC:187.662.2Create jsp:text elements for all template text.true +
+
truetechnologyactivetrue
JSP:SPEC:187.762.2Add the jsp:id attribute.true +
+
falsetechnologyactivetrue
JSP:SPEC:187.862.3JSP comments (<%-- comment --%>) are not passed through to the XML view of a JSP page.true +
+
falsetechnologyactivetrue
JSP:SPEC:187.962.4JSP page directives are translated into <jsp:directive.page> elements.true +
+
falsetechnologyactivetrue
JSP:SPEC:187.1052.5JSP taglib directives are translated into xmlns:prefix attributes of the jsp:root element.true +
+
falsetechnologyactivetrue
JSP:SPEC:26062.4A JSP Document with a DOCTYPE declaration must be validated by the container in the translation phase. Validation errors must be handled the same way as any other translation phase errors, as described in Section JSP.1.4.1.true +
+
falsetechnologyactivetrue
JSP:SPEC:18862.13As of JSP 2.0, the JSP container must support the jsp:id attribute which is only present in the XML view of a JSP page to improve the quality of translation time errors.true +
+
falsetechnologyactivetrue
JSP:SPEC:18971.4.7Scripting variables can be defined in one of two ways:true +
+
falsetechnologyactivetrue
JSP:SPEC:189.171.4.7Directly within the TLD for a particular action via the <variable> element.true +
+
falsetechnologyactivetrue
JSP:SPEC:189.271.4.7Using a subclass of the TagExtraInfo interface, specifically providing a method body to the getVariableInfo() call.true +
+
falsetechnologyactivetrue
JSP:SPEC:30171.5The <body-content> of a SimpleTag cannot be "JSP". [BodyContentSimpleTagNotJsp] true +
+
falsetechnologyactivetrue
JSP:SPEC:19071.6A translation error must occur if a piece of JSP code that is to be translated into a JSPFragment (any JSP code in the body of a named attribute (<jsp:attribute), that is declared to be a fragment in the TLD, or for the body of any tag handled by a Simple Tag Handler).true +
+
falsetechnologyactivetrue
JSP:SPEC:19171.9A tag library can define listener classes (See Servlet.2.4 specification) which will be instantiated and registered by the JSP container.true +
+
falsetechnologyactivetrue
JSP:SPEC:19271.9Listeners must be instantiated before the start of the application, however, the order in which listeners are registered is undefined.true +
+
truetechnologyactivefalse
JSP:SPEC:30271.11 Tag handlers which implement interfaces jakarta.servlet.jsp.tagext.Tag and jakarta.servlet.jsp.tagext.SimpleTag may be annotated for injection. [TagHandlerResourceInjection]true +
+
falsetechnologyactivetrue
JSP:SPEC:30371.11Resource injection occurs immediately after an instance of a tag handler is constructed, and before any of the tag properties are initialized. [TagHandlerResourceInjectionTiming]true +
+
falsetechnologyactivetrue
JSP:SPEC:30471.11Event Listeners can be annotated for resource injection. [EventListenerResourceInjection]true +
+
falsetechnologyactivetrue
JSP:SPEC:30571.11Resource injection occurs immediately after an instance of an event handler is constructed, and before it is registered. [EventListenerResourceInjectionTiming P1]true +
+
falsetechnologyactivetrue
JSP:SPEC:19372.1When tag libraries are deployed in a JSP container as a JAR file, the standard JAR conventions described in the Servlet 2.4 specification apply, including the conventions for dependencies on extensions.true +
+
falsetechnologyactivetrue
JSP:SPEC:19472.1Packaged tag libraries must have at least one tag library descript file.true +
+
falsetechnologyactivefalse
JSP:SPEC:19572.1Both classic and simple tag handlers (implemented in either Java or as tag files) can be packaged together in the same JAR file.true +
+
falsetechnologyactivetrue
JSP:SPEC:19672.3If a JSP container cannot locate a TLD resource path for a given URI, a fatal translation error shall result.true +
+
falsetechnologyactivetrue
JSP:SPEC:19772.3If the URI resolves to two different TLD resource paths, a translation error will occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:19873.1A TLD must end with the extension ".tld" to be recognized by the container.true +
+
falsetechnologyactivetrue
JSP:SPEC:19973.1When taglibraries are deployed in a JAR file, the TLDs must be present in the META-INF directory in order to be recognized by the container.true +
+
falsetechnologyactivetrue
JSP:SPEC:20073.1When deployed directly in the web application, the TLD's must be be in the WEB-INF directory, or some subdirectory thereof.true +
+
falsetechnologyactivetrue
JSP:SPEC:20173.1A translation error will occur if the TLD resource path doesn't ultimately resolve directly to a TLD within the web application, or to a JAR file that has the taglib.tld file in the META-INF directory of the JAR.true +
+
falsetechnologyactivetrue
JSP:SPEC:30673.1TLD files must not be placed inside /WEB-INF/tags or a subdirectory of it, unless named implicit.tld and intended to configure an implicit tag library with its JSP version and tlib-version. [TldPlacementInWEB-INFtags]true +
+
falsetechnologyactivetrue
JSP:SPEC:20273.3Explicit taglib map entries between URI's and TLD resource paths can be described using taglib elements of the Web Application Deployment descriptor (web.xml).true +
+
falsetechnologyactivetrue
JSP:SPEC:20373.4Implicit taglib map entries can be described via a TLD file(s) located in the META-INF directory of the JAR file (TLD is not named taglib.tld).true +
+
falsetechnologyactivetrue
JSP:SPEC:203.173.4Each TLD file is examined. If it has a <uri> element, then a new <taglib> element is created, with a <taglib-uri> subelement whose value is that of the <uri> element, and with a <taglib-location> subelement that refers to the TLD file.true +
+
falsetechnologyactivetrue
JSP:SPEC:203.273.4If the created <taglib> element has a different <taglib-uri> to any in the taglib map, it is added to the map.true +
+
falsetechnologyactivetrue
JSP:SPEC:20473.9The JSP container may "know of" some specific URIs and may provide alternate implementations for the tag libraries described by these URI's.true +
+
truetechnologyactivefalse
JSP:SPEC:204.173.9When the container does provide an alternate implementation, the implementation must provide the same behavior as that described by the required, portable tag library description described by the URI.true +
+
truetechnologyactivefalse
JSP:SPEC:204.273.9A JSP container must always use the mapping specified for a URI in the web.xml deployment descriptor if present. If the deployer wishes to use the platform-specific implementation of the well-known URI, the mapping for that URI should be removed at deployment time.true +
+
truetechnologyactivefalse
JSP:SPEC:20573.6.1The <taglib-uri> element may be URI of the following types:true +
+
falsetechnologyactivetrue
JSP:SPEC:205.173.6.1An absolute URI.true +
+
falsetechnologyactivetrue
JSP:SPEC:205.273.6.1A context-relative URI (URI starting with '/').true +
+
falsetechnologyactivetrue
JSP:SPEC:205.373.6.1A page-relative URI (URI that doesn't start with '/').true +
+
falsetechnologyactivetrue
JSP:SPEC:20673.6.1If the <taglib-location> sublement is a relative URI without a leading slash, the resolution of the taglib location will be relative to /WEB-INF.true +
+
falsetechnologyactivetrue
JSP:SPEC:206.173.6.1The result of the resolution will be a context-relative path (starts with "/").true +
+
falsetechnologyactivefalse
JSP:SPEC:20773.6.2The following describes the resolution process of the taglib directive to compute the TLD resource path.true +
+
falsetechnologyactivetrue
JSP:SPEC:207.173.6.2If the URI is an absolute URI, check the taglib map for an entry whose URI is the specified absolute URI. If found, the corresponding taglib location is the TLD resource path. The taglib will be usable in the page.true +
+
falsetechnologyactivetrue
JSP:SPEC:207.273.6.2If the absolute URI is not found in the taglib map, a translation error will occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:207.373.6.2If the URI is a context-relative path (URI starts with '/'), look in taglib amp for an entry whose taglib URI matchs the provided URI. If found, the corresponding location is the TLD resource path. The tag library will be available to the pagetrue +
+
falsetechnologyactivetrue
JSP:SPEC:207.473.6.2If the context-relative URI is not found in the taglib map, then the URI provided by the taglib directive is the TLD resource path.true +
+
falsetechnologyactivetrue
JSP:SPEC:207.573.6.2If at translation time, the resource (either a TLD or a JAR where taglib.tld is in the META-INF directory) doesn't exist as specified by the provided context-relative path, a translation error will occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:207.673.6.2If the URI is a page-relative path (the URI doesn't start with a '/') look in the taglib map for the same page-relative path. If found, the corresponding taglib location in the map is the TLD resource path. The tag library will be available to the page.true +
+
falsetechnologyactivetrue
JSP:SPEC:207.773.6.2If the page-relative URI is not found in the taglib map, resolve the page relative path to the current JSP page where the directive appears. This will be used as the TLD resource path. If the resource is found at the resolved location, the tag library will be available to the page.true +
+
falsetechnologyactivetrue
JSP:SPEC:207.873.6.2If, at translation time, the resource identified by the resolved page-relative path doesn't exist (either a TLD or a JAR file with a taglib.tld in META-INF), a translation error will occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:20873.10JSP containers must not alter their behavior based on the content, the presence, or the absence of a particular Tag or Tag Library Extension Element.true +
+
falsetechnologyactivetrue
JSP:SPEC:20973.10JSP containers must consider invalid any tag library that specifies mustUnderstand='true' for any Tag or Tag Library Extension element.true +
+
falsetechnologyactivefalse
JSP:SPEC:21074.1.1All attribute constraints as described in the TLD must be enforced by the container.true +
+
falsetechnologyactivetrue
JSP:SPEC:21183The following must hold true for all tag handlers defined as tag files:true +
+
falsetechnologyactivetrue
JSP:SPEC:211.183The tag file implementation must keep a copy of the JspContext instance passed to it by the invoking page via setJspContext(). This is called the 'Invoking JSP Context'.true +
+
falsetechnologyactivetrue
JSP:SPEC:211.283The tag file implementation must create and maintain a second instance of JspContext called a 'JSP Context Wrapper'. If the Invoking JSP Context is an instance of PageContext, the JSP Context Wrapper must also be an instance of PageContext.true +
+
falsetechnologyactivetrue
JSP:SPEC:211.383For each invocation of the tag, the JSP Context Wrapper must present a clean page scope containing no initial elements. true +
+
falsetechnologyactivetrue
JSP:SPEC:211.483All scopes other than the page scope must be identical to this in the Invoking JSP Context and must be modified accordingly when updates are made to those scopes in the JSP Context Wrapper.true +
+
falsetechnologyactivetrue
JSP:SPEC:211.583Any modifications to the page scope, however, must not affect the Invoking JSP Context.true +
+
falsetechnologyactivetrue
JSP:SPEC:211.683For each attribute declared and specified, a page-scoped variable must be created in the page scope of the JSP Context Wrapper.true +
+
falsetechnologyactivetrue
JSP:SPEC:211.783The name of the variable must be the same as the declared attribute name. true +
+
falsetechnologyactivetrue
JSP:SPEC:211.883The value of the variable must be the value of the attribute passed in during invocation.true +
+
falsetechnologyactivetrue
JSP:SPEC:211.983For each attribute declared as optional and not specified, no page-scoped variable is created.true +
+
falsetechnologyactivetrue
JSP:SPEC:211.1083If the tag accepts dynamic attributes, then page-scoped variables must also be made available for each dynamic attribute passed in.true +
+
falsetechnologyactivetrue
JSP:SPEC:211.1183The 'pageContext' scripting variable must point to the JSP Context Wrapper instead of the Invoking JSP Contexttrue +
+
falsetechnologyactivetrue
JSP:SPEC:211.1283The tag handler must behave as through a tag library descriptor entry was defined for it, in accordance with the tag, attribute, and variable directives that appear in the tag file translation unit.true +
+
falsetechnologyactivetrue
JSP:SPEC:21283If <jsp:forward> is used within a tag file, the generated tag handler must stop processing upon the return of RequestDispatcher.forward() and throw a jakarta.servlet.jsp.SkipPageExceptiontrue +
+
falsetechnologyactivetrue
JSP:SPEC:21383If a tag file invokes a Classic Tag Handler which returns SKIP_PAGE, from doEndTag() , tag file must terminate and SkipPageException must be thrown.true +
+
falsetechnologyactivetrue
JSP:SPEC:21483If a tag file invokes a Classic Tag Handler invokes a a Simple Tag Handler which throws SkipPageException, the tag file must terminate and SkipPageException must be thrown.true +
+
falsetechnologyactivetrue
JSP:SPEC:21583If a tag file invokes a Simple Tag Handler which throws a SkipPageException, processing must terminate with the tag file throwing a SkipPageExceptiontrue +
+
falsetechnologyactivetrue
JSP:SPEC:21683In the case of either Simple or Classic Tag Handlers, the doFinally() method must be called on enclosing tags that implement the TryCatchFinally interface before returning.true +
+
falsetechnologyactivetrue
JSP:SPEC:21783The doEndTag() methods of enclosing classic tags must not be called when SkipPageException is thrown.true +
+
falsetechnologyactivetrue
JSP:SPEC:21883When a tag file attempts to invoke a classic tag handler (i.e one that implements the Tag interface), it must cast the JspContext passed to the SimpleTag into a PageContexttrue +
+
falsetechnologyactivetrue
JSP:SPEC:21983If the cast by a Simple Tag Handler of a JspContext to a PageContext fails, the invocation of the classic tag files, and a JspException must be thrown.true +
+
falsetechnologyactivefalse
JSP:SPEC:22084.1Tag files can be packaged in the /META-INF/tags directory of a JAR file installed in the /WEB-INF/lib directory.true +
+
falsetechnologyactivetrue
JSP:SPEC:220.184.2Any tag files packaged in a JAR file must have a Tag Library Descriptor (TLD) present within the JAR file with a reference for each tag that is to be recognized by the container in the TLD.true +
+
falsetechnologyactivetrue
JSP:SPEC:220.284.2Any tag files within a JAR file that are not defined within a TLD must be ignored by the container.true +
+
falsetechnologyactivetrue
JSP:SPEC:220.384.2A tag library is considered invalid and must be rejected by the container if a <tag-file> element has a <name> subelement with the same content as a <name> subelement in a <tag> element.true +
+
falsetechnologyactivefalse
JSP:SPEC:31484.2Tag files packaged in a JAR inherit the JSP version of the TLD that references them. [JspVersionInheritanceInJarPackagedTagFiles]true +
+
falsetechnologyactivetrue
JSP:SPEC:22184.3Tag files can be packaged in the /WEB-INF/tags/ directory of a web application or a subdirectory thereof.true +
+
falsetechnologyactivetrue
JSP:SPEC:221.184.3The JSP container must interpret the '/WEB-INF/tags/' directory and each subdirectory under it, as another implicitly defined tag library containing tag handlers defined by the tag files that appear in the directory.true +
+
falsetechnologyactivetrue
JSP:SPEC:221.284.3The JSP container must generate an implicit tag library for each directory under and included /WEB-INF/tags/.true +
+
falsetechnologyactivetrue
JSP:SPEC:221.384.3The tag library can only be imported via the tagdir attribute of the taglib directive.true +
+
falsetechnologyactivetrue
JSP:SPEC:221.3.184.3The <tlib-version> element will be defined as 1.0true +
+
falsetechnologyactivefalse
JSP:SPEC:221.3.284.3<short-name> is derived from the directory name that that tag file resides in.true +
+
falsetechnologyactivefalse
JSP:SPEC:221.3.2.184.3 +
+
true +
+
falsetechnologyremovedfalse
JSP:SPEC:221.3.384.3The <tag-file> element is considered to exist for each tag file in this directory. true +
+
falsetechnologyactivefalse
JSP:SPEC:221.3.3.184.3The <name> for each is the filename of the tag file, withouth the .tag extensiontrue +
+
falsetechnologyactivetrue
JSP:SPEC:221.3.3.284.3The <path> element for each is the path of the tag file, relative to the root of the web application.true +
+
falsetechnologyactivefalse
JSP:SPEC:30784.3The JSP version of an implicit tag library defaults to 2.0. [ImplicitTldDefaultJspVersion]true +
+
falsetechnologyactivetrue
JSP:SPEC:30884.3The JSP version and tlib-version of an implicit tag library may be configured by placing a TLD with the reserved name implicit.tld in the same directory as the implicit tag library?s constituent tag files. [ImplicitTldReservedName]true +
+
falsetechnologyactivetrue
JSP:SPEC:30984.3A JSP 2.1 container must consider only the JSP version and tlib-version specified by an implicit.tld file, and ignore its short-name element. [ImplicitTldVersionInfo]true +
+
falsetechnologyactivetrue
JSP:SPEC:31084.3Any elements in addition to jsp-version, tlib-version, and short-name in an implicit.tld file must cause a translation error. [ImplicitTldAdditionalElements]true +
+
falsetechnologyactivetrue
JSP:SPEC:31184.3The JSP version specified in an implicit.tld file must be equal to or greater than 2.0, or else a translation error must be reported. [ImplicitTldMinimumJspVersion]true +
+
falsetechnologyactivetrue
JSP:SPEC:22284.3Upon deployment, the JSP container must seach for and process all tag files appearing in these directories and subdirectories. In processing a tag file, the container makes the custom actions defined in these tags available to JSP files.true +
+
falsetechnologyactivetrue
JSP:SPEC:31284.3If a tag library directory contains two files with the same tag name, the tag library is considered invalid. [TwoFilesSameTagName]true +
+
falsetechnologyactivetrue
JSP:SPEC:31384.3It a tag file is referenced by both a TLD as well as an implicit TLD, the JSP versions of the TLD and implicit TLD do not need to match. [TldImplicitTldJspVersionNotMatch]true +
+
falsetechnologyactivetrue
JSP:SPEC:22385A translation error will occur of a page directive is present within a tag file.true +
+
falsetechnologyactivetrue
JSP:SPEC:22485The taglib directive is legal within Tag files. The semantics of the taglib directive within a tag file are identical to those of a JSP page.true +
+
falsetechnologyactivetrue
JSP:SPEC:22585The include directive is legal within Tag files. The semantics of the include directive within a tag file are identical to those of a JSP page.true +
+
falsetechnologyactivetrue
JSP:SPEC:225.185If the included file contains syntax unsuitable for tag files, a translation error will occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:22685The tag directive is only applicable to tag files. Any attempt to use the tag directive in a JSP page will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:22785The attribute directive is only applicable to tag files. Any attempt to use the attribute directive in a JSP page will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:22885The variable directive is only applicable to tag files. Any attempt to use the variable directive in a JSP page will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:22985.1The 'tag' directive is similar to the page directive, but applied to tag files instead of JSP's.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.185.1A translation unit can container more than one instance of the tag directive, all the attributes will apply to the complete translation unit (i.e. tag directives are position independent).true +
+
falsetechnologyactivetrue
JSP:SPEC:229.285.1Unrecoginized attributes or values will result in a fatal translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.385.1The 'display-name' attribute provides a short name that is intended to be displayed by tools.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.485.1Multiple 'display-name' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.585.1The 'body-content' attribute specifies the body content of this tag.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.5.185.1A valid value is 'empty' meaning no body.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.5.285.1A valid value is 'tagdependent'.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.5.385.1A valid value is 'scriptless'true +
+
falsetechnologyactivetrue
JSP:SPEC:229.5.485.1If the 'body-content' attribute is not specified, it will default to 'scriptless'true +
+
falsetechnologyactivetrue
JSP:SPEC:229.5.585.1Any other value provided to the 'body-content' attribute aside from 'empty', 'tagdependent', or 'scriptless' will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.685.1Multiple 'body-content' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.785.1The 'dynamic-attributes' attribute indicates whether this tag supports additional attributes with dynamic names.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.7.185.1If 'true', the generated tag handler must implement the jakarta.servlet.jsp.tagext.DynamicAttributes interface.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.7.285.1If 'false' the generated tag handler will not implement the jakarta.servlet.jsp.tagext.DynamicAttributes interface.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.7.385.1The default value is 'false'.true +
+
falsetechnologyactivefalse
JSP:SPEC:229.7.485.1If any values are provided to the 'dynamic-attributes' attribute aside from 'true' or 'false' a translation error will occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.885.1Multiple 'dyanmic-attribute' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.985.1The 'small-icon' attribute specifies a relative path, from the tag source file, of an image file containg a small icon that can be used by tools.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.9.185.1If the 'small-icon' attribute is not specified, no icon will be used.true +
+
falsetechnologyactivefalse
JSP:SPEC:229.1085.1Multiple 'small-icon' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.1185.1The 'large-icon' attribute specifies a relative path from the tag source file, of an image file containing a large icon that can be used by tools.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.11.185.1If the 'large-icon' attribute is not specified, no icon will be used.true +
+
falsetechnologyactivefalse
JSP:SPEC:229.1285.1Multiple 'large-icon' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.1385.1The 'description' attribute provides an arbitrary string that describes this tag.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.13.185.1If the 'description' attribute is not specified, no description will be available.true +
+
falsetechnologyactivefalse
JSP:SPEC:229.1485.1Multiple 'description' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.1585.1The 'example' attribute defines an arbitraty string describing the use of this action.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.15.185.1If the 'example' attribute is not specified, no example string will be available.true +
+
falsetechnologyactivefalse
JSP:SPEC:229.1685.1Multiple 'example' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.1785.1The 'language' attribute specifies the scripting language used by the tag file.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.17.1110.1All scripting languages, specifiable by the tag directive's 'language' attribute, must provide some implicit objects that a JSP page author can use in declarations, scriptlets, and expressions (see Section JSP.1.3.8 for list of available implicit objects)true +
+
truetechnologyactivefalse
JSP:SPEC:229.17.2110.1All scripting languages, specifiable by the tag directive's 'language' attribute, must expose the Java technology object model to the script environment, especially implicit variables, JavaBeans components properties, and public methods.true +
+
truetechnologyactivefalse
JSP:SPEC:229.17.3110.1It is a fatal translation error for a tag directive with a non-"java" language attribute to appear after the first scripting has been encountered.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.17.4110.1The only required scripting language value for the 'language' attribute is "java".true +
+
falsetechnologyactivetrue
JSP:SPEC:229.1885.1Multiple 'language' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.1985.1The 'import' attribute of the tag directive specifies the fully qualified Java programming language type name denoting a particular type, or of a package name following by the ".*" string, denoting all the public types declared in that package, that shall be imorted by the translated JSP page implementation and is thus available to the scripting language.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.19.1110.1The default import list for a tag is java.lang.*, jakarta.servlet.*, jakarta.servlet.jsp.*, jakarta.servlet.http.*true +
+
falsetechnologyactivetrue
JSP:SPEC:229.19.285.1multiple uses of this attribute are cumulative (with ordered set union semantics).true +
+
falsetechnologyactivetrue
JSP:SPEC:229.2085.1The 'pageEncoding' attribute of the tag directive specifies the character encoding of the tag. The value is in the form of CHARSET which my be the IANA value for a character encoding. If no 'pageEncoding' attribute is specified, the default of ISO-8859-1 will be used.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.2185.1Multiple 'pageEncoding' attribute/value (re)definitions will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.2285.1The 'pageEncoding' attribute of the tag directive is not influenced at all by any global configuration present in the web.xmltrue +
+
falsetechnologyactivetrue
JSP:SPEC:229.2385.1The 'isScriptingEnabled' attribute specified whether scripting elements are legal within the tag file.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.23.1110.1The 'isScriptingEnabled' attribute of the tag directive, if false, disallows the presence of scripting elements (scriptlets, expressions, declarations) within a given translation unit and will generate a translation error if they are present.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.23.2110.1The default value for 'isScriptingEnabled' of the tag directive, if not specified, is true.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.23.385.1Any value other than 'true' or 'false' provided to the 'isScriptingEnabled' attribute will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.2485.1Multiple 'isScriptingEnabled' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.2585.1The 'isELEnabled' attribute of the tag directive specifies whether or not the container should evaluate EL expressions.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.25.1110.1The 'isELEnabled' attribute of the page directive , if false, will result in EL expressions not being evaluated by the container.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.25.2110.1The default value, if 'isELEnabled' is not specified, is true.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.25.385.1Any value other than 'true' or 'false' provided to the 'isELEnabled' attribute will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:229.2685.1The deferredSyntaxAllowedAsLiteral attribute of the tag directive carries the same syntax and semantics of the deferredSyntaxAllowedAsLiteral attribute of the page directive. [DeferredSyntaxAllowedAsLiteralTagDirectiveAttribute]true +
+
falsetechnologyactivetrue
JSP:SPEC:229.26.185.1The deferredSyntaxAllowedAsLiteral attribute of the tag directive causes a translation error if specified in a tag file with a JSP version less than 2.1. [deferredSyntaxAllowedAsLiteralMinimumJspVersion]true +
+
falsetechnologyactivetrue
JSP:SPEC:229.2785.1The trimDirectiveWhiteSpaces attribute of the tag directive carries the same syntax and semantics of the trimDirectiveWhitespaces attribute of the page directive. [TrimDirectiveWhitespacesTagDirectiveAttribute]true +
+
falsetechnologyactivetrue
JSP:SPEC:229.2685.1Multiple 'isELEnabled' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:23085.2The attribute directive is analogous to the <attribute> element in the Tag Library Descriptor, and allows for the declaration of custom action attributes.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.185.2The 'name' attribute specifies the unique name of the attribute being declared.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.1.185.2A translation error will occur if the 'name' attribute is not specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.1.285.2A translation error will result if there is an attribute directive with a name attribute equal to the value of the name-given attribute of a variable directive in this translation unit.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.1.385.2A translation error will result if there is an attribute directive with a name attribute equal to the value of the dynamicattributes attribute of a tag directive in this translation unit.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.285.2A translation error will occur if more than one attribute directive appears in the same translation unit with the same name.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.385.2The 'required' attribute indicates whether or not the attribute must be present.true +
+
falsetechnologyactivefalse
JSP:SPEC:230.3.185.2If 'true' the attribute is requried and a translation error will occur if the attribute is not provided.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.3.285.2If 'false', the attribute need not be present.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.3.385.2If the 'required' attribute is not specified, the value of 'false' will be assumed.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.485.2The 'fragment' attribute specifies whether this attribute is a fragment to be evaluated by the tag handler or a normal attribute to be evaluated by the container prior to being passed to the tag handler.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.4.185.2If 'true', the type of the attribute is fixed to jakarta.servlet.jsp.tagext.JspFragment.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.4.585.2If the 'fragment' attribute is true, and the 'type' attribute is specified, a translation error will occurtrue +
+
falsetechnologyactivetrue
JSP:SPEC:230.4.285.2If 'true' the 'rtexprvalue' attribute is fixed at true.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.4.2.185.2A translation error will occur if the 'fragment' attribute is 'true' and the 'rtexprvalue' attribute is specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.4.385.2If 'false', the container will evaluate the attribute before passing it to the tag handler.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.4.485.2If the 'fragment' attribute is not specified, the behavior will be as if it was defined as 'false'true +
+
falsetechnologyactivetrue
JSP:SPEC:230.585.2The 'rtexprevalue' attribute specifies whether this attribute accepts dynamic attribute value.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.5.185.2If 'true', the attribute can accept dynamic values.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.5.285.2If 'false', the attribute cannot accept a dynamic value. Any attempt to pass a dynamic value when false will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.5.385.2If 'rtexprvalue' is not specified, the default of 'false' will be assumed.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.5.485.2A translation error will occur if any other value outside of 'true' or 'false' is provided.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.685.2The 'type' attribute specifies the runtime type of the attribute being described.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.6.185.2If the 'type' attribute is not specified, the default of java.lang.String will be assumed.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.6.285.2It is a translation error to specify a primitive type.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.785.2The 'description' attribute specifies a description of the attribute.true +
+
falsetechnologyactivetrue
JSP:SPEC:230.7.185.2If the 'description' attribute is not specified, no description will be available.true +
+
falsetechnologyactivefalse
JSP:SPEC:230.885.2The deferredValue attribute of the attribute directive determines whether the attribute's value represents a deferred value expressiontrue +
+
falsetechnologyactivefalse
JSP:SPEC:230.8.185.2Only one of deferredValue or deferredMethod attribute directive attributes may be true. [OnlyOneOfDeferredValueOrMethod]true +
+
falsetechnologyactivetrue
JSP:SPEC:230.8.285.2If the deferredValueType of the attribute directive is specified, default for deferredValue is true, otherwise default is false.[DefaultDeferredValue]true +
+
falsetechnologyactivetrue
JSP:SPEC:230.8.385.2The deferredValue attribute causes a translation error if specified in a tag file with a JSP version less than 2.1. [deferredValueMinimumJspVersion]true +
+
falsetechnologyactivetrue
JSP:SPEC:230.985.2The deferredValueType attribute of the attribute directive is the expected type resulting from the evaluation of the attribute's value expression.true +
+
falsetechnologyactivefalse
JSP:SPEC:230.9.185.2The deferredValueType attribute defaults to java.lang.String if not specified. [DeferredValueTypeNotSpecified]true +
+
falsetechnologyactivetrue
JSP:SPEC:230.9.285.2If both deferredValueType and deferredValue are specified, deferredValue must be true. [BothDeferredValueTypeAndDeferredValue] true +
+
falsetechnologyactivetrue
JSP:SPEC:230.9.385.2 deferredValue is true, the default for deferredValueType is java.lang.Object.[DeferredValueTypeDefaultWhenDeferredValueTrue]true +
+
falsetechnologyactivetrue
JSP:SPEC:230.9.485.2 The deferredValueType attribute causes a translation error if specified in a tag file with a JSP version less than 2.1. [deferredValueTypeMinimumJspVersion]true +
+
falsetechnologyactivetrue
JSP:SPEC:230.1085.2The deferredMethod attribute of the attribute directive determines whether the attribute's value represents a deferred method expression.true +
+
falsetechnologyactivefalse
JSP:SPEC:230.10.185.2If deferredMethodSignature is specified, the default of the deferredMethod attribute is true, otherwise default is false. [DefaultDeferredMethod]true +
+
falsetechnologyactivetrue
JSP:SPEC:230.10.285.2The deferredMethod attribute causes a translation error if specified in a tag file with a JSP version less than 2.1. +[deferredMethodMinimumJspVersion] + true +
+
falsetechnologyactivetrue
JSP:SPEC:230.1185.2The deferredMethodSignature attribute of the attribute directive represents the signature, as defined in the Java Language Specification, of the method to be invoked in the attribute's method expression.true +
+
falsetechnologyactivefalse
JSP:SPEC:230.11.185.2If both deferredMethod and deferredMethodSignature are specified, deferredMethod must be true. [BothDeferredMethodAndSignature]true +
+
falsetechnologyactivetrue
JSP:SPEC:230.11.285.2If deferredMethod is true and deferredMethodSignature is not specified, deferredMethodSignature defaults to void methodname(). [DefaultDeferredMethodSignature]true +
+
falsetechnologyactivetrue
JSP:SPEC:230.11.395.2The deferredMethodSignature attribute causes a translation error if specified in a tag file with a JSP version less than 2.1. +[deferredMethodSignatureMinimumJspVersion] + true +
+
falsetechnologyactivetrue
JSP:SPEC:23185.3The variable directive is analogous to the <variable> element in the Tag Library Descriptor, and defines the details of a variable exposed by the tag handler to the calling page.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.185.3The 'name-given' attribute specifies the name of the scripting variable to be exposed by the tag.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.1.185.3A translation error will occur if two variable directives have the same value for the 'name-given' attribute.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.285.3The 'name-from-attribute' directive specifies the name of an attribute whose (translation-time) value will give the name of the variable.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.2.185.3A translation error will occur if two variable directives have the same value for the 'name-from-attribute' attribute.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.385.3A translation error will occur if both the 'name-given' and the 'name-from-attribute' attributes are specified within the same directive.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.485.3A translation error will occur if neither the 'name-given' or the 'name-from-attribute' attributes are not specified wihin a variable directive.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.585.3The 'variable-class' attribute specifies the class of the variable.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.5.185.3If the 'variable-class' attribute is not specified, the default class of java.lang.String will be assumed.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.685.3The 'scope' attribute specifies the scope of the variable being declared.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.6.185.3Valid values are AT_BEGIN, AT_END, or NESTED.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.6.285.3If the 'scope' attribute is not specified, the default scope of NESTED will be used.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.6.385.3If any other value is provided outside of AT_BEGIN, NESTED, or AT_END, a translation error will occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.6.485.3A translation error must occur if both 'scope' and 'fragment' are specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.785.3The 'declare' attribute specifies whether the variable is declared or not.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.7.185.3If 'true', the variable will be declared and available based on the specified scope.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.7.285.3If 'false', the variable will not be declared.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.7.385.3A translation error must occur if both 'declare' and 'fragment' are specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.885.3The 'fragment' attribute specifies that the value of this variable is scoped to the specified fragment and does not appear in the body of the tag.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.8.185.3A translation error will occur if the value of 'fragment' does not match the name of an attribute declared earier in this page with 'fragment=true'.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.8.285.3A translation error will occur if 'fragment' is specified and either 'scope' or 'declare' is specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.985.3The 'description' attribute provides an optional description for the variable being declared.true +
+
falsetechnologyactivetrue
JSP:SPEC:231.9.185.3If the 'description' attribute is not specified, no description will be available.true +
+
falsetechnologyactivefalse
JSP:SPEC:23286XML view of Tag Filestrue +
+
falsetechnologyactivefalse
JSP:SPEC:232.186The XML equivalent of the tag directive is the jsp:directive.tag element. The semantics followed are the same as the tag directive in standard syntax.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.185.1A translation unit can contain more than one instance of the tag directive, all the attributes will apply to the complete translation unit (i.e. tag directives are position independent).true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.285.1Unrecoginized attributes or values will result in a fatal translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.385.1The 'display-name' attribute provides a short name that is intended to be displayed by tools.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.485.1Multiple 'display-name' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.585.1The 'body-content' attribute specifies the body content of this tag.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.5.185.1A valid value is 'empty' meaning no body.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.5.285.1A valid value is 'tagdependent'.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.5.385.1A valid value is 'scriptless'true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.5.485.1If the 'body-content' attribute is not specified, it will default to 'scriptless'true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.5.585.1Any other value provided to the 'body-content' attribute aside from 'empty', 'tagdependent', or 'scriptless' will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.685.1Multiple 'body-content' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.785.1The 'dynamic-attributes' attribute indicates whether this tag supports additional attributes with dynamic sata.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.7.185.1If 'true', the generated tag handler must implement the jakarta.servlet.jsp.tagext.DynamicAttributes interface.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.7.285.1If 'false' the generated tag handler will not implement the jakarta.servlet.jsp.tagext.DynamicAttributes interface.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.7.385.1The default value is 'false'.true +
+
falsetechnologyactivefalse
JSP:SPEC:232.1.7.485.1If any values are provided to the 'dynamic-attributes' attribute aside from 'true' or 'false' a translation error will occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.885.1Multiple 'dyanmic-attribute' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.985.1The 'small-icon' attribute specifies a relative path, from the tag source file, of an image file containg a small icon that can be used by tools.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.9.185.1If the 'small-icon' attribute is not specified, no icon will be used.true +
+
falsetechnologyactivefalse
JSP:SPEC:232.1.1085.1Multiple 'small-icon' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.1185.1The 'large-icon' attribute specifies a relative path from the tag source file, of an image file containing a large icon that can be used by tools.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.11.185.1If the 'large-icon' attribute is not specified, no icon will be used.true +
+
falsetechnologyactivefalse
JSP:SPEC:232.1.1285.1Multiple 'large-icon' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.1385.1The 'decription' attribute provides an arbitrary string that describes this tag.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.13.185.1If the 'description' attribute is not specified, no description will be available.true +
+
falsetechnologyactivefalse
JSP:SPEC:232.1.1485.1Multiple 'description' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.1585.1The 'example' attribute defines an arbitraty string describe the use of this action.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.15.185.1If the 'example' attribute is not specified, no example string will be available.true +
+
falsetechnologyactivefalse
JSP:SPEC:232.1.1685.1Multiple 'example' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.1785.1The 'language' attribute specifies the scripting language used by the tag file.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.17.1110.1All scripting languages, specifiable by the tag directive's 'language' attribute, must provide some implicit objects that a JSP page author can use in declarations, scriptlets, and expressions (see Section JSP.1.3.8 for list of available implicit objects)true +
+
truetechnologyactivefalse
JSP:SPEC:232.1.17.2110.1All scripting languages, specifiable by the tag directive's 'language' attribute, must expose the Java technology object model to the script environment, especially implicit variables, JavaBeans components properties, and public methods.true +
+
truetechnologyactivefalse
JSP:SPEC:232.1.17.3110.1It is a fatal translation error for a tag directive with a non-"java" language attribute to appear after the first scripting has been encountered.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.17.4110.1The only required scripting language value for the 'language' attribute is "java".true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.1885.1Multiple 'language' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.1985.1The 'import' attribute of the tag directive specifies the fully qualified Java programming language type name denoting a particular type, or of a package name following by the ".*" string, denoting all the public types declared in that package, that shall be imorted by the translated JSP page implementation and is thus available to the scripting language.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.19.1110.1The default import list for a tag is java.lang.*, jakarta.servlet.*, jakarta.servlet.jsp.*, jakarta.servlet.http.*true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.2085.1The 'pageEncoding' attribute of the tag directive specifies the character encoding of the tag. The value is in the form of CHARSET which my be the IANA value for a character encoding. If no 'pageEncoding' attribute is specified, the default of ISO-8859-1 will be used.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.2185.1Multiple 'pageEncoding' attribute/value (re)definitions will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.2285.1The 'pageEncoding' attribute of the tag directive is not influenced at all by any global configuration present in the web.xmltrue +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.2385.1The 'isScriptingEnabled' attribute specified whether scripting elements are legal within the tag file.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.23.1110.1The 'isScriptingEnabled' attribute of the tag directive, if false, disallows the presence of scripting elements (scriptlets, expressions, declarations) within a given translation unit and will generate a translation error if they are present.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.23.2110.1The default value for 'isScriptingEnabled' of the tag directive, if not specified, is true.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.23.385.1Any value other than 'true' or 'false' provided to the 'isScriptinEnabled' attribute will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.2485.1Multiple 'isScriptingEnabled' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.2585.1The 'isELEnabled' attribute of the tag directive specifies whether or not the container should evaluate EL expressions.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.25.1110.1The 'isELEnabled' attribute of the page directive , if false, will result in EL expressions not being evaluated by the container.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.25.2110.1The default value, if 'isELEnabled' is not specified, is true.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.25.385.1Any value other than 'true' or 'false' provided to the 'isELEnabled' attribute will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.1.2685.1Multiple 'isELEnabled' attribute/value (re)definitions will result in a translation error if values do not match.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.286The attribute directive of a tag file can be described in XML using the jsp:directive.attribute element. The semantics of this element are the same as the attribute directive in standard syntax.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.185.2The 'name' attribute specified the unique name of the attribute being declared.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.1.185.2A translation error will occur if the 'name' attribute is not specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.285.2A translation error will occur if mnore than one attribute directive appears in the same translation unit with the same name.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.385.2The 'required' attribute indicates whether or not the attribute must be present.true +
+
falsetechnologyactivefalse
JSP:SPEC:232.2.3.185.2If 'true' the attribute is requried and a translation error will occur if the attribute is not provided.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.3.285.2If 'false', the attribute need not be present.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.3.385.2If the 'required' attribute is not specified, the value of 'false' will be assumed.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.485.2The 'fragment' attribute specifies whether this attribute is a fragment to be evaluated by the tag handler or a normal attribute to be evaluated by the container prior to being passed to the tag handler.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.4.185.2If 'true', the type of the attribute is fixed to jakarta.servlet.jsp.tagext.JspFragment and a translation error will occur if the 'type' attribute is specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.4.285.2If 'true' the 'rtexprvalue' attribute is fixed at true.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.4.2.185.2A translation error will occur if the 'fragment' attribute is 'true' and the 'rtexprvalue' attribute is specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.4.385.2If 'false', the container will evaluate the attribute before passing it to the tag handler.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.4.485.2If the 'fragment' attribute is not specified, the behavior will be as if it was defined as 'false'true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.585.2The 'rtexprevalue' attribute specifies whether this attribute accepts dynamic attribute value.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.5.185.2If 'true', the attribute can accept dynamic values.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.5.285.2If 'false', the attribute cannot accept a dynamic value. Any attempt to pass a dynamic value when false will result in a translation error.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.5.385.2If 'rtexprvalue' is not specified, the default of 'false' will be assumed.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.5.485.2A translation error will occur if any other value outside of 'true' or 'false' is provided.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.685.2The 'type' attribute specifies the runtime type of the attribute being described.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.6.185.2If the 'type' attribute is not specified, the default of java.lang.String will be assumed.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.785.2The 'description' attribute specifies a description of the attribute.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.2.7.185.2If the 'description' attribute is not specified, no description will be available.true +
+
falsetechnologyactivefalse
JSP:SPEC:232.385.2The variable directive of a tag file can be described in XML using the jsp:directive.variable element. The semantics are the same as the variable directive in standard syntax.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.185.3The 'name-given' attribute specifies the name of the scriptin variable to be exposed by the tag.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.1.185.3A translation error will occur if two variable directives have the same value for the 'name-given' attribute.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.285.3The 'name-from-attribute' directive specifies the name of an attribute whose (translation-time) value will give the name of the variable.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.2.185.3A translation error will occur if two variable directives have the same value for the 'name-from-attribute' attribute.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.385.3A translation error will occur if both the 'name-given' and the 'name-from-attribute' attributes are specified within the same directive.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.485.3A translation error will occur if neither the 'name-given' or the 'name-from-attribute' attributes are not specified wihin a variable directive.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.585.3The 'variable-class' attribute specifies the class of the variable.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.5.185.3If the 'variable-class' attribute is not specified, the default class of java.lang.String will be assumed.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.685.3The 'scope' attribute specifies the scope of the variable being declared.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.6.185.3Valid values are AT_BEGIN, AT_END, or NESTED.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.6.285.3If the 'scope' attribute is not specified, the default scope of NESTED will be used.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.6.385.3If any other value is provided outside of AT_BEGIN, NESTED, or AT_END, a translation error will occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.6.485.3A translation error must occur if both 'scope' and 'fragment' are specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.785.3The 'declare' attribute specifies whether the variable is declared or not.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.7.185.3If 'true', the variable will be declared and available based on the specified scope.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.7.285.3If 'false', the variable will not be declared.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.7.385.3A translation error must occur if both 'declare' and 'fragment' are specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.885.3The 'fragment' attribute specifies that the value of this variable is scoped to the specified fragment and does not appear in the boyd of the tag.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.8.185.3A translation error will occur if the value of 'fragment' does not match the name of an attribute declared earier in this page with 'fragment=true'.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.8.285.3A translation error will occur if 'fragment' is specified and either 'scope' or 'declare' is specified.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.985.3The 'description' attribute provides an optional description for the variable being declared.true +
+
falsetechnologyactivetrue
JSP:SPEC:232.3.9.185.3If the 'description' attribute is not specified, no description will be available.true +
+
falsetechnologyactivefalse
JSP:SPEC:23391.1A JSP page is valid for a Java Platform if and only if the JSP page implementation class, together with any other classes defined by the JSP container, is a valid program for the given Java Platform, and if it passes the validation methods for all the tag libraries associated with the JSP page.true +
+
falsetechnologyactivetrue
JSP:SPEC:234101In JSP 2.0 only 'init' and 'destroy' events are allowed events.true +
+
falsetechnologyactivefalse
JSP:SPEC:235101A JSP page author may provide a jspInit() method, which if present, must be called by the container to prepare the page before the first request is delivered.true +
+
falsetechnologyactivetrue
JSP:SPEC:236101.1.1A JSP page author may provide a jspDestroy() method that can be called by a Container, when a request is not being serviced by the JSP page, to reclaim resources.true +
+
truetechnologyactivefalse
JSP:SPEC:237101.1.1A translation error will occur if a JSP page author attempts to override any Servlet methods through a declaration scripting element.true +
+
falsetechnologyactivefalse
JSP:SPEC:238101.1.2The enforcement of the contract between the JSP container and the JSP page author is aided by the requirement that the Servlet class corresponding to the JSP page must implement the HttpJspPage interface if the protocol is HTTP.true +
+
falsetechnologyactivetrue
JSP:SPEC:239101.1.2The enforcement of the contract between the JSP container and the JSP page author is aided by the requirement that the Servlet class corresponding to the JSP page must implement the JspPage interface of the protocol is not HTTP.true +
+
falsetechnologyactivefalse
JSP:SPEC:240102The name of the JSP implementation class is implementation dependent.true +
+
truetechnologyactivefalse
JSP:SPEC:241102The package that the JSP implementation class belongs to is implementation dependent.true +
+
truetechnologyactivefalse
JSP:SPEC:242102.1All JSP implementation classes must implement the following methodstrue +
+
falsetechnologyactivetrue
JSP:SPEC:242.1102.1Method with signature: public void jspInit()true +
+
falsetechnologyactivetrue
JSP:SPEC:242.2102.1Method with signature: public void jspDestroy()true +
+
falsetechnologyactivetrue
JSP:SPEC:242.3102.1Method with signature: public void _jspService(<ServletRequestSubType>, <ServletResponseSubType>) throws IOException, ServletException -- NOTE: The request/response subtype indicates that the request and response object provided must implement the jakarta.servlet.ServletRequest and jakarta.servlet.ServletResponse interfaces respectively.true +
+
falsetechnologyactivetrue
JSP:SPEC:242.3.1102,1The _jspService(ServletRequest, ServletResponse) method may not be declared in a JSP page via the JSP declaration mechanism.true +
+
falsetechnologyactivefalse
JSP:SPEC:243102.1JSP containers that conform to this specification (in both JSP page implementation classes, and JSP container runtime) must implement the jakarta.servlet.ServletRequest and jakarta.servlet.ServletResponse interfaces.true +
+
falsetechnologyactivefalse
JSP:SPEC:244104All JSP 2.0 compliant containers must support a simple precompilation protocol, as well as some basic reserved parameter names.true +
+
falsetechnologyactivetrue
JSP:SPEC:244.1104A request to a page with the request parameter 'jsp_precompile" is a precompilation request.true +
+
falsetechnologyactivetrue
JSP:SPEC:244.1.1104.2If the value of the request parameter 'jsp_precompile' is 'true' the request will not be delivered to the target page.true +
+
falsetechnologyactivetrue
JSP:SPEC:244.1.2104.2If the value of the request parameter 'jsp_precompile' is 'false', the request will not be delivered to the target page.true +
+
falsetechnologyactivetrue
JSP:SPEC:244.1.3104.2If the value of the request parameter 'jsp_precompile' is 'debug', the request will not be delivered to the target page.true +
+
falsetechnologyactivetrue
JSP:SPEC:244.1.4104.2If the value of the request parameter 'jsp_precompile' is empty (i.e. ""), the request will not be delivered to the target page.true +
+
falsetechnologyactivetrue
JSP:SPEC:244.1.5104.2If the value of the request parameter 'jsp_precompile' is any other value aside from 'true', 'false', 'debug', or an empty parameter, a translation error will occur.true +
+
falsetechnologyactivetrue
JSP:SPEC:245105All JSP 2.0 containers must implement JSR-045 by generating source map debugging information for JSP pages written in either standard or XML syntax.true +
+
falsetechnologyactivefalse
JSP:SPEC:246105The JSP compiler, when producing a class with JSP-045 debug extensions must produce a .class file with a SourceDebugExtension attribute, mapping each line or lines of JSP code to the corresponding generated line or lines of Java code.true +
+
falsetechnologyactivefalse
JSP:SPEC:247105The strata, as defined by JSP-045, that maps to the original JSP source must be named JSP in the Source Debug Extension.true +
+
falsetechnologyactivefalse
JSP:SPEC:315101.11The XML view of an escaped EL expression using the #{expr} syntax follows the same rules as the ${expr} syntax, where ${ is simply substituted with #{.[#{expr}SameAs${expr}]true +
+
falsetechnologyactivetrue
JSP:SPEC:316101.12The same rules for deriving the XML view of escaped expressions for the ${expr} syntax apply for the #{expr} syntax, where ${ is simply substituted with #{[TemplateTextPoundSign]true +
+
falsetechnologyactivetrue
JSP:SPEC:317115SP 2.1 containers are required to provide support for JSR-45 for JSP pages and tag files written in either standard or XML syntax. [JSR45DebuggingSupport]true +
+
falsetechnologyactivetrue
JSP:SPEC:318D1In determining the page encoding of a JSP file where the file is preceded by a BOM: +Read the file using the encoding indicated by the BOM, and search for a pageEncoding attribute in a page declaration. +Report an error if any of the following conditions are met: +There is a <page-encoding> configuration element whose URL pattern matches this page and whose encoding does not match the encoding indicated by the BOM. +There is a pageEncoding page directive attribute whose encoding does not match the encoding indicated by the BOM. +[BOMErrorReporting] + true +
+
falsetechnologyactivetrue
+ + diff --git a/tck/docs/index.html b/tck/docs/index.html new file mode 100644 index 00000000..e9f3f134 --- /dev/null +++ b/tck/docs/index.html @@ -0,0 +1,83 @@ + + + + + + Welcome to the Jakarta Server Pages TCK + + + +
+

Welcome to the Jakarta Server Pages TCK, Version 3.1

+

Your Starting Point

+
+
+

Guide to Jakarta Server Pages TCK 3.1 Documentation

+

The Jakarta Server Pages TCK 3.1 documentation includes the following:

+ +

JT Harness Documentation

+

The online version of the JT Harness version 5.0 documentation is + available here.

+
+

+
+ Copyright © 2013, 2021 Oracle and/or its affiliates. All rights + reserved. +
+ +

+
+ + diff --git a/tck/docs/userguide/README.md b/tck/docs/userguide/README.md new file mode 100644 index 00000000..a3ec2b69 --- /dev/null +++ b/tck/docs/userguide/README.md @@ -0,0 +1,77 @@ +# A JBake project template + +## About JBake + +JBake is a static site generator, it's inspired from jekyll and written +in java. The basic idea is to have templates for the structure of the +page, and the body generated from asciidoc content. + +## Pre requisites + +- Maven +- JDK8+ + +Deploying to Github will require password less authentication. + +This is done by exporting your SSH public key into your Github account. + +## Build the site locally + +The site is generated under target/staging. + +Open file:///PATH_TO_PROJECT_DIR/target/staging in a browser to view the site. + +``` +mvn generate-resources +``` + +Or you can invoke the JBake plugin directly. + +``` +mvn jbake:build +``` + +### Rebuild the site on changes + +``` +mvn jbake:watch +``` + +If you keep this command running, changes to the sources will be +detected and the site will be rendered incrementally. + +This is convenient when writing content. + +### Serve the site locally + +``` +mvn jbake:serve +``` + +If a webserver is required (e.g. absolute path are used), this command +will start a webserver (jetty) at http://localhost:8820. It will also +watch for changes and rebuild incrementally. + +## Deploy the site to Github Pages + +``` +mvn deploy +``` + +## Produce a zip file for download + +To produce a zip file containing the generated html files, use: + +``` +mvn package +``` + +When making a release on GitHub, this zip file should be added to the release. + +## Links + +- [JBake maven plugin documentation](https://github.com/Blazebit/jbake-maven-plugin) +- [JBake documentation](http://jbake.org/docs/2.5.1) +- [Freemarker documentation](http://freemarker.org/docs) +- [AsciiDoc User Guide](http://asciidoc.org/userguide.html) +- [Asciidoctor quick reference](http://asciidoctor.org/docs/asciidoc-syntax-quick-reference) diff --git a/tck/docs/userguide/pom.xml b/tck/docs/userguide/pom.xml new file mode 100644 index 00000000..b75d03b8 --- /dev/null +++ b/tck/docs/userguide/pom.xml @@ -0,0 +1,259 @@ + + + + + 4.0.0 + + org.eclipse.ee4j + project + 1.0.5 + + org.glassfish + tck_jsp + pom + 3.1.0 + Eclipse Foundation Technology Compatibility Kit User's Guide for Jakarta Server Pages for Jakarta EE, Release 3.1 + + + UTF-8 + ${project.build.directory}/staging + true + 2.4.2 + 2.1.0 + 2.1.0 + 1.5.3 + 0.3.3 + 2.3.30 + + + Jakarta-Server-Pages-TCK-Users-Guide.pdf + true + + + + + scm:git:git@github.com:eclipse-ee4j/jakartaee-tck.git + + + + + package + + + org.apache.maven.plugins + maven-clean-plugin + + + + src/main/jbake/content + + toc.adoc + + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-versions + + enforce + + + + + [1.8.0,) + You need JDK8 or newer + + + + + + + + org.glassfish.doc + glassfish-doc-maven-plugin + + + generate-toc + generate-resources + + toc + + + + [0-9]+\s.*,Preface.*,Part\s.* + + + + + generate-book + generate-resources + + book + + + + + + org.jbake + jbake-maven-plugin + + ${site.output.dir} + + ${status} + + + + + build-site + generate-resources + + generate + + + + + + org.asciidoctor + asciidoctor-maven-plugin + + ${project.build.directory}/book + book.adoc + + ${project.build.directory}/staging/ + pdf + ${doc.pdf} + + ${project.basedir}/src/theme + jakartaee + book + ${status} + + + font + + + font + true + + - + true + true + + + + + generate-pdf-doc + generate-resources + + process-asciidoc + + + + + + org.apache.maven.plugins + maven-scm-publish-plugin + + + deploy-site + deploy + + publish-scm + + + gh-pages + false + Update site + + + + + + + + + + org.apache.maven.plugins + maven-clean-plugin + 3.1.0 + + + org.glassfish.doc + glassfish-doc-maven-plugin + 1.3 + + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0-M3 + + + org.apache.maven.plugins + maven-assembly-plugin + 3.3.0 + + + org.apache.maven.plugins + maven-scm-publish-plugin + 3.1.0 + + + org.jbake + jbake-maven-plugin + ${jbake.maven.plugin.version} + + + org.asciidoctor + asciidoctorj + ${asciidoctorj.version} + + + org.asciidoctor + asciidoctorj-diagram + ${asciidoctorj.diagram.version} + + + org.freemarker + freemarker + ${freemarker.version} + + + + + org.asciidoctor + asciidoctor-maven-plugin + ${asciidoctorj.maven.plugin.version} + + + org.asciidoctor + asciidoctorj-pdf + ${asciidoctorj.pdf.version} + + + + + + + diff --git a/tck/docs/userguide/src/main/jbake/assets/README.md b/tck/docs/userguide/src/main/jbake/assets/README.md new file mode 100644 index 00000000..f8f962c0 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/assets/README.md @@ -0,0 +1,4 @@ +# About + +The {{site.title}} project contains the [AsciiDoc](http://asciidoc.org/) +source code for the ... diff --git a/tck/docs/userguide/src/main/jbake/assets/_config.yml b/tck/docs/userguide/src/main/jbake/assets/_config.yml new file mode 100644 index 00000000..68f72a09 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/assets/_config.yml @@ -0,0 +1,15 @@ +remote_theme: jakartaee/jekyll-theme-jakarta-ee + +title: [tck_jsp_v3_1] +description: [Oracle Technology Compatibility Kit User's Guide for Jakarta Server Pages 3.1 for Technology Licensees, + Release 3.1] + +# sidebar links url +links: + source: https://github.com/eclipse-ee4j/jakartaee-tck + download: https://jakarta.ee/specifications/pages/3.1/ + #mailinglist: https://javaee.groups.io/g/tck_jsp_v2_3 + #javadocs: + docs: https://jakarta.ee/specifications/pages/3.1/apidocs + #faq: + diff --git a/tck/docs/userguide/src/main/jbake/assets/css/style.css b/tck/docs/userguide/src/main/jbake/assets/css/style.css new file mode 100644 index 00000000..182f7559 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/assets/css/style.css @@ -0,0 +1,313 @@ +/* CSS */ +/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ +/** 1. Set default font family to sans-serif. 2. Prevent iOS text size adjust after orientation change, without disabling user zoom. */ +html { font-family: sans-serif; /* 1 */ -ms-text-size-adjust: 100%; /* 2 */ -webkit-text-size-adjust: 100%; /* 2 */ } + +/* HTML5 display definitions ========================================================================== */ +/** Correct `block` display not defined for any HTML5 element in IE 8/9. Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox. Correct `block` display not defined for `main` in IE 11. */ +article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, nav, section, summary { display: block; } + +/** 1. Correct `inline-block` display not defined in IE 8/9. 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. */ +audio, canvas, progress, video { display: inline-block; /* 1 */ vertical-align: baseline; /* 2 */ } + +/** Prevent modern browsers from displaying `audio` without controls. Remove excess height in iOS 5 devices. */ +audio:not([controls]) { display: none; height: 0; } + +/** Address `[hidden]` styling not present in IE 8/9/10. Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. */ +[hidden], template { display: none; } + +/* Links ========================================================================== */ +/** Remove the gray background color from active links in IE 10. */ +a { background-color: transparent; } + +/** Improve readability when focused and also mouse hovered in all browsers. */ +a:active, a:hover { outline: 0; } + +/* Text-level semantics ========================================================================== */ +/** Address styling not present in IE 8/9/10/11, Safari, and Chrome. */ +abbr[title] { border-bottom: 1px dotted; } + +/** Address style set to `bolder` in Firefox 4+, Safari, and Chrome. */ +b, strong { font-weight: bold; } + +/** Address styling not present in Safari and Chrome. */ +dfn { font-style: italic; } + +/** Address variable `h1` font-size and margin within `section` and `article` contexts in Firefox 4+, Safari, and Chrome. */ +h1 { font-size: 2em; margin: 0.67em 0; } + +/** Address styling not present in IE 8/9. */ +mark { background: #ff0; color: #000; } + +/** Address inconsistent and variable font size in all browsers. */ +small { font-size: 80%; } + +/** Prevent `sub` and `sup` affecting `line-height` in all browsers. */ +sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } + +sup { top: -0.5em; } + +sub { bottom: -0.25em; } + +/* Embedded content ========================================================================== */ +/** Remove border when inside `a` element in IE 8/9/10. */ +img { border: 0; } + +/** Correct overflow not hidden in IE 9/10/11. */ +svg:not(:root) { overflow: hidden; } + +/* Grouping content ========================================================================== */ +/** Address margin not present in IE 8/9 and Safari. */ +figure { margin: 1em 40px; } + +/** Address differences between Firefox and other browsers. */ +hr { box-sizing: content-box; height: 0; } + +/** Contain overflow in all browsers. */ +pre { overflow: auto; } + +/** Address odd `em`-unit font size rendering in all browsers. */ +code, kbd, pre, samp { font-family: monospace, monospace; font-size: 1em; } + +/* Forms ========================================================================== */ +/** Known limitation: by default, Chrome and Safari on OS X allow very limited styling of `select`, unless a `border` property is set. */ +/** 1. Correct color not being inherited. Known issue: affects color of disabled elements. 2. Correct font properties not being inherited. 3. Address margins set differently in Firefox 4+, Safari, and Chrome. */ +button, input, optgroup, select, textarea { color: inherit; /* 1 */ font: inherit; /* 2 */ margin: 0; /* 3 */ } + +/** Address `overflow` set to `hidden` in IE 8/9/10/11. */ +button { overflow: visible; } + +/** Address inconsistent `text-transform` inheritance for `button` and `select`. All other form control elements do not inherit `text-transform` values. Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. Correct `select` style inheritance in Firefox. */ +button, select { text-transform: none; } + +/** 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls. 2. Correct inability to style clickable `input` types in iOS. 3. Improve usability and consistency of cursor style between image-type `input` and others. */ +button, html input[type="button"], input[type="reset"], input[type="submit"] { -webkit-appearance: button; /* 2 */ cursor: pointer; /* 3 */ } + +/** Re-set default cursor for disabled elements. */ +button[disabled], html input[disabled] { cursor: default; } + +/** Remove inner padding and border in Firefox 4+. */ +button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; } + +/** Address Firefox 4+ setting `line-height` on `input` using `!important` in the UA stylesheet. */ +input { line-height: normal; } + +/** It's recommended that you don't attempt to style these elements. Firefox's implementation doesn't respect box-sizing, padding, or width. 1. Address box sizing set to `content-box` in IE 8/9/10. 2. Remove excess padding in IE 8/9/10. */ +input[type="checkbox"], input[type="radio"] { box-sizing: border-box; /* 1 */ padding: 0; /* 2 */ } + +/** Fix the cursor style for Chrome's increment/decrement buttons. For certain `font-size` values of the `input`, it causes the cursor style of the decrement button to change from `default` to `text`. */ +input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { height: auto; } + +/** 1. Address `appearance` set to `searchfield` in Safari and Chrome. 2. Address `box-sizing` set to `border-box` in Safari and Chrome (include `-moz` to future-proof). */ +input[type="search"] { -webkit-appearance: textfield; /* 1 */ /* 2 */ box-sizing: content-box; } + +/** Remove inner padding and search cancel button in Safari and Chrome on OS X. Safari (but not Chrome) clips the cancel button when the search input has padding (and `textfield` appearance). */ +input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; } + +/** Define consistent border, margin, and padding. */ +fieldset { border: 1px solid #c0c0c0; margin: 0 2px; padding: 0.35em 0.625em 0.75em; } + +/** 1. Correct `color` not being inherited in IE 8/9/10/11. 2. Remove padding so people aren't caught out if they zero out fieldsets. */ +legend { border: 0; /* 1 */ padding: 0; /* 2 */ } + +/** Remove default vertical scrollbar in IE 8/9/10/11. */ +textarea { overflow: auto; } + +/** Don't inherit the `font-weight` (applied by a rule above). NOTE: the default cannot safely be changed in Chrome and Safari on OS X. */ +optgroup { font-weight: bold; } + +/* Tables ========================================================================== */ +/** Remove most spacing between table cells. */ +table { border-collapse: collapse; border-spacing: 0; } + +td, th { padding: 0; } + +/* LAYOUT STYLES */ + +p { margin-top: 0; } + +code, pre { margin-bottom: 30px; font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace; font-size: 13px; color: #222; } + +code { padding: 0 3px; background-color: #f2f8fc; border: solid 1px #dbe7f3; } + +pre { padding: 20px; overflow: auto; text-shadow: none; background: #fff; border: solid 1px #f2f2f2; } + +pre code { padding: 0; color: #2879d0; background-color: #fff; border: none; } + +ul, ol, dl { margin-bottom: 20px; } + +/* COMMON STYLES */ + +td.halign-right { text-align: right; } + +td.halign-center { text-align: center; } + +form { padding: 20px; background: #f2f2f2; } + +h2 { + font-size: 2em; + line-height: 1.2em; + font-weight: 200; + letter-spacing: 0; +} + +h3 { + font-size: 1.4em; + line-height: 1.2em; + font-weight: normal; + letter-spacing: 0; +} + +.sect1 { + margin-left: 4%; + margin-right: 4%; + font: 13px/20px Arial, Helvetica, sans-serif +} + +a:link { + text-decoration: none; + color: #09569d; +} + +#preamble hr{ + margin-left: 0%; + margin-right: 0%; +} + +#preamble .sectionbody table { + font-weight: 200; + margin-left: 4%; + margin-right: 4%; +} + +hr { + margin-bottom: 12px; +} + +table.tableblock.frame-all.grid-all.spread { + font-size: 12px; +} + +code { + font-size:.9em; + border: 1px solid #eaeaea; + background-color: #f6f6f6; + border-radius: 3px; + padding: 1px; + padding-left:2px; + padding-right:2px; +} + +pre.prettyprint.highlight { + border: 1px solid #eaeaea; + background-color: #f6f6f6; + border-radius: 4px; + padding: 8px; + padding-top:4px; + padding-bottom:4px; +} + +.language-oac_no_warn { + font-size:.9em; + color:#222; + background-color: transparent; +} + +#doc-title { + margin-left: 4%; +} + +#top-nav { + margin-left: 4%; + font-size: 12px; +} + +#bottom-nav { + margin-left: 4%; + font-size: 12px; +} + +.vector-font { + color:grey; + font-size: 20px; +} + +#copyright { + padding-top: 10px; + padding-bottom: 4px; + display: table; + margin:0 auto; + color: grey; + font-size: 12px; + vertical-align: middle; +} + +.beta {color: #FF0000} + +/* GENERAL ELEMENT TYPE STYLES */ + +/* #Media Queries +================================================== */ +/* Smaller than standard 960 (devices and browsers) */ +/* Tablet Portrait size to standard 960 (devices and browsers) */ +@media only screen and (min-width: 768px) and (max-width: 959px) { .inner { width: 740px; } + header h1, header h2 { width: 340px; } + header h1 { font-size: 60px; } + header h2 { font-size: 30px; } +} +/* All Mobile Sizes (devices and browser) */ +@media only screen and (max-width: 767px) { .inner { width: 93%; } + header { padding: 20px 0; } + header .inner { position: relative; } + header h1, header h2 { width: 100%; } + header h1 { font-size: 48px; } + header h2 { font-size: 24px; } + header a.button { position: relative; display: inline-block; width: auto; height: auto; padding: 5px 10px; margin-top: 15px; font-size: 13px; line-height: 1; color: #2879d0; text-align: center; background-color: #9ddcff; background-image: none; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; } + header a.button small { display: inline; font-size: 13px; } +} +/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */ +/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */ + +header h1 { padding-top: 14px; font-size: 2em; font-weight: 200; line-height: 1.4; color: #FFFFFF; letter-spacing: 0px; border-bottom: 0px; } + +header h2 { font-size: 1.2em; margin-top: 0; margin-bottom: 0; font-weight: 200; line-height: .8; color: #ec7D11; letter-spacing: 0; } + +//header a.button { background: transparent url(../images/logo.png) 0 0 no-repeat; padding-left: 32px; } + +header a:hover { text-decoration: none; } + +/* Admonition (Note) block */ +.admonitionblock > table { + border: 0; + background: none; + width: 100%; + table-layout: auto; + margin-bottom: 10.5px; +} +.admonitionblock > table td.icon { + text-align: center; + width: 60px; +} +.admonitionblock > table td.icon img { + max-width: none; +} +.admonitionblock > table td.icon .title { + text-transform: uppercase; +} +.admonitionblock > table td.content { + padding-left: 1em; + padding-right: 1em; + border-left: 3px solid #ddd; +} +.admonitionblock > table td.content > :last-child > :last-child { + margin-bottom: 0; +} +.admonitionblock td.icon [class^="fa icon-"]:before { + font-size: 2.5em; + text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); + cursor: default; +} +.admonitionblock td.icon .icon-note:before { + content: "\f05a"; + color: #5bc0de; +} diff --git a/tck/docs/userguide/src/main/jbake/assets/img/eclipse_foundation_logo_tiny.png b/tck/docs/userguide/src/main/jbake/assets/img/eclipse_foundation_logo_tiny.png new file mode 100644 index 00000000..ee830aeb Binary files /dev/null and b/tck/docs/userguide/src/main/jbake/assets/img/eclipse_foundation_logo_tiny.png differ diff --git a/tck/docs/userguide/src/main/jbake/content/README b/tck/docs/userguide/src/main/jbake/content/README new file mode 100644 index 00000000..05fa2c27 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/README @@ -0,0 +1,77 @@ +The file attributes.conf defines several attributes (variables) that +need to be customized for each technology. + +The *.adoc files should not be modified. + +The following "include" files should be customized as necessary +for the specific technology: + +- rules.inc + + Additional compatibility rules needed by some technologies. + The rules in rules.adoc should NOT be changed. + +- defns.inc + + Additional definitions needed by additional compatibility + rules in rules.inc. + +- config.inc + + Detailed instructions for configuring the TCK, included in + Chapter 4. Unfortunately, these are sections 4.1 - 4.3, + so even if the TCK doesn't require 3 sections you need to + make up something, or else change the sections to "N/A". + +- packages.inc + + A simple list of Jakarta EE package names for the technology. + +- tck-packages.inc + + A list of additional software packages included in the TCK. + +- req-software.inc + + A list of software required in addition to the TCK and CI. + +- install-server.inc + + Steps to install the Jakarta EE CI, if needed. + For standalone technologies, no server may be required, + and this file can be empty. + This is used in install.adoc in section 3.2. + +- install-server-vi.inc + + Steps to install a Vendor's web server, if needed. + For standalone technologies, no web server may be required, + and this file can be empty. + This is used in install.adoc in section 3.2. + +- using-examples.inc + + Command line examples showing how to run the TCK. + +- using.inc + + Optional additional instructions for running the TCK. + +- debug-tips.inc + + Technology-specific troubleshooting tips for Chapter 6. + If this isn't needed, it can be an empty file, but toc.adoc + will need to be fixed. + +- rebuild.inc + + Special instructions for rebuilding the WAR files used by some TCKs. + If needed, customize it appropriately and define the "rebuild" + attribute in attributes.conf. + +- title.inc + Add acronym references as required do distinguish between legacy and + current APIs. + +Note that this template is NOT sufficient for the Jakarta EE platform +or Jakarta EE Web Profile. diff --git a/tck/docs/userguide/src/main/jbake/content/attributes.conf b/tck/docs/userguide/src/main/jbake/content/attributes.conf new file mode 100644 index 00000000..3c2a0bb6 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/attributes.conf @@ -0,0 +1,37 @@ +:TechnologyFullName: Jakarta Server Pages +:TechnologyShortName: Server Pages +:LegacyAcronym: JSP +:TechnologyVersion: 3.1 +:ReleaseDate: March 2022 +:CopyrightDates: 2017, 2022 +:TechnologyRI: Eclipse GlassFish 7.0 +:TechnologyRIURL: https://projects.eclipse.org/projects/ee4j.glassfish +:SpecificationURL: https://jakarta.ee/specifications/pages/3.1/ +:TCKInquiryList: mailto:jakartaee-tck-dev@eclipse.org[jakartaee-tck-dev@eclipse.org] +:SpecificationInquiryList: mailto:jsp-dev@eclipse.org[jsp-dev@eclipse.org] +:techID: Pages +// Define this attribute (uncomment it) if the TCK includes no API tests. (Rare.) +// :no-api-tests: +// Define this attribute (uncomment it) if the TCK includes end-to-end tests. +// :end-to-end-tests: +// Define this attribute (uncomment it) if subsets of the API are allowed. +// (Common Annotations only) +// :subset-allowed: +// +// The environment variable used to specify the home directory +// for the technology. Used in config.inc. +:TechnologyHomeEnv: JAVAEE_HOME +// Java SE version required. +:SEversion: 11 +:AntVersion: 1.10.0+ +:JakartaEEVersion: 10.0 +:JavaTestVersion: 5.0 +:jteFileName: /bin/ts.jte +:jtxFileName: /bin/ts.jtx +:TCKPackageName: jakarta-pages-tck-3.1.0.zip +// Directory names used in examples in using.adoc. +:sigTestDirectoryExample: /src/com/sun/ts/tests/signaturetest/jsp +:singleTestDirectoryExample: /src/com/sun/ts/tests/jsp +:subsetTestDirectoryExample: /src/com/sun/ts/tests/jsp +// Define this attribute (uncomment it) if the TCK needs the rebuild appendix. +// :rebuild: diff --git a/tck/docs/userguide/src/main/jbake/content/config.adoc b/tck/docs/userguide/src/main/jbake/content/config.adoc new file mode 100644 index 00000000..7608705f --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/config.adoc @@ -0,0 +1,353 @@ +type=page +status=published +title=Setup and Configuration +next=using.html +prev=install.html +~~~~~~ +include::attributes.conf[] +Setup and Configuration +======================= + +[[GBFVV]] + + + +[[setup-and-configuration]] +4 Setup and Configuration +------------------------- + + +[NOTE] +==== +The Jakarta EE Specification process provides for any number of compatible implementations. +As additional implementations become available, refer to project or product documentation from +those vendors for specific TCK setup and operational guidance. + +==== + +This chapter describes how to set up the {TechnologyShortName} TCK and +JavaTest harness software. Before proceeding with the instructions in +this chapter, be sure to install all required software, as described in +link:install.html#GBFTP[Chapter 3, "Installation."] + +After completing the instructions in this chapter, proceed to +link:using.html#GBFWO[Chapter 5, "Executing Tests,"] for instructions on +running the {TechnologyShortName} TCK. + +include::config.inc[] + +[[GHGDH]][[custom-configuration-handlers]] + +4.4 Custom Configuration Handlers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Configuration handlers are used to configure and unconfigure a +{TechnologyShortName} {TechnologyVersion} implementation during the +certification process. These are similar to deployment handlers but +used for configuration. A configuration handler is an Ant build file +that contains at least the required targets listed below: + + * `config.vi` - to configure the vendor implementation + * `clean.vi` - to unconfigure the vendor implementation + +These targets are called from the `/bin/build.xml` file and +call down into the implementation-specific configuration handlers. + +To provide your own configuration handler, create a config.vi.xml file +with the necessary configuration steps for your implementation and place +the file under the `/bin/xml/impl/` directory. + +For more information, you may wish to view `/bin/xml/impl/glassfish/config.vi.xml`, +the configuration file for Jakarta EE {JakartaEEVersion} Compatible Implementation, {TechnologyRI}. + +[[GBFWG]][[custom-deployment-handlers]] + +4.5 Custom Deployment Handlers +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Deployment handlers are used to deploy and undeploy the WAR files that +contain the tests to be run during the certification process. A deployment +handler is an Ant build file that contains at least the required targets +listed in the table below. + +The {TechnologyShortName} TCK provides these deployment handlers: + +* `/bin/xml/impl/none/deploy.xml` +* `/bin/xml/impl/glassfish/deploy.xml` +* `/bin/xml/impl/tomcat/deploy.xml` + +The `deploy.xml` files in each of these directories are used to control +deployment to a specific container (no deployment, deployment to +the Eclipse GlassFish Web container, deployment to the Tomcat Web container) +denoted by the name of the directory in which each `deploy.xml` file +resides. The primary `build.xml` file in the `/bin` directory +has a target to invoke any of the required targets (`-deploy`, `-undeploy`, +`-deploy.all`, `-undeploy.all`). + +[[GBFVA]][[create-custom-deployment-handler]] + +4.5.1 To Create a Custom Deployment Handler +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +To deploy tests to another {TechnologyShortName} implementation, you +must create a custom handler. + +1. Create a new directory in the `/bin/xml/impl` directory tree. + For example, create the `/bin/xml/impl/my_deployment_handler` directory. + Replace my_deployment_handler with the value of the impl.vi + property that you set in Step 5 of the configuration procedure + described in Section 4.2, "Configuring Your Environment to Repackage + and Run the TCK Against the Vendor Implementation". + +2. Copy the deploy.xml file from the `/bin/xml/impl/none` + directory to the directory that you created. + +3. Modify the required targets in the `deploy.xml` file. This is what + the `deploy.xml` file for the "none" deployment handler looks like. + ++ +[source,oac_no_warn] +---- + + + + + + + + + + + + + + + +---- ++ +Although this example just echoes messages, it does include the four +required Ant targets (`-deploy`, `-undeploy`, `-deploy.all`, `-undeploy.all`) +that your custom `deploy.xml` file must contain. With this as your +starting point, look at the required targets in the `deploy.xml` files +in the Tomcat and Eclipse Glassfish directories for guidance as you create +the same targets for the Web container in which you will run your +implementation of {TechnologyShortName}. + +The following Ant targets can be called from anywhere under the +`/src` directory: + +* `deploy` +* `undeploy` +* `deploy.all` +* `undeploy.all` + +The `deploy.all` and `undeploy.all` targets can also be called from the +`/bin` directory. + +[NOTE] +======================================================================= +The targets in the `deploy.xml` file are never called directly. +They are called indirectly by the targets listed above. +======================================================================= + +[[GBFUY]][[using-the-javatest-harness-software]] + +4.6 Using the JavaTest Harness Software +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There are two general ways to run the {TechnologyShortName} TCK test +suite using the JavaTest harness software: + +* Through the JavaTest GUI; if using this method, please continue on to +link:#GBFWG[Section 4.7, "Using the JavaTest Harness Configuration +GUI."] +* In JavaTest batch mode, from the command line in your shell +environment; if using this method, please proceed directly to +link:using.html#GBFWO[Chapter 5, "Executing Tests."] + +[[GBFWG]][[using-the-javatest-harness-configuration-gui]] + +4.7 Using the JavaTest Harness Configuration GUI +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can use the JavaTest harness GUI to modify general test settings and +to quickly get started with the default {TechnologyShortName} TCK test +environment. This section covers the following topics: + +* link:#GBFVA[Configuration GUI Overview] +* link:#GBFVD[Starting the Configuration GUI] +* link:#GBFVX[To Configure the JavaTest Harness to Run the +{TechnologyShortName} TCK Tests] +* link:#GBFUU[Modifying the Default Test Configuration] + + +[NOTE] +======================================================================= + +It is only necessary to proceed with this section if you want to run the +JavaTest harness in GUI mode. If you plan to run the JavaTest harness in +command-line mode, skip the remainder of this chapter, and continue with +link:using.html#GBFWO[Chapter 5, "Executing Tests."] + +======================================================================= + + +[[GBFVA]][[configuration-gui-overview]] + +4.7.1 Configuration GUI Overview +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +In order for the JavaTest harness to execute the test suite, it requires +information about how your computing environment is configured. The +JavaTest harness requires two types of configuration information: + +* Test environment: This is data used by the tests. For example, the +path to the Java runtime, how to start the product being tested, network +resources, and other information required by the tests in order to run. +This information does not change frequently and usually stays constant +from test run to test run. +* Test parameters: This is information used by the JavaTest harness to +run the tests. Test parameters are values used by the JavaTest harness +that determine which tests in the test suite are run, how the tests +should be run, and where the test reports are stored. This information +often changes from test run to test run. + +The first time you run the JavaTest harness software, you are asked to +specify the test suite and work directory that you want to use. (These +parameters can be changed later from within the JavaTest harness GUI.) + +Once the JavaTest harness GUI is displayed, whenever you choose Start, +then Run Tests to begin a test run, the JavaTest harness determines +whether all of the required configuration information has been supplied: + +* If the test environment and parameters have been completely +configured, the test run starts immediately. +* If any required configuration information is missing, the +configuration editor displays a series of questions asking you the +necessary information. This is called the configuration interview. When +you have entered the configuration data, you are asked if you wish to +proceed with running the test. + +[[GBFVD]][[starting-the-configuration-gui]] + +4.7.2 Starting the Configuration GUI +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Before you start the JavaTest harness software, you must have a valid +test suite and Java SE {SEversion} installed on your system. + +The {TechnologyShortName} TCK includes an Ant script that is used to execute the +JavaTest harness from the `` directory. Using this Ant script +to start the JavaTest harness is part of the procedure described in +link:#GBFVX[Section 4.7.3, "To Configure the JavaTest Harness to Run the +TCK Tests."] + +When you execute the JavaTest harness software for the first time, the +JavaTest harness displays a Welcome dialog box that guides you through +the initial startup configuration. + +* If it is able to open a test suite, the JavaTest harness displays a +Welcome to JavaTest dialog box that guides you through the process of +either opening an existing work directory or creating a new work +directory as described in the JavaTest online help. +* If the JavaTest harness is unable to open a test suite, it displays a +Welcome to JavaTest dialog box that guides you through the process of +opening both a test suite and a work directory as described in the +JavaTest documentation. + +After you specify a work directory, you can use the Test Manager to +configure and run tests as described in link:#GBFVX[Section 4.7.3, "To +Configure the JavaTest Harness to Run the TCK Tests."] + +[[GBFVX]][[to-configure-the-javatest-harness-to-run-the-tck-tests]] + +4.7.3 To Configure the JavaTest Harness to Run the TCK Tests +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The answers you give to some of the configuration interview questions +are specific to your site. For example, the name of the host on which +the JavaTest harness is running. Other configuration parameters can be +set however you wish. For example, where you want test report files to +be stored. + +Note that you only need to complete all these steps the first time you +start the JavaTest test harness. After you complete these steps, you can +either run all of the tests by completing the steps in +link:using.html#GBFUZ[Section 5.1, "Starting JavaTest,"] or run a subset +of the tests by completing the steps in link:using.html#GBFWM[Section +5.2, "Running a Subset of the Tests."] + +1. Change to the `/bin` directory and start the JavaTest test +harness: + +`cd /bin` + +`ant gui` +2. From the File menu, click *Open Quick Start Wizard*. + +The Welcome screen displays. +3. Select *Start a new test run*, and then click *Next*. + +You are prompted to create a new configuration or use a configuration +template. +4. Select *Create a new configuration*, and then click *Next*. + +You are prompted to select a test suite. +5. Accept the default suite (`/src`), and then click *Next*. + +You are prompted to specify a work directory to use to store your test +results. +6. Type a work directory name or use the *Browse* button to select a work +directory, and then click *Next*. + +You are prompted to start the configuration editor or start a test run. +At this point, the {TechnologyShortName} TCK is configured to run the +default test suite. +7. Deselect the *Start the configuration editor* option, and then click +*Finish*. +8. Click *Run Tests*, then click *Start*. + +The JavaTest harness starts running the tests. +9. To reconfigure the JavaTest test harness, do one of the following: +* Click *Configuration*, then click *New Configuration*. +* Click *Configuration*, then click *Change Configuration*. +10. Click *Report*, and then click *Create Report*. +11. Specify the directory in which the JavaTest test harness will write +the report, and then click *OK*. + +A report is created, and you are asked whether you want to view it. +12. Click *Yes* to view the report. + +[[GBFUU]][[modifying-the-default-test-configuration]] + +4.7.4 Modifying the Default Test Configuration +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The JavaTest GUI enables you to configure numerous test options. These +options are divided into two general dialog box groups: + +* Group 1: Available from the JavaTest *Configure/Change Configuration* +submenus, the following options are displayed in a tabbed dialog box: + +** *Tests to Run* + +** *Exclude List* + +** *Keywords* + +** *Prior Status* + +** *Test Environment* + +** *Concurrency* + +** *Timeout Factor* +* Group 2: Available from the JavaTest *Configure/Change +Configuration/Other Values* submenu, or by pressing `Ctrl+E`, the following +options are displayed in a paged dialog box: + +** *Environment Files* + +** *Test Environment* + +** *Specify Tests to Run* + +** *Specify an Exclude List* + +Note that there is some overlap between the functions in these two +dialog boxes; for those functions use the dialog box that is most +convenient for you. Please refer to the JavaTest Harness documentation +or the online help for complete information about these various options. + + diff --git a/tck/docs/userguide/src/main/jbake/content/config.inc b/tck/docs/userguide/src/main/jbake/content/config.inc new file mode 100644 index 00000000..72ae898d --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/config.inc @@ -0,0 +1,165 @@ +/////////////////////////////////////////////////////////////////////// +NOTE TO WRITERS: +The following sections should be customized for the technology. +This text was originally from the JAX-RS TCK. Most references +to JAX-RS have been parameterized to serve as a simple starting +point for customization. There are still many details that will +need to be changed or removed. The major sections 4.1, 4.2, and +4.3 should be preserved. If their titles are changed, the links +at the top of config.adoc will need to be changed as well as well +as toc.adoc. +/////////////////////////////////////////////////////////////////////// + +[[GBFVU]][[configuring-your-environment-to-run-the-tck-against-the-reference-implementation]] + +4.1 Configuring Your Environment to Run the TCK Against the Reference Implementation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +After configuring your environment as described in this section, +continue with the instructions in link:#GBFUY[Section 4.6, "Using the +JavaTest Harness Software."] + + +[NOTE] +======================================================================= + +In these instructions, variables in angle brackets need to be expanded +for each platform. For example, `` becomes `$TS_HOME` on +Solaris/Linux and `%TS_HOME%` on Windows. In addition, the forward +slashes (`/`) used in all of the examples need to be replaced with +backslashes (`\`) for Windows. Finally, be sure to use the appropriate +separator for your operating system when specifying multiple path +entries (`;` on Windows, `:` on UNIX/Linux). + +On Windows, you must escape any backslashes with an extra backslash in +path separators used in any of the following properties, or use forward +slashes as a path separator instead. + +======================================================================= + + +1. Set the following environment variables in your shell environment: + a. `JAVA_HOME` to the directory in which Java SE {SEversion} is installed + b. `TS_HOME` to the directory in which the {TechnologyShortName} TCK + {TechnologyVersion} software is installed + c. +{TechnologyHomeEnv}+ to the directory in which the {TechnologyShortName} + {TechnologyVersion} CI has been installed + d. `PATH` to include the following directories: `JAVA_HOME/bin`, + +{TechnologyHomeEnv}/bin+, and `ANT_HOME/bin` +2. Copy /bin/ts.jte.jdk11 as /bin/ts.jte if JAVA_HOME is Java SE 11. +Edit your `/bin/ts.jte` file and set the following +environment variables: + a. Set the `webServerHost` property to the name of the host on which + Jakarta EE {JakartaEEVersion} CI (for example {TechnologyRI}) is running. + + The default setting is `localhost`. + b. Set the `webServerPort` property to the port number of the host on + which your Jakarta EE {JakartaEEVersion} CI is running. + + The default setting is `8080`. + c. Set the `webServerHome` property to the installation directory of Jakarta EE + {JakartaEEVersion} CI. + d. `web.deployment.handler` to an Ant file that contains at least a + single target named `deploy`. + + When `ant deploy` is invoked, this target will be invoked to handle the + deployment of the web applications to the target server. To use a custom + handler, copy the handler to the `/bin/deploy` directory and + provide only the filename as the property value. + + The {TechnologyShortName} TCK includes the following handlers: + + * `noop`: No deployment; default setting + * `glassfish`: Deploy to the Jakarta EE {JakartaEEVersion} CI server {TechnologyRI} + * `jwsdp`: Deploy to a server running the Java Web Services Developers + Pack or to a Tomcat server + + See link:#GCRVD[Section 4.5, "Custom Deployment Handlers,"] for + information about creating your own deployment handler and setting the + `web.deployment.handler` property to use that handler. + e. `jspservlet.classes` to the path to the Servlet and {TechnologyShortName} API classes + that are used for building. + + The `ts.jte` file includes examples that show how to set the classes + properties for {TechnologyRI} servers. + f. `jstl.classes` to the path to the Jakarta Standard Tag Library JAR files. + g. `report.dir` to the default directory in which JavaTest creates a + test report for the most recent test run. + + This property is a required property for the TCK Ant targets; it must be + set. To disable reporting, set the `report.dir` property to `"none"`. + h. `work.dir` to the default directory in which JavaTest writes + temporary files that are created during test execution. + + This property is required for the TCK Ant targets. + i. When the signature tests are run, the `sigTestClasspath` property + must be set to a list of JAR files and directories which contain the + Jakarta EE and Java SE classes. + + Paths must be separated by the appropriate path separator ("`;`" on + Windows, "`:`" on Solaris/Linux). + j. `porting.ts.url.class.1` to the class names of your porting class + implementations. + + By default, the property settings point to the {TechnologyShortName} TCK CI-specific + classes. ++ +3. Provide your own implementation of the porting package interface +provided with the {TechnologyShortName} TCK. + +The porting package interface, `TSURLInterface.java`, obtains URL +strings for web resources in an implementation-specific manner. API +documentation for the `TSURLInterface.java` porting package interface is +available in the {TechnologyShortName} TCK documentation bundle. + + +[[GCLHU]][[configuring-your-environment-to-repackage-and-run-the-tck-against-the-vendor-implementation]] + +4.2 Configuring Your Environment to Repackage and Run the TCK Against the Vendor Implementation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +After configuring your environment as described in this section, +continue with the instructions in link:#GBFUY[Section 4.4, "Using the +JavaTest Harness Software."] + + +[NOTE] +======================================================================= + +In these instructions, variables in angle brackets need to be expanded +for each platform. For example, `` becomes `$TS_HOME` on +Solaris/Linux and `%TS_HOME%` on Windows. In addition, the forward +slashes (`/`) used in all of the examples need to be replaced with +backslashes (`\`) for Windows. Finally, be sure to use the appropriate +separator for your operating system when specifying multiple path +entries (`;` on Windows, `:` on UNIX/Linux). + +On Windows, you must escape any backslashes with an extra backslash in +path separators used in any of the following properties, or use forward +slashes as a path separator instead. + +======================================================================= + + +[[sthref9]] + +4.2.1 Before You Begin +^^^^^^^^^^^^^^^^^^^^^^ + +Decide against which {TechnologyShortName} implementation the tests +will be run and determine to which Servlet–compliant Web server the +{TechnologyShortName} TCK applications will be published. + +Adapt the instructions above for the vendor implementation. + + +[[GCFQK]][[preparing-the-war-files-for-deployment]] + +4.3 Preparing the WAR Files for Deployment +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Complete this step only if you intend to package a {TechnologyShortName} implementation in +the WAR files, thereby overriding the default {TechnologyShortName} implementation for the +application server under test. This procedure adds to and rebuilds the +{TechnologyShortName} TCK WAR files. + +1. Copy one or more of the JAR files required by the {TechnologyShortName} implementation +that will replace the application server's default {TechnologyShortName} implementation to +the `/weblib` directory. + +This JAR file (or files) must contain all of the TLDs (located in the +`META-INF` directory of the archive) for the tag libraries, as defined +by the {TechnologyShortName} specification and any additional support JAR files upon which +the {TechnologyShortName} implementation is dependent. +2. Change to the `/src/com/sun/ts/tests` directory and run +`ant build` to package the web archives. + +This adds one or more JAR files from the `/weblib` directory to +each of the WAR files. diff --git a/tck/docs/userguide/src/main/jbake/content/debug-tips.inc b/tck/docs/userguide/src/main/jbake/content/debug-tips.inc new file mode 100644 index 00000000..e69de29b diff --git a/tck/docs/userguide/src/main/jbake/content/debug.adoc b/tck/docs/userguide/src/main/jbake/content/debug.adoc new file mode 100644 index 00000000..5208c401 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/debug.adoc @@ -0,0 +1,174 @@ +type=page +status=published +title=Debugging Test Problems +next=faq.html +prev=using.html +~~~~~~ +include::attributes.conf[] +Debugging Test Problems +======================= + +[[GBFUV]] + + +[[debugging-test-problems]] +6 Debugging Test Problems +------------------------- + +There are a number of reasons that tests can fail to execute properly. +This chapter provides some approaches for dealing with these failures. +Please note that most of these suggestions are only relevant when +running the test harness in GUI mode. + +This chapter includes the following topics: + +* link:#GBFYP[Overview] +* link:#GBFVF[Test Tree] +* link:#GBFWI[Folder Information] +* link:#GBFVP[Test Information] +* link:#GBFVZ[Report Files] +* link:#GBFYF[Configuration Failures] + +[[GBFYP]][[overview]] + +6.1 Overview +~~~~~~~~~~~~ + +The goal of a test run is for all tests in the test suite that are not +filtered out to have passing results. If the root test suite folder +contains tests with errors or failing results, you must troubleshoot and +correct the cause to satisfactorily complete the test run. + +* Errors: Tests with errors could not be executed by the JavaTest +harness. These errors usually occur because the test environment is not +properly configured. +* Failures: Tests that fail were executed but had failing results. + +The Test Manager GUI provides you with a number of tools for effectively +troubleshooting a test run. See the JavaTest User's Guide and JavaTest +online help for detailed descriptions of the tools described in this +chapter. Ant test execution tasks provide command-line users with +immediate test execution feedback to the display. Available JTR report +files and log files can also help command-line users troubleshoot test +run problems. + +For every test run, the JavaTest harness creates a set of report files +in the reports directory, which you specified by setting the +`report.dir` property in the +{jteFileName}+ file. The report files contain +information about the test description, environment, messages, +properties used by the test, status of the test, and test result. After +a test run is completed, the JavaTest harness writes HTML reports for +the test run. You can view these files in the JavaTest ReportBrowser +when running in GUI mode, or in the Web browser of your choice outside +the JavaTest interface. To see all of the HTML report files, enter the +URL of the `report.html` file. This file is the root file that links to +all of the other HTML reports. + +The JavaTest harness also creates a `summary.txt` file in the report +directory that you can open in any text editor. The `summary.txt` file +contains a list of all tests that were run, their test results, and +their status messages. + +The work directory, which you specified by setting the `work.dir` +property in the +{jteFileName}+ file, contains several files that were +deposited there during test execution: `harness.trace`, `log.txt`, +`lastRun.txt`, and `testsuite`. Most of these files provide information +about the harness and environment in which the tests were executed. + +[NOTE] +======================================================================= + +You can set `harness.log.traceflag=true` in +{jteFileName}+ to +get more debugging information. + +======================================================================= + +If a large number of tests failed, you should read +link:#GBFYF[Configuration Failures] to see if a +configuration issue is the cause of the failures. + + +[[GBFVF]][[test-tree]] + +6.2 Test Tree +~~~~~~~~~~~~~ + +Use the test tree in the JavaTest GUI to identify specific folders and +tests that had errors or failing results. Color codes are used to +indicate status as follows: + +* Green: Passed +* Blue: Test Error +* Red: Failed to pass test +* White: Test not run +* Gray: Test filtered out (not run) + +[[GBFWI]][[folder-information]] + +6.3 Folder Information +~~~~~~~~~~~~~~~~~~~~~~ + +Click a folder in the test tree in the JavaTest GUI to display its tabs. + +Choose the Error and the Failed tabs to view the lists of all tests in +and under a folder that were not successfully run. You can double-click +a test in the lists to view its test information. + +[[GBFVP]][[test-information]] + +6.4 Test Information +~~~~~~~~~~~~~~~~~~~~ + +To display information about a test in the JavaTest GUI, click its icon +in the test tree or double-click its name in a folder status tab. The +tab contains detailed information about the test run and, at the bottom +of the window, a brief status message identifying the type of failure or +error. This message may be sufficient for you to identify the cause of +the error or failure. + +If you need more information to identify the cause of the error or +failure, use the following tabs listed in order of importance: + +* Test Run Messages contains a Message list and a Message section that +display the messages produced during the test run. +* Test Run Details contains a two-column table of name/value pairs +recorded when the test was run. +* Configuration contains a two-column table of the test environment +name/value pairs derived from the configuration data actually used to +run the test. + + +[NOTE] +======================================================================= + +You can set `harness.log.traceflag=true` in +{jteFileName}+ to +get more debugging information. + +======================================================================= + + +[[GBFVZ]][[report-files]] + +6.5 Report Files +~~~~~~~~~~~~~~~~ + +Report files are another good source of troubleshooting information. You +may view the individual test results of a batch run in the JavaTest +Summary window, but there are also a wide range of HTML report files +that you can view in the JavaTest ReportBrowser or in the external +browser or your choice following a test run. See +link:using.html#GBFVK[Section 5.5, "Test Reports,"] for more information. + +[[GBFYF]][[configuration-failures]] + +6.6 Configuration Failures +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Configuration failures are easily recognized because many tests fail the +same way. When all your tests begin to fail, you may want to stop the +run immediately and start viewing individual test output. However, in +the case of full-scale launching problems where no tests are actually +processed, report files are usually not created (though sometimes a +small `harness.trace` file in the report directory is written). + +include::debug-tips.inc[] diff --git a/tck/docs/userguide/src/main/jbake/content/defns.inc b/tck/docs/userguide/src/main/jbake/content/defns.inc new file mode 100644 index 00000000..64b6df54 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/defns.inc @@ -0,0 +1,6 @@ +|Jakarta Server Page |A text-based document that uses Jakarta Server +Pages technology. + +|Jakarta Server Page Implementation Class |A program constructed by +transforming the Jakarta Server Page text into a Java language program +using the transformation rules described in the Specifications. diff --git a/tck/docs/userguide/src/main/jbake/content/faq.adoc b/tck/docs/userguide/src/main/jbake/content/faq.adoc new file mode 100644 index 00000000..97ca394c --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/faq.adoc @@ -0,0 +1,62 @@ +type=page +status=published +title=Appendix A: Frequently Asked Questions +next=rebuild.html +prev=debug.html +~~~~~~ +include::attributes.conf[] +Appendix A: Frequently Asked Questions +====================================== + +[[GBFYD]] + + +[[a-frequently-asked-questions]] +A Frequently Asked Questions +---------------------------- + +This appendix contains the following questions. + +* link:#GBFYQ[Where do I start to debug a test failure?] +* link:#GBFYR[How do I restart a crashed test run?] +* link:#GBFWU[What would cause tests be added to the exclude list?] + +[[GBFYQ]][[a.1-where-do-i-start-to-debug-a-test-failure]] + +A.1 Where do I start to debug a test failure? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +From the JavaTest GUI, you can view recently run tests using the Test +Results Summary, by selecting the red Failed tab or the blue Error tab. +See link:debug.html#GBFUV[Chapter 6, "Debugging Test Problems,"] for more +information. + +[[GBFYR]][[a.2-how-do-i-restart-a-crashed-test-run]] + +A.2 How do I restart a crashed test run? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you need to restart a test run, you can figure out which test crashed +the test suite by looking at the `harness.trace` file. The +`harness.trace` file is in the report directory that you supplied to the +JavaTest GUI or parameter file. Examine this trace file, then change the +JavaTest GUI initial files to that location or to a directory location +below that file, and restart. This will overwrite only `.jtr` files that +you rerun. As long as you do not change the value of the GUI work +directory, you can continue testing and then later compile a complete +report to include results from all such partial runs. + +[[GBFWU]][[a.3-what-would-cause-tests-be-added-to-the-exclude-list]] + +A.3 What would cause tests be added to the exclude list? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The JavaTest exclude file (+{jtxFileName}+) contains all tests that are not +required to be run. The following is a list of reasons for a test to be +included in the Exclude List: + +* An error in a Compatible Implementation that does not allow the test to +execute properly has been discovered. +* An error in the specification that was used as the basis of the test +has been discovered. +* An error in the test has been discovered. diff --git a/tck/docs/userguide/src/main/jbake/content/install-server-vi.inc b/tck/docs/userguide/src/main/jbake/content/install-server-vi.inc new file mode 100644 index 00000000..5637912e --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/install-server-vi.inc @@ -0,0 +1,2 @@ +. Install a Web server on which the {TechnologyShortName} TCK test +applications can be published for testing the VI. diff --git a/tck/docs/userguide/src/main/jbake/content/install-server.inc b/tck/docs/userguide/src/main/jbake/content/install-server.inc new file mode 100644 index 00000000..834e3b17 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/install-server.inc @@ -0,0 +1,8 @@ +. Install the Jakarta EE {JakartaEEVersion} CI software, for example {TechnologyRI} (which hosts the servlet Web container used +for running the {TechnologyShortName} TCK with the +{TechnologyShortName} {TechnologyVersion} CI), if it is not already +installed. + +. Download and install the Servlet Web container with the +{TechnologyShortName} {TechnologyVersion} CI used for running the +{TechnologyShortName} TCK {TechnologyVersion}. For example you could use {TechnologyRI}. +This software may be obtained from {TechnologyRIURL}. \ No newline at end of file diff --git a/tck/docs/userguide/src/main/jbake/content/install.adoc b/tck/docs/userguide/src/main/jbake/content/install.adoc new file mode 100644 index 00000000..a3b93e73 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/install.adoc @@ -0,0 +1,86 @@ +type=page +status=published +title=Installation +next=config.html +prev=rules.html +~~~~~~ +include::attributes.conf[] +Installation +============ + +[[GBFTP]] + + +[[installation]] +3 Installation +-------------- + +This chapter explains how to install the {TechnologyFullName} TCK software. + +After installing the software according to the instructions in this +chapter, proceed to link:config.html#GBFVV[Chapter 4, "Setup and +Configuration,"] for instructions on configuring your test environment. + +[[GBFUD]][[obtaining-the-reference-implementation]] + +3.1 Obtaining a Compatible Implementation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Each compatible implementation (CI) will provide instructions for obtaining +their implementation. +{TechnologyRI} is a compatible implementation which may be obtained +from {TechnologyRIURL} + +[[GBFTS]][[installing-the-software]] + +3.2 Installing the Software +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Before you can run the {TechnologyShortName} TCK tests, you must +install and set up the following software components: + +include::req-software.inc[] +* Java SE {SEversion} +* Apache Ant {AntVersion} +* A CI for {TechnologyShortName} {TechnologyVersion}, one example is {TechnologyRI} +* {TechnologyShortName} TCK version {TechnologyVersion}, which includes: +include::tck-packages.inc[] +* The {TechnologyShortName} {TechnologyVersion} Vendor Implementation (VI) + +Follow these steps: + +. Install the Java SE {SEversion} software, if it is not already installed. + +Download and install the Java SE {SEversion} software from +http://www.oracle.com/technetwork/java/javase/downloads/index.html. +Refer to the installation instructions that accompany the software for +additional information. +. Install the Apache Ant {AntVersion} software, if it is not already installed. + +Download and install Apache Ant {AntVersion} software from Apache Ant +Project. For complete information about Ant, refer to the extensive documentation +on the Apache Ant Project site. The Apache Ant Manual is available at +`http://ant.apache.org/manual/index.html`. +Apache Ant is protected under the Apache Software, License 2.0, which is +is available on the Apache Ant Project license page at +`http://ant.apache.org/license.html`. +. Install the {TechnologyShortName} TCK {TechnologyVersion} software. + a. Copy or download the {TechnologyShortName} TCK software to your + local system. + + You can obtain the {TechnologyShortName} TCK software from the + Jakarta EE site {SpecificationURL}. + b. Use the `unzip` command to extract the bundle in the directory of + your choice: + + +unzip {TCKPackageName}+ + + This creates the TCK directory. The TCK is the test suite home, + ``. +include::install-server.inc[] +. Install a {TechnologyShortName} {TechnologyVersion} Compatible +Implementation. + +A Compatible Implementation is used to validate your initial +configuration and setup of the {TechnologyShortName} TCK +{TechnologyVersion} tests, which are explained further in +link:config.html#GBFVV[Chapter 4, "Setup and Configuration."] + +The Compatible Implementations for {TechnologyShortName} are listed on +the Jakarta EE Specifications web site: {SpecificationURL}. +include::install-server-vi.inc[] +. Install the {TechnologyShortName} VI to be tested. + +Follow the installation instructions for the particular VI under test. diff --git a/tck/docs/userguide/src/main/jbake/content/intro.adoc b/tck/docs/userguide/src/main/jbake/content/intro.adoc new file mode 100644 index 00000000..774adfd3 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/intro.adoc @@ -0,0 +1,349 @@ +type=page +status=published +title=Introduction +next=rules.html +prev=preface.html +~~~~~~ +include::attributes.conf[] +Introduction +============ + +[[GBFOW]] + + +[[introduction]] +1 Introduction +-------------- + +This chapter provides an overview of the principles that apply +generally to all Technology Compatibility Kits (TCKs) and describes the +{TechnologyFullName} TCK ({TechnologyShortName} {TechnologyVersion} TCK). +It also includes a high level listing +of what is needed to get up and running with the {TechnologyShortName} +TCK. + +This chapter includes the following topics: + +* link:#GBFTK[Compatibility Testing] +* link:#GBFQR[About the TCK] +* link:#GBFQW[Getting Started With the TCK] + +[[GBFTK]][[compatibility-testing]] + +1.1 Compatibility Testing +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Compatibility testing differs from traditional product testing in a +number of ways. The focus of compatibility testing is to test those +features and areas of an implementation that are likely to differ across +other implementations, such as those features that: + +* Rely on hardware or operating system-specific behavior +* Are difficult to port +* Mask or abstract hardware or operating system behavior + +Compatibility test development for a given feature relies on a complete +specification and compatible implementation (CI) for that feature. +Compatibility testing is not primarily concerned with robustness, +performance, nor ease of use. + +[[GBFQN]][[why-compatibility-testing-is-important]] + +1.1.1 Why Compatibility Testing is Important +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Jakarta platform compatibility is important to different groups involved +with Jakarta technologies for different reasons: + +* Compatibility testing ensures that the Jakarta platform does not become +fragmented as it is ported to different operating systems and hardware +environments. +* Compatibility testing benefits developers working in the Jakarta +programming language, allowing them to write applications once and then +to deploy them across heterogeneous computing environments without +porting. +* Compatibility testing allows application users to obtain applications +from disparate sources and deploy them with confidence. +* Conformance testing benefits Jakarta platform implementors by ensuring a +level playing field for all Jakarta platform ports. + +[[GBFPR]][[tck-compatibility-rules]] + +1.1.2 TCK Compatibility Rules +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Compatibility criteria for all technology implementations are embodied +in the TCK Compatibility Rules that apply to a specified technology. +Each TCK tests for adherence to these Rules as described in +link:rules.html#GBFSN[Chapter 2, "Procedure for Certification."] + +[[GBFPW]][[tck-overview]] + +1.1.3 TCK Overview +^^^^^^^^^^^^^^^^^^ + +A TCK is a set of tools and tests used to verify that a vendor's compatible +implementation of a Jakarta EE technology conforms to the applicable +specification. All tests in the TCK are based on the written +specifications for the Jakarta EE platform. A TCK tests compatibility of a +vendor's compatible implementation of the technology to the applicable +specification of the technology. Compatibility testing is a means of +ensuring correctness, completeness, and consistency across all +implementations developed by technology licensees. + +The set of tests included with each TCK is called the test suite. Most +tests in a TCK's test suite are self-checking, but some tests may +require tester interaction. Most tests return either a Pass or Fail +status. For a given platform to be certified, all of the required tests +must pass. The definition of required tests may change from platform to +platform. + +The definition of required tests will change over time. Before your +final certification test pass, be sure to download the latest version +of this TCK. + +[[GBFPB]][[java-community-process-jcp-program-and-compatibility-testing]] + +1.1.4 Jakarta EE Specification Process (JESP) Program and Compatibility Testing +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The Jakarta EE Specification Process (JESP) program is the formalization of the +open process that has been used since 2019 to develop and revise Jakarta EE +technology specifications in cooperation with the international Jakarta EE +community. The JESP program specifies that the following three major +components must be included as deliverables in a final Jakarta EE technology +release under the direction of the responsible Expert Group: + +* Technology Specification +* Compatible Implementation (CI) +* Technology Compatibility Kit (TCK) + +For further information about the JESP program, go to Jakarta EE Specification +Process community page https://jakarta.ee/specifications. + +[[GBFQR]][[about-the-tck]] + +1.2 About the TCK +~~~~~~~~~~~~~~~~~ + +The {TechnologyShortName} TCK {TechnologyVersion} is designed as a +portable, configurable, automated test suite for verifying the +compatibility of a vendor's implementation of the +{TechnologyShortName} {TechnologyVersion} Specification. + +[[GBFQV]][[tck-specifications-and-requirements]] + +1.2.1 TCK Specifications and Requirements +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +This section lists the applicable requirements and specifications. + +* Specification Requirements: Software requirements for a +{TechnologyShortName} implementation are described in detail in the +{TechnologyShortName} {TechnologyVersion} Specification. Links to the +{TechnologyShortName} specification and other product information can +be found at {SpecificationURL}. +* {TechnologyShortName} Version: The {TechnologyShortName} {TechnologyVersion} TCK +is based on the {TechnologyShortName} +Specification, Version {TechnologyVersion}. +* Compatible Implementation: One {TechnologyShortName} +{TechnologyVersion} Compatible Implementation, {TechnologyRI} is +available from the Eclipse EE4J project +(https://projects.eclipse.org/projects/ee4j). See the CI documentation page at +{TechnologyRIURL} for more information. + +See the {TechnologyShortName} TCK Release Notes for more specific +information about Java SE version requirements, supported platforms, +restrictions, and so on. + +[[GBFSQ]][[tck-components]] + +1.2.2 TCK Components +^^^^^^^^^^^^^^^^^^^^ + +The {TechnologyShortName} TCK {TechnologyVersion} includes the +following components: + +* JavaTest harness version {JavaTestVersion} and related documentation. See +link:https://wiki.openjdk.java.net/display/CodeTools/JT+Harness[JT Harness web site] +for additional information. +* {TechnologyShortName} TCK signature tests; check that all public APIs +are supported and/or defined as specified in the {TechnologyShortName} +Version {TechnologyVersion} implementation under test. +* If applicable, an exclude list, which provides a list of tests that your +implementation is not required to pass. +ifndef::no-api-tests[] +* API tests for all of the {TechnologyShortName} API in all related packages: +include::packages.inc[] +endif::no-api-tests[] +ifdef::end-to-end-tests[] +* End-to-end tests that demonstrate compliance with the {TechnologyFullName} +Specification. +endif::end-to-end-tests[] + +The {TechnologyShortName} TCK tests run on the following platforms: + +include::platforms.inc[] + +[[GBFSA]][[javatest-harness]] + +1.2.3 JavaTest Harness +^^^^^^^^^^^^^^^^^^^^^^ + +The JavaTest harness version {JavaTestVersion} is a set of tools +designed to run and manage test suites on different Java platforms. +To JavaTest, Jakarta EE can be considered another platform. +The JavaTest harness can be described as both a Java application and a set +of compatibility testing tools. It can run tests on different kinds of +Java platforms and it allows the results to be browsed online within +the JavaTest GUI, or offline in the HTML reports that the JavaTest +harness generates. + +The JavaTest harness includes the applications and tools that are used +for test execution and test suite management. It supports the following +features: + +* Sequencing of tests, allowing them to be loaded and executed automatically +* Graphic user interface (GUI) for ease of use +* Automated reporting capability to minimize manual errors +* Failure analysis +* Test result auditing and auditable test specification framework +* Distributed testing environment support + +To run tests using the JavaTest harness, you specify which tests in the +test suite to run, how to run them, and where to put the results as +described in link:config.html#GBFVV[Chapter 4, "Setup and +Configuration."] + +[[GBFRA]][[tck-compatibility-test-suite]] + +1.2.4 TCK Compatibility Test Suite +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The test suite is the collection of tests used by the JavaTest harness +to test a particular technology implementation. In this case, it is the +collection of tests used by the {TechnologyShortName} TCK +{TechnologyVersion} to test a {TechnologyShortName} {TechnologyVersion} +implementation. The tests are designed to verify that a vendor's +runtime implementation of the technology complies with the appropriate +specification. The individual tests correspond to assertions of the +specification. + +The tests that make up the TCK compatibility test suite are precompiled +and indexed within the TCK test directory structure. When a test run is +started, the JavaTest harness scans through the set of tests that are +located under the directories that have been selected. While scanning, +the JavaTest harness selects the appropriate tests according to any +matches with the filters you are using and queues them up for execution. + +[[GBFSH]][[exclude-lists]] + +1.2.5 Exclude Lists +^^^^^^^^^^^^^^^^^^^ + +Each version of a TCK includes an Exclude List contained in a `.jtx` +file. +This is a list of test file URLs that identify tests which do not +have to be run for the specific version of the TCK being used. +Whenever tests are run, the JavaTest harness automatically excludes +any test on the Exclude List from being executed. + +A vendor's compatible implementation is not required to pass or run any test on the Exclude List. +The Exclude List file, +{jtxFileName}+, is included in the +{TechnologyShortName} TCK. + + +[NOTE] +======================================================================= + +From time to time, updates to the Exclude List are made available. +The exclude list is included in the Jakarta TCK ZIP archive. +Each time an update is approved and released, the version number +will be incremented. +You should always make sure you are using an up-to-date copy of the +Exclude List before running the {TechnologyShortName} TCK to verify your +implementation. + +======================================================================= + + +A test might be in the Exclude List for reasons such as: + +* An error in an underlying implementation API has been discovered which +does not allow the test to execute properly. +* An error in the specification that was used as the basis of the test +has been discovered. +* An error in the test itself has been discovered. +* The test fails due to a bug in the tools (such as the JavaTest +harness, for example). + +In addition, all tests are run against the compatible implementations. +Any tests that fail when run on a compatible Jakarta platform are put on the +Exclude List. Any test that is not specification-based, or for which the +specification is vague, may be excluded. Any test that is found to be +implementation dependent (based on a particular thread scheduling model, +based on a particular file system behavior, and so on) may be excluded. + + +[NOTE] +======================================================================= + +Vendors are not permitted to alter or modify Exclude Lists. Changes to +an Exclude List can only be made by using the procedure described in +link:rules.html#CJAJEAEI[Section 2.3.1, "TCK Test Appeals Steps."] + +======================================================================= + + +[[GBFRR]][[tck-configuration]] + +1.2.6 TCK Configuration +^^^^^^^^^^^^^^^^^^^^^^^ + +You need to set several variables in your test environment, modify +properties in the +{jteFileName}+ file, and then use the JavaTest +harness to configure and run the {TechnologyShortName} tests, as described in +link:config.html#GBFVV[Chapter 4, "Setup and Configuration."] + +include::intro.inc[] + +[[GBFQW]][[getting-started-with-the-tck]] + +[NOTE] +==== +The Jakarta EE Specification Process support multiple compatible implementations. +These instructions explain how to get started with the {TechnologyRI} CI. +If you are using another compatible implementation, refer to material provided +by that implementation for specific instructions and procedures. + +==== + +1.3 Getting Started With the TCK +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This section provides an general overview of what needs to be done to +install, set up, test, and use the {TechnologyShortName} TCK. These +steps are explained in more detail in subsequent chapters of this +guide. + +1. Make sure that the following software has been correctly installed +on the system hosting the JavaTest harness: +include::req-software.inc[] +* Java SE {SEversion} +* Apache Ant {AntVersion} +* A CI for {TechnologyShortName} {TechnologyVersion}. One example is {TechnologyRI}. +* {TechnologyShortName} TCK version {TechnologyVersion}, which includes: +include::tck-packages.inc[] +* The {TechnologyShortName} {TechnologyVersion} Vendor Implementation (VI) + +See the documentation for each of these software applications for +installation instructions. See link:install.html#GBFTP[Chapter 3, +"Installation,"] for instructions on installing the {TechnologyShortName} TCK. +2. Set up the {TechnologyShortName} TCK software. + +See link:config.html#GBFVV[Chapter 4, "Setup and Configuration,"] for +details about the following steps. + a. Set up your shell environment. + b. Modify the required properties in the +{jteFileName}+ file. + c. Configure the JavaTest harness. +3. Test the {TechnologyShortName} {TechnologyVersion} implementation. + +Test the {TechnologyShortName} implementation installation by running +the test suite. See link:using.html#GBFWO[Chapter 5, "Executing Tests."] diff --git a/tck/docs/userguide/src/main/jbake/content/intro.inc b/tck/docs/userguide/src/main/jbake/content/intro.inc new file mode 100644 index 00000000..e69de29b diff --git a/tck/docs/userguide/src/main/jbake/content/packages.inc b/tck/docs/userguide/src/main/jbake/content/packages.inc new file mode 100644 index 00000000..1565b793 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/packages.inc @@ -0,0 +1,5 @@ +** `jakarta.servlet.jsp` + +** `jakarta.servlet.jsp.el` + +** `jakarta.servlet.tagext` diff --git a/tck/docs/userguide/src/main/jbake/content/platforms.inc b/tck/docs/userguide/src/main/jbake/content/platforms.inc new file mode 100644 index 00000000..236beed7 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/platforms.inc @@ -0,0 +1 @@ +* CentOS Linux 7 \ No newline at end of file diff --git a/tck/docs/userguide/src/main/jbake/content/preface.adoc b/tck/docs/userguide/src/main/jbake/content/preface.adoc new file mode 100644 index 00000000..ea10c287 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/preface.adoc @@ -0,0 +1,147 @@ +type=page +status=published +title=Preface +next=intro.html +prev=title.html +~~~~~~ +include::attributes.conf[] +Preface +======= + +[[TCJRS00001]][[GBFTI]] + + +[[preface]] +Preface +------- + +This guide describes how to install, configure, and run the Technology +Compatibility Kit (TCK) that is used to test the {TechnologyFullName} +({TechnologyShortName} {TechnologyVersion}) technology. + +The {TechnologyShortName} TCK is a portable, configurable automated +test suite for verifying the compatibility of a vendor's +implementation of the {TechnologyShortName} {TechnologyVersion} +Specification (hereafter referred to as the vendor implementation or VI). +The {TechnologyShortName} TCK uses the JavaTest harness version +{JavaTestVersion} to run the test suite + + +[NOTE] +======================================================================= + +Note All references to specific Web URLs are given for the sake of your +convenience in locating the resources quickly. These references are +always subject to changes that are in many cases beyond the control of +the authors of this guide. + +======================================================================= + +Jakarta EE is a community sponsored and community run program. +Organizations contribute, along side individual contributors who use, evolve +and assist others. +Commercial support is not available through the Eclipse Foundation resources. +Please refer to the Eclipse EE4J project site +(https://projects.eclipse.org/projects/ee4j). +There, you will find additional details as well as a list of all the associated sub-projects +(Implementations and APIs), that make up Jakarta EE and define these specifications. +If you have questions about this Specification you may +send inquiries to {SpecificationInquiryList}. +If you have questions about this TCK, you may send inquiries to +{TCKInquiryList}. + +[[TCJRS00034]][[GBFUS]] + + +[[who-should-use-this-book]] +Who Should Use This Book +~~~~~~~~~~~~~~~~~~~~~~~~ + +This guide is for vendors that implement the {TechnologyShortName} +{TechnologyVersion} technology to assist them in running the test suite +that verifies compatibility of their implementation of the +{TechnologyShortName} {TechnologyVersion} Specification. + + +[[TCJRS00035]][[GBFPO]] + + +[[before-you-read-this-book]] +Before You Read This Book +~~~~~~~~~~~~~~~~~~~~~~~~~ + +You should be familiar with the {TechnologyShortName} +{TechnologyVersion}, version {TechnologyVersion} Specification, +which can be found at {SpecificationURL}. + +Before running the tests in the {TechnologyShortName} TCK, you should +familiarize yourself with the JavaTest documentation which can be +accessed at the +link:https://wiki.openjdk.java.net/display/CodeTools/JT+Harness[JT Harness web site]. + +[[TCJRS00036]][[GBFWF]] + + +[[typographic-conventions]] +Typographic Conventions +~~~~~~~~~~~~~~~~~~~~~~~ + +The following table describes the typographic conventions that are used +in this book. + +[width="100%",cols="15%,40%,45%",options="header",] +|======================================================================= +|Convention |Meaning |Example +|*Boldface* |Boldface type indicates graphical user interface elements +associated with an action, terms defined in text, or what you type, +contrasted with onscreen computer output. a| +From the *File* menu, select *Open Project*. + +A *cache* is a copy that is stored locally. + +`machine_name% *su*` + +`Password:` + +|`Monospace` |Monospace type indicates the names of files and +directories, commands within a paragraph, URLs, code in examples, text +that appears on the screen, or text that you enter. a| +Edit your `.login` file. + +Use `ls` `-a` to list all files. + +`machine_name% you have mail.` + +|_Italic_ |Italic type indicates book titles, emphasis, or placeholder +variables for which you supply particular values. a| +Read Chapter 6 in the _User's Guide_. + +Do _not_ save the file. + +The command to remove a file is `rm` _filename_. + +|======================================================================= + + +[[TCJRS00037]][[FWBSD]] + + +[[shell-prompts-in-command-examples]] +Shell Prompts in Command Examples +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following table shows the default UNIX system prompt and superuser +prompt for the C shell, Bourne shell, and Korn shell. + +[width="100%",cols="50%,50%",options="header",] +|===================================================== +|Shell |Prompt +|C shell |`machine_name%` +|C shell for superuser |`machine_name#` +|Bourne shell and Korn shell |`$` + +|Bourne shell and Korn shell for superuser |`#` + +|Bash shell |`shell_name-shell_version$` +|Bash shell for superuser |`shell_name-shell_version#` +|===================================================== + + + diff --git a/tck/docs/userguide/src/main/jbake/content/rebuild.adoc b/tck/docs/userguide/src/main/jbake/content/rebuild.adoc new file mode 100644 index 00000000..e4021cfa --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/rebuild.adoc @@ -0,0 +1,20 @@ +type=page +status=published +title=Appendix B: Rebuild Rules +prev=faq.html +~~~~~~ +include::attributes.conf[] + +Appendix B: Rebuild Rules +========================= + + +ifdef::rebuild[] +include::rebuild.inc[] +endif::rebuild[] +ifndef::rebuild[] + +<<< +Appendix B is not used for the {TechnologyShortName} TCK. + +endif::rebuild[] diff --git a/tck/docs/userguide/src/main/jbake/content/rebuild.inc b/tck/docs/userguide/src/main/jbake/content/rebuild.inc new file mode 100644 index 00000000..fe3d5ac5 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/rebuild.inc @@ -0,0 +1,188 @@ +/////////////////////////////////////////////////////////////////////// +NOTE TO WRITERS: +The following sections should be customized for the technology. +This text was originally from the JAX-RS TCK. Most references +to JAX-RS have been parameterized to serve as a simple starting +point for customization. There are still many details that will +need to be changed or removed. +/////////////////////////////////////////////////////////////////////// + +[[GCLIZ]] + + +[[b-packaging-the-test-applications-in-servlet-compliant-war-files-with-vi-specific-information]] +B Packaging the Test Applications in Servlet-Compliant WAR Files With VI-Specific Information +--------------------------------------------------------------------------------------------- + +The {TechnologyShortName} {TechnologyVersion} specification specifies +how {TechnologyShortName} applications are to be published in a Java SE +environment, JAX-WS endpoint, or Servlet–compliant Web container. + +{TechnologyShortName} TCK test application classes that are to be +published in a Java SE environment are located under +`$TS_HOME/classes`. + +The {TechnologyShortName} TCK comes with prebuilt test WAR files for +deployment on Jakarta EE {JakartaEEVersion} CI , which provides a Servlet–compliant Web +container. The WAR files are {TechnologyRI}-specific, with {TechnologyRI}'s servlet +class and {TechnologyRI}'s servlet defined in the `web.xml` deployment +descriptor. To run the TCK tests against the VI in a Servlet–compliant +Web container, the tests need to be repackaged to include the +VI-specific servlet, and the VI-specific servlet must be defined in the +deployment descriptor. + +The {TechnologyShortName} TCK makes it easier for the vendor by +including template WAR files that contain all of the necessary files +except for the VI-specific servlet adaptor class. The +{TechnologyShortName} TCK provides a tool to help with the repackaging +task. + +This appendix contains the following sections: + +* link:#GCLIO[Overview] +* link:#GCLLW[Creating the VI-Specific Servlet–Compliant WAR +Files] + +[[GCLIO]][[b.1-overview]] + +B.1 Overview +~~~~~~~~~~~~ + +The set of prebuilt archives and classes that ship with the +{TechnologyShortName} TCK were built using the Reference +Implementation, and must be deployed on Jakarta EE {JakartaEEVersion} CI and run against +the {TechnologyRI} CI. + +The prebuilt {TechnologyRI}-specific Servlet–compliant WAR files are located +under $TS_HOME`/dist`, and have `jersey` as part of their name; for +example: + +[source,oac_no_warn] +---- +$TS_HOME/dist/com/sun/ts/tests/jaxrs/ee/rs/get/jaxrs_rs_get_web.war.jersey +---- + +The names are made unique by including `jersey` to minimize the chances +that the files will be overwritten or modified. + +The Vendor must create VI-specific Servlet–compliant WAR files if the +Vendor chooses to publish on a Servlet–compliant Web container, so that +the VI-specific Servlet class will be included instead of the +{TechnologyRI}-specific Servlet class. + +[[GCLLW]][[b.2-creating-the-vi-specific-servletcompliant-war-files]] + +B.2 Creating the TCK VI-Specific Servlet–Compliant WAR Files +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +All resource and application class files are already compiled. The +Vendor needs to package these files. All tests also come with a +`web.xml.template` file to be used for generating deployment descriptor +files with a VI-specific Servlet definition. + +Each test that has a {TechnologyShortName} resource class to publish comes with a +template deployment descriptor file. For example, the file +`$TS_HOME/src/com/sun/ts/tests/jaxrs/ee/rs/get/web.xml.template` +contains the following elements: + +[source,oac_no_warn] +---- + + + + CTSJAX-RSGET + servlet_adaptor + + jakarta.ws.rs.Application + com.sun.ts.tests.jaxrs.ee.rs.get.TSAppConfig + + 1 + + + CTSJAX-RSGET + /* + + + 30 + + +---- + +In this example, the `` element has a value of +`servlet_adaptor`, which is a placeholder for the +implementation-specific Servlet class. A {TechnologyRI}-specific +deployment descriptor also comes with the {TechnologyShortName} TCK, +and has the values for the +`com.sun.jersey.spi.container.servlet.ServletContainer`: + +[source,oac_no_warn] +---- + + + + CTSJAX-RSGET + + org/glassfish/jersey/servlet/ServletContainer + + + jakarta.ws.rs.Application + com.sun.ts.tests.jaxrs.ee.rs.get.TSAppConfig + + 1 + + + CTSJAX-RSGET + /* + + + 30 + + +---- + +The {TechnologyShortName} TCK provides a tool, +`${ts.home}/bin/xml/impl/glassfish/jersey.xml`, for the Jakarta EE {JakartaEEVersion} CI +that you can use as a model to help you create your own VI-specific Web +test application. + +[[GCLMA]][[b.2.1-to-create-a-vi-specific-deployment-descriptor]] + +B.2.1 To Create a VI-Specific Deployment Descriptor +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +1. Create a VI handler file. + +Create a VI-specific handler file +`$TS_HOME/bin/xml/impl/${`impl.vi`}/`jaxrs_impl_name`.xml` if one does +not already exist. Make sure the `jaxrs_impl_name` property is set in +the +{jteFileName}+, file and that it has a unique name so no file will be +overwritten. +2. Set the VI Servlet class property. + +Set the `servlet_adaptor` property in the +{jteFileName}+ file. This property +will be used to set the value of the `` element in the +deployment descriptor. +3. Create VI Ant tasks. + +Create a `update.jaxrs.wars` target in the VI handler file. Reference +this `update.jaxrs.wars` target in the `jersey.xml` file. + +This target will create a `web.xml.${`jaxrs_impl_name`}` for each test +that has a deployment descriptor template. The +`web.xml.${`jaxrs_impl_name`}` will contain the VI-specific Servlet +class name. It will also create the test WAR files under +`$TS_HOME/dist`; for example: + ++ +[source,oac_no_warn] +---- +ls $TS_HOME/dist/com/sun/ts/tests/jaxrs/ee/rs/get/ +jaxrs_rs_get_web.war.jersey +jaxrs_rs_get_web.war.${impl_name} +---- ++ +4. Change to the `$TS_HOME/bin` directory and execute the +`update.jaxrs.wars` Ant target. + +This creates a `web.xml.`VI_name file for each test based on the VI's +servlet class name and repackage the tests. diff --git a/tck/docs/userguide/src/main/jbake/content/req-software.inc b/tck/docs/userguide/src/main/jbake/content/req-software.inc new file mode 100644 index 00000000..30cdadc4 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/req-software.inc @@ -0,0 +1,12 @@ +/////////////////////////////////////////////////////////////////////// +NOTE TO WRITERS: +This is a list of software required in addition to the TCK and the CI. +For many Jakarta EE APIs, the Jakarta EE CI will be required, as described below. +For standalone technologies, no other software may be required, and the +below line can be removed. + +This is used in intro.adoc in section 1.3 and install.adoc in section 3.2. +/////////////////////////////////////////////////////////////////////// + +* Jakarta EE {JakartaEEVersion} CI (for example {TechnologyRI}, from {TechnologyRIURL}) or, at a minimum, a Web server with a Servlet +container diff --git a/tck/docs/userguide/src/main/jbake/content/rules.adoc b/tck/docs/userguide/src/main/jbake/content/rules.adoc new file mode 100644 index 00000000..f6b08ceb --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/rules.adoc @@ -0,0 +1,403 @@ +type=page +status=published +title=Procedure for Certification +next=install.html +prev=intro.html +~~~~~~ +include::attributes.conf[] +Procedure for Certification +=========================== + +[[GBFSN]] + + +[[procedure-for-certification]] +2 Procedure for Certification +----------------------------- + +This chapter describes the compatibility testing procedure and +compatibility requirements for {TechnologyFullName}. +This chapter contains the following sections: + +* link:#CJAFFDGI[Certification Overview] +* link:#CJAFGIGG[Compatibility Requirements] +* link:#CJAIIBDJ[Test Appeals Process] +* link:#CJAJECIE[Specifications for {TechnologyFullName}] +* link:#CJABAHGI[Libraries for {TechnologyFullName}] + +[[CJAFFDGI]][[certification-overview]] + +2.1 Certification Overview +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The certification process for {technologyShortName} {TechnologyVersion} +consists of the following activities: + +* Install the appropriate version of the Technology Compatibility Kit +(TCK) and execute it in accordance with the instructions in this User's +Guide. +* Ensure that you meet the requirements outlined in +link:#CJAFGIGG[Compatibility Requirements] below. +* Certify to the Eclipse Foundation that you have finished +testing and that you meet all of the compatibility requirements, +as required by the Eclipse Foundation TCK License. + +[[CJAFGIGG]][[compatibility-requirements]] + +2.2 Compatibility Requirements +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The compatibility requirements for {TechnologyShortName} +{TechnologyVersion} consist of meeting the requirements set forth by +the rules and associated definitions contained in this section. + +[[sthref4]][[definitions]] + +2.2.1 Definitions +^^^^^^^^^^^^^^^^^ + +These definitions are for use only with these compatibility requirements +and are not intended for any other purpose. + +[[sthref5]][[sthref6]] + +Table 2-1 Definitions  + +[width="100%",cols="25%,75%",options="header",] +|======================================================================= +|Term |Definition +|API Definition Product |A Product for which the only Java class files +contained in the product are those corresponding to the application +programming interfaces defined by the Specifications, and which is +intended only as a means for formally specifying the application +programming interfaces defined by the Specifications. + +|Computational Resource a| +A piece of hardware or software that may vary in quantity, existence, or +version, which may be required to exist in a minimum quantity and/or at +a specific or minimum revision level so as to satisfy the requirements +of the Test Suite. + +Examples of computational resources that may vary in quantity are RAM +and file descriptors. + +Examples of computational resources that may vary in existence (that is, +may or may not exist) are graphics cards and device drivers. + +Examples of computational resources that may vary in version are +operating systems and device drivers. + +|Configuration Descriptor |Any file whose format is well defined by a +specification and which contains configuration information for a set of +Java classes, archive, or other feature defined in the specification. + +|Conformance Tests |All tests in the Test Suite for an indicated +Technology Under Test, as released and distributed by the +Eclipse Foundation, excluding those tests on the +published Exclude List for the Technology Under Test. + +|Container |An implementation of the associated Libraries, as specified +in the Specifications, and a version of a Java Platform, Standard +Edition Runtime Product, as specified in the Specifications, or a later +version of a Java Platform, Standard Edition Runtime Product that also +meets these compatibility requirements. + +|Documented |Made technically accessible and made known to users, +typically by means such as marketing materials, product documentation, +usage messages, or developer support programs. + +|Exclude List |The most current list of tests, released and distributed by the +Eclipse Foundation, that are not required to be passed to certify +conformance. The Jakarta EE Specification Committee may add to the Exclude List for that +Test Suite as needed at any time, in which case the updated TCK version +supplants any previous Exclude Lists for that Test Suite. + +|Libraries a| +The class libraries, as specified through the Jakarta EE Specification Process +(JESP), for the Technology Under Test. + +The Libraries for {TechnologyFullName} are listed at the end of this chapter. + +|Location Resource a| +A location of classes or native libraries that are components of the +test tools or tests, such that these classes or libraries may be +required to exist in a certain location in order to satisfy the +requirements of the test suite. + +For example, classes may be required to exist in directories named in a +CLASSPATH variable, or native libraries may be required to exist in +directories named in a PATH variable. + +|Maintenance Lead |The corresponding Jakarta EE Specification Project +is responsible for maintaining the Specification, and the TCK for the +Technology. The Specification Project Team will propose revisions and +updates to the Jakarta EE Specification Committee which will approve +and release new versions of the specification and TCK. + +|Operating Mode a| +Any Documented option of a Product that can be changed by a user in +order to modify the behavior of the Product. + +For example, an Operating Mode can be binary (enable/disable +optimization), an enumeration (select from a list of protocols), or a +range (set the maximum number of active threads). + +Note that an Operating Mode may be selected by a command line switch, an +environment variable, a GUI user interface element, a configuration or +control file, etc. + +|Product |A vendor's product in which the Technology Under Test is +implemented or incorporated, and that is subject to compatibility +testing. + +|Product Configuration a| +A specific setting or instantiation of an Operating Mode. + +For example, a Product supporting an Operating Mode that permits user +selection of an external encryption package may have a Product +Configuration that links the Product to that encryption package. + +|Rebuildable Tests |Tests that must be built using an +implementation-specific mechanism. This mechanism must produce +specification-defined artifacts. Rebuilding and running these tests +against a known compatible implementation verifies that the mechanism generates +compatible artifacts. + +|Resource |A Computational Resource, a Location Resource, or a Security +Resource. + +|Rules |These definitions and rules in this Compatibility Requirements +section of this User's Guide. + +|Runtime |The Containers specified in the Specifications. + +|Security Resource a| +A security privilege or policy necessary for the proper execution of the +Test Suite. + +For example, the user executing the Test Suite will need the privilege +to access the files and network resources necessary for use of the +Product. + +|Specifications a| +The documents produced through the Jakarta EE Specification Process (JESP) +that define a particular Version of a Technology. + +The Specifications for the Technology Under Test are referenced later in +this chapter. + +|Technology |Specifications and one or more compatible implementations produced +through the Jakarta EE Specification Process (JESP). + +|Technology Under Test |Specifications and a compatible implementation +for {TechnologyFullName} Version {TechnologyVersion}. + +|Test Suite |The requirements, tests, and testing tools distributed by +the Maintenance Lead as applicable to a given Version of the Technology. + +|Version |A release of the Technology, as produced through the +Jakarta EE Specification Process (JESP). + +include::defns.inc[] +|======================================================================= + + +[[sthref7]][[rules-for-products]] + +2.2.2 Rules for {TechnologyFullName} Products +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +The following rules apply for each version of an operating system, +software component, and hardware platform Documented as supporting the +Product: + +*{techID}1* The Product must be able to satisfy all applicable compatibility +requirements, including passing all Conformance Tests, in every Product +Configuration and in every combination of Product Configurations, except +only as specifically exempted by these Rules. + +For example, if a Product provides distinct Operating Modes to optimize +performance, then that Product must satisfy all applicable compatibility +requirements for a Product in each Product Configuration, and +combination of Product Configurations, of those Operating Modes. + +*{techID}1.1* If an Operating Mode controls a Resource necessary for the +basic execution of the Test Suite, testing may always use a Product +Configuration of that Operating Mode providing that Resource, even if +other Product Configurations do not provide that Resource. +Notwithstanding such exceptions, each Product must have at least one set +of Product Configurations of such Operating Modes that is able to pass +all the Conformance Tests. + +For example, a Product with an Operating Mode that controls a security +policy (i.e., Security Resource) which has one or more Product +Configurations that cause Conformance Tests to fail may be tested using +a Product Configuration that allows all Conformance Tests to pass. + +*{techID}1.2* A Product Configuration of an Operating Mode that causes the +Product to report only version, usage, or diagnostic information is +exempted from these compatibility rules. + +*{techID}1.3* An API Definition Product is exempt from all functional +testing requirements defined here, except the signature tests. + +*{techID}2* Some Conformance Tests may have properties that may be changed. +Properties that can be changed are identified in the configuration +interview. Properties that can be changed are identified in the JavaTest +Environment (.jte) files in the Test Suite +installation. Apart from changing such properties and other allowed +modifications described in this User's Guide (if any), no source or +binary code for a Conformance Test may be altered in any way without +prior written permission. Any such allowed alterations to the +Conformance Tests will be provided via the Jakarta EE Specification Project +website and apply to all vendor compatible implementations. + +*{techID}3* The testing tools supplied as part of the Test Suite or as +updated by the Maintenance Lead must be used to certify compliance. + +*{techID}4* The Exclude List associated with the Test Suite cannot be +modified. + +*{techID}5* The Maintenance Lead can define exceptions to these Rules. Such +exceptions would be made available as above, and will apply to all vendor implementations. + +*{techID}6* All hardware and software component additions, deletions, and +modifications to a Documented supporting hardware/software platform, +that are not part of the Product but required for the Product to satisfy +the compatibility requirements, must be Documented and available to +users of the Product. + +For example, if a patch to a particular version of a supporting +operating system is required for the Product to pass the Conformance +Tests, that patch must be Documented and available to users of the +Product. + +*{techID}7* The Product must contain the full set of public and protected +classes and interfaces for all the Libraries. Those classes and +interfaces must contain exactly the set of public and protected methods, +constructors, and fields defined by the Specifications for those +Libraries. No subsetting, supersetting, or modifications of the public +and protected API of the Libraries are allowed except only as +specifically exempted by these Rules. + +*{techID}7.1* If a Product includes Technologies in addition to the +Technology Under Test, then it must contain the full set of combined +public and protected classes and interfaces. The API of the Product +must contain the union of the included Technologies. No further +modifications to the APIs of the included Technologies are allowed. + +ifdef::subset-allowed[] +*{techID}7.2* The Product may contain a subset of the classes and +interfaces for the Libraries. +endif::subset-allowed[] + +*{techID}8* Except for tests specifically required by this TCK to be rebuilt +(if any), the binary Conformance Tests supplied as part of the Test +Suite or as updated by the Maintenance Lead must be used to certify +compliance. + +*{techID}9* The functional programmatic behavior of any binary class or +interface must be that defined by the Specifications. + +include::rules.inc[] + +[[CJAIIBDJ]][[test-appeals-process]] + +2.3 Test Appeals Process +~~~~~~~~~~~~~~~~~~~~~~~~ + +Jakarta has a well established process for managing challenges to its +TCKs. Any implementor may submit a challenge to one or more tests in the +{TechnologyShortName} TCK as it relates to their implementation. Implementor +means the entity as a whole in charge of producing the final certified release. +*Challenges filed should represent the consensus of that entity*. + +2.3.1 Valid Challenges +^^^^^^^^^^^^^^^^^^^^^^ +Any test case (e.g., test class, @Test method), test case configuration (e.g., deployment descriptor), test beans, annotations, and other resources considered part of the TCK may be challenged. + +The following scenarios are considered in scope for test challenges: + +* Claims that a test assertion conflicts with the specification. +* Claims that a test asserts requirements over and above that of the specification. +* Claims that an assertion of the specification is not sufficiently implementable. +* Claims that a test is not portable or depends on a particular implementation. + +2.3.2 Invalid Challenges +^^^^^^^^^^^^^^^^^^^^^^^^ +The following scenarios are considered out of scope for test challenges and will be immediately closed if filed: + +* Challenging an implementation’s claim of passing a test. Certification is an honor system and these issues must be raised directly with the implementation. +* Challenging the usefulness of a specification requirement. The challenge process cannot be used to bypass the specification process and raise in question the need or relevance of a specification requirement. +* Claims the TCK is inadequate or missing assertions required by the specification. See the Improvement section, which is outside the scope of test challenges. +* Challenges that do not represent a consensus of the implementing community will be closed until such time that the community does agree or agreement cannot be made. The test challenge process is not the place for implementations to initiate their own internal discussions. +* Challenges to tests that are already excluded for any reason. +* Challenges that an excluded test should not have been excluded and should be re-added should be opened as a new enhancement request + +Test challenges must be made in writing via the {TechnologyShortName} specification project issue tracker +as described in link:#CJAJEAEI[Section 2.3.3, "TCK Test Appeals Steps."] + +All tests found to be invalid will be placed on the Exclude List +for that version of the {TechnologyShortName} TCK. + + +[[CJAJEAEI]][[tck-test-appeals-steps]] + +2.3.3 TCK Test Appeals Steps +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +1. Challenges should be filed via the {TechnologyFullName} specification project’s issue tracker using the label `challenge` and include the following information: +* The relevant specification version and section number(s) +* The coordinates of the challenged test(s) +* The exact TCK and exclude list versions +* The implementation being tested, including name and company +* The full test name +* A full description of why the test is invalid and what the correct behavior is believed to be +* Any supporting material; debug logs, test output, test logs, run scripts, etc. + + + +2. Specification project evaluates the challenge. + +Challenges can be resolved by a specification project lead, or a project challenge triage team, after a consensus of the specification project committers is reached or attempts to gain consensus fails. +Specification projects may exercise lazy consensus, voting or any practice that follows the principles of Eclipse Foundation Development Process. +The expected timeframe for a response is two weeks or less. +If consensus cannot be reached by the specification project for a prolonged period of time, the default recommendation is to exclude the tests and address the dispute in a future revision of the specification. + +3. Accepted Challenges. + +A consensus that a test produces invalid results will result in the exclusion of that test from certification requirements, and an immediate update and release of an official distribution of the TCK including the new exclude list. The associated `challenge` issue must be closed with an `accepted` label to indicate it has been resolved. + +4. Rejected Challenges and Remedy. + +When a`challenge` issue is rejected, it must be closed with a label of `invalid` to indicate it has been rejected. +There appeal process for challenges rejected on technical terms is outlined in Escalation Appeal. +If, however, an implementer feels the TCK challenge process was not followed, an appeal issue should be filed with specification project’s TCK issue tracker using the label `challenge-appeal`. +A project lead should escalate the issue with the Jakarta EE Specification Committee via email (jakarta.ee-spec@eclipse.org). +The committee will evaluate the matter purely in terms of due process. +If the appeal is accepted, the original TCK challenge issue will be reopened and a label of `appealed-challenge` added, along with a discussion of the appeal decision, and the `challenge-appeal` issue with be closed. +If the appeal is rejected, the `challenge-appeal` issue should closed with a label of `invalid`. + +5. Escalation Appeal. + +If there is a concern that a TCK process issue has not been resolved satisfactorily, the +https://www.eclipse.org/projects/dev_process/#6_5_Grievance_Handling[Eclipse Development Process Grievance Handling] procedure should be followed to escalate the resolution. Note that this is not a mechanism to attempt to handle implementation specific issues. + + +[[CJAJECIE]][[specifications-for-technology]] + +2.4 Specifications for {TechnologyFullName} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The {TechnologyFullName} specification is available from the specification +project web-site: {SpecificationURL}. + +[[CJABAHGI]][[libraries-for-technology]] + +2.5 Libraries for {TechnologyFullName} +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following is a list of the packages comprising the required class +libraries for {TechnologyShortName} {TechnologyVersion}: + +include::packages.inc[] + +For the latest list of packages, also see: + +{SpecificationURL} diff --git a/tck/docs/userguide/src/main/jbake/content/rules.inc b/tck/docs/userguide/src/main/jbake/content/rules.inc new file mode 100644 index 00000000..9b4f4649 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/rules.inc @@ -0,0 +1,28 @@ +*{techID}10* Each Container must make technically accessible all Java SE +Runtime interfaces and functionality, as defined by the Specifications, +to programs running in the Container, except only as specifically +exempted by these Rules. + +*{techID}10.1* Containers may impose security constraints, as defined by +the Specifications. + +*{techID}11* A web Container must report an error, as defined by the +Specifications, when processing a {TechnologyShortName} Page that does not conform to the +Specifications. + +*{techID}12* The presence of a Java language comment or Java language +directive in a {TechnologyShortName} Page that specifies â€java†as the scripting +language, when processed by a web Container, must not cause the +functional programmatic behavior of that {TechnologyShortName} Page to vary from the +functional programmatic behavior of that {TechnologyShortName} Page in the absence of +that Java language comment or Java language directive. + +*{techID}13* The contents of any fixed template data (defined by the +Specifications) in a {TechnologyShortName} Page, when processed by a web Container, must +not affect the functional programmatic behavior of that {TechnologyShortName} Page, +except as defined by the Specifications. + +*{techID}14* The functional programmatic behavior of a {TechnologyShortName} Page that +specifies â€java†as the scripting language must be equivalent to the +functional programmatic behavior of the {TechnologyShortName} Page Implementation Class +constructed from that {TechnologyShortName} Page. diff --git a/tck/docs/userguide/src/main/jbake/content/tck-packages.inc b/tck/docs/userguide/src/main/jbake/content/tck-packages.inc new file mode 100644 index 00000000..5ca50031 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/tck-packages.inc @@ -0,0 +1,7 @@ +** JDOM 1.1.3 + +** Apache Commons HTTP Client 3.1 + +** Apache Commons Logging 1.1.3 + +** Apache Commons Codec 1.9 diff --git a/tck/docs/userguide/src/main/jbake/content/title.adoc b/tck/docs/userguide/src/main/jbake/content/title.adoc new file mode 100644 index 00000000..232172d7 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/title.adoc @@ -0,0 +1,42 @@ +type=page +status=published +title=TCK User's Guide for Technology Implementors +next=preface.html +prev=toc.html +~~~~~~ +include::attributes.conf[] + +TCK User's Guide for {TechnologyFullName}, Release {TechnologyVersion} for Jakarta EE +===================================================================================== + +[[eclipse-foundation]] +Eclipse Foundation +------------------ + +Technology Compatibility Kit User's Guide for {TechnologyFullName} + +Release {TechnologyVersion} for Jakarta EE + +{ReleaseDate} + +[[sthref1]] + +''''' + +Technology Compatibility Kit User's Guide for {TechnologyFullName}, +Release {TechnologyVersion} for Jakarta EE + +Copyright © {CopyrightDates} Oracle and/or its affiliates. All rights reserved. + +This program and the accompanying materials are made available under +the terms of the Eclipse Public License v. 2.0, which is available at +http://www.eclipse.org/legal/epl-2.0. + +SPDX-License-Identifier: EPL-2.0 + +Oracle and Java are registered trademarks of Oracle and/or its +affiliates. Other names may be trademarks of their respective owners. + +include::title.inc[] + + diff --git a/tck/docs/userguide/src/main/jbake/content/title.inc b/tck/docs/userguide/src/main/jbake/content/title.inc new file mode 100644 index 00000000..afe281cc --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/title.inc @@ -0,0 +1,13 @@ +/////////////////////////////////////////////////////////////////////// +NOTE TO WRITERS: +This is included at the tail end of the Title page. +The following section should be customized for the technology. +This is provided to allow each technology to customize legacy acronym names +that are used in this TCK. +Be sure to customize LegacyAcronym in attributes.conf +Add additional lines as needed for acronyms found in your TCK user guide. +/////////////////////////////////////////////////////////////////////// + +References in this document to {LegacyAcronym} refer to the {TechnologyFullName} unless otherwise noted. + +References in this document to JSTL refer to the Jakarta Standard Tag Library unless otherwise noted. \ No newline at end of file diff --git a/tck/docs/userguide/src/main/jbake/content/toc.adoc b/tck/docs/userguide/src/main/jbake/content/toc.adoc new file mode 100644 index 00000000..6d9a7554 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/toc.adoc @@ -0,0 +1,106 @@ +type=page +status=published +title=TCK User's Guide for Technology Implementors +next=title.html +~~~~~~ +include::attributes.conf[] +TCK User's Guide for Technology Implementors +============================================ + +[[contents]] +Contents +-------- + +* link:title.html#eclipse-foundation[Eclipse Foundation] + +link:preface.html#GBFTI[Preface] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +** link:preface.html#GBFUS[Who Should Use This Book] +** link:preface.html#GBFPO[Before You Read This Book] +** link:preface.html#GBFWF[Typographic Conventions] +** link:preface.html#FWBSD[Shell Prompts in Command Examples] + +link:intro.html#GBFOW[1 Introduction] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +** link:intro.html#GBFTK[1.1 Compatibility Testing] +*** link:intro.html#GBFQN[1.1.1 Why Compatibility Testing is Important] +*** link:intro.html#GBFPR[1.1.2 TCK Compatibility Rules] +*** link:intro.html#GBFPW[1.1.3 TCK Overview] +*** link:intro.html#GBFPB[1.1.4 Jakarta EE Specification Process (JESP) Program and Compatibility Testing] +** link:intro.html#GBFQR[1.2 About the TCK] +*** link:intro.html#GBFQV[1.2.1 TCK Specifications and Requirements] +*** link:intro.html#GBFSQ[1.2.2 TCK Components] +*** link:intro.html#GBFSA[1.2.3 JavaTest Harness] +*** link:intro.html#GBFRA[1.2.4 TCK Compatibility Test Suite] +*** link:intro.html#GBFSH[1.2.5 Exclude Lists] +*** link:intro.html#GBFRR[1.2.6 TCK Configuration] +** link:intro.html#GBFQW[1.3 Getting Started With the TCK] + +[[procedure-for-certification]] +link:rules.html#GBFSN[2 Procedure for Certification] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +** link:rules.html#CJAFFDGI[2.1 Certification Overview] +** link:rules.html#CJAFGIGG[2.2 Compatibility Requirements] +*** link:rules.html#definitions[2.2.1 Definitions] +*** link:rules.html#sthref7[2.2.2 Rules for {TechnologyFullName} Products] +** link:rules.html#CJAIIBDJ[2.3 Test Appeals Process] +*** link:rules.html#[2.3.1 Valid Challenges] +*** link:rules.html#[2.3.2 Invalid Challenges] +*** link:rules.html#CJAJEAEI[2.3.3 TCK Test Appeals Steps] +** link:rules.html#CJAJECIE[2.4 Specifications for {TechnologyFullName}] +** link:rules.html#CJABAHGI[2.5 Libraries for {TechnologyFullName}] + +link:install.html#GBFTP[3 Installation] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +** link:install.html#GBFUD[3.1 Obtaining a Compatible Implementation] +** link:install.html#GBFTS[3.2 Installing the Software] + +[[setup-and-configuration]] +link:config.html#GBFVV[4 Setup and Configuration] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +** link:config.html#GHGDH[4.4 Custom Configuration Handlers] +** link:config.html#GBFWG[4.5 Custom Deployment Handlers] +*** link:config.html#GBFVA[4.5.1 To Create a Custom Deployment Handler] +** link:config.html#GBFUY[4.6 Using the JavaTest Harness Software] +** link:config.html#GBFWG[4.7 Using the JavaTest Harness Configuration GUI] +*** link:config.html#GBFVA[4.7.1 Configuration GUI Overview] +*** link:config.html#GBFVD[4.7.2 Starting the Configuration GUI] +*** link:config.html#GBFVX[4.7.3 To Configure the JavaTest Harness to Run the TCK Tests] +*** link:config.html#GBFUU[4.7.4 Modifying the Default Test Configuration] + +[[executing-tests]] +link:using.html#GBFWO[5 Executing Tests] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +** link:using.html#GBFUZ[5.1 Starting JavaTest] +*** link:using.html#GBFWH[5.1.1 To Start JavaTest in GUI Mode] +*** link:using.html#GBFVW[5.1.2 To Start JavaTest in Command-Line Mode] +** link:using.html#GBFWM[5.2 Running a Subset of the Tests] +*** link:using.html#GBFVT[5.2.1 To Run a Subset of Tests in GUI Mode] +*** link:using.html#GBFWK[5.2.2 To Run a Subset of Tests in Command-Line Mode] +*** link:using.html#GBFVL[5.2.3 To Run a Subset of Tests in Batch Mode Based on Prior Result Status] +** link:using.html#GCLRR[5.3 Running the TCK Against another CI] +** link:using.html#GCLRZ[5.4 Running the TCK Against a Vendor's Implementation] +** link:using.html#GBFVK[5.5 Test Reports] +*** link:using.html#GBFWD[5.5.1 Creating Test Reports] +*** link:using.html#GBFVB[5.5.2 Viewing an Existing Test Report] + +[[debugging-test-problems]] +link:debug.html#GBFUV[6 Debugging Test Problems] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +** link:debug.html#GBFYP[6.1 Overview] +** link:debug.html#GBFVF[6.2 Test Tree] +** link:debug.html#GBFWI[6.3 Folder Information] +** link:debug.html#GBFVP[6.4 Test Information] +** link:debug.html#GBFVZ[6.5 Report Files] +** link:debug.html#GBFYF[6.6 Configuration Failures] +* link:faq.html#GBFYD[A Frequently Asked Questions] +** link:faq.html#GBFYQ[A.1 Where do I start to debug a test failure?] +** link:faq.html#GBFYR[A.2 How do I restart a crashed test run?] +** link:faq.html#GBFWU[A.3 What would cause tests be added to the exclude list?] diff --git a/tck/docs/userguide/src/main/jbake/content/using-examples.inc b/tck/docs/userguide/src/main/jbake/content/using-examples.inc new file mode 100644 index 00000000..1b3d9660 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/using-examples.inc @@ -0,0 +1,53 @@ +/////////////////////////////////////////////////////////////////////// +NOTE TO WRITERS: +These CLI examples can be customized as necessary. +/////////////////////////////////////////////////////////////////////// + +1. Change to any subdirectory under `/src/com/sun/ts/tests`. +2. Start JavaTest using the following command: ++ +-- +[source,oac_no_warn] +---- +ant runclient +---- +-- + +[[GCMCU]] + +==== Example 5-1 {TechnologyShortName} TCK Signature Tests + +To run the {TechnologyShortName} TCK signature tests, enter the +following commands: + +[source,subs="attributes"] +---- +cd {sigTestDirectoryExample} +ant runclient +---- + +[[GCMBV]] + + +==== Example 5-2 Single Test Directory + +To run a single test directory, enter the following commands: + +[source,subs="attributes"] +---- +cd {singleTestDirectoryExample} +ant runclient +---- + +[[GCMCA]] + + +==== Example 5-3 Subset of Test Directories + +To run a subset of test directories, enter the following commands: + +[source,subs="attributes"] +---- +cd {subsetTestDirectoryExample} +ant runclient +---- diff --git a/tck/docs/userguide/src/main/jbake/content/using.adoc b/tck/docs/userguide/src/main/jbake/content/using.adoc new file mode 100644 index 00000000..9189c9f9 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/content/using.adoc @@ -0,0 +1,323 @@ +type=page +status=published +title=Executing Tests +next=debug.html +prev=config.html +~~~~~~ +include::attributes.conf[] +Executing Tests +=============== + +[[GBFWO]] + + +[[executing-tests]] +5 Executing Tests +----------------- + +The {TechnologyShortName} TCK uses the JavaTest harness to execute the +tests in the test suite. For detailed instructions that explain how to +run and use JavaTest, see the JavaTest User's Guide and Reference in +the documentation bundle. + +This chapter includes the following topics: + +* link:#GBFUZ[Starting JavaTest] +* link:#GBFWM[Running a Subset of the Tests] +* link:#GCLRR[Running the TCK Against your selected CI] +* link:#GCLRZ[Running the TCK Against a Vendor's Implementation] +* link:#GBFVK[Test Reports] + + +[NOTE] +======================================================================= + +The instructions in this chapter assume that you have installed and +configured your test environment as described in +link:install.html#GBFTP[Chapter 3, "Installation,"] and +link:config.html#GBFVV[Chapter 4, "Setup and Configuration,"], +respectively. + +======================================================================= + +ifdef::rebuild[] +As explained in link:rebuild.html#GCLIZ[Appendix B, "Packaging the +Test Applications in Servlet-Compliant WAR +Files With VI-Specific Information,"] the {TechnologyShortName} TCK +introduces the concept of repackaging the TCK tests. +endif::rebuild[] + + +[[GBFUZ]][[starting-javatest]] + +5.1 Starting JavaTest +~~~~~~~~~~~~~~~~~~~~~ + +There are two general ways to run the {TechnologyShortName} TCK using +the JavaTest harness software: + +* Through the JavaTest GUI +* From the command line in your shell environment + + +[NOTE] +======================================================================= + +The `ant` command referenced in the following +two procedures and elsewhere in this guide is the Apache Ant +build tool, which will need to be downloaded separately. +The `build.xml` file in `/bin` contains the various Ant +targets for the {TechnologyShortName} TCK test suite. + +======================================================================= + + +[[GBFWH]][[to-start-javatest-in-gui-mode]] + +5.1.1 To Start JavaTest in GUI Mode +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Execute the following commands: + +[source,oac_no_warn] +---- +cd /bin +ant gui +---- + +[[GBFVW]][[to-start-javatest-in-command-line-mode]] + +5.1.2 To Start JavaTest in Command-Line Mode +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +include::using-examples.inc[] + +[[GBFWM]][[running-a-subset-of-the-tests]] + +5.2 Running a Subset of the Tests +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Use the following modes to run a subset of the tests: + +* link:#GBFVT[Section 5.2.1, "To Run a Subset of Tests in GUI Mode"] +* link:#GBFWK[Section 5.2.2, "To Run a Subset of Tests in Command-Line Mode"] +* link:#GBFVL[Section 5.2.3, "To Run a Subset of Tests in Batch Mode +Based on Prior Result Status"] + +[[GBFVT]][[to-run-a-subset-of-tests-in-gui-mode]] + +5.2.1 To Run a Subset of Tests in GUI Mode +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +1. From the JavaTest main menu, click *Configure*, then click *Change +Configuration*, and then click *Tests to Run*. + +The tabbed Configuration Editor dialog box is displayed. +2. Click *Specify* from the option list on the left. +3. Select the tests you want to run from the displayed test tree, and +then click *Done*. + +You can select entire branches of the test tree, or use `Ctrl+Click` or +`Shift+Click` to select multiple tests or ranges of tests, respectively, +or select just a single test. +4. Click *Save File*. +5. Click *Run Tests*, and then click *Start* to run the tests you selected. + +Alternatively, you can `right-click` the test you want from the test tree +in the left section of the JavaTest main window, and choose *Execute +These Tests* from the menu. +6. Click *Report*, and then click *Create Report*. +7. Specify the directory in which the JavaTest test harness will write +the report, and then click *OK* + +A report is created, and you are asked whether you want to view it. +8. Click *Yes* to view the report. + +[[GBFWK]][[to-run-a-subset-of-tests-in-command-line-mode]] + +5.2.2 To Run a Subset of Tests in Command-Line Mode +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +1. Change to the directory containing the tests you want to run. +2. Start the test run by executing the following command: + ++ +[source] +---- +ant runclient +---- ++ +The tests in the directory and its subdirectories are run. + +[[GBFVL]][[to-run-a-subset-of-tests-in-batch-mode-based-on-prior-result-status]] + +5.2.3 To Run a Subset of Tests in Batch Mode Based on Prior Result Status +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +You can run certain tests in batch mode based on the test's prior run +status by specifying the `priorStatus` system property when invoking +`ant` + +Invoke `ant` with the `priorStatus` property. + +The accepted values for the `priorStatus` property are any combination +of the following: + +* `fail` +* `pass` +* `error` +* `notRun` + +For example, you could run all the {TechnologyShortName} tests with a +status of failed and error by invoking the following commands: + +[source,oac_no_warn] +---- +ant -DpriorStatus="fail,error" runclient +---- + +Note that multiple `priorStatus` values must be separated by commas. + +[[GCLRR]][[running-the-tck-against-the-ci]] + +5.3 Running the TCK Against another CI +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Some test scenarios are designed to ensure that the configuration and deployment of +all the prebuilt {TechnologyShortName} TCK tests against one Compatible +Implementation are successful operating with other compatible implementations, and that the TCK is ready for +compatibility testing against the Vendor and Compatible Implementations. + +1. Verify that you have followed the configuration instructions in +link:config.html#GBFVU[Section 4.1, "Configuring Your Environment to Run +the TCK Against the Compatible Implementation."] +2. If required, verify that you have completed the steps in +link:config.html#GCLIW[Section 4.3.2, "Deploying the Prebuilt Archives."] +3. Run the tests, as described in link:#GBFUZ[Section 5.1, "Starting +JavaTest,"] and, if desired, link:#GBFWM[Section 5.2, "Running a Subset +of the Tests."] + +[[GCLRZ]][[running-the-tck-against-a-vendors-implementation]] + +5.4 Running the TCK Against a Vendor's Implementation +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This test scenario is one of the compatibility test phases that all +Vendors must pass. + +1. Verify that you have followed the configuration instructions in +link:config.html#GCLHU[Section 4.2, "Configuring Your Environment to +Repackage and Run the TCK Against the Vendor Implementation."] +2. If required, verify that you have completed the steps in +link:config.html#GCLIL[Section 4.3.3, "Deploying the +Test Applications Against the Vendor Implementation."] +3. Run the tests, as described in link:#GBFUZ[Section 5.1, "Starting +JavaTest,"] and, if desired, link:#GBFWM[Section 5.2, "Running a Subset +of the Tests."] + +[[GBFVK]][[test-reports]] + +5.5 Test Reports +~~~~~~~~~~~~~~~~ + +A set of report files is created for every test run. These report files +can be found in the report directory you specify. After a test run is +completed, the JavaTest harness writes HTML reports for the test run. +You can view these files in the JavaTest ReportBrowser when running in +GUI mode, or in the web browser of your choice outside the JavaTest +interface. + +To see all of the HTML report files, enter the URL of the `report.html` +file. This file is the root file that links to all of the other HTML +reports. + +The JavaTest harness also creates a `summary.txt` file in the report +directory that you can open in any text editor. The `summary.txt` file +contains a list of all tests that were run, their test results, and +their status messages. + +[[GBFWD]][[creating-test-reports]] + +5.5.1 Creating Test Reports +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Use the following modes to create test reports: + +* link:#GBFVH[Section 5.5.1.1, "To Create a Test Report in GUI Mode"] +* link:#GBFVC[Section 5.5.1.2, "To Create a Test Report in Command-Line Mode"] + +[[GBFVH]][[to-create-a-test-report-in-gui-mode]] + +5.5.1.1 To Create a Test Report in GUI Mode ++++++++++++++++++++++++++++++++++++++++++++ + +1. From the JavaTest main menu, click *Report*, then click *Create Report*. + +You are prompted to specify a directory to use for your test reports. +2. Specify the directory you want to use for your reports, and then +click *OK*. + +Use the Filter list to specify whether you want to generate reports for +the current configuration, all tests, or a custom set of tests. + +You are asked whether you want to view report now. +3. Click *Yes* to display the new report in the JavaTest ReportBrowser. + +[[GBFVC]][[to-create-a-test-report-in-command-line-mode]] + +5.5.1.2 To Create a Test Report in Command-Line Mode +++++++++++++++++++++++++++++++++++++++++++++++++++++ + +1. Specify where you want to create the test report. +a. To specify the report directory from the command line at runtime, +use: ++ +[source] +---- +ant -Dreport.dir="report_dir" +---- ++ +Reports are written for the last test run to the directory you specify. +2. To specify the default report directory, set the `report.dir` +property in +{jteFileName}+. + +For example: ++ +[source] +---- +report.dir="/home/josephine/reports" +---- ++ +3. To disable reporting, set the `report.dir` property to `"none"`, +either on the command line or in +{jteFileName}+. + +For example: ++ +[source] +---- +ant -Dreport.dir="none" +---- ++ + +[[GBFVB]][[viewing-an-existing-test-report]] + +5.5.2 Viewing an Existing Test Report +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Use the following modes to view an existing test report: + +* link:#GBFVO[Section 5.5.2.1, "To View an Existing Report in GUI Mode"] +* link:#GBFWB[Section 5.5.2.2, "To View an Existing Report in +Command-Line Mode"] + +[[GBFVO]][[to-view-an-existing-report-in-gui-mode]] + +5.5.2.1 To View an Existing Report in GUI Mode +++++++++++++++++++++++++++++++++++++++++++++++ + +1. From the JavaTest main menu, click *Report*, then click *Open Report*. + +You are prompted to specify the directory containing the report you want +to open. +2. Select the report directory you want to open, and then click *Open*. + +The selected report set is opened in the JavaTest ReportBrowser. + +[[GBFWB]][[to-view-an-existing-report-in-command-line-mode]] + +5.5.2.2 To View an Existing Report in Command-Line Mode ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +Use the Web browser of your choice to view the `report.html` file in the +report directory you specified from the command line or in +{jteFileName}+. + +include::using.inc[] + diff --git a/tck/docs/userguide/src/main/jbake/content/using.inc b/tck/docs/userguide/src/main/jbake/content/using.inc new file mode 100644 index 00000000..e69de29b diff --git a/tck/docs/userguide/src/main/jbake/jbake.properties b/tck/docs/userguide/src/main/jbake/jbake.properties new file mode 100644 index 00000000..05c7056f --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/jbake.properties @@ -0,0 +1,24 @@ +# +# Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +site.host=http://jbake.org +render.tags=false +render.sitemap=false +render.archive=false +render.feed=false +render.index=false +asciidoctor.option.safe=0 +asciidoctor.attributes.export=true \ No newline at end of file diff --git a/tck/docs/userguide/src/main/jbake/templates/footer.ftl b/tck/docs/userguide/src/main/jbake/templates/footer.ftl new file mode 100644 index 00000000..746cbf1c --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/templates/footer.ftl @@ -0,0 +1,44 @@ +<#-- a footer template fragment included in the page template --> +
+ + + + + + + + + <#if content.prev??> + + + + <#if content.next??> + + + + + +
+ + + Previous + + + + + Next + + + + + Contents + +
+ + + Eclipse Foundation Logo  + Copyright © 2017, 2021 Oracle and/or its affiliates. All rights reserved. + + + + diff --git a/tck/docs/userguide/src/main/jbake/templates/header.ftl b/tck/docs/userguide/src/main/jbake/templates/header.ftl new file mode 100644 index 00000000..50b72ae8 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/templates/header.ftl @@ -0,0 +1,54 @@ + +<#-- a header template fragment included in the page template --> + + + + <#if (content.title)??><#escape x as x?xml>${content.title}</#escape></#if> + + + + + + + + + +
+ ${content.title}
+
+
+ + + + + + + + + <#if content.prev??> + + + + <#if content.next??> + + + + + +
+ + + Previous + + + + + Next + + + + + Contents + +
+ diff --git a/tck/docs/userguide/src/main/jbake/templates/menu.ftl b/tck/docs/userguide/src/main/jbake/templates/menu.ftl new file mode 100644 index 00000000..888c03dc --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/templates/menu.ftl @@ -0,0 +1 @@ +<#-- a menu bar template fragment included in the page template --> \ No newline at end of file diff --git a/tck/docs/userguide/src/main/jbake/templates/page.ftl b/tck/docs/userguide/src/main/jbake/templates/page.ftl new file mode 100644 index 00000000..eca51db3 --- /dev/null +++ b/tck/docs/userguide/src/main/jbake/templates/page.ftl @@ -0,0 +1,8 @@ +<#-- a top level page layout template --> + +<#include "header.ftl"> +<#include "menu.ftl"> + +${content.body} + +<#include "footer.ftl"> \ No newline at end of file diff --git a/tck/docs/userguide/src/theme/jakartaee-theme.yml b/tck/docs/userguide/src/theme/jakartaee-theme.yml new file mode 100644 index 00000000..6092a2f5 --- /dev/null +++ b/tck/docs/userguide/src/theme/jakartaee-theme.yml @@ -0,0 +1,299 @@ +# +# Following is the asciidoctor-pdf default theme [1], with small +# customizations, mostly for header and footer, marked "EE". +# +# [1] https://github.com/asciidoctor/asciidoctor-pdf/blob/master/data/themes/default-theme.yml +# +font: + catalog: + # Noto Serif supports Latin, Latin-1 Supplement, Latin Extended-A, Greek, Cyrillic, Vietnamese & an assortment of symbols + Noto Serif: + normal: notoserif-regular-subset.ttf + bold: notoserif-bold-subset.ttf + italic: notoserif-italic-subset.ttf + bold_italic: notoserif-bold_italic-subset.ttf + # M+ 1mn supports ASCII and the circled numbers used for conums + M+ 1mn: + normal: mplus1mn-regular-ascii-conums.ttf + bold: mplus1mn-bold-ascii.ttf + italic: mplus1mn-italic-ascii.ttf + bold_italic: mplus1mn-bold_italic-ascii.ttf + # M+ 1p supports Latin, Latin-1 Supplement, Latin Extended, Greek, Cyrillic, Vietnamese, Japanese & an assortment of symbols + # It also provides arrows for ->, <-, => and <= replacements in case these glyphs are missing from font + M+ 1p Fallback: + normal: mplus1p-regular-fallback.ttf + bold: mplus1p-regular-fallback.ttf + italic: mplus1p-regular-fallback.ttf + bold_italic: mplus1p-regular-fallback.ttf + fallbacks: + - M+ 1p Fallback +page: + background_color: ffffff + layout: portrait + margin: [0.5in, 0.67in, 0.67in, 0.67in] + # margin_inner and margin_outer keys are used for recto/verso print margins when media=prepress + margin_inner: 0.75in + margin_outer: 0.59in + #size: A4 # EE + size: Letter # EE +base: + align: justify + # color as hex string (leading # is optional) + font_color: 333333 + # color as RGB array + #font_color: [51, 51, 51] + # color as CMYK array (approximated) + #font_color: [0, 0, 0, 0.92] + #font_color: [0, 0, 0, 92%] + font_family: Noto Serif + # choose one of these font_size/line_height_length combinations + #font_size: 14 + #line_height_length: 20 + #font_size: 11.25 + #line_height_length: 18 + #font_size: 11.2 + #line_height_length: 16 + font_size: 10.5 + #line_height_length: 15 + # correct line height for Noto Serif metrics + line_height_length: 12 + #font_size: 11.25 + #line_height_length: 18 + line_height: $base_line_height_length / $base_font_size + font_size_large: round($base_font_size * 1.25) + font_size_small: round($base_font_size * 0.85) + font_size_min: $base_font_size * 0.75 + font_style: normal + border_color: eeeeee + border_radius: 4 + border_width: 0.5 +# FIXME vertical_rhythm is weird; we should think in terms of ems +#vertical_rhythm: $base_line_height_length * 2 / 3 +# correct line height for Noto Serif metrics (comes with built-in line height) +vertical_rhythm: $base_line_height_length +horizontal_rhythm: $base_line_height_length +# QUESTION should vertical_spacing be block_spacing instead? +vertical_spacing: $vertical_rhythm +link: + font_color: 428bca +# literal is currently used for inline monospaced in prose and table cells +literal: + font_color: b12146 + font_family: M+ 1mn +menu_caret_content: " \u203a " +heading: + align: left + #font_color: 181818 + font_color: $base_font_color + font_family: $base_font_family + font_style: bold + # h1 is used for part titles (book doctype) or the doctitle (article doctype) + #h1_font_size: floor($base_font_size * 2.6) # EE + h1_font_size: floor($base_font_size * 2.5) # EE, squeeze title onto one line + # h2 is used for chapter titles (book doctype only) + h2_font_size: floor($base_font_size * 2.15) + h3_font_size: round($base_font_size * 1.7) + h4_font_size: $base_font_size_large + h5_font_size: $base_font_size + h6_font_size: $base_font_size_small + #line_height: 1.4 + # correct line height for Noto Serif metrics (comes with built-in line height) + line_height: 1 + margin_top: $vertical_rhythm * 0.4 + margin_bottom: $vertical_rhythm * 0.9 +title_page: + align: right + logo: + top: 10% + title: + top: 55% + font_size: $heading_h1_font_size + font_color: 999999 + line_height: 0.9 + subtitle: + font_size: $heading_h3_font_size + font_style: bold_italic + line_height: 1 + authors: + margin_top: $base_font_size * 1.25 + font_size: $base_font_size_large + font_color: 181818 + revision: + margin_top: $base_font_size * 1.25 +block: + margin_top: 0 + margin_bottom: $vertical_rhythm +caption: + align: left + font_size: $base_font_size * 0.95 + font_style: italic + # FIXME perhaps set line_height instead of / in addition to margins? + margin_inside: $vertical_rhythm / 3 + #margin_inside: $vertical_rhythm / 4 + margin_outside: 0 +lead: + font_size: $base_font_size_large + line_height: 1.4 +abstract: + font_color: 5c6266 + font_size: $lead_font_size + line_height: $lead_line_height + font_style: italic + first_line_font_style: bold + title: + align: center + font_color: $heading_font_color + font_family: $heading_font_family + font_size: $heading_h4_font_size + font_style: $heading_font_style +admonition: + column_rule_color: $base_border_color + column_rule_width: $base_border_width + padding: [0, $horizontal_rhythm, 0, $horizontal_rhythm] + #icon: + # tip: + # name: fa-lightbulb-o + # stroke_color: 111111 + # size: 24 + label: + text_transform: uppercase + font_style: bold +blockquote: + font_color: $base_font_color + font_size: $base_font_size_large + border_color: $base_border_color + border_width: 5 + # FIXME disable negative padding bottom once margin collapsing is implemented + padding: [0, $horizontal_rhythm, $block_margin_bottom * -0.75, $horizontal_rhythm + $blockquote_border_width / 2] + cite_font_size: $base_font_size_small + cite_font_color: 999999 +# code is used for source blocks (perhaps change to source or listing?) +code: + font_color: $base_font_color + font_family: $literal_font_family + font_size: ceil($base_font_size) + padding: $code_font_size + line_height: 1.25 + # line_gap is an experimental property to control how a background color is applied to an inline block element + line_gap: 3.8 + background_color: f5f5f5 + border_color: cccccc + border_radius: $base_border_radius + border_width: 0.75 +conum: + font_family: M+ 1mn + font_color: $literal_font_color + font_size: $base_font_size + line_height: 4 / 3 +example: + border_color: $base_border_color + border_radius: $base_border_radius + border_width: 0.75 + background_color: ffffff + # FIXME reenable padding bottom once margin collapsing is implemented + padding: [$vertical_rhythm, $horizontal_rhythm, 0, $horizontal_rhythm] +image: + align: left +prose: + margin_top: $block_margin_top + margin_bottom: $block_margin_bottom +sidebar: + background_color: eeeeee + border_color: e1e1e1 + border_radius: $base_border_radius + border_width: $base_border_width + # FIXME reenable padding bottom once margin collapsing is implemented + padding: [$vertical_rhythm, $vertical_rhythm * 1.25, 0, $vertical_rhythm * 1.25] + title: + align: center + font_color: $heading_font_color + font_family: $heading_font_family + font_size: $heading_h4_font_size + font_style: $heading_font_style +thematic_break: + border_color: $base_border_color + border_style: solid + border_width: $base_border_width + margin_top: $vertical_rhythm * 0.5 + margin_bottom: $vertical_rhythm * 1.5 +description_list: + term_font_style: bold + term_spacing: $vertical_rhythm / 4 + description_indent: $horizontal_rhythm * 1.25 +outline_list: + indent: $horizontal_rhythm * 1.5 + #marker_font_color: 404040 + # NOTE outline_list_item_spacing applies to list items that do not have complex content + item_spacing: $vertical_rhythm / 2 +table: + background_color: $page_background_color + #head_background_color: + #head_font_color: $base_font_color + head_font_style: bold + #body_background_color: + body_stripe_background_color: f9f9f9 + foot_background_color: f0f0f0 + border_color: dddddd + border_width: $base_border_width + cell_padding: 3 +toc: + indent: $horizontal_rhythm + line_height: 1.4 + dot_leader: + #content: ". " + font_color: a9a9a9 + #levels: 2 3 +# NOTE in addition to footer, header is also supported +footer: + font_size: $base_font_size_small + # NOTE if background_color is set, background and border will span width of page + #border_color: dddddd # EE + #border_width: 0.25 # EE + height: $base_line_height_length * 2.5 + line_height: 1 + padding: [$base_line_height_length / 2, 1, 0, 1] + vertical_align: top + #image_vertical_align: or + # additional attributes for content: + # * {page-count} + # * {page-number} + # * {document-title} + # * {document-subtitle} + # * {chapter-title} + # * {section-title} + # * {section-or-chapter-title} + recto: + #columns: "<50% =0% >50%" + right: + #content: '{page-number}' # EE + #content: '{section-or-chapter-title} | {page-number}' + #content: '{document-title} | {page-number}' + content: '{document-title}{nbsp}{nbsp}{nbsp} *{page-number}*' # EE + #center: + # content: '{page-number}' + left: # EE + content: '{status}' # EE + verso: + #columns: $footer_recto_columns + left: + #content: $footer_recto_right_content # EE + #content: '{page-number} | {chapter-title}' + content: '*{page-number}* {nbsp}{nbsp}{nbsp}{document-title}' # EE + #center: + # content: '{page-number}' + right: # EE + content: '{status}' # EE +header: # EE + font_size: $base_font_size_small # EE + border_color: dddddd # EE + border_width: 0.25 # EE + height: $base_line_height_length * 2.5 # EE + line_height: 1 # EE + padding: [$base_line_height_length / 2, 1, 0, 1] # EE + vertical_align: top # EE + recto: # EE + right: # EE + content: '{section-or-chapter-title}' # EE + verso: # EE + left: # EE + content: '{section-or-chapter-title}' # EE diff --git a/tck/pom.xml b/tck/pom.xml new file mode 100644 index 00000000..0f8356b9 --- /dev/null +++ b/tck/pom.xml @@ -0,0 +1,225 @@ + + + + 4.0.0 + + + jakarta.tck + project + 11.0.0-SNAPSHOT + + + jakarta-pages-tck + 4.0.0 + jar + + pages-tck + JSP TCK + + + 1.7.0.Alpha14 + 3.0.0-M1 + 6.0.0-RC1 + 2.1.2 + 6.1.0-M2 + 3.1.0 + 4.0.0-M2 + 5.9.3 + + + + + ${project.groupId} + common + 11.0.0-SNAPSHOT + + + ${project.groupId} + runtime + 11.0.0-SNAPSHOT + + + ${project.groupId} + libutil + 11.0.0-SNAPSHOT + + + ${project.groupId} + signaturetest + 11.0.0-SNAPSHOT + + + jakarta.tck + sigtest-maven-plugin + 2.2 + + + jakarta.servlet.jsp + jakarta.servlet.jsp-api + ${jsp-api.version} + + + jakarta.servlet + jakarta.servlet-api + ${jakarta.servlet-api.version} + + + jakarta.annotation + jakarta.annotation-api + ${jakarta.annotation-api.version} + + + jakarta.jms + jakarta.jms-api + ${jms-api.version} + + + jakarta.el + jakarta.el-api + ${jakarta.el-api.version} + + + jakarta.mail + jakarta.mail-api + ${jakarta.mail-api.version} + + + org.junit.jupiter + junit-jupiter + ${junit.jupiter.version} + + + org.jboss.arquillian.junit5 + arquillian-junit5-container + ${arquillian.junit} + + + org.jboss.arquillian.junit5 + arquillian-junit5-core + ${arquillian.junit} + + + + + ${bundle-name}-${project.version} + + + src/main/resources + + LICENSE_${license}.md + ee/ + + + + + + maven-javadoc-plugin + + none + + + + org.apache.maven.plugins + maven-source-plugin + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-assembly-plugin + 3.3.0 + + + distribution + + single + + package + + + src/main/assembly/assembly.xml + + \ + false + ${bundle-name}-${project.version} + + + + + + + + + + EFTL + + true + + + jakarta-pages-tck + EFTL + + + + EPL + + pages-tck + EPL + + + + record-signature + + false + + + jakarta-pages-tck + EFTL + + + + + jakarta.tck + sigtest-maven-plugin + 2.2 + + ${project.build.directory}/jakarta.servlet.jsp.sig_${project.version} + jakarta.servlet.jsp,jakarta.servlet.jsp.el,jakarta.servlet.jsp.tagext + + + + + generate + + + + + + + + + + diff --git a/tck/src/main/assembly/assembly.xml b/tck/src/main/assembly/assembly.xml new file mode 100644 index 00000000..09fdcfd9 --- /dev/null +++ b/tck/src/main/assembly/assembly.xml @@ -0,0 +1,77 @@ + + + + + distribution + pages-tck + + zip + + + + + + ${project.basedir}/src/main/resources/LICENSE_${license}.md + LICENSE.md + + + ${project.basedir}/src/main/resources/jakarta.servlet.jsp.sig_4.0 + jakarta.servlet.jsp.sig_4.0 + + + + + ${project.build.directory} + artifacts + 755 + + **/*.jar + + + + ${project.basedir}/docs + docs + 755 + + assertions + *.html + *.txt + + + + ${project.basedir}/docs/userguide/target/generated-docs + docs/pdf-usersguide + 755 + + *.pdf + + + + ${project.basedir}/docs/userguide/target/staging + docs/html-usersguide + 755 + + *.html + css/** + img/** + + + + diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/arrayelresolver/ArrayELResolverTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/arrayelresolver/ArrayELResolverTag.java new file mode 100644 index 00000000..fb9d1207 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/arrayelresolver/ArrayELResolverTag.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.api.jakarta_el.arrayelresolver; + +import java.io.IOException; + +import com.sun.ts.tests.common.el.api.resolver.ResolverTest; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.el.ArrayELResolver; +import jakarta.el.ELContext; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class ArrayELResolverTag extends SimpleTagSupport { + + public void doTag() throws JspException, IOException { + + StringBuffer buf = new StringBuffer(); + String[] colors = { "red", "blue", "green" }; + JspWriter out = getJspContext().getOut(); + ELContext context = getJspContext().getELContext(); + ArrayELResolver arrayResolver = new ArrayELResolver(); + + try { + boolean pass = ResolverTest.testELResolver(context, arrayResolver, colors, + Integer.valueOf(1), "yellow", buf, false); + out.println(buf.toString()); + if (pass == true) + out.println("Test PASSED"); + + } catch (Throwable t) { + out.println("buffer is " + buf.toString()); + JspTestUtil.handleThrowable(t, out, "ArrayELResolverTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/arrayelresolver/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/arrayelresolver/URLClientIT.java new file mode 100644 index 00000000..2ddb4d9a --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/arrayelresolver/URLClientIT.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)URLClient.java + */ + +package ee.jakarta.tck.pages.api.jakarta_el.arrayelresolver; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import com.sun.ts.tests.common.el.api.resolver.ResolverTest; +import com.sun.ts.tests.common.el.api.resolver.BarELResolver; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_arrayelresolver_web"); + setTestJsp("ArrayELResolverTest"); + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_arrayelresolver_web.war"); + archive.addClasses(ArrayELResolverTag.class, JspTestUtil.class, + ResolverTest.class, + BarELResolver.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_arrayelresolver_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/arrayelresolver.tld", "arrayelresolver.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ArrayELResolverTest.jsp")), "ArrayELResolverTest.jsp"); + + return archive; + + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: arrayElResolverTest + * + * @assertion_ids: EL:JAVADOC:3; EL:JAVADOC:4; EL:JAVADOC:5; EL:JAVADOC:6; + * EL:JAVADOC:7; EL:JAVADOC:8 + * + * @test_Strategy: Obtain an ArrayELResolver via the PageContext and verify + * that API calls work as expected: setValue() getValue() getType() + * isReadOnly() getCommonPropertyType() getFeatureDescriptors() + */ + @Test + public void arrayElResolverTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "arrayElResolverTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/beanelresolver/BeanELResolverTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/beanelresolver/BeanELResolverTag.java new file mode 100644 index 00000000..be70b333 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/beanelresolver/BeanELResolverTag.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.api.jakarta_el.beanelresolver; + +import java.io.IOException; + +import com.sun.ts.tests.common.el.api.resolver.ResolverTest; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.el.BeanELResolver; +import jakarta.el.ELContext; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class BeanELResolverTag extends SimpleTagSupport { + + public void doTag() throws JspException, IOException { + + StringBuffer buf = new StringBuffer(); + String property = "intention"; + + SimpleBean bean = new SimpleBean(); + bean.setIntention("bad"); + + JspWriter out = getJspContext().getOut(); + ELContext context = getJspContext().getELContext(); + BeanELResolver beanResolver = new BeanELResolver(); + + try { + boolean pass = ResolverTest.testELResolver(context, beanResolver, bean, + property, "good", buf, false); + out.println(buf.toString()); + if (pass == true) + out.println("Test PASSED"); + } catch (Throwable t) { + out.println("contents of buffer:\n" + buf.toString()); + JspTestUtil.handleThrowable(t, out, "BeanELResolverTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/beanelresolver/SimpleBean.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/beanelresolver/SimpleBean.java new file mode 100644 index 00000000..13bbe759 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/beanelresolver/SimpleBean.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.api.jakarta_el.beanelresolver; + +public class SimpleBean { + + private String intention; + + public void setIntention(String s) { + intention = s; + } + + public String getIntention() { + return intention; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/beanelresolver/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/beanelresolver/URLClientIT.java new file mode 100644 index 00000000..dd8f02e0 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/beanelresolver/URLClientIT.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)URLClient.java + */ + +package ee.jakarta.tck.pages.api.jakarta_el.beanelresolver; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import com.sun.ts.tests.common.el.api.resolver.ResolverTest; +import com.sun.ts.tests.common.el.api.resolver.BarELResolver; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_beanelresolver_web"); + setTestJsp("BeanELResolverTest"); + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_beanelresolver_web.war"); + archive.addClasses(BeanELResolverTag.class, SimpleBean.class, + JspTestUtil.class, + ResolverTest.class, + BarELResolver.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_beanelresolver_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/beanelresolver.tld", "beanelresolver.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/BeanELResolverTest.jsp")), "BeanELResolverTest.jsp"); + + return archive; + + } + + + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: beanElResolverTest + * + * @assertion_ids: EL:JAVADOC:11; EL:JAVADOC:12; EL:JAVADOC:13; EL:JAVADOC:14; + * EL:JAVADOC:15; EL:JAVADOC:16 + * + * @test_Strategy: Obtain an BeanELResolver via the PageContext and verify + * that API calls work as expected: setValue() getValue() getType() + * isReadOnly() getCommonPropertyType() getFeatureDescriptors() + */ + @Test + public void beanElResolverTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "beanElResolverTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/compelresolver/CompositeELResolverTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/compelresolver/CompositeELResolverTag.java new file mode 100644 index 00000000..625ced88 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/compelresolver/CompositeELResolverTag.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.api.jakarta_el.compelresolver; + +import java.io.IOException; + +import com.sun.ts.tests.common.el.api.resolver.ResolverTest; +import ee.jakarta.tck.pages.common.util.InstallCompositeELResolverListener; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.el.CompositeELResolver; +import jakarta.el.ELContext; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class CompositeELResolverTag extends SimpleTagSupport { + + public void doTag() throws JspException, IOException { + + StringBuffer buf = new StringBuffer(""); + JspWriter out = getJspContext().getOut(); + ELContext context = getJspContext().getELContext(); + CompositeELResolver compResolver = InstallCompositeELResolverListener + .getCompositeELResolver(); + + try { + boolean pass = ResolverTest.testCompositeELResolver(context, compResolver, + buf); + out.println(buf.toString()); + if (pass == true) + out.println("Test PASSED"); + } catch (Throwable t) { + out.println(buf.toString()); + JspTestUtil.handleThrowable(t, out, "CompositeELResolverTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/compelresolver/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/compelresolver/URLClientIT.java new file mode 100644 index 00000000..11a121fe --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/compelresolver/URLClientIT.java @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)URLClient.java + */ + +package ee.jakarta.tck.pages.api.jakarta_el.compelresolver; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.common.util.InstallCompositeELResolverListener; +import com.sun.ts.tests.common.el.api.resolver.ResolverTest; +import com.sun.ts.tests.common.el.api.resolver.BarELResolver; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_compelresolver_web"); + setTestJsp("CompositeELResolverTest"); + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_compelresolver_web.war"); + archive.addClasses(CompositeELResolverTag.class, + JspTestUtil.class, + InstallCompositeELResolverListener.class, + ResolverTest.class, + BarELResolver.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_compelresolver_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/compelresolver.tld", "compelresolver.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/CompositeELResolverTest.jsp")), "CompositeELResolverTest.jsp"); + + return archive; + + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: compositeElResolverTest + * + * @assertion_ids: EL:JAVADOC:24; EL:JAVADOC:26; EL:JAVADOC:27; EL:JAVADOC:28; + * EL:JAVADOC:29; EL:JAVADOC:30; EL:JAVADOC:31 + * + * @test_Strategy: Obtain a CompositeELResolver via the PageContext and verify + * that API calls work as expected: add() setValue() setValue() throws + * PropertyNotWritableException getValue() getType() isReadOnly() + * getCommonPropertyType() getFeatureDescriptors() + */ + @Test + public void compositeElResolverTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "compositeElResolverTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/createmethexpr/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/createmethexpr/URLClientIT.java new file mode 100644 index 00000000..6d9664e9 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/createmethexpr/URLClientIT.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)URLClient.java + */ + +package ee.jakarta.tck.pages.api.jakarta_el.createmethexpr; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_createmethexpr_web"); + setTestJsp("CreateMethodExpressionTest"); + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_createmethexpr_web.war"); + archive.addClasses(JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_createmethexpr_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/CreateMethodExpressionTest.jsp")), "CreateMethodExpressionTest.jsp"); + + return archive; + + } + + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: createMethodExpressionTest + * + * @assertion_ids: EL:JAVADOC:62 + * + * @test_Strategy: Validate the behavior of + * ExpressionFactory.createMethodExpression(). + */ + @Test + public void createMethodExpressionTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "createMethodExpressionTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/createvalexpr/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/createvalexpr/URLClientIT.java new file mode 100644 index 00000000..f9e42c58 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/createvalexpr/URLClientIT.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)URLClient.java + */ + +package ee.jakarta.tck.pages.api.jakarta_el.createvalexpr; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import java.io.IOException; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_createvalexpr_web"); + setTestJsp("CreateValueExpressionTest"); + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_createvalexpr_web.war"); + archive.addClasses(JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_createvalexpr_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/CreateValueExpressionTest.jsp")), "CreateValueExpressionTest.jsp"); + + return archive; + + } + + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: createValueExpressionTest + * + * @assertion_ids: EL:JAVADOC:63 + * + * @test_Strategy: Validate the behavior of + * ExpressionFactory.createValueExpression(). + */ + @Test + public void createValueExpressionTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "createValueExpressionTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/elresolver/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/elresolver/URLClientIT.java new file mode 100644 index 00000000..47a2a281 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/elresolver/URLClientIT.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)URLClient.java + */ + +package ee.jakarta.tck.pages.api.jakarta_el.elresolver; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import com.sun.ts.tests.common.el.api.resolver.ResolverTest; +import com.sun.ts.tests.common.el.api.resolver.BarELResolver; + +import java.io.IOException; + + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; + +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_elresolver_web"); + setTestJsp("ELResolverTest"); + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_elresolver_web.war"); + archive.addClasses(JspTestUtil.class, + ResolverTest.class, + BarELResolver.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_elresolver_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ELResolverTest.jsp")), "ELResolverTest.jsp"); + + return archive; + + } + + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: elResolverTest + * + * @assertion_ids: EL:JAVADOC:50; EL:JAVADOC:51; EL:JAVADOC:52; EL:JAVADOC:53; + * EL:JAVADOC:54; EL:JAVADOC:55 + * + * @test_Strategy: Obtain an ELResolver via the PageContext and verify that + * API calls work as expected: getValue() getType() setValue() isReadOnly() + * getCommonPropertyType() getFeatureDescriptors() + */ + @Test + public void elResolverTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "elResolverTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/listelresolver/ListELResolverTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/listelresolver/ListELResolverTag.java new file mode 100644 index 00000000..9199eeab --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/listelresolver/ListELResolverTag.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.api.jakarta_el.listelresolver; + +import java.io.IOException; +import java.util.ArrayList; + +import com.sun.ts.tests.common.el.api.resolver.ResolverTest; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.el.ELContext; +import jakarta.el.ListELResolver; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class ListELResolverTag extends SimpleTagSupport { + + public void doTag() throws JspException, IOException { + + StringBuffer buf = new StringBuffer(); + ArrayList superheroes = new ArrayList(); + superheroes.add("Batman"); + superheroes.add("Superman"); + superheroes.add("Spiderman"); + JspWriter out = getJspContext().getOut(); + ELContext context = getJspContext().getELContext(); + ListELResolver listResolver = new ListELResolver(); + + try { + boolean pass = ResolverTest.testELResolver(context, listResolver, + superheroes, Integer.valueOf(1), "Kryptonite", buf, false); + out.println(buf.toString()); + if (pass == true) + out.println("Test PASSED"); + + } catch (Throwable t) { + out.println("buffer is " + buf.toString()); + JspTestUtil.handleThrowable(t, out, "ListELResolverTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/listelresolver/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/listelresolver/URLClientIT.java new file mode 100644 index 00000000..f7738c76 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/listelresolver/URLClientIT.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)URLClient.java + */ + +package ee.jakarta.tck.pages.api.jakarta_el.listelresolver; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import com.sun.ts.tests.common.el.api.resolver.ResolverTest; +import com.sun.ts.tests.common.el.api.resolver.BarELResolver; + +import java.io.IOException; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_listelresolver_web"); + setTestJsp("ListELResolverTest"); + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_listelresolver_web.war"); + archive.addClasses(ListELResolverTag.class, + JspTestUtil.class, + ResolverTest.class, + BarELResolver.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_listelresolver_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/listelresolver.tld", "listelresolver.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ListELResolverTest.jsp")), "ListELResolverTest.jsp"); + + return archive; + + } + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: listElResolverTest + * + * @assertion_ids: EL:JAVADOC:68; EL:JAVADOC:69; EL:JAVADOC:70; EL:JAVADOC:71; + * EL:JAVADOC:72; EL:JAVADOC:73 + * + * @test_Strategy: Obtain an ListELResolver via the PageContext and verify + * that API calls work as expected: setValue() getValue() getType() + * isReadOnly() getCommonPropertyType() getFeatureDescriptors() + */ + @Test + public void listElResolverTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "listElResolverTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/mapelresolver/MapELResolverTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/mapelresolver/MapELResolverTag.java new file mode 100644 index 00000000..cfd202c2 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/mapelresolver/MapELResolverTag.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.api.jakarta_el.mapelresolver; + +import java.io.IOException; +import java.util.HashMap; + +import com.sun.ts.tests.common.el.api.resolver.ResolverTest; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.el.ELContext; +import jakarta.el.MapELResolver; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class MapELResolverTag extends SimpleTagSupport { + + public void doTag() throws JspException, IOException { + + StringBuffer buf = new StringBuffer(); + HashMap sportstars = new HashMap(); + sportstars.put("baseball", "Barry Bonds"); + sportstars.put("football", "Joe Montana"); + sportstars.put("basketball", "Michael Jordan"); + JspWriter out = getJspContext().getOut(); + ELContext context = getJspContext().getELContext(); + MapELResolver mapResolver = new MapELResolver(); + + try { + boolean pass = ResolverTest.testELResolver(context, mapResolver, + sportstars, "football", "Steve Young", buf, false); + out.println(buf.toString()); + if (pass == true) + out.println("Test PASSED"); + } catch (Throwable t) { + out.println("buffer is " + buf.toString()); + JspTestUtil.handleThrowable(t, out, "MapELResolverTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/mapelresolver/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/mapelresolver/URLClientIT.java new file mode 100644 index 00000000..3f4c4dd0 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/mapelresolver/URLClientIT.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)URLClient.java + */ + +package ee.jakarta.tck.pages.api.jakarta_el.mapelresolver; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import com.sun.ts.tests.common.el.api.resolver.ResolverTest; +import com.sun.ts.tests.common.el.api.resolver.BarELResolver; + +import java.io.IOException; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_mapelresolver_web"); + setTestJsp("MapELResolverTest"); + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_mapelresolver_web.war"); + archive.addClasses(MapELResolverTag.class, + JspTestUtil.class, + ResolverTest.class, + BarELResolver.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_mapelresolver_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/mapelresolver.tld", "mapelresolver.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/MapELResolverTest.jsp")), "MapELResolverTest.jsp"); + + return archive; + + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: mapElResolverTest + * + * @assertion_ids: EL:JAVADOC:76; EL:JAVADOC:77; EL:JAVADOC:78; EL:JAVADOC:79; + * EL:JAVADOC:80; EL:JAVADOC:83 + * + * @test_Strategy: Obtain an MapELResolver via the PageContext and verify that + * API calls work as expected: setValue() getValue() getType() isReadOnly() + * getCommonPropertyType() getFeatureDescriptors() + */ + @Test + public void mapElResolverTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "mapElResolverTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/methodinfo/MethodInfoTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/methodinfo/MethodInfoTag.java new file mode 100644 index 00000000..294818d6 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/methodinfo/MethodInfoTag.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.api.jakarta_el.methodinfo; + +import java.io.IOException; + +import com.sun.ts.tests.common.el.api.expression.ExpressionTest; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.el.ELContext; +import jakarta.el.MethodExpression; +import jakarta.el.MethodInfo; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class MethodInfoTag extends SimpleTagSupport { + + private MethodExpression mexp; + + public void setMethExpr(MethodExpression mexp) { + this.mexp = mexp; + } + + public void doTag() throws JspException, IOException { + + JspWriter out = getJspContext().getOut(); + StringBuffer buf = new StringBuffer(""); + ELContext elContext = getJspContext().getELContext(); + + try { + MethodInfo minfo = mexp.getMethodInfo(elContext); + Class[] paramTypes = { Object.class }; + boolean pass = ExpressionTest.testMethodInfo(minfo, "add", boolean.class, + 1, paramTypes, buf); + + if (!pass) { + out.println("Test FAILED: return from testMethodExpression\n"); + out.println("Buffer contents:\n" + buf.toString()); + return; + } + + mexp.invoke(elContext, new Object[] { "latest member" }); + } catch (Throwable t) { + out.println("Test FAILED: Exception in tag handler\n"); + out.println("Buffer contents:\n" + buf.toString()); + JspTestUtil.handleThrowable(t, out, "MethodInfoTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/methodinfo/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/methodinfo/URLClientIT.java new file mode 100644 index 00000000..28cd8436 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/methodinfo/URLClientIT.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)URLClient.java + */ + +package ee.jakarta.tck.pages.api.jakarta_el.methodinfo; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.common.tags.tck.SetTag; +import com.sun.ts.tests.common.el.api.expression.ExpressionTest; + +import java.io.IOException; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_methodinfo_web"); + setTestJsp("MethodInfoTest"); + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_methodinfo_web.war"); + archive.addClasses(MethodInfoTag.class, + JspTestUtil.class, + SetTag.class, + ExpressionTest.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_methodinfo_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/methodinfo.tld", "methodinfo.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/MethodInfoTest.jsp")), "MethodInfoTest.jsp"); + + return archive; + + } + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: methodInfoTest + * + * @assertion_ids: EL:JAVADOC:84; EL:JAVADOC:85; EL:JAVADOC:87; EL:JAVADOC:88; + * EL:JAVADOC:89 + * + * @test_Strategy: Validate the behavior of MethodExpression and MethodInfo + * class methods: MethodExpression.getMethodInfo() MethodExpression.invoke() + * MethodInfo.getName() MethodInfo.getReturnType() MethodInfo.getParamTypes() + */ + @Test + public void methodInfoTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "methodInfoTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/resourcebundleelresolver/ResourceBundleELResolverTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/resourcebundleelresolver/ResourceBundleELResolverTag.java new file mode 100644 index 00000000..ae014109 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/resourcebundleelresolver/ResourceBundleELResolverTag.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.api.jakarta_el.resourcebundleelresolver; + +import java.io.IOException; +import java.util.Enumeration; +import java.util.ResourceBundle; +import java.util.StringTokenizer; + +import com.sun.ts.tests.common.el.api.resolver.ResolverTest; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.el.ELContext; +import jakarta.el.ResourceBundleELResolver; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class ResourceBundleELResolverTag extends SimpleTagSupport { + + public void doTag() throws JspException, IOException { + + StringBuffer buf = new StringBuffer(); + + JspWriter out = getJspContext().getOut(); + ELContext context = getJspContext().getELContext(); + ResourceBundleELResolver resourceBundleResolver = new ResourceBundleELResolver(); + ResourceBundle resources = new MyResources(); + + try { + boolean pass = ResolverTest.testELResolver(context, + resourceBundleResolver, resources, "okKey", "all right!", buf, true); + out.println(buf.toString()); + if (pass == true) + out.println("Test PASSED"); + } catch (Throwable t) { + out.println("buffer is " + buf.toString()); + JspTestUtil.handleThrowable(t, out, "ResourceBundleELResolverTag"); + } + } + + static class MyResources extends ResourceBundle { + + public Object handleGetObject(String key) { + if (key.equals("okKey")) + return "Ok"; + if (key.equals("cancelKey")) + return "Cancel"; + return null; + } + + public Enumeration getKeys() { + return new StringTokenizer("okKey cancelKey"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/resourcebundleelresolver/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/resourcebundleelresolver/URLClientIT.java new file mode 100644 index 00000000..b4044997 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/resourcebundleelresolver/URLClientIT.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)URLClient.java + */ + +package ee.jakarta.tck.pages.api.jakarta_el.resourcebundleelresolver; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import com.sun.ts.tests.common.el.api.resolver.ResolverTest; +import com.sun.ts.tests.common.el.api.resolver.BarELResolver; + +import java.io.IOException; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_resourcebundleelresolver_web"); + setTestJsp("ResourceBundleELResolverTest"); + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_resourcebundleelresolver_web.war"); + archive.addClasses(ResourceBundleELResolverTag.class, + JspTestUtil.class, + ResolverTest.class, + BarELResolver.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_resourcebundleelresolver_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/resourcebundleelresolver.tld", "resourcebundleelresolver.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ResourceBundleELResolverTest.jsp")), "ResourceBundleELResolverTest.jsp"); + + return archive; + + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: resourceBundleElResolverTest + * + * @assertion_ids: EL:JAVADOC:103; EL:JAVADOC:104; EL:JAVADOC:105; + * EL:JAVADOC:106; EL:JAVADOC:107; EL:JAVADOC:109 + * + * @test_Strategy: Obtain an ResourceBundleELResolver via the PageContext and + * verify that API calls work as expected: setValue() getValue() getType() + * isReadOnly() getCommonPropertyType() getFeatureDescriptors() + */ + @Test + public void resourceBundleElResolverTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "resourcebundleElResolverTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/valexpression/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/valexpression/URLClientIT.java new file mode 100644 index 00000000..9b95e1a1 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/valexpression/URLClientIT.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)URLClient.java + */ + +package ee.jakarta.tck.pages.api.jakarta_el.valexpression; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.common.tags.tck.SetTag; +import com.sun.ts.tests.common.el.api.expression.ExpressionTest; + +import java.io.IOException; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_valexpr_web"); + setTestJsp("ValueExpressionTest"); + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_valexpr_web.war"); + archive.addClasses(ValueExpressionTag.class, + JspTestUtil.class, + SetTag.class, + ExpressionTest.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_valexpr_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/valexpression.tld", "valexpression.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ValueExpressionTest.jsp")), "ValueExpressionTest.jsp"); + + return archive; + + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: valueExpressionEvaluateTest + * + * @assertion_ids: EL:JAVADOC:110; EL:JAVADOC:111; EL:JAVADOC:112; + * EL:JAVADOC:113; EL:JAVADOC:114; EL:JAVADOC:60 + * + * @test_Strategy: Validate the behavior of ValueExpression API and + * Expression.isLiteralText() ValueExpression.getValue() + * ValueExpression.setValue() ValueExpression.getType() + * ValueExpression.getExpectedType() ValueExpression.isReadOnly() + * Expression.isLiteralText() + */ + @Test + public void valueExpressionEvaluateTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "valueExpressionEvaluateTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/valexpression/ValueExpressionTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/valexpression/ValueExpressionTag.java new file mode 100644 index 00000000..d69bd8af --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_el/valexpression/ValueExpressionTag.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.api.jakarta_el.valexpression; + +import java.io.IOException; + +import com.sun.ts.tests.common.el.api.expression.ExpressionTest; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.el.ELContext; +import jakarta.el.ValueExpression; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class ValueExpressionTag extends SimpleTagSupport { + + private ValueExpression vexp; + + private static final String VALUE = "bar"; + + private static final boolean READONLY = false; + + private static final boolean LITERAL_TEXT = false; + + public void setValExpr(ValueExpression vexp) { + this.vexp = vexp; + } + + public void doTag() throws JspException, IOException { + + ELContext elContext = getJspContext().getELContext(); + StringBuffer buf = new StringBuffer(""); + JspWriter out = getJspContext().getOut(); + + try { + boolean pass = ExpressionTest.testValueExpression(vexp, elContext, + "#{foo}", String.class, VALUE, READONLY, LITERAL_TEXT, buf); + out.println(buf.toString()); + if (pass) + out.println("Test PASSED."); + else + out.println("Test FAILED."); + } catch (Throwable t) { + out.println(buf.toString()); + JspTestUtil.handleThrowable(t, out, "ValueExpressionTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/implicitobjelresolver/ImplicitObjELResolverTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/implicitobjelresolver/ImplicitObjELResolverTag.java new file mode 100644 index 00000000..5798c70e --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/implicitobjelresolver/ImplicitObjELResolverTag.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.el.implicitobjelresolver; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspResolverTest; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.el.ELContext; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.el.ImplicitObjectELResolver; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class ImplicitObjELResolverTag extends SimpleTagSupport { + + public void doTag() throws JspException, IOException { + + StringBuffer buf = new StringBuffer(); + JspWriter out = getJspContext().getOut(); + ELContext context = getJspContext().getELContext(); + ImplicitObjectELResolver implicitobjResolver = new ImplicitObjectELResolver(); + + try { + boolean pass = JspResolverTest.testImplicitObjELResolver(context, + implicitobjResolver, null, "pageContext", "foo", buf); + out.println(buf.toString()); + if (pass == true) + out.println("Test PASSED"); + } catch (Throwable t) { + out.println("contents of buffer:\n" + buf.toString()); + JspTestUtil.handleThrowable(t, out, "ImplicitObjELResolverTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/implicitobjelresolver/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/implicitobjelresolver/URLClientIT.java new file mode 100644 index 00000000..45a80313 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/implicitobjelresolver/URLClientIT.java @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)URLClient.java + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.el.implicitobjelresolver; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.common.util.JspResolverTest; +import com.sun.ts.tests.common.el.api.resolver.BarELResolver; +import com.sun.ts.tests.common.el.api.resolver.ResolverTest; + +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_implicitobjelresolver_web"); + setTestJsp("ImplicitObjELResolverTest"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_implicitobjelresolver_web.war"); + archive.addClasses(ImplicitObjELResolverTag.class, + JspTestUtil.class, + JspResolverTest.class, + BarELResolver.class, + ResolverTest.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_implicitobjelresolver_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/implicitobjelresolver.tld", "implicitobjelresolver.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ImplicitObjELResolverTest.jsp")), "ImplicitObjELResolverTest.jsp"); + + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: implicitObjElResolverTest + * + * @assertion_ids: JSP:JAVADOC:420; JSP:JAVADOC:421; JSP:JAVADOC:422; + * JSP:JAVADOC:423; JSP:JAVADOC:425; JSP:JAVADOC:426 + * + * @test_Strategy: Obtain an ImplicitObjectELResolver via the PageContext and + * verify that API calls work as expected: setValue() setValue() throws + * PropertyNotWritableException getValue() getType() isReadOnly() + * getCommonPropertyType() getFeatureDescriptors() + */ + @Test + public void implicitObjElResolverTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "implicitObjElResolverTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/implicitobjelresolver/jsp_implicitobjelresolver_web.xml b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/implicitobjelresolver/jsp_implicitobjelresolver_web.xml new file mode 100644 index 00000000..fe04af06 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/implicitobjelresolver/jsp_implicitobjelresolver_web.xml @@ -0,0 +1,25 @@ + + + + + ImplicitObjectELResolver + + 5 + + diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/scopedattrelresolver/ScopedAttrELResolverTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/scopedattrelresolver/ScopedAttrELResolverTag.java new file mode 100644 index 00000000..2fd91a75 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/scopedattrelresolver/ScopedAttrELResolverTag.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.el.scopedattrelresolver; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspResolverTest; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.el.ELContext; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.el.ScopedAttributeELResolver; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class ScopedAttrELResolverTag extends SimpleTagSupport { + + public void doTag() throws JspException, IOException { + + StringBuffer buf = new StringBuffer(); + JspWriter out = getJspContext().getOut(); + ELContext context = getJspContext().getELContext(); + ScopedAttributeELResolver scopedattrResolver = new ScopedAttributeELResolver(); + + try { + boolean pass = JspResolverTest.testScopedAttrELResolver(context, + scopedattrResolver, null, "foo", "bar", buf); + out.println(buf.toString()); + if (pass == true) + out.println("Test PASSED"); + } catch (Throwable t) { + out.println("contents of buffer:\n" + buf.toString()); + JspTestUtil.handleThrowable(t, out, "ScopedAttrELResolverTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/scopedattrelresolver/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/scopedattrelresolver/URLClientIT.java new file mode 100644 index 00000000..7eb7e6f9 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/scopedattrelresolver/URLClientIT.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)URLClient.java + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.el.scopedattrelresolver; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.common.util.JspResolverTest; +import com.sun.ts.tests.common.el.api.resolver.BarELResolver; +import com.sun.ts.tests.common.el.api.resolver.ResolverTest; + +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_scopedattrelresolver_web"); + setTestJsp("ScopedAttrELResolverTest"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_scopedattrelresolver_web.war"); + archive.addClasses(ScopedAttrELResolverTag.class, + JspTestUtil.class, + JspResolverTest.class, + BarELResolver.class, + ResolverTest.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_scopedattrelresolver_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/scopedattrelresolver.tld", "scopedattrelresolver.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ScopedAttrELResolverTest.jsp")), "ScopedAttrELResolverTest.jsp"); + + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: scopedAttrElResolverTest + * + * @assertion_ids: JSP:JAVADOC:427; JSP:JAVADOC:428; JSP:JAVADOC:429; + * JSP:JAVADOC:430; JSP:JAVADOC:431; JSP:JAVADOC:433 + * + * @test_Strategy: Obtain an ScopedAttributeELResolver via the PageContext and + * verify that API calls work as expected: setValue() getValue() getType() + * isReadOnly() getCommonPropertyType() getFeatureDescriptors() + */ + @Test + public void scopedAttrElResolverTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "scopedAttrElResolverTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/scopedattrelresolver/jsp_scopedattrelresolver_web.xml b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/scopedattrelresolver/jsp_scopedattrelresolver_web.xml new file mode 100644 index 00000000..1d58e45f --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/scopedattrelresolver/jsp_scopedattrelresolver_web.xml @@ -0,0 +1,25 @@ + + + + + ScopedAttrELResolver + + 5 + + diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/errordata/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/errordata/URLClientIT.java new file mode 100644 index 00000000..10c67863 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/errordata/URLClientIT.java @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.errordata; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_errordata_web"); + setTestJsp("ErrorDataTest"); + System.out.println("Running TESTS"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_errordata_web.war"); + archive.addClasses( + JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_errordata_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ErrorDataTest.jsp")), "ErrorDataTest.jsp"); + + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: errorDataConstructorTest + * + * @assertion_ids: JSP:JAVADOC:1 + * + * @test_Strategy: Validate proper construction of ErrorData object directly + * via API. + */ + @Test + public void errorDataConstructorTest() throws Exception { + System.out.println("In test method"); + TEST_PROPS.setProperty(APITEST, "errorDataConstructorTest"); + invoke(); + } + + /* + * @testName: errorDataGetThrowableTest + * + * @assertion_ids: JSP:JAVADOC:2 + * + * @test_Strategy: Validate behavior of ErrorData.getThrowable(). + */ + @Test + public void errorDataGetThrowableTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "errorDataGetThrowableTest"); + invoke(); + } + + /* + * @testName: errorDataGetStatusCodeTest + * + * @assertion_ids: JSP:JAVADOC:3 + * + * @test_Strategy: Validate behavior of ErrorData.getStatusCode(). + */ + @Test + public void errorDataGetStatusCodeTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "errorDataGetStatusCodeTest"); + invoke(); + } + + /* + * @testName: errorDataGetRequestURITest + * + * @assertion_ids: JSP:JAVADOC:4 + * + * @test_Strategy: Validate behavior of ErrorData.getRequestURI() + */ + @Test + public void errorDataGetRequestURITest() throws Exception { + TEST_PROPS.setProperty(APITEST, "errorDataGetRequestURITest"); + invoke(); + } + + /* + * @testName: errorDataGetServletNameTest + * + * @assertion_ids: JSP:JAVADOC:5 + * + * @test_Strategy: Validate behavior of ErrorData.getServletName(). + */ + @Test + public void errorDataGetServletNameTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "errorDataGetServletNameTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspapplicationcontext/FooELResolver.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspapplicationcontext/FooELResolver.java new file mode 100644 index 00000000..dfb8b862 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspapplicationcontext/FooELResolver.java @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.jspapplicationcontext; + +import java.util.Iterator; + +import jakarta.el.ELContext; +import jakarta.el.ELException; +import jakarta.el.ELResolver; + +public class FooELResolver extends ELResolver { + public Object getValue(ELContext context, Object base, Object property) + throws ELException { + if (context == null) + throw new NullPointerException(); + + Object result = null; + + if (base == null) { + // Resolving first variable (e.g. ${Foo}). + // We only handle "Foo" + String propertyName = (String) property; + if (propertyName.equals("Foo")) { + result = "Test PASSED"; + context.setPropertyResolved(true); + } else { + System.out.println( + "FooELResolver: no match: propertyName is " + propertyName); + } + } else { + System.out.println("FooELResolver: base is non-null"); + } + + return result; + } + + public Class getType(ELContext context, Object base, Object property) + throws ELException { + if (context == null) + throw new NullPointerException(); + + if (base instanceof String && base.toString().equals("Foo")) { + context.setPropertyResolved(true); + } + + // we never set a value + return null; + } + + public void setValue(ELContext context, Object base, Object property, + + Object value) throws ELException { + if (context == null) + throw new NullPointerException(); + + if (base == null && property instanceof String + && property.toString().equals("Foo")) { + context.setPropertyResolved(true); + } + } + + public boolean isReadOnly(ELContext context, Object base, Object property) + throws ELException { + if (context == null) + throw new NullPointerException(); + + if (base == null && property instanceof String + && property.toString().equals("Foo")) { + context.setPropertyResolved(true); + } + + return true; + } + + public Iterator getFeatureDescriptors(ELContext context, Object base) { + if (context == null) + throw new NullPointerException(); + return null; + } + + public Class getCommonPropertyType(ELContext context, Object base) { + if (context == null) + throw new NullPointerException(); + + if (base == null) + return String.class; + return null; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspapplicationcontext/InstallFooListener.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspapplicationcontext/InstallFooListener.java new file mode 100644 index 00000000..e89c5d77 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspapplicationcontext/InstallFooListener.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.jspapplicationcontext; + +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletContextEvent; +import jakarta.servlet.ServletContextListener; +import jakarta.servlet.jsp.JspApplicationContext; +import jakarta.servlet.jsp.JspFactory; + +/** + * ServletContextListener that installs the FooELResolver, enabling the use of + * ${Foo}. + */ +public class InstallFooListener implements ServletContextListener { + public void contextInitialized(ServletContextEvent evt) { + ServletContext context = evt.getServletContext(); + JspApplicationContext jspContext = JspFactory.getDefaultFactory() + .getJspApplicationContext(context); + jspContext.addELResolver(new FooELResolver()); + } + + public void contextDestroyed(ServletContextEvent evt) { + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspapplicationcontext/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspapplicationcontext/URLClientIT.java new file mode 100644 index 00000000..286be18d --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspapplicationcontext/URLClientIT.java @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.jspapplicationcontext; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_jspapplicationcontext_web"); + setTestJsp("JspApplicationContextTest"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_jspapplicationcontext_web.war"); + archive.addClasses(FooELResolver.class, InstallFooListener.class, + JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_jspapplicationcontext_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/AddELResolverTest.jsp")), "AddELResolverTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/IllegalStateExceptionTest.jsp")), "IllegalStateExceptionTest.jsp"); + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: addELResolverTest + * + * @assertion_ids: JSP:JAVADOC:410 + * + * @test_Strategy: Validate the behavior of + * JspApplicationContext.addELResolver() Verify that once an ELResolver has + * been registered with the JSP container it performs as expected. + */ + @Test + public void addELResolverTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_jspapplicationcontext_web/AddELResolverTest.jsp HTTP 1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: invokeIllegalStateExceptionTest + * + * @assertion_ids: JSP:JAVADOC:410 + * + * @test_Strategy: Validate the behavior of + * JspApplicationContext.addELResolver() throws IllegalStateException Verify + * that once an application has received a request from the clienT, A call to + * JspApplicationContext.addELResolver() will cause the container to throw an + * IllegalStateException. + */ + @Test + public void invokeIllegalStateExceptionTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_jspapplicationcontext_web/IllegalStateExceptionTest.jsp HTTP 1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspengineinfo/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspengineinfo/URLClientIT.java new file mode 100644 index 00000000..5979a130 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspengineinfo/URLClientIT.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.jspengineinfo; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_jspengineinfo_web"); + setTestJsp("JspEngineInfoTest"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_jspengineinfo_web.war"); + archive.addClasses(JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_jspengineinfo_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspEngineInfoTest.jsp")), "JspEngineInfoTest.jsp"); + + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: jspEngineInfoGetSpecificationVersionTest + * + * @assertion_ids: JSP:JAVADOC:131 + * + * @test_Strategy: Validate the behavior of + * JspEngineInfo.getSpecificationVersion(). + */ + @Test + public void jspEngineInfoGetSpecificationVersionTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspEngineInfoGetSpecificationVersionTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspexception/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspexception/URLClientIT.java new file mode 100644 index 00000000..ec5dd4d9 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspexception/URLClientIT.java @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.jspexception; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_jspexc_web"); + setTestJsp("JspExceptionTest"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_jspexc_web.war"); + archive.addClasses(ee.jakarta.tck.pages.common.util.JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_jspexc_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspExceptionTest.jsp")), "JspExceptionTest.jsp"); + + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: jspExceptionDefaultCtorTest + * + * @assertion_ids: JSP:JAVADOC:125 + * + * @test_Strategy: Validate default constructor of JspException + */ + @Test + public void jspExceptionDefaultCtorTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspExceptionDefaultCtorTest"); + invoke(); + } + + /* + * @testName: jspExceptionMessageCtorTest + * + * @assertion_ids: JSP:JAVADOC:126 + * + * @test_Strategy: Validate contructor taking single string argument as the + * message of the Exception. + */ + @Test + public void jspExceptionMessageCtorTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspExceptionMessageCtorTest"); + invoke(); + } + + /* + * @testName: jspExceptionCauseCtorTest + * + * @assertion_ids: JSP:JAVADOC:128 + * + * @test_Strategy: Validate constructor taking a Throwable signifying the root + * cause of the this JspException. + */ + @Test + public void jspExceptionCauseCtorTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspExceptionCauseCtorTest"); + invoke(); + } + + /* + * @testName: jspExceptionCauseMessageCtorTest + * + * @assertion_ids: JSP:JAVADOC:127 + * + * @test_Strategy: Validate constructor taking both a message and a Throwable + * signifying the root cause of the JspException. + */ + @Test + public void jspExceptionCauseMessageCtorTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspExceptionCauseMessageCtorTest"); + invoke(); + } + + /* + * @testName: jspExceptionGetRootCauseTest + * + * @assertion_ids: JSP:JAVADOC:129 + * + * @test_Strategy: Validate the behavior of JspException.getRootCause(). + */ + // @Test + public void jspExceptionGetRootCauseTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspExceptionGetRootCauseTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspfactory/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspfactory/URLClientIT.java new file mode 100644 index 00000000..0002780f --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspfactory/URLClientIT.java @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.jspfactory; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.common.util.SimpleContext; + +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_jspfactory_web"); + setTestJsp("JspFactoryTest"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_jspfactory_web.war"); + archive.addClasses( + JspTestUtil.class, + SimpleContext.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_jspfactory_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspFactoryTest.jsp")), "JspFactoryTest.jsp"); + + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: jspFactoryGetDefaultFactoryTest + * + * @assertion_ids: JSP:JAVADOC:121 + * + * @test_Strategy: Validate the behavior of JspFactory.getDefaultFactory(). + */ + @Test + public void jspFactoryGetDefaultFactoryTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspFactoryGetDefaultFactoryTest"); + invoke(); + } + + /* + * @testName: jspFactoryGetPageContextTest + * + * @assertion_ids: JSP:JAVADOC:122 + * + * @test_Strategy: Validate the behavior of JspFactory.getPageContext(). + */ + @Test + public void jspFactoryGetPageContextTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspFactoryGetPageContextTest"); + invoke(); + } + + /* + * @testName: jspFactoryGetEngineInfoTest + * + * @assertion_ids: JSP:JAVADOC:124 + * + * @test_Strategy: Validate the behavior of JspFactory.getEngineInfo(). + */ + @Test + public void jspFactoryGetEngineInfoTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspFactoryGetEngineInfoTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jsptagexception/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jsptagexception/URLClientIT.java new file mode 100644 index 00000000..b4cbf240 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jsptagexception/URLClientIT.java @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.jsptagexception; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_jsptagexc_web"); + setTestJsp("JspTagExceptionTest"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_jsptagexc_web.war"); + archive.addClasses(JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_jsptagexc_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspTagExceptionTest.jsp")), "JspTagExceptionTest.jsp"); + + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: jspTagExceptionDefaultCtorTest + * + * @assertion_ids: JSP:JAVADOC:116 + * + * @test_Strategy: Validate default constructor of JspTagException + */ + @Test + public void jspTagExceptionDefaultCtorTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspTagExceptionDefaultCtorTest"); + invoke(); + } + + /* + * @testName: jspTagExceptionMessageCtorTest + * + * @assertion_ids: JSP:JAVADOC:115 + * + * @test_Strategy: Validate contructor taking single string argument as the + * message of the Exception. + */ + @Test + public void jspTagExceptionMessageCtorTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspTagExceptionMessageCtorTest"); + invoke(); + } + + /* + * @testName: jspTagExceptionCauseCtorTest + * + * @assertion_ids: JSP:JAVADOC:118 + * + * @test_Strategy: Validate constructor taking a Throwable signifying the root + * cause of the this JspTagException. + */ + @Test + public void jspTagExceptionCauseCtorTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspTagExceptionCauseCtorTest"); + invoke(); + } + + /* + * @testName: jspTagExceptionCauseMessageCtorTest + * + * @assertion_ids: JSP:JAVADOC:117 + * + * @test_Strategy: Validate constructor taking both a message and a Throwable + * signifying the root cause of the JspTagException. + */ + @Test + public void jspTagExceptionCauseMessageCtorTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspTagExceptionCauseMessageCtorTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspwriter/JspWriterValidator.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspwriter/JspWriterValidator.java new file mode 100644 index 00000000..45798c7e --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspwriter/JspWriterValidator.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2007, 2022 Oracle and/or its affiliates and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.jspwriter; + +import java.util.List; + +import java.lang.System.Logger; +import com.sun.ts.tests.common.webclient.WebTestCase; +import com.sun.ts.tests.common.webclient.http.HttpResponse; +import com.sun.ts.tests.common.webclient.validation.TokenizedValidator; + +public class JspWriterValidator extends TokenizedValidator { + + private static final Logger logger = System.getLogger(JspWriterValidator.class.getName()); + + private static final String UNIX_LINE_SEPARATOR = "\n"; + + private static final String WIN32_LINE_SEPARATOR = "\r\n"; + + private static final String EOL_HEADER = "Server-EOL"; + + /** + * This validator preprocesses the search strings of the test case. It will + * replace all intances of #eol# with the line separator used by + * the container. + * + * @param testCase + * - The test case to validate + * @return true if the test passes, otherwise, false. + */ + public boolean validate(WebTestCase testCase) { + String eol = null; + String eolToken = "#eol#"; + HttpResponse response = testCase.getResponse(); + if ("UNIX".equals(response.getResponseHeader(EOL_HEADER))) { + // UNIX + eol = UNIX_LINE_SEPARATOR; + } else if ("WIN32".equals(response.getResponseHeader(EOL_HEADER))) { + // win32 + eol = WIN32_LINE_SEPARATOR; + } else { + // no header sent -- default the value to the client side line.separator + eol = System.getProperty("line.separator"); + } + + // get the search strings and replace any '|eol|' tokens with the + // line separator of the server side + List searchList = testCase.getSearchStrings(); + for (int i = 0, size = searchList.size(); i < size; i++) { + String string = (String) searchList.get(i); + logger.log(Logger.Level.TRACE, "[JspWriterValidator] Processing search string: " + string); + for (int index = string.indexOf(eolToken); index > -1; index = string + .indexOf(eolToken)) { + StringBuffer sb = new StringBuffer(string); + sb.replace(index, index + 5, eol); + string = sb.toString(); + } + logger.log(Logger.Level.TRACE, "[JspWriterValidator] Adding (possibly) modified " + + "search string: " + string); + searchList.set(i, string); + } + + return super.validate(testCase); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspwriter/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspwriter/URLClientIT.java new file mode 100644 index 00000000..5bcce506 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspwriter/URLClientIT.java @@ -0,0 +1,536 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.jspwriter; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + private static final char[] CHARS = new char[89]; + + private static final String EOL = "#eol#"; + + private static final String JSP_WRITER_VALIDATOR = "ee.jakarta.tck.pages.api.jakarta_servlet.jsp.jspwriter.JspWriterValidator"; + + public URLClientIT() throws Exception { + for (short i = 33, idx = 0; i < 90; i++, idx++) { + CHARS[idx] = (char) i; + } + + setContextRoot("/jsp_jspwriter_web"); + setTestJsp("JspWriterTest"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_jspwriter_web.war"); + archive.addClasses(JspWriterValidator.class, JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_jspwriter_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspWriterTest.jsp")), "JspWriterTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/CloseValidator.jsp")), "CloseValidator.jsp"); + + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: jspWriterNewLineTest + * + * @assertion_ids: JSP:JAVADOC:63 + * + * @test_Strategy: Validate the behavior of JspWriter.newLine(). + */ + @Test + public void jspWriterNewLineTest() throws Exception { + TEST_PROPS.setProperty(APITEST1, "jspWriterNewLineTest"); + TEST_PROPS.setProperty(STRATEGY, JSP_WRITER_VALIDATOR); + TEST_PROPS.setProperty(SEARCH_STRING, "new line" + EOL); + invoke(); + } + + /* + * @testName: jspWriterPrintBooleanTest + * + * @assertion_ids: JSP:JAVADOC:65 + * + * @test_Strategy: Validate the behavior of JspWriter.print(boolean). + */ + @Test + public void jspWriterPrintBooleanTest() throws Exception { + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintBooleanTest"); + TEST_PROPS.setProperty(SEARCH_STRING, "truefalse"); + invoke(); + } + + /* + * @testName: jspWriterPrintCharTest + * + * @assertion_ids: JSP:JAVADOC:67 + * + * @test_Strategy: Validate the behavior of JspWriter.print(char). + */ + @Test + public void jspWriterPrintCharTest() throws Exception { + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintCharTest"); + TEST_PROPS.setProperty(SEARCH_STRING, "cb"); + invoke(); + } + + /* + * @testName: jspWriterPrintIntTest + * + * @assertion_ids: JSP:JAVADOC:69 + * + * @test_Strategy: Validate the behavior of JspWriter.print(int). + */ + @Test + public void jspWriterPrintIntTest() throws Exception { + String result = new StringBuffer().append(Integer.MIN_VALUE) + .append(Integer.MAX_VALUE).toString(); + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintIntTest"); + TEST_PROPS.setProperty(SEARCH_STRING, result); + invoke(); + } + + /* + * @testName: jspWriterPrintLongTest + * + * @assertion_ids: JSP:JAVADOC:71 + * + * @test_Strategy: Validate the behavior of JspWriter.print(long). + */ + @Test + public void jspWriterPrintLongTest() throws Exception { + String result = new StringBuffer().append(Long.MIN_VALUE) + .append(Long.MAX_VALUE).toString(); + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintLongTest"); + TEST_PROPS.setProperty(SEARCH_STRING, result); + invoke(); + } + + /* + * @testName: jspWriterPrintFloatTest + * + * @assertion_ids: JSP:JAVADOC:73 + * + * @test_Strategy: Validate the behavior of JspWriter.print(Float). + */ + @Test + public void jspWriterPrintFloatTest() throws Exception { + String result = new StringBuffer().append(Float.MIN_VALUE) + .append(Float.MAX_VALUE).toString(); + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintFloatTest"); + TEST_PROPS.setProperty(SEARCH_STRING, result); + invoke(); + } + + /* + * @testName: jspWriterPrintDoubleTest + * + * @assertion_ids: JSP:JAVADOC:75 + * + * @test_Strategy: Validate the behavior of JspWriter.print(double). + */ + @Test + public void jspWriterPrintDoubleTest() throws Exception { + String result = new StringBuffer().append(Double.MIN_VALUE) + .append(Double.MAX_VALUE).toString(); + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintDoubleTest"); + TEST_PROPS.setProperty(SEARCH_STRING, result); + invoke(); + } + + /* + * @testName: jspWriterPrintCharArrayTest + * + * @assertion_ids: JSP:JAVADOC:77 + * + * @test_Strategy: Validate the behavior of JspWriter.print(char[]). + */ + @Test + public void jspWriterPrintCharArrayTest() throws Exception { + String result = new StringBuffer().append(CHARS).append(CHARS).toString(); + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintCharArrayTest"); + TEST_PROPS.setProperty(SEARCH_STRING, result); + invoke(); + } + + /* + * @testName: jspWriterPrintStringTest + * + * @assertion_ids: JSP:JAVADOC:80 + * + * @test_Strategy: Validate the behavior of JspWriter.print(String). + */ + @Test + public void jspWriterPrintStringTest() throws Exception { + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintStringTest"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test Passed"); + invoke(); + } + + /* + * @testName: jspWriterPrintNullStringTest + * + * @assertion_ids: JSP:JAVADOC:80 + * + * @test_Strategy: Validate the behavior of JspWriter.print(String) where the + * argument is null. + */ + @Test + public void jspWriterPrintNullStringTest() throws Exception { + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintNullStringTest"); + TEST_PROPS.setProperty(SEARCH_STRING, "null"); + invoke(); + } + + /* + * @testName: jspWriterPrintObjectTest + * + * @assertion_ids: JSP:JAVADOC:82 + * + * @test_Strategy: Validate the behavior of JspWriter.print(Object). + */ + @Test + public void jspWriterPrintObjectTest() throws Exception { + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintObjectTest"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test Passed"); + invoke(); + } + + /* + * @testName: jspWriterPrintlnTest + * + * @assertion_ids: JSP:JAVADOC:84 + * + * @test_Strategy: Validate the behavior of JspWriter.println(). + */ + @Test + public void jspWriterPrintlnTest() throws Exception { + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintlnTest"); + TEST_PROPS.setProperty(STRATEGY, JSP_WRITER_VALIDATOR); + TEST_PROPS.setProperty(SEARCH_STRING, "Test Passed" + EOL); + invoke(); + } + + /* + * @testName: jspWriterPrintlnBooleanTest + * + * @assertion_ids: JSP:JAVADOC:86 + * + * @test_Strategy: Validate the behavior of JspWriter.println(boolean). + */ + @Test + public void jspWriterPrintlnBooleanTest() throws Exception { + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintlnBooleanTest"); + TEST_PROPS.setProperty(STRATEGY, JSP_WRITER_VALIDATOR); + TEST_PROPS.setProperty(SEARCH_STRING, "true" + EOL + "false" + EOL); + invoke(); + } + + /* + * @testName: jspWriterPrintlnCharTest + * + * @assertion_ids: JSP:JAVADOC:88 + * + * @test_Strategy: Validate the behavior of JspWriter.println(char). + */ + @Test + public void jspWriterPrintlnCharTest() throws Exception { + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintlnCharTest"); + TEST_PROPS.setProperty(STRATEGY, JSP_WRITER_VALIDATOR); + TEST_PROPS.setProperty(SEARCH_STRING, "a" + EOL + "B" + EOL); + invoke(); + } + + /* + * @testName: jspWriterPrintlnIntTest + * + * @assertion_ids: JSP:JAVADOC:90 + * + * @test_Strategy: Validate the behavior of JspWriter.println(int). + */ + @Test + public void jspWriterPrintlnIntTest() throws Exception { + String result = new StringBuffer().append(Integer.MIN_VALUE).append(EOL) + .append(Integer.MAX_VALUE).append(EOL).toString(); + TEST_PROPS.setProperty(STRATEGY, JSP_WRITER_VALIDATOR); + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintlnIntTest"); + TEST_PROPS.setProperty(SEARCH_STRING, result); + invoke(); + } + + /* + * @testName: jspWriterPrintlnLongTest + * + * @assertion_ids: JSP:JAVADOC:92 + * + * @test_Strategy: Validate the behavior of JspWriter.println(long). + */ + @Test + public void jspWriterPrintlnLongTest() throws Exception { + String result = new StringBuffer().append(Long.MIN_VALUE).append(EOL) + .append(Long.MAX_VALUE).append(EOL).toString(); + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintlnLongTest"); + TEST_PROPS.setProperty(STRATEGY, JSP_WRITER_VALIDATOR); + TEST_PROPS.setProperty(SEARCH_STRING, result); + invoke(); + } + + /* + * @testName: jspWriterPrintlnFloatTest + * + * @assertion_ids: JSP:JAVADOC:94 + * + * @test_Strategy: Validate the behavior of JspWriter.println(float). + */ + @Test + public void jspWriterPrintlnFloatTest() throws Exception { + String result = new StringBuffer().append(Float.MIN_VALUE).append(EOL) + .append(Float.MAX_VALUE).append(EOL).toString(); + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintlnFloatTest"); + TEST_PROPS.setProperty(STRATEGY, JSP_WRITER_VALIDATOR); + TEST_PROPS.setProperty(SEARCH_STRING, result); + invoke(); + } + + /* + * @testName: jspWriterPrintlnDoubleTest + * + * @assertion_ids: JSP:JAVADOC:96 + * + * @test_Strategy: Validate the behavior of JspWriter.println(double). + */ + @Test + public void jspWriterPrintlnDoubleTest() throws Exception { + String result = new StringBuffer().append(Double.MIN_VALUE).append(EOL) + .append(Double.MAX_VALUE).append(EOL).toString(); + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintlnDoubleTest"); + TEST_PROPS.setProperty(STRATEGY, JSP_WRITER_VALIDATOR); + TEST_PROPS.setProperty(SEARCH_STRING, result); + invoke(); + } + + /* + * @testName: jspWriterPrintlnCharArrayTest + * + * @assertion_ids: JSP:JAVADOC:98 + * + * @test_Strategy: Validate the behavior of JspWriter.println(double). + */ + @Test + public void jspWriterPrintlnCharArrayTest() throws Exception { + String result = new StringBuffer().append(CHARS).append(EOL).append(CHARS) + .append(EOL).toString(); + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintlnCharArrayTest"); + TEST_PROPS.setProperty(STRATEGY, JSP_WRITER_VALIDATOR); + TEST_PROPS.setProperty(SEARCH_STRING, result); + invoke(); + } + + /* + * @testName: jspWriterPrintlnStringTest + * + * @assertion_ids: JSP:JAVADOC:100 + * + * @test_Strategy: Validate the behavior of JspWriter.println(String). + */ + @Test + public void jspWriterPrintlnStringTest() throws Exception { + String result = new StringBuffer().append("Test ").append(EOL) + .append("Passed").append(EOL).toString(); + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintlnStringTest"); + TEST_PROPS.setProperty(STRATEGY, JSP_WRITER_VALIDATOR); + TEST_PROPS.setProperty(SEARCH_STRING, result); + invoke(); + } + + /* + * @testName: jspWriterPrintlnNullStringTest + * + * @assertion_ids: JSP:JAVADOC:100 + * + * @test_Strategy: Validate the behavior of JspWriter.println(String) where + * the argument is null. + */ + @Test + public void jspWriterPrintlnNullStringTest() throws Exception { + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintlnNullStringTest"); + TEST_PROPS.setProperty(SEARCH_STRING, "null"); + invoke(); + } + + /* + * @testName: jspWriterPrintlnObjectTest + * + * @assertion_ids: JSP:JAVADOC:102 + * + * @test_Strategy: Validate the behavior of JspWriter.println(Object). + */ + @Test + public void jspWriterPrintlnObjectTest() throws Exception { + String result = new StringBuffer().append("Test ").append(EOL) + .append("Passed").append(EOL).toString(); + TEST_PROPS.setProperty(APITEST1, "jspWriterPrintlnObjectTest"); + TEST_PROPS.setProperty(STRATEGY, JSP_WRITER_VALIDATOR); + TEST_PROPS.setProperty(SEARCH_STRING, result); + invoke(); + } + + /* + * @testName: jspWriterClearTest + * + * @assertion_ids: JSP:JAVADOC:104 + * + * @test_Strategy: Validate the behavior of JspWriter.clear(). + */ + @Test + public void jspWriterClearTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspWriterClearTest"); + invoke(); + } + + /* + * @testName: jspWriterClearIOExceptionTest + * + * @assertion_ids: JSP:JAVADOC:105 + * + * @test_Strategy: Validate the behavior of JspWriter.clear(). An IOException + * must be thrown if the response has been committed, and JspWriter.clear() is + * subsequently called. + */ + @Test + public void jspWriterClearIOExceptionTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspWriterClearIOExceptionTest"); + invoke(); + } + + /* + * @testName: jspWriterClearBufferTest + * + * @assertion_ids: JSP:JAVADOC:106 + * + * @test_Strategy: Validate the behavior of JspWriter.clearBuffer(). + */ + @Test + public void jspWriterClearBufferTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspWriterClearBufferTest"); + invoke(); + } + + /* + * @testName: jspWriterFlushTest + * + * @assertion_ids: JSP:JAVADOC:108 + * + * @test_Strategy: Validate the behavior of JspWriter.flush(). + */ + @Test + public void jspWriterFlushTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspWriterFlushTest"); + invoke(); + } + + /* + * @testName: jspWriterCloseTest + * + * @assertion_ids: JSP:JAVADOC:110;JSP:JAVADOC:109 + * + * @test_Strategy: Validate the behavior of JspWriter.close(). + */ + @Test + public void jspWriterCloseTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_jspwriter_web/JspWriterTest.jsp?testname=jspWriterCloseTest HTTP/1.1"); + TEST_PROPS.setProperty(IGNORE_STATUS_CODE, "true"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_jspwriter_web/CloseValidator.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: jspWriterGetBufferSizeTest + * + * @assertion_ids: JSP:JAVADOC:112 + * + * @test_Strategy: Validate the behavior of JspWriter.getBufferSize(). + */ + @Test + public void jspWriterGetBufferSizeTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspWriterGetBufferSizeTest"); + invoke(); + } + + /* + * @testName: jspWriterGetRemainingTest + * + * @assertion_ids: JSP:JAVADOC:113 + * + * @test_Strategy: Validate the behavior of JspWriter.getRemaining(). + */ + @Test + public void jspWriterGetRemainingTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspWriterGetRemainingTest"); + invoke(); + } + + /* + * @testName: jspWriterIsAutoFlushTest + * + * @assertion_ids: JSP:JAVADOC:114 + * + * @test_Strategy: Validate the behavior of JspWriter.isAutoFlush(). + */ + @Test + public void jspWriterIsAutoFlushTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "jspWriterIsAutoFlushTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/pagecontext/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/pagecontext/URLClientIT.java new file mode 100644 index 00000000..ee2fecdc --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/pagecontext/URLClientIT.java @@ -0,0 +1,723 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.pagecontext; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setTestJsp("PageContextTest"); + setContextRoot("/jsp_pagecontext_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_pagecontext_web.war"); + archive.addClasses(JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_pagecontext_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/PageContextTest.jsp")), "PageContextTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ErrorPage.jsp")), "ErrorPage.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/Resource.jsp")), "Resource.jsp"); + + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /** + * @testName: pageContextGetSessionTest + * @assertion_ids: JSP:JAVADOC:16 + * @test_Strategy: Validate PageContext.getSession(). + */ + @Test + public void pageContextGetSessionTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextGetSessionTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextGetPageTest + * @assertion_ids: JSP:JAVADOC:17 + * @test_Strategy: Validate PageContext.getPage(). + */ + @Test + public void pageContextGetPageTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextGetPageTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextGetRequestTest + * @assertion_ids: JSP:JAVADOC:18 + * @test_Strategy: Validate PageContext.getRequest(). + */ + @Test + public void pageContextGetRequestTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextGetRequestTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextGetResponseTest + * @assertion_ids: JSP:JAVADOC:19 + * @test_Strategy: Validate PageContext.getResponse(). + */ + @Test + public void pageContextGetResponseTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextGetResponseTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextGetExceptionTest + * @assertion_ids: JSP:JAVADOC:20 + * @test_Strategy: Validate PageContext.getException(). + */ + @Test + public void pageContextGetExceptionTest() throws Exception { + TEST_PROPS.setProperty(TEST_NAME, "pageContextGetExceptionTest"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_pagecontext_web/PageContextTest.jsp?testname=pageContextGetExceptionTest HTTP/1.1"); + TEST_PROPS.setProperty(IGNORE_STATUS_CODE, "true"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED (getException)"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextGetServletConfigTest + * @assertion_ids: JSP:JAVADOC:21 + * @test_Strategy: Validate PageContext.getServletConfig(). + */ + @Test + public void pageContextGetServletConfigTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextGetServletConfigTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextGetServletContextTest + * @assertion_ids: JSP:JAVADOC:22 + * @test_Strategy: Validate PageContext.getServletContext(). + */ + @Test + public void pageContextGetServletContextTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextGetServletContextTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextForwardContextPathTest + * @assertion_ids: JSP:JAVADOC:23 + * @test_Strategy: Validate PageContext.forward() passing in a resource + * identified by a context-relative path. + */ + @Test + public void pageContextForwardContextPathTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextForwardContextPathTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextForwardPagePathTest + * @assertion_ids: JSP:JAVADOC:24 + * @test_Strategy: Validate PageContext.forward() passing in a resource + * identified by a page-relative path. + */ + @Test + public void pageContextForwardPagePathTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextForwardPagePathTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * -- Removed due to the way we capture the exception. -- testName: + * pageContextForwardServletExceptionTest + * + * @assertion_ids: JSP:JAVADOC:26 + * @test_Strategy: Validate PageContext.forward() throws a ServletException if + * a ServletException occurs during the forward process. + * + * public void pageContextForwardServletExceptionTest() throws + * Fault { TEST_PROPS.setProperty(APITEST, + * "pageContextForwardServletExceptionTest"); + * TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error + * page invoked"); invoke(); } + */ + + /** + * -- Removed due to the way we capture the exception. -- testName: + * pageContextForwardIOExceptionTest + * + * @assertion_ids: JSP:JAVADOC:27 + * @test_Strategy: Validate PageContext.forward() throws an IOExcpetion if an + * IOException occurs during the forward process. + * + * public void pageContextForwardIOExceptionTest() throws + * Fault { TEST_PROPS.setProperty(APITEST, + * "pageContextForwardIOExceptionTest"); + * TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error + * page invoked"); invoke(); } + */ + + /** + * @testName: pageContextForwardIllegalStateExceptionTest + * @assertion_ids: JSP:JAVADOC:29 + * @test_Strategy: Valdiate PageContext.forward() throws an + * IllegalStateException if ServletResponse is not in the + * proper state to perform a forward. + */ + @Test + public void pageContextForwardIllegalStateExceptionTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_pagecontext_web/PageContextTest.jsp?testname=pageContextForwardIllegalStateExceptionTest HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Arbitrary text|Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextIncludeContextPathTest + * @assertion_ids: JSP:JAVADOC:31 + * @test_Strategy: Validate PageContext.include() where the inclusion resource + * is identified by a context-relative path. + */ + @Test + public void pageContextIncludeContextPathTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextIncludeContextPathTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextIncludePagePathTest + * @assertion_ids: JSP:JAVADOC:32 + * @test_Strategy: Validate PageContext.include() where the inclusion resource + * is identified by a page-relative path. + */ + @Test + public void pageContextIncludePagePathTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextIncludePagePathTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextIncludeFlushTrueTest + * @assertion_ids: JSP:JAVADOC:40;JSP:JAVADOC:39 + * @test_Strategy: Validate PageContext.include() with flush argument provided + * and set to true. Response should be commited after the + * flush. Test validates this by perfoming an action against + * the response that would cause an IllegalStateException if + * the response has been comitted. This also validated the + * inclusion of a resource identified by a page-relative path. + */ + @Test + public void pageContextIncludeFlushTrueTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextIncludeFlushTrueTest"); + TEST_PROPS.setProperty(SEARCH_STRING, "Stream was properly flushed"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextIncludeFlushFalseTest + * @assertion_ids: JSP:JAVADOC:385;JSP:JAVADOC:38 + * @test_Strategy: Validate PageContext.include() with flush argument provided + * and set to false. Response should not have been flushed. + * Verify by preforming an action against the response that + * will throw an IllegalStateException if the response has + * been flushed to the client. This also validated the + * inclusion of a resource identified by a context-relative + * path. + */ + @Test + public void pageContextIncludeFlushFalseTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextIncludeFlushFalseTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, + "Test PASSED.|Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextHandlePageExceptionExcTest + * @assertion_ids: JSP:JAVADOC:46 + * @test_Strategy: Validate PageContext.handlePageException(Exception) invokes + * the defined error page. + */ + @Test + public void pageContextHandlePageExceptionExcTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextHandlePageExceptionExcTest"); + TEST_PROPS.setProperty(IGNORE_STATUS_CODE, "true"); + TEST_PROPS.setProperty(SEARCH_STRING, "java.lang.RuntimeException"); + invoke(); + } + + /** + * @testName: pageContextHandlePageExceptionThrTest + * @assertion_ids: JSP:JAVADOC:53 + * @test_Strategy: Validate PageContext.handlePageException(Throwable) invokes + * the defined error page. + */ + @Test + public void pageContextHandlePageExceptionThrTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextHandlePageExceptionThrTest"); + TEST_PROPS.setProperty(IGNORE_STATUS_CODE, "true"); + TEST_PROPS.setProperty(SEARCH_STRING, "java.lang.Throwable"); + invoke(); + } + + /** + * @testName: pageContextHandlePageExceptionExcNPETest + * @assertion_ids: JSP:JAVADOC:51 + * @test_Strategy: Validate PageContext.handlePageException(Exception) throws + * a NullPointerException if an null argument is provided. + */ + @Test + public void pageContextHandlePageExceptionExcNPETest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextHandlePageExceptionExcNPETest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextHandlePageExceptionThrNPETest + * @assertion_ids: JSP:JAVADOC:58 + * @test_Strategy: Validate PageContext.handlePageException(Throwable) throws + * a NullPointerException if an null argument is provided. + */ + @Test + public void pageContextHandlePageExceptionThrNPETest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextHandlePageExceptionThrNPETest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextPushPopBodyTest + * @assertion_ids: JSP:JAVADOC:60;JSP:JAVADOC:61;JSP:JAVADOC:380;JSP:JAVADOC: + * 381 + * @test_Strategy: Validate behavior of PageContext.pushBody() and + * PageContext.popBody(). + */ + @Test + public void pageContextPushPopBodyTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextPushPopBodyTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextGetErrorDataTest + * @assertion_ids: JSP:JAVADOC:62 + * @test_Strategy: Validate behavior of PageContext.getErrorData(). + */ + @Test + public void pageContextGetErrorDataTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextGetErrorDataTest"); + TEST_PROPS.setProperty(IGNORE_STATUS_CODE, "true"); + TEST_PROPS.setProperty(SEARCH_STRING, "ErrorData object obtained"); + invoke(); + } + + /** + * @testName: pageContextIncludeIOExceptionTest + * @assertion_ids: JSP:JAVADOC:35 + * @test_Strategy: Validate PageContext.include() throws an IOException if + * included resource throws an IOException. + */ + @Test + public void pageContextIncludeIOExceptionTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextIncludeIOExceptionTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextIncludeServletExceptionTest + * @assertion_ids: JSP:JAVADOC:34 + * @test_Strategy: Validate PageContext.include() throws a ServletException if + * target resource throws a ServletException. + */ + @Test + public void pageContextIncludeServletExceptionTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextIncludeServletExceptionTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextIncludeFlushIOExceptionTest + * @assertion_ids: JSP:JAVADOC:43 + * @test_Strategy: Validate PageContext.include() with flush argument + * provided, throws an IOException if the target resource + * cannot be accessed by the caller. + */ + @Test + public void pageContextIncludeFlushIOExceptionTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextIncludeFlushIOExceptionTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextIncludeFlushServletExceptionTest + * @assertion_ids: JSP:JAVADOC:42 + * @test_Strategy: Validate PageContext.include() with flush argument + * provided, throws a ServletException if the target resource + * cannot be accessed by the caller. + */ + @Test + public void pageContextIncludeFlushServletExceptionTest() throws Exception { + TEST_PROPS.setProperty(APITEST, + "pageContextIncludeFlushServletExceptionTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextGetSetAttributeTest + * @assertion_ids: JSP:JAVADOC:133;JSP:JAVADOC:138 + * @test_Strategy: Validate PageContext.getAttribute(String), + * PageContext.setAttribute(String). Note: These are inherited + * from JspContext. + */ + @Test + public void pageContextGetSetAttributeTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextGetSetAttributeTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextSetAttributeNPETest + * @assertion_ids: JSP:JAVADOC:134;JSP:JAVADOC:396 + * @test_Strategy: Validate a NullPointerException is thrown if the attribute + * name provided is null, but not when the provided value is + * null. Note: This is inherited from JspContext. + */ + @Test + public void pageContextSetAttributeNPETest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextSetAttributeNPETest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextGetSetAttributeInScopeTest + * @assertion_ids: JSP:JAVADOC:135;JSP:JAVADOC:141 + * @test_Strategy: Validate PageContext.getAttribute() and + * PageContext.setAttribute() when provided with scope + * arguments. Note: These are inherited from JspContext. + */ + @Test + public void pageContextGetSetAttributeInScopeTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextGetSetAttributeInScopeTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextSetAttributeInScopeNPETest + * @assertion_ids: JSP:JAVADOC:136;JSP:JAVADOC:397 + * @test_Strategy: Validate a NullPointerException is thrown if the attribute + * name provided is null, but not when the provided value is + * null. Note: This is inherited from JspContext. + */ + @Test + public void pageContextSetAttributeInScopeNPETest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextSetAttributeInScopeNPETest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextSetAttributeInScopeIllegalArgumentExceptionTest + * @assertion_ids: JSP:JAVADOC:137;JSP:JAVADOC:398 + * @test_Strategy: Validate an IllegalArgumentException is thrown if + * PageContext.setAttribute() is provided an invalid scope. + * Note: This is inherited from JspContext. + */ + @Test + public void pageContextSetAttributeInScopeIllegalArgumentExceptionTest() + throws Exception { + TEST_PROPS.setProperty(APITEST, + "pageContextSetAttributeInScopeIllegalArgumentExcTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextGetAttributeNPETest + * @assertion_ids: JSP:JAVADOC:139;JSP:JAVADOC:142 + * @test_Strategy: Validate a NullPointerException is thrown if + * PageContext.getAttriubte() is provided a null argument. + * Note: This is inherited from JspContext. + */ + @Test + public void pageContextGetAttributeNPETest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextGetAttributeNPETest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextGetAttributeInScopeIllegalArgumentExceptionTest + * @assertion_ids: JSP:JAVADOC:143 + * @test_Strategy: Validate an IllegalArgumentException is thrown if + * PageContext.getAttribute() is provided an invalid value for + * scope. Note: This is inherited from JspContext. + */ + @Test + public void pageContextGetAttributeInScopeIllegalArgumentExceptionTest() + throws Exception { + TEST_PROPS.setProperty(APITEST, + "pageContextGetAttributeInScopeIllegalArgumentExceptionTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextFindAttributeTest + * @assertion_ids: JSP:JAVADOC:144 + * @test_Strategy: Validate behavior of PageContext.findAttribute(). Note: + * This is inherited from JspContext. + */ + @Test + public void pageContextFindAttributeTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextFindAttributeTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextRemoveAttributeTest + * @assertion_ids: JSP:JAVADOC:145 + * @test_Strategy: Validate the behavior of PageContext.removeAttribute(). + * Note: This is inhertied from JspContext + */ + @Test + public void pageContextRemoveAttributeTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextRemoveAttributeTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextRemoveAttributeFromScopeTest + * @assertion_ids: JSP:JAVADOC:146 + * @test_Strategy: Validate the behavior of PageContext.remoteAttribute() when + * provided a scope. Note: This is inherited from JspContext. + */ + @Test + public void pageContextRemoveAttributeFromScopeTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextRemoveAttributeFromScopeTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextRemoveAttributeFromScopeIllegalScopeTest + * @assertion_ids: JSP:JAVADOC:392 + * @test_Strategy: Validate an IllegalArgumentException is thrown if the scope + * argument is provided an illegal scope. + */ + @Test + public void pageContextRemoveAttributeFromScopeIllegalScopeTest() + throws Exception { + TEST_PROPS.setProperty(APITEST, + "pageContextRemoveAttributeFromScopeIllegalScopeTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextGetAttributeScopeTest + * @assertion_ids: JSP:JAVADOC:147 + * @test_Strategy: Validate the behavior of PageContext.getAttributeScope(). + * Note: This is inherited from JspContext. + */ + @Test + public void pageContextGetAttributeScopeTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextGetAttributeScopeTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextGetAttributeNamesInScopeTest + * @assertion_ids: JSP:JAVADOC:148 + * @test_Strategy: Validate the behavior of + * PageContext.getAttributeNamesInScope(). Note: This is + * inherited from JspContext + */ + @Test + public void pageContextGetAttributeNamesInScopeTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextGetAttributeNamesInScopeTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextGetAttributeNamesInScopeIllegalScopeTest + * @assertion_ids: JSP:JAVADOC:401 + * @test_Strategy: Validate an IllegalArgumentException is thrown if the scope + * argument is provided an illegal scope. + */ + @Test + public void pageContextGetAttributeNamesInScopeIllegalScopeTest() + throws Exception { + TEST_PROPS.setProperty(APITEST, + "pageContextGetAttributeNamesInScopeIllegalScopeTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextGetOutTest + * @assertion_ids: JSP:JAVADOC:149 + * @test_Strategy: Validate the behavior of PageContext.getOut. Note: This is + * inherited from JspContext. + */ + @Test + public void pageContextGetOutTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextGetOutTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextGetExpressionEvaluatorTest + * @assertion_ids: JSP:JAVADOC:150 + * @test_Strategy: Validate the behavior of + * PageContext.getExpressionEvaluator. Note: This is inherited + * from JspContext. + */ + //@Test + public void pageContextGetExpressionEvaluatorTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextGetExpressionEvaluatorTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextGetVariableResolverTest + * @assertion_ids: JSP:JAVADOC:151 + * @test_Strategy: Validate the behavior of PageContext.getVariableResolver(). + * Note: This is inherited from JspContext. + */ + // @Test + public void pageContextGetVariableResolverTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextGetVariableResolverTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextFindAttributeNullNameTest + * @assertion_ids: JSP:JAVADOC:387 + * @test_Strategy: Validate a NullPointerException is thrown if a null value + * is provided for the name parameter. + */ + @Test + public void pageContextFindAttributeNullNameTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextFindAttributeNullNameTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextGetAttributesScopeNullNameTest + * @assertion_ids: JSP:JAVADOC:389 + * @test_Strategy: Validate a NullPointerException is thrown if a null value + * is provided to the name argument. + */ + @Test + public void pageContextGetAttributesScopeNullNameTest() throws Exception { + TEST_PROPS.setProperty(APITEST, + "pageContextGetAttributesScopeNullNameTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextRemoveAttributeNullNameTest + * @assertion_ids: JSP:JAVADOC:393;JSP:JAVADOC:391 + * @test_Strategy: Validate a NullPointerException is thrown if the name + * argument is provided a null value. + */ + @Test + public void pageContextRemoveAttributeNullNameTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextRemoveAttributeNullNameTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } + + /** + * @testName: pageContextSetAttributeNullValueTest + * @assertion_ids: JSP:JAVADOC:396;JSP:JAVADOC:397 + * @test_Strategy: Validate that if a null value is provided to either + * setAttribute(String, Object) or setAttribute(String, + * Object, int) it has the same affect as calling + * removeAttribute(String) or removeAttribute(String, int). + */ + @Test + public void pageContextSetAttributeNullValueTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "pageContextSetAttributeNullValueTest"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Error page invoked"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/skippageexception/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/skippageexception/URLClientIT.java new file mode 100644 index 00000000..50cb463c --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/skippageexception/URLClientIT.java @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.skippageexception; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_skippageexc_web"); + setTestJsp("SkipPageExceptionTest"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_skippageexc_web.war"); + archive.addClasses(JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_skippageexc_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/SkipPageExceptionTest.jsp")), "SkipPageExceptionTest.jsp"); + + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: skipPageExceptionDefaultCtorTest + * + * @assertion_ids: JSP:JAVADOC:6 + * + * @test_Strategy: Validate default constructor of SkipPageException + */ + @Test + public void skipPageExceptionDefaultCtorTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "skipPageExceptionDefaultCtorTest"); + invoke(); + } + + /* + * @testName: skipPageExceptionMessageCtorTest + * + * @assertion_ids: JSP:JAVADOC:7 + * + * @test_Strategy: Validate contructor taking single string argument as the + * message of the Exception. + */ + @Test + public void skipPageExceptionMessageCtorTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "skipPageExceptionMessageCtorTest"); + invoke(); + } + + /* + * @testName: skipPageExceptionCauseCtorTest + * + * @assertion_ids: JSP:JAVADOC:8 + * + * @test_Strategy: Validate constructor taking a Throwable signifying the root + * cause of the this SkipPageException. + */ + @Test + public void skipPageExceptionCauseCtorTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "skipPageExceptionCauseCtorTest"); + invoke(); + } + + /* + * @testName: skipPageExceptionCauseMessageCtorTest + * + * @assertion_ids: JSP:JAVADOC:9 + * + * @test_Strategy: Validate constructor taking both a message and a Throwable + * signifying the root cause of the SkipPageException. + */ + @Test + public void skipPageExceptionCauseMessageCtorTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "skipPageExceptionCauseMessageCtorTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentClearBodyTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentClearBodyTag.java new file mode 100644 index 00000000..4aeb335e --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentClearBodyTag.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodycontent; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.BodyContent; +import jakarta.servlet.jsp.tagext.BodyTagSupport; + +public class BodyContentClearBodyTag extends BodyTagSupport { + + /** + * Default constructor. + */ + public BodyContentClearBodyTag() { + super(); + } + + /** + * Validates the behavior of clearBody(). + * + * @return SKIP_BODY + * @throws JspException + * - if an error occurs + */ + public int doAfterBody() throws JspException { + JspTestUtil.debug("[BodyContentClearBodyTag] in doAfterBody()"); + BodyContent content = this.getBodyContent(); + + try { + content.clearBody(); + // write the body content -- should be empty. + content.writeOut(content.getEnclosingWriter()); + + } catch (Exception e) { + throw new JspException("Test FAILED. Unexpected Exception!", e); + } + + return SKIP_BODY; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentFlushTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentFlushTag.java new file mode 100644 index 00000000..079eab29 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentFlushTag.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodycontent; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.BodyContent; +import jakarta.servlet.jsp.tagext.BodyTagSupport; + +public class BodyContentFlushTag extends BodyTagSupport { + + /** + * Default constructor. + */ + public BodyContentFlushTag() { + super(); + } + + /** + * Validates that an IOException is thrown if BodyContent.flush() is called. + * + * @return SKIP_BODY + * @throws JspException + * - if an error occurs + */ + public int doAfterBody() throws JspException { + JspTestUtil.debug("[BodyContentFlushTag] in doAfterBody()"); + BodyContent content = this.getBodyContent(); + + try { + content.flush(); + } catch (IOException ioe) { + try { + content.getEnclosingWriter().println("Test PASSED"); + } catch (IOException eio) { + throw new JspException("Test FAILED. Unexpected IOException!", eio); + } + } catch (Exception e) { + throw new JspException("Test FAILED. Unexpected Exception!", e); + } + + return SKIP_BODY; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentGetStringTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentGetStringTag.java new file mode 100644 index 00000000..45219308 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentGetStringTag.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodycontent; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.BodyContent; +import jakarta.servlet.jsp.tagext.BodyTagSupport; + +public class BodyContentGetStringTag extends BodyTagSupport { + + /** + * Default constructor. + */ + public BodyContentGetStringTag() { + super(); + } + + /** + * Validates BodyContent.getString() + * + * @return SKIP_BODY + * @throws JspException + * if an error occurs + */ + public int doAfterBody() throws JspException { + BodyContent content = this.getBodyContent(); + + try { + String body = content.getString().trim(); + + if (body.equals("body content")) { + content.getEnclosingWriter().println("Test PASSED"); + + } else { + content.getEnclosingWriter() + .println("Test FAILED. Expected " + + "BodyContent.getString() to return 'body content'. " + + "Received: " + body); + } + + } catch (Exception e) { + throw new JspException("Test FAILED. Unexpected Exception", e); + } + + return SKIP_BODY; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentReadWriteTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentReadWriteTag.java new file mode 100644 index 00000000..e770f96a --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentReadWriteTag.java @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodycontent; + +import java.io.BufferedReader; +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.BodyContent; +import jakarta.servlet.jsp.tagext.BodyTagSupport; + +public class BodyContentReadWriteTag extends BodyTagSupport { + + /** + * Default constructor. + */ + public BodyContentReadWriteTag() { + super(); + } + + /** + * Validates the behavior of BodyContent.getReader() and + * BodyContent.getEnclosingWriter(); + * + * @return SKIP_BODY + * @throws JspException + * - if an error occurs + */ + public int doAfterBody() throws JspException { + JspTestUtil.debug("[BodyContentReadWriteTag] in doAfterBody()"); + + try { + BodyContent content = this.getBodyContent(); + BufferedReader reader = new BufferedReader(content.getReader()); + StringBuffer sb = new StringBuffer(); + JspWriter writer = content.getEnclosingWriter(); + + try { + // add a little something to the body to show that it has + // been modified... + sb.append("#"); + + for (int i = reader.read(); i != -1; i = reader.read()) { + if (Character.isWhitespace((char) i)) { + continue; + } + sb.append((char) i); + } + sb.append("#"); + + writer = content.getEnclosingWriter(); + + if (writer != null) { + // validate that the enclosing writer is not the same + // JspWriter used at the page level. + if (writer == pageContext.getOut()) { + writer.println("Test FAILED. Writer returned" + + " by BodyContent has the same address as the writer returned" + + " by pageContext.get()."); + } else { + writer.println(sb.toString()); + } + } + } finally { + writer.close(); + reader.close(); + } + + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + + return SKIP_BODY; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentWriteOutTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentWriteOutTag.java new file mode 100644 index 00000000..525f43ff --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentWriteOutTag.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodycontent; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.BodyContent; +import jakarta.servlet.jsp.tagext.BodyTagSupport; + +public class BodyContentWriteOutTag extends BodyTagSupport { + + /** + * Default constructor. + */ + public BodyContentWriteOutTag() { + super(); + } + + /** + * Validates the behavior of BodyContent.writeOut(). + * + * @return SKIP_BODY + * @throws JspException + * if an error occurs + */ + public int doAfterBody() throws JspException { + JspTestUtil.debug("[BodyContentWriteOutTag] in doAfterBody()"); + BodyContent content = this.getBodyContent(); + + try { + // write the content of the body to the current writer + content.writeOut(content.getEnclosingWriter()); + + } catch (IOException ioe) { + throw new JspException("Test FAILED. Unexpected IOException!", ioe); + } catch (Exception e) { + throw new JspException("Test FAILED. Unexpected Exception!", e); + } + return SKIP_BODY; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/URLClientIT.java new file mode 100644 index 00000000..92fe10c8 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/URLClientIT.java @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.2 10/09/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodycontent; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import java.io.IOException; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + +/** + * Test client for BodyContent + */ + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + public URLClientIT() throws Exception { + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_bodycontent_web.war"); + archive.addClasses(BodyContentClearBodyTag.class, + BodyContentFlushTag.class, BodyContentGetStringTag.class, + BodyContentReadWriteTag.class, BodyContentWriteOutTag.class, + JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_bodycontent_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/bodycontent.tld", "bodycontent.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/BodyContentClearBodyTest.jsp")), "BodyContentClearBodyTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/BodyContentFlushTest.jsp")), "BodyContentFlushTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/BodyContentGetStringTest.jsp")), "BodyContentGetStringTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/BodyContentReadWriteTest.jsp")), "BodyContentReadWriteTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/BodyContentWriteOutTest.jsp")), "BodyContentWriteOutTest.jsp"); + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: bodyContentFlushTest + * + * @assertion_ids: JSP:JAVADOC:332 + * + * @test_Strategy: Validates that an IOException is thrown when + * BodyContent.flush() is called. + */ + @Test + public void bodyContentFlushTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_bodycontent_web/BodyContentFlushTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: bodyContentClearBodyTest + * + * @assertion_ids: JSP:JAVADOC:333 + * + * @test_Strategy: Validate that clearBuffer() works as expected. + */ + @Test + public void bodyContentClearBodyTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_bodycontent_web/BodyContentClearBodyTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: bodyContentReadWriteTest + * + * @assertion_ids: JSP:JAVADOC:334;JSP:JAVADOC:338 + * + * @test_Strategy: Validate that a reader can be obtained containing the + * bodycontent of the tag. Using the content that is read in, obtain a writer + * and write the content to that writer. + */ + @Test + public void bodyContentReadWriteTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_bodycontent_web/BodyContentReadWriteTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "#TestPASSED#"); + invoke(); + } + + /* + * @testName: bodyContentWriteOutTest + * + * @assertion_ids: JSP:JAVADOC:336 + * + * @test_Strategy: Validate the behavior of BodyContent.writeOut(). + */ + @Test + public void bodyContentWriteOutTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_bodycontent_web/BodyContentWriteOutTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: bodyContentGetStringTest + * + * @assertion_ids: JSP:JAVADOC:335 + * + * @test_Strategy: Validate the behavior of BodyContent.getString(). + */ + @Test + public void bodyContentGetStringTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_bodycontent_web/BodyContentGetStringTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyContainerInteractionTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyContainerInteractionTag.java new file mode 100644 index 00000000..0ad11c88 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyContainerInteractionTag.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodytagsupport; + +import ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagsupport.ContainerInteractionTag; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.BodyContent; +import jakarta.servlet.jsp.tagext.BodyTag; + +public class BodyContainerInteractionTag extends ContainerInteractionTag + implements BodyTag { + + protected BodyContent _content = null; + + /** + * Default constructor. + */ + public BodyContainerInteractionTag() { + super(); + } + + /** + * Validate container behavior when returning either EVAL_BODY_INCLUDE, + * SKIP_BODY, SKIP_PAGE, or EVAL_BODY_BUFFERED. + * + * @return an int value based on the doStartTag attribute. + * @throws JspException + * if an error occurs + */ + public int doStartTag() throws JspException { + int retValue = 0; + if ("EVAL_BODY_BUFFERED".equals(_doStartTag)) { + addMethodToList("doStartTag"); + retValue = EVAL_BODY_BUFFERED; + } else { + retValue = super.doStartTag(); + } + return retValue; + } + + /** + * Validate the container calls setBodyContent on tag instances when + * doStartTag() returns EVAL_BODY_BUFFERED. + * + * @param content + * - the body content. + */ + public void setBodyContent(BodyContent content) { + _content = content; + addMethodToList("setBodyContent"); + } + + /** + * Validate the container calls doInitBody() before the evaluation of the + * body. + * + * @throws JspException + * if an error occurs + */ + public void doInitBody() throws JspException { + addMethodToList("doInitBody"); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodySynchronizationTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodySynchronizationTag.java new file mode 100644 index 00000000..129d4a3f --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodySynchronizationTag.java @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodytagsupport; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.BodyContent; + +public class BodySynchronizationTag extends BodyContainerInteractionTag { + + /** + * Default constructor. + */ + public BodySynchronizationTag() { + super(); + } + + /** + * Adds two attributes to the PageContext to be synchronized after + * doStartTag() has been called. + * + * @return an int value based on what the tag has been configured to return + * @throws JspException + * if an error occurs + */ + public int doStartTag() throws JspException { + JspTestUtil.debug("[BodySynchronizationTag] in doStartTag()"); + pageContext.setAttribute("begin", + Integer.valueOf(getIntValue("begin") + 1)); + pageContext.setAttribute("nested", + Integer.valueOf(getIntValue("nested") + 1)); + return super.doStartTag(); + } + + /** + * Adds two attributes to the PageContext to be synchronized after + * doInitBody() has been called. + * + * @throws JspException + * if an error occurs + */ + public void doInitBody() throws JspException { + JspTestUtil.debug("[BodySynchronizationTag] in doInitBody()"); + pageContext.setAttribute("begin", + Integer.valueOf(getIntValue("begin") + 1)); + pageContext.setAttribute("nested", + Integer.valueOf(getIntValue("nested") + 1)); + super.doInitBody(); + } + + /** + * Adds two attributes to the PageContext to be synchronized after doEndTag() + * has been called. + * + * @return an int value based on what the tag has been configured to return + * @throws JspException + * if an error occurs + */ + public int doEndTag() throws JspException { + JspTestUtil.debug("[BodySynchronizationTag] in doEndTag()"); + pageContext.setAttribute("begin", + Integer.valueOf(getIntValue("begin") + 1)); + pageContext.setAttribute("end", Integer.valueOf(getIntValue("nested") + 1)); + pageContext.removeAttribute("nested"); + return super.doEndTag(); + } + + /** + * Adds two attributes to the PageContext to be synchronized after + * doAfterBody() has been called. + * + * @return an int value based on what the tag has been configured to return + * @throws JspException + * if an error occurs + */ + public int doAfterBody() throws JspException { + JspTestUtil.debug("[BodySynchronizationTag] in doAfterBody()"); + pageContext.setAttribute("begin", + Integer.valueOf(getIntValue("begin") + 1)); + pageContext.setAttribute("nested", + Integer.valueOf(getIntValue("nested") + 1)); + if (_content != null) { + try { + _content.writeOut(_content.getEnclosingWriter()); + JspTestUtil.debug( + "[BodySynchronizationTag] bodyContent: " + _content.getString()); + } catch (IOException ioe) { + throw new JspException("Unexpcted IOException!", ioe); + } + } + return super.doAfterBody(); + } + + /** + * Called by container to set the body content of the action. + * + * @param content + * - the body content + */ + public void setBodyContent(BodyContent content) { + super.setBodyContent(content); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/GetBodyContentTestTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/GetBodyContentTestTag.java new file mode 100644 index 00000000..5b0830f6 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/GetBodyContentTestTag.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodytagsupport; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.BodyContent; +import jakarta.servlet.jsp.tagext.BodyTagSupport; + +public class GetBodyContentTestTag extends BodyTagSupport { + + /** + * Default constructor. + */ + public GetBodyContentTestTag() { + super(); + } + + /** + * Validate the that get/setBodyContent() work as expected. + * + * @return Tag.EVAL_PAGE + * @throws JspException + * if an unexpected error occurs + */ + public int doEndTag() throws JspException { + BodyContent bc = this.getBodyContent(); + try { + if (bc != null) { + if ("body content".equals(bc.getString().trim())) { + pageContext.getOut().println("Test PASSED"); + } else { + pageContext.getOut() + .println("Test FAILED. Unexpected body" + + " content returned. Expected: 'body content', received: " + + bc.getString()); + } + } else { + pageContext.getOut().println( + "Test FAILED. BodyTagSupport.getBodyContent()" + "returned null."); + } + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + return EVAL_PAGE; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/GetPreviousOutTestTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/GetPreviousOutTestTag.java new file mode 100644 index 00000000..f70ad06f --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/GetPreviousOutTestTag.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodytagsupport; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.BodyTagSupport; + +public class GetPreviousOutTestTag extends BodyTagSupport { + + /** + * Default constructor. + */ + public GetPreviousOutTestTag() { + super(); + } + + /** + * Validates getPreviousOut(). + * + * @return Tag.EVAL_PAGE + * @throws JspException + * - if an error occurs + */ + public int doEndTag() throws JspException { + try { + JspWriter out = this.getPreviousOut(); + + // clear the buffer from the page + out.clear(); + out.println("Test PASSED"); + } catch (IOException ioe) { + throw new JspException("Unexpected Exception!", ioe); + } + return EVAL_PAGE; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/SyncTEI.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/SyncTEI.java new file mode 100644 index 00000000..3e47d432 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/SyncTEI.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodytagsupport; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.tagext.TagData; +import jakarta.servlet.jsp.tagext.TagExtraInfo; +import jakarta.servlet.jsp.tagext.VariableInfo; + +public class SyncTEI extends TagExtraInfo { + + /** + * Default constructor. + */ + public SyncTEI() { + super(); + } + + /** + * Sets the begin, nested, and end scripting variables for the + * BodySynchronizationTag. + * + * @param data + * - the TagData from the TLD. + * @return a VariableInfo array. + */ + public VariableInfo[] getVariableInfo(TagData data) { + JspTestUtil.debug("[SyncTEI] in getVariableInfo()"); + return new VariableInfo[] { + new VariableInfo("begin", "java.lang.Integer", true, + VariableInfo.AT_BEGIN), + new VariableInfo("nested", "java.lang.Integer", true, + VariableInfo.NESTED), + new VariableInfo("end", "java.lang.Integer", true, + VariableInfo.AT_END) }; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/URLClientIT.java new file mode 100644 index 00000000..76c23d09 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/URLClientIT.java @@ -0,0 +1,257 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodytagsupport; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagsupport.ContainerInteractionTag; +import ee.jakarta.tck.pages.common.util.MethodValidatorBean; + +/** + * Test client for BodyTagSupport. + */ +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_bodytagsupp_web"); + setTestJsp("BodyTagSupportApiTest"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_bodytagsupp_web.war"); + archive.addClasses(BodyContainerInteractionTag.class, + BodySynchronizationTag.class, GetBodyContentTestTag.class, + GetPreviousOutTestTag.class, SyncTEI.class, + JspTestUtil.class, + ContainerInteractionTag.class, + MethodValidatorBean.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_bodytagsupp_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/bodytagsupport.tld", "bodytagsupport.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/BodyTagEmptyTagTest.jsp")), "BodyTagEmptyTagTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/BodyTagEvalBodyBufferedTest.jsp")), "BodyTagEvalBodyBufferedTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/BodyTagEvalBodyIncludeTest.jsp")), "BodyTagEvalBodyIncludeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/BodyTagSkipBodyTest.jsp")), "BodyTagSkipBodyTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/BodyTagSupportApiTest.jsp")), "BodyTagSupportApiTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/BodyTagSupportSynchronizationTest.jsp")), "BodyTagSupportSynchronizationTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetBodyContentTest.jsp")), "GetBodyContentTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetPreviousOutTest.jsp")), "GetPreviousOutTest.jsp"); + + return archive; + + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: bodyTagSupportCtorTest + * + * @assertion_ids: JSP:JAVADOC:318 + * + * @test_Strategy: Validate the constructor of BodyTagSupport + */ + @Test + public void bodyTagSupportCtorTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "bodyTagSupportCtorTest"); + invoke(); + } + + /* + * @testName: bodyTagSupportDoStartTagTest + * + * @assertion_ids: JSP:JAVADOC:319 + * + * @test_Strategy: Validate the default return value of + * BodyTagSupport.doStartTag() is EVAL_BODY_BUFFERED. + */ + @Test + public void bodyTagSupportDoStartTagTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "bodyTagSupportDoStartTagTest"); + invoke(); + } + + /* + * @testName: bodyTagSupportDoEndTagTest + * + * @assertion_ids: JSP:JAVADOC:321 + * + * @test_Strategy: Validate the default return value of + * BodyTagSupport.doEndTag() is EVAL_PAGE. + */ + @Test + public void bodyTagSupportDoEndTagTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "bodyTagSupportDoEndTagTest"); + invoke(); + } + + /* + * @testName: bodyTagSupportDoAfterBodyTest + * + * @assertion_ids: JSP:JAVADOC:326 + * + * @test_Strategy: Validate the default return value of + * BodyTagSupport.doAfterBody() is SKIP_BODY. + */ + @Test + public void bodyTagSupportDoAfterBodyTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "bodyTagSupportDoAfterBodyTest"); + invoke(); + } + + /* + * @testName: bodyTagSupportGetBodyContentTest + * + * @assertion_ids: JSP:JAVADOC:323;JSP:JAVADOC:329 + * + * @test_Strategy: Validate the behavior of getBodyContent(). This indirectly + * ensures that the container properly called setBodyContent(). + */ + @Test + public void bodyTagSupportGetBodyContentTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_bodytagsupp_web/GetBodyContentTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: bodyTagSupportGetPreviousOutTest + * + * @assertion_ids: JSP:JAVADOC:330 + * + * @test_Strategy: Validate the behavior of getPreviousOut. + */ + @Test + public void bodyTagSupportGetPreviousOutTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_bodytagsupp_web/GetPreviousOutTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: bodyTagSupportEvalBodyBufferedTest + * + * @assertion_ids: + * JSP:JAVADOC:346;JSP:JAVADOC:374;JSP:JAVADOC:375;JSP:JAVADOC:324 + * + * @test_Strategy: Validate that the container properly calls setInitBody() + * then doInitBody() after doStartTag() is called, prior to evaluating the + * body. + */ + @Test + public void bodyTagSupportEvalBodyBufferedTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_bodytagsupp_web/BodyTagEvalBodyBufferedTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: bodyTagSupportEvalBodyIncludeTest + * + * @assertion_ids: JSP:JAVADOC:376 + * + * @test_Strategy: Validate that the container doesn't call setBodyContent() + * and doInitBody() if doStartTag() returns EVAL_BODY_INCLUDE. + */ + @Test + public void bodyTagSupportEvalBodyIncludeTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_bodytagsupp_web/BodyTagEvalBodyIncludeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: bodyTagSupportSkipBodyTest + * + * @assertion_ids: JSP:JAVADOC:402 + * + * @test_Strategy: Validate that the container doesn't call setInitBody() and + * doInitBody() after doStartTag() returns SKIP_BODY. + */ + @Test + public void bodyTagSupportSkipBodyTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_bodytagsupp_web/BodyTagSkipBodyTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: bodyTagSupportEmptyTagTest + * + * @assertion_ids: JSP:JAVADOC:376; + * + * @test_Strategy: Validate that the container only calls setInitBody() and + * doInitBody() if the tag is empty. 1. Empty Tag1: 2. Empty Tag2: + * 3. Non-Empty Tag2: + */ + @Test + public void bodyTagSupportEmptyTagTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_bodytagsupp_web/BodyTagEmptyTagTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "Empty Tag1: Test PASSED|Empty Tag2: Test PASSED|Non-Empty Tag3: Test PASSED"); + invoke(); + } + + /* + * @testName: bodyTagSupportVariableSynchronizationTest + * + * @assertion_ids: JSP:JAVADOC:377 + * + * @test_Strategy: Validate scripting variables are properly synchornized. + */ + @Test + public void bodyTagSupportVariableSynchronizationTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_bodytagsupp_web/BodyTagSupportSynchronizationTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/DynamicAttributesTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/DynamicAttributesTag.java new file mode 100644 index 00000000..1fff5d08 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/DynamicAttributesTag.java @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.dynamicattributes; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.DynamicAttributes; +import jakarta.servlet.jsp.tagext.TagSupport; + +public class DynamicAttributesTag extends TagSupport + implements DynamicAttributes { + + boolean _throwException = false; + + boolean _setDynCalled = false; + + /** + * Default constructor. + */ + public DynamicAttributesTag() { + super(); + } + + /** + * Sets the _throwException instance variable. If true, when + * setDynamicAttribute() is called by the container, a JspException will be + * thrown. + * + * @param throwException + */ + public void setThrowException(boolean throwException) { + _throwException = throwException; + } + + /** + * Validates that setDynamicAttributes is properly called and will cause a + * test failure if setDynamicAttribute throws a JspException and doStartTag() + * is called. + * + * @return SKIP_BODY + * @throws JspException + * if an error occurs + */ + public int doStartTag() throws JspException { + try { + if (!_setDynCalled) { + pageContext.getOut().println("Test FAILED. setDynamicAttributes()" + + " was not called prior to attempting to invoke doStartTag()."); + } + if (_throwException) { + pageContext.getOut().println("Test FAILED. setDynamicAttributes()" + + " threw an Exception but the container incorrectly called doStartTag()"); + } + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + return SKIP_BODY; + } + + /** + * Called by the container if a tag has an attribute present and not declared + * by the TLD. If _throwException is true, a JspException will be thrown by + * this method. + * + * @param uri + * - the namespace of the attribute (if any) + * @param localName + * - the attribute name + * @param value + * - the attribute value + * @throws JspException + * if _throwException is true + */ + public void setDynamicAttribute(String uri, String localName, Object value) + throws JspException { + _setDynCalled = true; + if (_throwException) { + throw new JspException("JspException"); + } else { + try { + if ("dynamic".equals(localName)) { + if ("dynValue".equals(value)) { + pageContext.getOut().println("Test PASSED"); + } else { + pageContext.getOut() + .println("Test FAILED. Expected" + + " a dynamic attribute value of 'dynValue'. " + + "Received: " + ((String) value)); + } + } else { + pageContext.getOut() + .println("Test FAILED. Expected" + + " a dynamic attribute with a local name of 'dynamic'" + + ". Received: " + localName); + } + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/SimpleExcTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/SimpleExcTag.java new file mode 100644 index 00000000..cef12fa4 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/SimpleExcTag.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.dynamicattributes; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.DynamicAttributes; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class SimpleExcTag extends SimpleTagSupport + implements DynamicAttributes { + + /** + * Default constructor. + */ + public SimpleExcTag() { + super(); + } + + /** + * If called, it will fail the test. + * + * @throws JspException + * not thrown + * @throws IOException + * not thrown + */ + public void doTag() throws JspException, IOException { + this.getJspContext().getOut().println("Test FAILED. Container incorrectly" + + " called doTag() after setDynamicAttribute() threw a JspException."); + } + + /** + * Throws a JspException. + * + * @param uri + * - the namespace of the attribute (if any) + * @param localName + * - the name of the attribute + * @param value + * - the value of the attribute + * @throws JspException + * if an error occurs + */ + public void setDynamicAttribute(String uri, String localName, Object value) + throws JspException { + throw new JspException("JspException"); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/URLClientIT.java new file mode 100644 index 00000000..4943a108 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/URLClientIT.java @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.2 10/09/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.dynamicattributes; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +/** + * Test client for the DynamicAttributes interface. + */ +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_bodytagsupp_web"); + setTestJsp("BodyTagSupportApiTest"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_dynattrib_web.war"); + archive.addClasses(DynamicAttributesTag.class, SimpleExcTag.class, + JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_dynattrib_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/dynamicattributes.tld", "dynamicattributes.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/SetDynamicAttributesTest.jsp")), "SetDynamicAttributesTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/DynamicAttributesExceptionTest.jsp")), "DynamicAttributesExceptionTest.jsp"); + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: dynamicAttributesTest + * + * @assertion_ids: JSP:JAVADOC:372 + * + * @test_Strategy: Validate undeclared attributes can be set on a tag handler + * for attributes not specified in the TLD. + */ + @Test + public void dynamicAttributesTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_dynattrib_web/SetDynamicAttributesTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: dynamicAttributesExceptionTest + * + * @assertion_ids: JSP:JAVADOC:372 + * + * @test_Strategy: Validate that if a JspException is thrown by + * setDynamicAttribute(), that doStartTag() or doTag() is not called on the + * handler. + */ + @Test + public void dynamicAttributesExceptionTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_dynattrib_web/DynamicAttributesExceptionTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Classic - Test PASSED"); + TEST_PROPS.setProperty(SEARCH_STRING, "Simple - Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/FunctionInfoTEI.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/FunctionInfoTEI.java new file mode 100644 index 00000000..89e5e00b --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/FunctionInfoTEI.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.functioninfo; + +import ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.tagext.FunctionInfo; + +/** + * A TagExtraInfo implementation to validate the methods of + * jakarta.servlet.jsp.tagext.FunctionInfo. + */ +public class FunctionInfoTEI extends BaseTCKExtraInfo { + + /** + * Default constructor. + */ + public FunctionInfoTEI() { + } + + // ------------------------------------------- Test Definitions ---------- + + /** + * Validate the behavior of FunctionInfo.getName(). + * + * @return null if the test passes, otherwise a String describing the cause of + * failure. + */ + public String getName() { + debug("in getName()"); + FunctionInfo[] info = this.getTagInfo().getTagLibrary().getFunctions(); + String message = null; + if (info != null) { + if (info.length == 1) { + String name = info[0].getName().trim(); + if (!"upperCase".equals(name)) { + message = "Test FAILED. FunctionInfo.getName() returned " + "'" + + name + "', expected: 'upperCase'"; + } + } else { + message = "Test FAILED. FunctionInfo array length was " + info.length + + ", expected the length to be 1."; + } + } else { + message = "Test FAILED. FunctionInfo was null."; + } + return message; + } + + /** + * Validate the behavior of FunctionInfo.getFunctionClass(). + * + * @return null if the test passes, otherwise a String describing the cause of + * failure. + */ + public String getFunctionClass() { + debug("in getFunctionClass()"); + FunctionInfo[] info = this.getTagInfo().getTagLibrary().getFunctions(); + String message = null; + if (info != null) { + if (info.length == 1) { + String clazz = info[0].getFunctionClass().trim(); + String expClass = "ee.jakarta.tck.pages.common.util.JspFunctions"; + if (!expClass.equals(clazz)) { + message = "Test FAILED. Expected FunctionInfo.getFunctionClass()" + + " to return '" + expClass + "'. Received: '" + clazz + "'"; + } + } else { + message = "Test FAILED. FunctionInfo array length was " + info.length + + ", expected the length to be 1."; + } + } else { + message = "Test FAILED. FunctionInfo was null."; + } + return message; + } + + /** + * Validate the behavior of FunctionInfo.getFunctionSignature(). + * + * @return null if the test passes, otherwise a String describing the cause of + * failure. + */ + public String getFunctionSignature() { + debug("in getFunctionSignature()"); + FunctionInfo[] info = this.getTagInfo().getTagLibrary().getFunctions(); + String message = null; + if (info != null) { + if (info.length == 1) { + String sig = info[0].getFunctionSignature().trim(); + String expSig = "java.lang.String upperCase(java.lang.String)"; + if (!expSig.equals(sig)) { + message = "Test FAILED. Expected FunctionInfo.getFunctionClass()" + + " to return '" + expSig + "'. Received: '" + sig + "'"; + } + } else { + message = "Test FAILED. FunctionInfo array length was " + info.length + + ", expected the length to be 1."; + } + } else { + message = "Test FAILED. FunctionInfo was null."; + } + return message; + } + + /** + * Utility method that calls JspTestUtil.debug after prepending this class + * name to the message. + * + * @param message + * - a debug message + */ + private static void debug(String message) { + JspTestUtil.debug("[FunctionInfoTEI] " + message); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/URLClientIT.java new file mode 100644 index 00000000..7025acbc --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/URLClientIT.java @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.2 10/09/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.functioninfo; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.common.tags.tck.SimpleTag; +import ee.jakarta.tck.pages.common.util.JspFunctions; +import ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo; + +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + +/** + * Test client for FunctionInfo. Implementation note, all tests are performed + * within a TagExtraInfo class. If the test fails, a translation error will be + * generated and a ValidationMessage array will be returned. + */ + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_functioninfo_web.war"); + archive.addClasses(FunctionInfoTEI.class, + JspTestUtil.class, + SimpleTag.class, + JspFunctions.class, + BaseTCKExtraInfo.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_functioninfo_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/functioninfo.tld", "functioninfo.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetFunctionClassTest.jsp")), "GetFunctionClassTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetFunctionSignatureTest.jsp")), "GetFunctionSignatureTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetNameTest.jsp")), "GetNameTest.jsp"); + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: functionInfoGetNameTest + * + * @assertion_ids: JSP:JAVADOC:315 + * + * @test_Strategy: Validate the container properly parses the function + * information in the provided TLD and the method calls, in this case, + * FunctionInfo.getName(), returns the expected value. + */ + @Test + public void functionInfoGetNameTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_functioninfo_web/GetNameTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: functionInfoGetFunctionClassTest + * + * @assertion_ids: JSP:JAVADOC:316 + * + * @test_Strategy: Validate the container properly parses the function + * information in the provided TLD and the method calls, in this case, + * FunctionInfo.getFunctionClass(), returns the expected value. + */ + @Test + public void functionInfoGetFunctionClassTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_functioninfo_web/GetFunctionClassTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: functionInfoGetFunctionSignatureTest + * + * @assertion_ids: JSP:JAVADOC:317 + * + * @test_Strategy: Validate the container properly parses the function + * information in the provided TLD and the method calls, in this case, + * FunctionInfo.getFunctionSignature(), returns the expected value. + */ + @Test + public void functionInfoGetFunctionSignatureTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_functioninfo_web/GetFunctionSignatureTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/MultiOneTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/MultiOneTag.java new file mode 100644 index 00000000..247b31a5 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/MultiOneTag.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.jspidconsumer; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.JspIdConsumer; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class MultiOneTag extends SimpleTagSupport implements JspIdConsumer { + + private static String jspId; + + private JspWriter out; + + public void setJspId(String id) { + jspId = id; + } + + public static String getJspId() { + return jspId; + } + + public void doTag() throws JspException, IOException { + + out = getJspContext().getOut(); + + try { + out.println("MultiOneTag: JspId is " + jspId); + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "MultiOneTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/MultiThreeTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/MultiThreeTag.java new file mode 100644 index 00000000..6ab397e3 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/MultiThreeTag.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.jspidconsumer; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.JspIdConsumer; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class MultiThreeTag extends SimpleTagSupport implements JspIdConsumer { + + private String jspId; + + private JspWriter out; + + public void setJspId(String id) { + jspId = id; + } + + public void doTag() throws JspException, IOException { + + out = getJspContext().getOut(); + + try { + String jspId1 = MultiOneTag.getJspId(); + String jspId2 = MultiTwoTag.getJspId(); + if (jspId == null || jspId1 == null || jspId2 == null) { + out.println("Some ID(s) not assigned. Test FAILED"); + return; + } + out.println("MultiThreeTag: JspId is " + jspId); + out.println("MultiThreeTag: JspId1 is " + jspId1); + out.println("MultiThreeTag: JspId2 is " + jspId2); + + if (jspId == jspId1 || jspId == jspId2 || jspId1 == jspId2) { + out.println("Identical IDs found. Test FAILED"); + return; + } + out.println("Test PASSED"); + + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "MultiThreeTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/MultiTwoTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/MultiTwoTag.java new file mode 100644 index 00000000..6194e54e --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/MultiTwoTag.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.jspidconsumer; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.JspIdConsumer; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class MultiTwoTag extends SimpleTagSupport implements JspIdConsumer { + + private static String jspId; + + private JspWriter out; + + public void setJspId(String id) { + jspId = id; + } + + public static String getJspId() { + return jspId; + } + + public void doTag() throws JspException, IOException { + + out = getJspContext().getOut(); + + try { + out.println("MultiTwoTag: JspId is " + jspId); + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "MultiTwoTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/SameJspIdTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/SameJspIdTag.java new file mode 100644 index 00000000..68bfaedf --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/SameJspIdTag.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.jspidconsumer; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.JspIdConsumer; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class SameJspIdTag extends SimpleTagSupport implements JspIdConsumer { + + public static final int NUM_INVOC = 5; + + private static int currentInvoc = 0; + + private String jspId; + + private static String[] idArray = new String[NUM_INVOC]; + + private JspWriter out; + + public void setJspId(String id) { + jspId = id; + } + + public void doTag() throws JspException, IOException { + + out = getJspContext().getOut(); + currentInvoc = (currentInvoc == NUM_INVOC) ? 1 : currentInvoc + 1; + try { + out.println("SameJspIdTag: current Invocation = " + currentInvoc); + out.println("SameJspIdTag: JspId is " + jspId); + idArray[currentInvoc - 1] = jspId; + + if (currentInvoc != NUM_INVOC) + return; + else { + for (int i = 0; i < NUM_INVOC; ++i) { + if (!idArray[i].equals(jspId)) { + out.println("SameJspIdTag: different jsp ids found"); + out.println("Test FAILED"); + return; + } + } + out.println("Test PASSED"); + } + + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "SameJspIdTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/SetJspIdTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/SetJspIdTag.java new file mode 100644 index 00000000..8d4a4e43 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/SetJspIdTag.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.jspidconsumer; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.JspIdConsumer; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class SetJspIdTag extends SimpleTagSupport implements JspIdConsumer { + + private String jspId; + + private JspWriter out; + + public void setJspId(String id) { + jspId = id; + } + + public void doTag() throws JspException, IOException { + + out = getJspContext().getOut(); + + try { + if (jspId == null) { + out.println("No ID assigned. Test FAILED"); + return; + } + out.println("JspId is " + jspId); + if (isConformant()) { + out.println("Test PASSED"); + } + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "SetJspIdTag"); + } + } + + private boolean isConformant() throws IOException { + + char firstChar = jspId.charAt(0); + + if (!Character.isLetter(firstChar) && firstChar != '_') { + out.println("First character of ID is not letter or underscore"); + return false; + } + + for (int i = 1; i < jspId.length(); ++i) { + char ch = jspId.charAt(i); + if (!Character.isLetter(ch) && !Character.isDigit(ch) && ch != '-' + && ch != '_') { + out.print("character " + i + " is neither letter, "); + out.println("digit, dash, or underscore"); + return false; + } + } + return true; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/URLClientIT.java new file mode 100644 index 00000000..c7f929d8 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/URLClientIT.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.jspidconsumer; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_jspidconsumer_web"); + // setTestJsp("SetJspIdTest"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_jspidconsumer_web.war"); + archive.addClasses(MultiOneTag.class, MultiTwoTag.class, + MultiThreeTag.class, SameJspIdTag.class, SetJspIdTag.class, + JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_jspidconsumer_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/jspidconsumer.tld", "jspidconsumer.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/SetJspIdTest.jsp")), "SetJspIdTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/MultipleJspIdTest.jsp")), "MultipleJspIdTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/SameJspIdTest.jsp")), "SameJspIdTest.jsp"); + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: setJspIdTest + * + * @assertion_ids: JSP:JAVADOC:434 + * + * @test_Strategy: Validate the behavior of JspIdConsumer.setJspId() Implement + * the setJspId() method in a tag handler. Verify that the ID generated + * conforms to the rules set forth in the javadoc. + */ + @Test + public void setJspIdTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_jspidconsumer_web/SetJspIdTest.jsp HTTP 1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: multipleJspIdTest + * + * @assertion_ids: JSP:JAVADOC:434 + * + * @test_Strategy: Validate the behavior of JspIdConsumer.setJspId() Implement + * the setJspId() method in multiple tag handlers. Verify that each tag has a + * unique ID. [JspConsumerIdUniqueIdString] + */ + @Test + public void multipleJspIdTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_jspidconsumer_web/MultipleJspIdTest.jsp HTTP 1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: sameJspIdTest + * + * @assertion_ids: JSP:JAVADOC:434 + * + * @test_Strategy: Validate the behavior of JspIdConsumer.setJspId() Implement + * the setJspId() method in a single tag handler. Verify that when the jsp + * page is invoked multiple times, the tag's ID does not change. + * [JspConsumerIdUniqueIdString] + */ + @Test + public void sameJspIdTest() throws Exception { + + for (int i = 1; i < SameJspIdTag.NUM_INVOC; ++i) { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_jspidconsumer_web/SameJspIdTest.jsp HTTP 1.1"); + TEST_PROPS.setProperty(IGNORE_STATUS_CODE, "true"); + TEST_PROPS.setProperty(IGNORE_BODY, "true"); + invoke(); + } + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_jspidconsumer_web/SameJspIdTest.jsp HTTP 1.1"); + TEST_PROPS.setProperty(IGNORE_STATUS_CODE, "false"); + TEST_PROPS.setProperty(IGNORE_BODY, "false"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/PageDataValidator.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/PageDataValidator.java new file mode 100644 index 00000000..d353b217 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/PageDataValidator.java @@ -0,0 +1,627 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.pagedata; + +import java.io.BufferedInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.SAXNotRecognizedException; +import org.xml.sax.SAXNotSupportedException; +import org.xml.sax.helpers.DefaultHandler; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.tagext.PageData; +import jakarta.servlet.jsp.tagext.TagLibraryValidator; +import jakarta.servlet.jsp.tagext.ValidationMessage; + +/** + * Validate the PageData object provided to a configured TagLibraryValidator. + */ +public class PageDataValidator extends TagLibraryValidator { + + /** + * Flag that indicates the TLV has been called by the container. + */ + private static boolean _called = false; + + /** + * SAX parser factory used to get parser instances. + */ + private SAXParserFactory _factory = null; + + /** + * Initializes the parser factory when the TLV is first created. + */ + public PageDataValidator() { + } + + /** + * Validates the XML view of the JSP page using the provided PageData object. + * + * @param prefix + * - the tag library prefix + * @param uri + * - the tag library URI + * @param page + * - the PageData object. + * @return null if no validation errors occurred, otherwise an non-zero-length + * array of ValidationMessages. + */ + public ValidationMessage[] validate(String prefix, String uri, + PageData page) { + debug("In validate()"); + _called = true; + debug("Set _called to 'true'."); + InputStream input = null; + SAXParser parser; + PageDataValidator.PageHandler handler = new PageDataValidator.PageHandler(); + try { + initializeSaxParserFactory(); + parser = _factory.newSAXParser(); + displayXmlView(page.getInputStream()); + input = page.getInputStream(); + parser.parse(input, handler); + } catch (Throwable t) { + return JspTestUtil.getValidationMessage(null, + "Test Setup FAILED: " + t.toString()); + } finally { + if (input != null) { + try { + input.close(); + } catch (IOException e) { + debug("IOException caught when closing steam."); + } + } + } + return handler.getParsingResults(); + } + + /** + * Releases any state associated with this TLV. + */ + public void release() { + _factory = null; + super.release(); + } + + /** + * Returns the TVL invocation status. + * + * @return true if the TLV has been called, otherwise false + */ + public static boolean wasCalled() { + return _called; + } + + /** + * Resets the TLV invocation status. + */ + public static void reset() { + _called = false; + debug("Set _called to 'false'"); + } + + /** + * Initializes the SAXParserFactory. The parser will not perform any + * validation, but will be namespace aware and will provide namespace prefixes + * in the attribute lists of elements. + * + * @throws ParserConfigurationException + * - if the parser could not be configured + * @throws SAXNotRecognizedException + * - if namespace-prefixes is not recognized + * @throws SAXNotSupportedException + * - if namespace-prefixes is not supported + */ + private void initializeSaxParserFactory() throws ParserConfigurationException, + SAXNotRecognizedException, SAXNotSupportedException { + debug( + "Initializing SAXParserFactory [ validating: false, NS aware: true, NS Prefixes: true ]"); + _factory = SAXParserFactory.newInstance(); + _factory.setValidating(false); + _factory.setNamespaceAware(true); + _factory.setFeature("http://xml.org/sax/features/namespace-prefixes", true); + } + + /** + * Displays the XML view of a JSP page as seen by the container. + * + * @param in + * - the InputStream from PageData + */ + private static void displayXmlView(InputStream in) { + if (JspTestUtil.DEBUG) { + InputStream bin = null; + ByteArrayOutputStream out = null; + try { + bin = new BufferedInputStream(in); + out = new ByteArrayOutputStream(); + + for (int i = bin.read(); i != -1; i = bin.read()) { + out.write(i); + } + + debug("*************** XML View of JSP Page ***************"); + debug(out.toString()); + debug("****************************************************"); + } catch (Throwable t) { + debug("[INFO] Unexpected exception while trying to display XML view " + + "of the JSP page."); + } finally { + try { + bin.close(); + out.close(); + } catch (Throwable t) { + debug("[INFO] Unexpected exception closing I/O streams."); + } + } + } + } + + /** + * Utility method to wrap JspTestUtil.debug(). This method will add this + * class' name to the provide message and then delegate to JspTestUtil. + * + * @param message + * - a debug message + */ + private static void debug(String message) { + JspTestUtil.debug("[PageDataValidator] " + message); + } + + /** + * An extension to the DefaultHandler to process the elements within the XML + * view of a JSP page. + */ + private static class PageHandler extends DefaultHandler { + + /** + * The jsp:root element. + */ + private static final String JSP_ROOT_QN = "jsp:root"; + + /** + * The jsp:scriptlet element. + */ + private static final String JSP_SCR_QN = "jsp:scriptlet"; + + /** + * The jsp:declaration element. + */ + private static final String JSP_DECL_QN = "jsp:declaration"; + + /** + * The jsp:declaration element. + */ + private static final String JSP_EXPR_QN = "jsp:expression"; + + /** + * The jsp:text element. + */ + private static final String JSP_TEXT_QN = "jsp:text"; + + /** + * The pagedata:test element. + */ + private static final String TCK_TAG_QN = "pagedata:test"; + + /** + * The jsp:directive.page element. + */ + private static final String JSP_PAGE_QN = "jsp:directive.page"; + + /** + * The jsp:directive.include element. NOTE: this should + * not appear in the XML view of a JSP page. + */ + private static final String JSP_INCL_QN = "jsp:directive.include"; + + /** + * Counter indicating that the jsp:scriptlet element was found. + */ + private short _scrWasFound = 0; + + /** + * Counter indicating that the jsp:declaration element was found. + */ + private short _declWasFound = 0; + + /** + * Counter indicating that the jsp:expression element was found. + */ + private short _exprWasFound = 0; + + /** + * Counter indicating that the pagedata:test element was found. + */ + private short _tagLibWasFound = 0; + + /** + * Counter indicating that the taglib declaration as an xmlns attribute of + * the jsp:root element was found. + */ + private short _tagDeclWasFound = 0; + + /** + * Counter indicating that the jsp:root element was found. + */ + private short _jspRootWasFound = 0; + + /** + * Counter indicating that the jsp:text element was found. + */ + private short _textWasFound = 0; + + /** + * Counter indicating that the jsp:directive.page element was found + */ + private short _pageDirectiveFound = 0; + + /** + * Counter indicating that the jsp namespace as an xmlns attribute of the + * jsp:root element was found. + */ + private short _jspNameSpaceFound = 0; + + /** + * Counter indicating that the jsp:directive.include element was + * found. + */ + private short _includeDirectiveFound = 0; + + /** + * Counter indicating that the RT expression present in the + * pagedata.test element was properly converted from standard JSP + * syntax to syntax supported by XML. + */ + private short _rtExprFound = 0; + + /** + * Counter indicating that the version attribute of the + * jsp:root element was found. + */ + private short _jspRootVersionFound = 0; + + /** + * Flag to indicate if an element doesn't have a jsp:id attribute. + */ + private boolean _jspIdAttributesFound = true; + + /** + * List to hold names of elements that do not contain jsp:id attributes. + */ + private Map elements = null; + + /** + * Default constructor. + */ + public PageHandler() { + elements = new HashMap(); + } + + /** + * Handles the start elements found in the XML stream by the parser. + * + * @param uri + * - the uri of the namespace + * @param localName + * - the name of the element minus the namespace + * @param qName + * - the name including the namespace + * @param attributes + * - the attributes of this element + * @throws SAXException + * - if an error occurs + */ + public void startElement(String uri, String localName, String qName, + Attributes attributes) throws SAXException { + debug("Values passed to startElement[uri: " + uri + ", localname: " + + localName + ", qname: " + qName + "]"); + + if (qName.trim().equals(JSP_DECL_QN)) { + debug(JSP_DECL_QN + " was found!"); + _declWasFound++; + checkJspIdAttribute(JSP_DECL_QN, attributes); + } else if (qName.trim().equals(JSP_EXPR_QN)) { + debug(JSP_EXPR_QN + " was found!"); + _exprWasFound++; + checkJspIdAttribute(JSP_EXPR_QN, attributes); + } else if (qName.trim().equals(JSP_ROOT_QN)) { + debug(JSP_ROOT_QN + " was found!"); + _jspRootWasFound++; + // extra handling to see if the taglib directive was + // properly handled. + if (hasAttribute("xmlns:jsp", "http://java.sun.com/JSP/Page", + attributes)) { + _jspNameSpaceFound++; + } + if (hasAttribute("xmlns:pagedata", + "http://java.sun.com/tck/jsp/pagedata", attributes)) { + _tagDeclWasFound++; + } + if (hasAttribute("version", "2.0", attributes)) { + _jspRootVersionFound++; + } + checkJspIdAttribute(JSP_ROOT_QN, attributes); + + } else if (qName.equals(TCK_TAG_QN)) { + debug(TCK_TAG_QN + " was found!"); + _tagLibWasFound++; + checkJspIdAttribute(TCK_TAG_QN, attributes); + + // process the attributes to find the one RTExpression + int length = attributes.getLength(); + for (int i = 0; i < length; i++) { + String name = attributes.getLocalName(i).trim(); + debug("pagedata:test attribute name: " + name); + if (name.equals("dynAttribute")) { + String value = attributes.getValue(i).trim(); + debug("pagedata:test attribute '" + name + "' value: " + value); + if (value.startsWith("%=") && (value.endsWith("%"))) { + debug("Converted JSP RT attribute expression was found!"); + _rtExprFound++; + } + } + } + } else if (qName.trim().equals(JSP_SCR_QN)) { + debug(JSP_SCR_QN + " was found!"); + _scrWasFound++; + checkJspIdAttribute(JSP_SCR_QN, attributes); + } else if (qName.trim().equals(JSP_TEXT_QN)) { + debug(JSP_TEXT_QN + " was found!"); + _textWasFound++; + checkJspIdAttribute(JSP_TEXT_QN, attributes); + } else if (qName.trim().equals(JSP_PAGE_QN)) { + // process the attributes to find the one RTExpression + int length = attributes.getLength(); + for (int i = 0; i < length; i++) { + String name = attributes.getLocalName(i).trim(); + debug("jsp:directive.page attribute name: " + name); + if (name.equals("import")) { + debug(JSP_PAGE_QN + " was found!"); + _pageDirectiveFound++; + } + } + checkJspIdAttribute(JSP_PAGE_QN, attributes); + } else if (qName.trim().equals(JSP_INCL_QN)) { + debug(JSP_INCL_QN + " was found! This is a problem..."); + _includeDirectiveFound++; + } + } + + /** + * Checks the instance variables used to count the elements processed and + * based on the values, will return failure messages. + * + * @return null of no errors occurred, othersise an array of + * ValidationMessages noting the failures. + */ + public ValidationMessage[] getParsingResults() { + debug("Processing the results of the parse operation..."); + ValidationMessage[] vMessages = null; + List messageList = new ArrayList(); + if (_scrWasFound == 0) { + messageList.add( + "Unable to find the jsp:scriptlet element in theXML view of the processed JSP page.\n"); + } + if (_scrWasFound > 1) { + messageList.add("Found " + _scrWasFound + + " jsp:scriplet elements in the XML view of the processed JSP page when 1 was expected.\n"); + } + if (_declWasFound == 0) { + messageList.add( + "Unable to find the jsp:declaration element in the XML view of the processed JSP page.\n"); + } + if (_declWasFound > 1) { + messageList.add("Found " + _declWasFound + + " jsp:declaration elements in the XML view of the processed JSP page when 1 was expected.\n"); + } + if (_exprWasFound == 0) { + messageList.add( + "Unable to find the jsp:expression element in the XML view of the JSP page.\n"); + } + if (_exprWasFound > 1) { + messageList.add("Found " + _exprWasFound + + " jsp:scriplet elements in the XML view of the processed JSP page when 1 was expected.\n"); + } + if (_tagLibWasFound == 0) { + messageList.add( + "Unable to find the taglib call pagedata:test element in the XML view of the JSP page.\n"); + } + if (_tagLibWasFound > 1) { + messageList.add("Found " + _tagLibWasFound + + " pagedata:test elements in the XML view of the processed JSP page when 1 was expected.\n"); + } + if (_tagDeclWasFound == 0) { + messageList.add( + "Unable to find the taglib declaration for uri 'http://java.sun.com/tck/jsp/pagedata' in " + + "the XML view of the JSP page.\n"); + } + if (_tagDeclWasFound > 1) { + messageList.add("Found " + _tagDeclWasFound + + " xmlns:pagedata attributes of the jsp:root element in the XML view of the processed JSP page when 1 was expected.\n"); + } + if (_jspRootWasFound == 0) { + messageList.add( + "Unable to find the jsp:root element in the XML view of the JSP page.\n"); + } + if (_jspRootWasFound > 1) { + messageList.add("Found " + _jspRootWasFound + + " jsp:root elements in the XML view of the processed JSP page when 1 was expected.\n"); + } + if (_textWasFound == 0) { + messageList.add( + "Unable to find the jsp:text element in the XML view of the JSP page.\n"); + } + if (_pageDirectiveFound == 0) { + messageList.add( + "Unable to find the jsp:page.directive element in the XML view of the JSP page.\n"); + } + if (_pageDirectiveFound > 1) { + messageList.add("Found " + _pageDirectiveFound + + " jsp:directive.page elements in the XML view of the processed JSP page when 1 was expected.\n"); + } + if (_includeDirectiveFound != 0) { + messageList.add( + "Unexpectedly found a jsp:directive.include element in the XML view of the JSP page.\n"); + } + if (_jspNameSpaceFound == 0) { + messageList.add( + "Unable to find JSP namespace xmlns:jsp with URI of 'http://java.sun.com/JSP/Page'" + + " in the XML view of the JSP page.\n"); + } + if (_jspNameSpaceFound > 1) { + messageList.add("Found " + _jspNameSpaceFound + + " JSP namespace attributes within the jsp:root element in the XML view of the processed JSP page when 1 was expected.\n"); + } + if (_rtExprFound == 0) { + messageList.add( + "Unable to find rt expression attribute in the 'dynAttribute' of pagedata:test tag invocation.\n"); + } + if (_rtExprFound > 1) { + messageList.add("Found " + _rtExprFound + + " rt expressions in the XML view of the JSP page, expected only 1.\n"); + } + if (_jspRootVersionFound == 0) { + messageList.add( + "Unable to find the 'version' attribute with value '2.0' in the jsp:root element.\n"); + } + if (_jspRootVersionFound > 1) { + messageList.add("The jsp:root element contained " + _jspRootVersionFound + + " attributes, where only 1 was expected."); + } + if (!_jspIdAttributesFound) { + messageList + .add("The following elements did not contain a jsp:id attribute: " + + getStringFromMap(elements)); + } + if (messageList.size() != 0) { + List list = new ArrayList(); + for (Iterator i = messageList.iterator(); i.hasNext();) { + list.add(new ValidationMessage(null, (String) i.next())); + } + vMessages = (ValidationMessage[]) list + .toArray(new ValidationMessage[list.size()]); + } + return vMessages; + } + + /** + * Checks that the jsp:id attribute exists in the attribute list of the + * specified element. If it doesn't it adds this element name to a list of + * elements that have a similar issue. + * + * @param elementName + * - name of the element + * @param attributes + * - attribute list + */ + private void checkJspIdAttribute(String elementName, + Attributes attributes) { + if (!hasAttribute("jsp:id", null, attributes)) { + Short sho = (Short) elements.get(elementName); + if (sho == null) { + elements.put(elementName, Short.valueOf((short) 1)); + } else { + short s = sho.shortValue(); + elements.put(elementName, Short.valueOf(++s)); + } + _jspIdAttributesFound = false; + } + } + + /** + * Scans the provided attribute object for the specified attribute name and + * value. If value is null, then only the attribute name is checked. + * + * @param attrName + * - name of the attribute to check for + * @param attrValue + * - the expected value of this attribute + * @param attributes + * - the element attributes + * @return - true if found otherwise false + */ + private boolean hasAttribute(String attrName, String attrValue, + Attributes attributes) { + debug("Scanning for attribute: [ " + attrName + ", " + attrValue + " ]"); + boolean found = false; + int length = attributes.getLength(); + for (int i = 0; i < length; i++) { + String name = attributes.getQName(i).trim(); + String val = attributes.getValue(i).trim(); + debug("Available attribute: [ " + name + ", " + val + " ]"); + if (attrValue == null) { + if (name.equals(attrName)) { + debug("Attribute found!"); + found = true; + } + } else { + if (name.equals(attrName) && val.equals(attrValue)) { + debug("Attribute found!"); + found = true; + } + } + } + return found; + } + + /** + * Returns a string representation of the Map containing elements and the + * occurrence count. + * + * @param map + * - element map + * @return String representation of the map + */ + private String getStringFromMap(Map map) { + StringBuffer sb = new StringBuffer(); + Iterator> itr = map.entrySet().iterator(); + + sb.append("["); + while (itr.hasNext()) { + Map.Entry entry = itr.next(); + sb.append(entry.getKey() + " (" + entry.getValue() + ")"); + + if (itr.hasNext()) { + sb.append(", "); + } + } + + sb.append("]"); + return sb.toString(); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/TagFilePageDataValidator.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/TagFilePageDataValidator.java new file mode 100644 index 00000000..81866acf --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/TagFilePageDataValidator.java @@ -0,0 +1,668 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.pagedata; + +import java.io.BufferedInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.parsers.SAXParser; +import javax.xml.parsers.SAXParserFactory; + +import org.xml.sax.Attributes; +import org.xml.sax.SAXException; +import org.xml.sax.SAXNotRecognizedException; +import org.xml.sax.SAXNotSupportedException; +import org.xml.sax.helpers.DefaultHandler; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.tagext.PageData; +import jakarta.servlet.jsp.tagext.TagLibraryValidator; +import jakarta.servlet.jsp.tagext.ValidationMessage; + +/** + * Validate the PageData object provided to a configured TagLibraryValidator. + */ +public class TagFilePageDataValidator extends TagLibraryValidator { + + /** + * Flag that indicates the TLV has been called by the container. + */ + private static boolean _called = false; + + /** + * SAX parser factory used to get parser instances. + */ + private SAXParserFactory _factory = null; + + /** + * Initializes the parser factory when the TLV is first created. + */ + public TagFilePageDataValidator() { + } + + /** + * Validates the XML view of the JSP page using the provided PageData object. + * + * @param prefix + * - the tag library prefix + * @param uri + * - the tag library URI + * @param page + * - the PageData object. + * @return null if no validation errors occurred, otherwise an non-zero-length + * array of ValidationMessages. + */ + public ValidationMessage[] validate(String prefix, String uri, + PageData page) { + debug("In validate()"); + _called = true; + debug("Set _called to 'true'."); + InputStream input = null; + SAXParser parser; + TagFilePageDataValidator.PageHandler handler = new TagFilePageDataValidator.PageHandler(); + try { + initializeSaxParserFactory(); + parser = _factory.newSAXParser(); + displayXmlView(page.getInputStream()); + input = page.getInputStream(); + parser.parse(input, handler); + } catch (Throwable t) { + return JspTestUtil.getValidationMessage(null, + "Test Setup FAILED: " + t.toString()); + } finally { + if (input != null) { + try { + input.close(); + } catch (IOException e) { + debug("IOException caught when closing steam."); + } + } + } + return handler.getParsingResults(); + } + + /** + * Releases any state associated with this TLV. + */ + public void release() { + _factory = null; + super.release(); + } + + /** + * Returns the TVL invocation status. + * + * @return true if the TLV has been called, otherwise false + */ + public static boolean wasCalled() { + return _called; + } + + /** + * Resets the TLV invocation status. + */ + public static void reset() { + _called = false; + debug("Set _called to 'false'"); + } + + /** + * Initializes the SAXParserFactory. The parser will not perform any + * validation, but will be namespace aware and will provide namespace prefixes + * in the attribute lists of elements. + * + * @throws ParserConfigurationException + * - if the parser could not be configured + * @throws SAXNotRecognizedException + * - if namespace-prefixes is not recognized + * @throws SAXNotSupportedException + * - if namespace-prefixes is not supported + */ + private void initializeSaxParserFactory() throws ParserConfigurationException, + SAXNotRecognizedException, SAXNotSupportedException { + debug( + "Initializing SAXParserFactory [ validating: false, NS aware: true, NS Prefixes: true ]"); + _factory = SAXParserFactory.newInstance(); + _factory.setValidating(false); + _factory.setNamespaceAware(true); + _factory.setFeature("http://xml.org/sax/features/namespace-prefixes", true); + } + + /** + * Displays the XML view of a JSP page as seen by the container. + * + * @param in + * - the InputStream from PageData + */ + private static void displayXmlView(InputStream in) { + if (JspTestUtil.DEBUG) { + InputStream bin = null; + ByteArrayOutputStream out = null; + try { + bin = new BufferedInputStream(in); + out = new ByteArrayOutputStream(); + + for (int i = bin.read(); i != -1; i = bin.read()) { + out.write(i); + } + + debug("*************** XML View of tag file ***************"); + debug(out.toString()); + debug("****************************************************"); + } catch (Throwable t) { + debug("[INFO] Unexpected exception while trying to display XML view " + + "of the tag file."); + } finally { + try { + bin.close(); + out.close(); + } catch (Throwable t) { + debug("[INFO] Unexpected exception closing I/O streams."); + } + } + } + } + + /** + * Utility method to wrap JspTestUtil.debug(). This method will add this + * class' name to the provide message and then delegate to JspTestUtil. + * + * @param message + * - a debug message + */ + private static void debug(String message) { + JspTestUtil.debug("[TagFilePageDataValidator] " + message); + } + + /** + * An extension to the DefaultHandler to process the elements within the XML + * view of a tag file. + */ + private class PageHandler extends DefaultHandler { + // ========= tag file specific elements ============== + /** + * The jsp:directive.tag element. + */ + private static final String JSP_TAG_QN = "jsp:directive.tag"; + + /** + * The jsp:directive.attribute element. + */ + private static final String JSP_ATTRIBUTE_QN = "jsp:directive.attribute"; + + /** + * The jsp:directive.variable element. + */ + private static final String JSP_VARIABLE_QN = "jsp:directive.variable"; + + private short _tagDirectiveFound = 0; + + private short _attributeDirectiveFound = 0; + + private short _variableDirectiveFound = 0; + + // ========= end of tag file specific elements ======== + + /** + * The jsp:root element. + */ + private static final String JSP_ROOT_QN = "jsp:root"; + + /** + * The jsp:scriptlet element. + */ + private static final String JSP_SCR_QN = "jsp:scriptlet"; + + /** + * The jsp:declaration element. + */ + private static final String JSP_DECL_QN = "jsp:declaration"; + + /** + * The jsp:declaration element. + */ + private static final String JSP_EXPR_QN = "jsp:expression"; + + /** + * The jsp:text element. + */ + private static final String JSP_TEXT_QN = "jsp:text"; + + /** + * The pagedatatagfile:test element. + */ + private static final String TCK_TAG_QN = "pagedatatagfile:test"; + + /** + * The jsp:directive.include element. NOTE: this should + * not appear in the XML view of a tag file. + */ + private static final String JSP_INCL_QN = "jsp:directive.include"; + + /** + * Counter indicating that the jsp:scriptlet element was found. + */ + private short _scrWasFound = 0; + + /** + * Counter indicating that the jsp:declaration element was found. + */ + private short _declWasFound = 0; + + /** + * Counter indicating that the jsp:expression element was found. + */ + private short _exprWasFound = 0; + + /** + * Counter indicating that the pagedatatagfile:test element was + * found. + */ + private short _tagLibWasFound = 0; + + /** + * Counter indicating that the taglib declaration as an xmlns attribute of + * the jsp:root element was found. + */ + private short _tagDeclWasFound = 0; + + /** + * Counter indicating that the jsp:root element was found. + */ + private short _jspRootWasFound = 0; + + /** + * Counter indicating that the jsp:text element was found. + */ + private short _textWasFound = 0; + + /** + * Counter indicating that the jsp namespace as an xmlns attribute of the + * jsp:root element was found. + */ + private short _jspNameSpaceFound = 0; + + /** + * Counter indicating that the jsp:directive.include element was + * found. + */ + private short _includeDirectiveFound = 0; + + /** + * Counter indicating that the RT expression present in the + * pagedatatagfile.test element was properly converted from + * standard JSP syntax to syntax supported by XML. + */ + private short _rtExprFound = 0; + + /** + * Counter indicating that the version attribute of the + * jsp:root element was found. + */ + private short _jspRootVersionFound = 0; + + /** + * Flag to indicate if an element doesn't have a jsp:id attribute. + */ + private boolean _jspIdAttributesFound = true; + + /** + * List to hold names of elements that do not contain jsp:id attributes. + */ + private Map elements = null; + + /** + * Default constructor. + */ + public PageHandler() { + elements = new HashMap(); + } + + /** + * Handles the start elements found in the XML stream by the parser. + * + * @param uri + * - the uri of the namespace + * @param localName + * - the name of the element minus the namespace + * @param qName + * - the name including the namespace + * @param attributes + * - the attributes of this element + * @throws SAXException + * - if an error occurs + */ + public void startElement(String uri, String localName, String qName, + Attributes attributes) throws SAXException { + debug("Values passed to startElement[uri: " + uri + ", localname: " + + localName + ", qname: " + qName + "]"); + + if (qName.trim().equals(JSP_DECL_QN)) { + debug(JSP_DECL_QN + " was found!"); + _declWasFound++; + checkJspIdAttribute(JSP_DECL_QN, attributes); + } else if (qName.trim().equals(JSP_EXPR_QN)) { + debug(JSP_EXPR_QN + " was found!"); + _exprWasFound++; + checkJspIdAttribute(JSP_EXPR_QN, attributes); + } else if (qName.trim().equals(JSP_ROOT_QN)) { + debug(JSP_ROOT_QN + " was found!"); + _jspRootWasFound++; + // extra handling to see if the taglib directive was + // properly handled. + if (hasAttribute("xmlns:jsp", "http://java.sun.com/JSP/Page", + attributes)) { + _jspNameSpaceFound++; + } + if (hasAttribute("xmlns:pagedatatagfile", + "http://java.sun.com/tck/jsp/pagedatatagfile", attributes)) { + _tagDeclWasFound++; + } + if (hasAttribute("version", "2.0", attributes)) { + _jspRootVersionFound++; + } + checkJspIdAttribute(JSP_ROOT_QN, attributes); + + } else if (qName.equals(TCK_TAG_QN)) { + debug(TCK_TAG_QN + " was found!"); + _tagLibWasFound++; + checkJspIdAttribute(TCK_TAG_QN, attributes); + + // process the attributes to find the one RTExpression + int length = attributes.getLength(); + for (int i = 0; i < length; i++) { + String name = attributes.getLocalName(i).trim(); + debug("pagedatatagfile:test attribute name: " + name); + if (name.equals("dynAttribute")) { + String value = attributes.getValue(i).trim(); + debug("pagedatatagfile:test attribute '" + name + "' value: " + + value); + if (value.startsWith("%=") && (value.endsWith("%"))) { + debug("Converted JSP RT attribute expression was found!"); + _rtExprFound++; + } + } + } + } else if (qName.trim().equals(JSP_SCR_QN)) { + debug(JSP_SCR_QN + " was found!"); + _scrWasFound++; + checkJspIdAttribute(JSP_SCR_QN, attributes); + } else if (qName.trim().equals(JSP_ATTRIBUTE_QN)) { + debug(JSP_ATTRIBUTE_QN + " was found!"); + _attributeDirectiveFound++; + checkJspIdAttribute(JSP_ATTRIBUTE_QN, attributes); + } else if (qName.trim().equals(JSP_VARIABLE_QN)) { + debug(JSP_VARIABLE_QN + " was found!"); + _variableDirectiveFound++; + checkJspIdAttribute(JSP_VARIABLE_QN, attributes); + } else if (qName.trim().equals(JSP_TEXT_QN)) { + debug(JSP_TEXT_QN + " was found!"); + _textWasFound++; + checkJspIdAttribute(JSP_TEXT_QN, attributes); + } else if (qName.trim().equals(JSP_TAG_QN)) { + // process the attributes to find the one RTExpression + int length = attributes.getLength(); + for (int i = 0; i < length; i++) { + String name = attributes.getLocalName(i).trim(); + debug("jsp:directive.tag attribute name: " + name); + if (name.equals("import")) { + debug(JSP_TAG_QN + " was found!"); + _tagDirectiveFound++; + } + } + checkJspIdAttribute(JSP_TAG_QN, attributes); + } else if (qName.trim().equals(JSP_INCL_QN)) { + debug(JSP_INCL_QN + " was found! This is a problem..."); + _includeDirectiveFound++; + } + } + + /** + * Checks the instance variables used to count the elements processed and + * based on the values, will return failure messages. + * + * @return null of no errors occurred, othersise an array of + * ValidationMessages noting the failures. + */ + public ValidationMessage[] getParsingResults() { + debug("Processing the results of the parse operation..."); + ValidationMessage[] vMessages = null; + List messageList = new ArrayList(); + if (_attributeDirectiveFound == 0) { + messageList.add( + "Unable to find the jsp:directive.attribute element in the XML view of the processed tag file.\n"); + } + if (_attributeDirectiveFound > 1) { + messageList.add("Found " + _attributeDirectiveFound + + " jsp:directive.attribute elements in the XML view of the processed tag file when 1 was expected.\n"); + } + if (_variableDirectiveFound == 0) { + messageList.add( + "Unable to find the jsp:directive.variable element in the XML view of the processed tag file.\n"); + } + if (_variableDirectiveFound > 1) { + messageList.add("Found " + _variableDirectiveFound + + " jsp:directive.variable elements in the XML view of the processed tag file when 1 was expected.\n"); + } + if (_scrWasFound == 0) { + messageList.add( + "Unable to find the jsp:scriptlet element in theXML view of the processed tag file.\n"); + } + if (_scrWasFound > 1) { + messageList.add("Found " + _scrWasFound + + " jsp:scriplet elements in the XML view of the processed tag file when 1 was expected.\n"); + } + if (_declWasFound == 0) { + messageList.add( + "Unable to find the jsp:declaration element in the XML view of the processed tag file.\n"); + } + if (_declWasFound > 1) { + messageList.add("Found " + _declWasFound + + " jsp:declaration elements in the XML view of the processed tag file when 1 was expected.\n"); + } + if (_exprWasFound == 0) { + messageList.add( + "Unable to find the jsp:expression element in the XML view of the tag file.\n"); + } + if (_exprWasFound > 1) { + messageList.add("Found " + _exprWasFound + + " jsp:scriplet elements in the XML view of the processed tag file when 1 was expected.\n"); + } + if (_tagLibWasFound == 0) { + messageList.add( + "Unable to find the taglib call pagedatatagfile:test element in the XML view of the tag file.\n"); + } + if (_tagLibWasFound > 1) { + messageList.add("Found " + _tagLibWasFound + + " pagedatatagfile:test elements in the XML view of the processed tag file when 1 was expected.\n"); + } + if (_tagDeclWasFound == 0) { + messageList.add( + "Unable to find the taglib declaration for uri 'http://java.sun.com/tck/jsp/pagedatatagfile' in " + + "the XML view of the tag file.\n"); + } + if (_tagDeclWasFound > 1) { + messageList.add("Found " + _tagDeclWasFound + + " xmlns:pagedatatagfile attributes of the jsp:root element in the XML view of the processed tag file when 1 was expected.\n"); + } + if (_jspRootWasFound == 0) { + messageList.add( + "Unable to find the jsp:root element in the XML view of the tag file.\n"); + } + if (_jspRootWasFound > 1) { + messageList.add("Found " + _jspRootWasFound + + " jsp:root elements in the XML view of the processed tag file when 1 was expected.\n"); + } + if (_textWasFound == 0) { + messageList.add( + "Unable to find the jsp:text element in the XML view of the tag file.\n"); + } + if (_tagDirectiveFound == 0) { + messageList.add( + "Unable to find the jsp:directive.tag element in the XML view of the tag file.\n"); + } + if (_tagDirectiveFound > 1) { + messageList.add("Found " + _tagDirectiveFound + + " jsp:directive.tag elements in the XML view of the processed tag file when 1 was expected.\n"); + } + if (_includeDirectiveFound != 0) { + messageList.add( + "Unexpectedly found a jsp:directive.include element in the XML view of the tag file.\n"); + } + if (_jspNameSpaceFound == 0) { + messageList.add( + "Unable to find JSP namespace xmlns:jsp with URI of 'http://java.sun.com/JSP/Page'" + + " in the XML view of the tag file.\n"); + } + if (_jspNameSpaceFound > 1) { + messageList.add("Found " + _jspNameSpaceFound + + " JSP namespace attributes within the jsp:root element in the XML view of the processed tag file when 1 was expected.\n"); + } + if (_rtExprFound == 0) { + messageList.add( + "Unable to find rt expression attribute in the 'dynAttribute' of pagedatatagfile:test tag invocation.\n"); + } + if (_rtExprFound > 1) { + messageList.add("Found " + _rtExprFound + + " rt expressions in the XML view of the tag file, expected only 1.\n"); + } + if (_jspRootVersionFound == 0) { + messageList.add( + "Unable to find the 'version' attribute with value '2.0' in the jsp:root element.\n"); + } + if (_jspRootVersionFound > 1) { + messageList.add("The jsp:root element contained " + _jspRootVersionFound + + " attributes, where only 1 was expected."); + } + if (!_jspIdAttributesFound) { + messageList + .add("The following elements did not contain a jsp:id attribute: " + + getStringFromMap(elements)); + } + + if (messageList.size() != 0) { + List list = new ArrayList(); + for (Iterator i = messageList.iterator(); i.hasNext();) { + list.add(new ValidationMessage(null, i.next())); + } + vMessages = (ValidationMessage[]) list + .toArray(new ValidationMessage[list.size()]); + } + return vMessages; + } + + /** + * Checks that the jsp:id attribute exists in the attribute list of the + * specified element. If it doesn't it adds this element name to a list of + * elements that have a similar issue. + * + * @param elementName + * - name of the element + * @param attributes + * - attribute list + */ + private void checkJspIdAttribute(String elementName, + Attributes attributes) { + if (!hasAttribute("jsp:id", null, attributes)) { + Short sho = (Short) elements.get(elementName); + if (sho == null) { + elements.put(elementName, Short.valueOf((short) 1)); + } else { + short s = sho.shortValue(); + elements.put(elementName, Short.valueOf(++s)); + } + _jspIdAttributesFound = false; + } + } + + /** + * Scans the provided attribute object for the specified attribute name and + * value. If value is null, then only the attribute name is checked. + * + * @param attrName + * - name of the attribute to check for + * @param attrValue + * - the expected value of this attribute + * @param attributes + * - the element attributes + * @return - true if found otherwise false + */ + private boolean hasAttribute(String attrName, String attrValue, + Attributes attributes) { + debug("Scanning for attribute: [ " + attrName + ", " + attrValue + " ]"); + boolean found = false; + int length = attributes.getLength(); + for (int i = 0; i < length; i++) { + String name = attributes.getQName(i).trim(); + String val = attributes.getValue(i).trim(); + debug("Available attribute: [ " + name + ", " + val + " ]"); + if (attrValue == null) { + if (name.equals(attrName)) { + debug("Attribute found!"); + found = true; + } + } else { + if (name.equals(attrName) && val.equals(attrValue)) { + debug("Attribute found!"); + found = true; + } + } + } + return found; + } + + /** + * Returns a string representation of the Map containing elements and the + * occurence count. + * + * @param map + * - element map + * @return String representation of the map + */ + private String getStringFromMap(Map map) { + Iterator> es = map.entrySet().iterator(); + StringBuffer sb = new StringBuffer(); + + sb.append("["); + + while (es.hasNext()) { + Map.Entry entry = es.next(); + sb.append(entry.getKey() + " (" + entry.getValue() + ")"); + + if (es.hasNext()) { + sb.append(", "); + } + } + + sb.append("]"); + return sb.toString(); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/URLClientIT.java new file mode 100644 index 00000000..9c64bb62 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/URLClientIT.java @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.pagedata; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.common.tags.tck.SimpleTag; + +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + +/** + * Test client for TagAttributeInfo. Implementation note, all tests are + * performed within a TagExtraInfo class. If the test fails, a translation error + * will be generated and a ValidationMessage array will be returned. + */ + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public URLClientIT() throws Exception { + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_pagedata_web.war"); + archive.addClasses(PageDataValidator.class, TagFilePageDataValidator.class, + JspTestUtil.class, + SimpleTag.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_pagedata_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/pagedata.tld", "pagedata.tld"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/pagedatatagfile.tld", "pagedatatagfile.tld"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/pageDataTagFileTest.tag", "tags/pageDataTagFileTest.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/template.txt", "tags/template.txt"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/PageDataTagFileTest.jsp")), "PageDataTagFileTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/PageDataTest.jsp")), "PageDataTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/template.txt")), "template.txt"); + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: pageDataTest + * + * @assertion_ids: JSP:JAVADOC:313 + * + * @test_Strategy: Validate the following: - We can get an inputstream from + * the PageData object provided to the validation method of the + * TagLibraryValidator. - Validate the XML view of a JSP page: - page + * directives are jsp:directive.page elements - taglib directives are includes + * in the namespace declaration in the jsp:root element - include directives + * are not present in the XML view - template text is wrapped by jsp:text + * elements - scriptlets are wrapped by jsp:scriptlet elements - declarations + * are wrapped by jsp:declaration elements - JSP expressions are wrapped by + * jsp:expression elements - rt expressions are converted from '<%=' '%>' to + * '%=' '%' - Custom taglib usages are passed through - the jsp:root element + * is present - the jsp namespace is present in the jsp:root element. + */ + @Test + public void pageDataTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_pagedata_web/PageDataTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + TEST_PROPS.setProperty(SEARCH_STRING, + "Validator Called|Expression Text|Included template text"); + invoke(); + } + + /* + * @testName: pageDataTagFileTest + * + * @assertion_ids: JSP:JAVADOC:313 + * + * @test_Strategy: same as above. + */ + @Test + public void pageDataTagFileTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_pagedata_web/PageDataTagFileTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + TEST_PROPS.setProperty(SEARCH_STRING, + "Validator Called|Expression Text in tag file|Included template text in tag file"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/CheckInstanceSimpleTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/CheckInstanceSimpleTag.java new file mode 100644 index 00000000..9f829e0d --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/CheckInstanceSimpleTag.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspContext; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.PageContext; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class CheckInstanceSimpleTag extends SimpleTagSupport { + public CheckInstanceSimpleTag() { + super(); + } + + public void doTag() throws JspException, IOException { + JspTestUtil.debug("[CheckInstanceSimpleTag] in doTag()"); + JspContext ctx = this.getJspContext(); + JspWriter out = ctx.getOut(); + + Object obj = ctx.getAttribute("handlers", PageContext.REQUEST_SCOPE); + List handlers = null; + if (obj == null) { + handlers = new ArrayList(); + ctx.setAttribute("handlers", handlers, PageContext.REQUEST_SCOPE); + } else { + handlers = (List) obj; + } + int numHandlers = handlers.size(); + out.println("Comparing with prior " + numHandlers + + " instances of CheckInstanceSimpleTag"); + for (int i = 0; i < numHandlers; i++) { + Object o = handlers.get(i); + if (this == o) { + throw new JspException( + "Test FAILED. The same instance of CheckInstanceSimpleTag is used in this invocation: " + + this); + } + } + handlers.add(this); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/ClassicJspFragmentGetJspContext.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/ClassicJspFragmentGetJspContext.java new file mode 100644 index 00000000..2e6ea985 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/ClassicJspFragmentGetJspContext.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspContext; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.JspFragment; +import jakarta.servlet.jsp.tagext.TagSupport; + +public class ClassicJspFragmentGetJspContext extends TagSupport { + + /** + * JspFragment instance. + */ + Object _fragment = null; + + /** + * Sets _fragment. This should be an instance of JspFragment. + * + * @param o + * - a JspFragment instance + */ + public void setFragment(Object o) { + _fragment = o; + } + + public int doStartTag() throws JspException { + JspWriter out = pageContext.getOut(); + try { + if (_fragment != null) { + if (_fragment instanceof JspFragment) { + JspContext ctx = ((JspFragment) _fragment).getJspContext(); + if (ctx == null) { + out.println( + "Test FAILED in classic tag. jspFragment.getJspContext() returned null."); + } else { + ctx.getOut().println("Test PASSED in classic tag."); + } + } else { + out.println( + "Test FAILED in classic tag. fragment is not of type JspFragment."); + } + } else { + out.println("Test FAILED in classic tag. fragment attribute is null."); + } + } catch (IOException ioex) { + throw new JspException("Unexpected IOException", ioex); + } + return SKIP_BODY; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/ClassicParent.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/ClassicParent.java new file mode 100644 index 00000000..6cc01826 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/ClassicParent.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)ClassicParent.java 1.1 10/31/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.tagext.TagSupport; + +/** + * A simple tag to help verify nested tag behavior. + */ +public class ClassicParent extends TagSupport { + + /** + * The nested level. + */ + private String _level = null; + + /** + * Default constructor. + */ + public ClassicParent() { + super(); + } + + /** + * Sets the nesting level. + * + * @param level + * - the nesting level + */ + public void setLevel(String level) { + _level = level; + } + + /** + * Gets the nesting level of this tag. + * + * @return the defined nesting level + */ + public String getLevel() { + return _level; + } + + /** + * Returns EVAL_BODY_INCLUDE. + * + * @return Tag.EVAL_BODY_INCLUDE + */ + public int doStartTag() { + JspTestUtil.debug("[ClassicParent] in doStartTag()"); + return EVAL_BODY_INCLUDE; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/ClassicSkipPage.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/ClassicSkipPage.java new file mode 100644 index 00000000..f1b03963 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/ClassicSkipPage.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)ClassicSkipPage.java 1.1 10/31/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.TagSupport; + +public class ClassicSkipPage extends TagSupport { + + /** + * Default Constructor. + */ + public ClassicSkipPage() { + super(); + } + + /** + * Called by container to perform any at-end tag processing. + * + * @return Tag.SKIP_PAGE + * @throws JspException + * - not thrown by this test + */ + public int doEndTag() throws JspException { + JspTestUtil.debug("[ClassicSkipPage] in doEndTag()"); + return SKIP_PAGE; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/DefaultSimpleTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/DefaultSimpleTag.java new file mode 100644 index 00000000..5cde38ef --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/DefaultSimpleTag.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)DefaultSimpleTag.java 1.1 10/31/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport; + +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +/** + * This will validate that the default behavior of SimpleTagSupport is to do + * nothing. This will be validated by having the SimpleTag surround another tag + * instance. If the default behavior is correct, the nested tag will not be + * invoked. + */ +public class DefaultSimpleTag extends SimpleTagSupport { + + /** + * Default constructor. + */ + public DefaultSimpleTag() { + super(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/FailingTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/FailingTag.java new file mode 100644 index 00000000..fcac7006 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/FailingTag.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)FailingTag.java 1.1 10/31/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.TagSupport; + +public class FailingTag extends TagSupport { + + /** + * Default constructor. + */ + public FailingTag() { + super(); + } + + /** + * This method shouldn't be invoked. + * + * @return Tag.SKIP_BODY + * @throws JspException + * - if an unexpected error occurs + */ + public int doEndTag() throws JspException { + JspTestUtil.debug("[FailingTag] in doEndTag()"); + try { + pageContext.getOut().println("Test FAILED. Default behavior of " + + "SimpleTagSupport.doTag() is to do nothing. This handler should" + + " not have been invoked."); + } catch (IOException ioe) { + throw new JspException("Test FAILED. Unexpected IOException thrown.", + ioe); + } + return SKIP_BODY; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleAncestor.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleAncestor.java new file mode 100644 index 00000000..6b2fcc58 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleAncestor.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)SimpleAncestor.java 1.1 10/31/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.JspTag; +import jakarta.servlet.jsp.tagext.SimpleTag; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class SimpleAncestor extends SimpleTagSupport { + + /** + * Default constructor. + */ + public SimpleAncestor() { + super(); + } + + /** + * Validates the behavior of getAncestorWithClass(). + * + * @throws JspException + * - not thrown by this test + * @throws IOException + * - not thrown by this test + */ + public void doTag() throws JspException, IOException { + JspTestUtil.debug("[SimpleAncestor] in doTag()"); + JspTag tag = SimpleTagSupport.findAncestorWithClass(this, SimpleTag.class); + if (tag != null) { + String lvl = ((SimpleParentTag) tag).getLevel(); + if ("nested3".equals(lvl)) { + JspTag tag2 = SimpleTagSupport.findAncestorWithClass(this, + ClassicParent.class); + if (tag2 != null) { + String lvl2 = ((ClassicParent) tag2).getLevel(); + if ("nested2".equals(lvl2)) { + this.getJspContext().getOut().println("Test PASSED"); + } else { + this.getJspContext().getOut() + .println("Test FAILED. The appropriate" + + "ancestor type was returned, but the actual instance returned was" + + "incorrect. The attribute 'level' for the expected instance was " + + "'nested2', received: " + lvl2); + } + } else { + this.getJspContext().getOut().println("Test FAILED. Unabled to find" + + " ancestor with class 'ee.jakarta.tck.pages.api.jakarta_servlet" + + ".jsp.tagext.simpletagsupport.ClassicParent'."); + } + } else { + this.getJspContext().getOut().println("Test FAILED. The appropriate" + + "ancestor type was returned, but the actual instance returned was" + + "incorrect. The attribute 'level' for the expected instance was " + + "'nested3', received: " + lvl); + } + } else { + this.getJspContext().getOut().println("Test FAILED. Unable to find" + + " ancestor with class 'jakarta.servlet.jsp.tagext.SimpleTag',"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleEmptyBody.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleEmptyBody.java new file mode 100644 index 00000000..e4a52fa7 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleEmptyBody.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.JspFragment; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class SimpleEmptyBody extends SimpleTagSupport { + private boolean called; + + public SimpleEmptyBody() { + super(); + } + + public void setJspBody(JspFragment jspBody) { + this.called = true; + super.setJspBody(jspBody); + } + + public void doTag() throws JspException, IOException { + JspTestUtil.debug("[SimpleEmptyBody] in doTag()"); + this.getJspBody(); + JspWriter out = this.getJspContext().getOut(); + + if (called) { + out.println( + "Test FAILED. setJspBody() unexpectedly called for empty body"); + } else { + out.println("Test PASSED. setJspBody() not called"); + } + this.called = false; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleGetSetJspBody.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleGetSetJspBody.java new file mode 100644 index 00000000..3c966922 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleGetSetJspBody.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)SimpleGetSetJspBody.java 1.1 10/31/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.JspFragment; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class SimpleGetSetJspBody extends SimpleTagSupport { + + /** + * Default constructor. + */ + public SimpleGetSetJspBody() { + super(); + } + + /** + * Validate that getJspBody() returns a non null value. This indirectly + * ensures that the container properly called setJspBody(). + * + * @throws JspException + * - if an unexpected error occurs + * @throws IOException + * - if an unexpected I/O error occurs + */ + public void doTag() throws JspException, IOException { + JspTestUtil.debug("[SimpleGetSetJspBody] in doGet()"); + JspFragment fragment = this.getJspBody(); + if (fragment != null) { + this.getJspContext().getOut().println("Test PASSED"); + } else { + this.getJspContext().getOut().println( + "Test FAILED. JspContext.getJspBody()" + " returned a null value."); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleGetSetJspContext.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleGetSetJspContext.java new file mode 100644 index 00000000..cc09d1fb --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleGetSetJspContext.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)SimpleGetSetJspContext.java 1.1 10/31/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspContext; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class SimpleGetSetJspContext extends SimpleTagSupport { + + /** + * Default constructor. + */ + public SimpleGetSetJspContext() { + super(); + } + + /** + * Validates that getJspContext() returns a non null value. This indirectly + * ensures that the container properly called setJspContext(). + * + * @throws JspException + * - if an unexpected error occured. + * @throws IOException + * - if an unexpected I/O error occured. + */ + public void doTag() throws JspException, IOException { + JspTestUtil.debug("[SimpleGetSetJspcontext] in doTag()"); + JspContext ctx = this.getJspContext(); + + if (ctx != null) { + ctx.getOut().println("Test PASSED"); + } else { + throw new JspException( + "Test FAILED. PageContext.getJspContext()" + "returned null."); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleGetSetParent.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleGetSetParent.java new file mode 100644 index 00000000..35939ceb --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleGetSetParent.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)SimpleGetSetParent.java 1.1 10/31/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.JspTag; +import jakarta.servlet.jsp.tagext.SimpleTag; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class SimpleGetSetParent extends SimpleTagSupport { + + /** + * Default constructor. + */ + public SimpleGetSetParent() { + super(); + } + + /** + * Validates that getParent() returns the expected result. This indirectly + * ensures that the container called setParent(). + * + * @throws JspException + * @throws IOException + */ + public void doTag() throws JspException, IOException { + JspTestUtil.debug("[SimpleGetSetParent] in doTag()"); + JspTag tag = this.getParent(); + if (tag != null) { + if (tag instanceof SimpleTag) { + this.getJspContext().getOut().println("Test PASSED"); + } else { + this.getJspContext().getOut().println("Test FAILED. SimpleTagSupport" + + ".getParent() returned a non-null value, but was not an instance " + + "of the expected parent class. Recieved: " + + tag.getClass().getName()); + } + } else { + this.getJspContext().getOut().println( + "Test FAILED. SimpleTagSupport" + ".getParent() returned null."); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleJspFragmentGetJspContext.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleJspFragmentGetJspContext.java new file mode 100644 index 00000000..26c0c861 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleJspFragmentGetJspContext.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspContext; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.JspFragment; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class SimpleJspFragmentGetJspContext extends SimpleTagSupport { + public SimpleJspFragmentGetJspContext() { + super(); + } + + public void doTag() throws JspException, IOException { + JspTestUtil.debug("[SimpleJspFragmentGetJspContext] in doTag()"); + JspFragment aBody = getJspBody(); + JspContext ctx = aBody.getJspContext(); + if (ctx == null) { + this.getJspContext().getOut().println( + "Test FAILED in simple tag. jspFragment.getJspContext() returned null."); + } else { + ctx.getOut().println("Test PASSED in simple tag."); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleNoParent.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleNoParent.java new file mode 100644 index 00000000..4de28102 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleNoParent.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.JspTag; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class SimpleNoParent extends SimpleTagSupport { + private boolean called; + + public SimpleNoParent() { + super(); + } + + public void setParent(JspTag parent) { + this.called = true; + super.setParent(parent); + } + + public void doTag() throws JspException, IOException { + JspTestUtil.debug("[SimpleNoParent] in doTag()"); + if (this.called) { + this.getJspContext().getOut() + .println("Test FAILED. setParent() is unexpectedly called."); + } else { + this.getJspContext().getOut() + .println("Test PASSED. setParent() is not called."); + } + this.called = false; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleParentTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleParentTag.java new file mode 100644 index 00000000..db9750bd --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleParentTag.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)SimpleParentTag.java 1.2 11/07/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +/** + * SimpleTag to do nothing more than invoke its body. + */ +public class SimpleParentTag extends SimpleTagSupport { + + /** + * Nesting level + */ + private String _level = null; + + /** + * Default constructor + */ + public SimpleParentTag() { + super(); + } + + /** + * Returns the level set for this tag. + * + * @return the nesting level defined by the tag + */ + public String getLevel() { + return _level; + } + + /** + * Sets the level for this tag. + * + * @param level + * - the nesting level of the tag + */ + public void setLevel(String level) { + _level = level; + } + + /** + * Does nothing more than invokes the body. + * + * @throws jakarta.servlet.jsp.JspException + * Subclasses can throw JspException to indicate an error occurred + * while processing this tag. + * @throws jakarta.servlet.jsp.SkipPageException + * If the page that (either directly or indirectly) invoked this tag + * is to cease evaluation. A Simple Tag Handler generated from a tag + * file must throw this exception if an invoked Classic Tag Handler + * returned SKIP_PAGE or if an invoked Simple Tag Handler threw + * SkipPageException or if an invoked Jsp Fragment threw a + * SkipPageException. + * @throws java.io.IOException + * Subclasses can throw IOException if there was an error writing to + * the output stream + */ + public void doTag() throws JspException, IOException { + this.getJspBody().invoke(this.getJspContext().getOut()); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleSkipPage.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleSkipPage.java new file mode 100644 index 00000000..ba019626 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleSkipPage.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)SimpleSkipPage.java 1.1 10/31/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.SkipPageException; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class SimpleSkipPage extends SimpleTagSupport { + + /** + * Default Constructor. + */ + public SimpleSkipPage() { + super(); + } + + public void doTag() throws JspException, IOException { + JspTestUtil.debug("[SimpleSkipPage] in doTag()"); + throw new SkipPageException("Test PASSED"); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleSyncTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleSyncTag.java new file mode 100644 index 00000000..c30871c2 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleSyncTag.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)SimpleSyncTag.java 1.1 11/06/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspContext; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +/** + * SimpleTag instance to validate variable synchronization with SimpleTag's + * declared in the TLD. + */ +public class SimpleSyncTag extends SimpleTagSupport { + + /** + * Default constructor. + */ + public SimpleSyncTag() { + super(); + } + + /** + * Export PageContext variables to be synced with TEI declared variables. + * + * @throws JspException + * if an error occurs + * @throws IOException + * if an I/O error occurs + */ + public void doTag() throws JspException, IOException { + JspContext context = this.getJspContext(); + Integer begin = (Integer) context.getAttribute("begin"); + Integer end = (Integer) context.getAttribute("end"); + if (begin == null) { + context.setAttribute("begin", Integer.valueOf(1)); + } else { + context.setAttribute("begin", Integer.valueOf(begin.intValue() + 1)); + } + if (end == null) { + context.setAttribute("end", Integer.valueOf(2)); + } else { + context.setAttribute("end", Integer.valueOf(end.intValue() + 1)); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SyncTEI.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SyncTEI.java new file mode 100644 index 00000000..f41aa2f0 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SyncTEI.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)SyncTEI.java 1.1 11/06/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.tagext.TagData; +import jakarta.servlet.jsp.tagext.TagExtraInfo; +import jakarta.servlet.jsp.tagext.VariableInfo; + +/** + * Simple TEI to export AT_BEGIN and AT_END variables. + */ +public class SyncTEI extends TagExtraInfo { + + /** + * Default constructor. + */ + public SyncTEI() { + super(); + } + + /** + * Exports 'begin' with scope of AT_BEGIN, and 'end' with scope of AT_END. + * + * @param data + * - TagData instance + * @return an array of VariableInfos + */ + public VariableInfo[] getVariableInfo(TagData data) { + JspTestUtil.debug("[SyncTEI] in getVariableInfo()"); + return new VariableInfo[] { + new VariableInfo("begin", "java.lang.Integer", true, + VariableInfo.AT_BEGIN), + new VariableInfo("end", "java.lang.Integer", true, + VariableInfo.AT_END) }; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/URLClientIT.java new file mode 100644 index 00000000..8c6e7697 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/URLClientIT.java @@ -0,0 +1,307 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.2 10/09/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.common.tags.tck.SetTag; +import com.sun.ts.tests.common.el.api.expression.ExpressionTest; + +/** + * Test client for the default behavior of SimpleTagSupport. + */ +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_tagadapter_web"); + setTestJsp("TagAdapterTest"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_simtagsupport_web.war"); + archive.addClasses(CheckInstanceSimpleTag.class, + ClassicJspFragmentGetJspContext.class, + ClassicParent.class, + ClassicSkipPage.class, + DefaultSimpleTag.class, + FailingTag.class, + SimpleAncestor.class, + SimpleEmptyBody.class, + SimpleGetSetJspBody.class, + SimpleGetSetJspContext.class, + SimpleGetSetParent.class, + SimpleJspFragmentGetJspContext.class, + SimpleNoParent.class, + SimpleParentTag.class, + SimpleSkipPage.class, + SimpleSyncTag.class, + SyncTEI.class, + JspTestUtil.class, + SetTag.class, + ExpressionTest.class); + + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_simtagsupport_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/simpletagsupport/ClassicSkipPageTag.tag", "tags/simpletagsupport/ClassicSkipPageTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/simpletagsupport/SimpleSkipPageTag.tag", "tags/simpletagsupport/SimpleSkipPageTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/simpletagsupport/Sync.tag", "tags/simpletagsupport/Sync.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/simpletagsupport.tld", "simpletagsupport.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/emptySetJspBodyTest.jsp")), "emptySetJspBodyTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/jspFragmentGetJspContextTest.jsp")), "jspFragmentGetJspContextTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/noParentTest.jsp")), "noParentTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/SimpleTagSupportDoTagDefault.jsp")), "SimpleTagSupportDoTagDefault.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/SimpleTagSupportFindAncestorTest.jsp")), "SimpleTagSupportFindAncestorTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/SimpleTagSupportJspBodyTest.jsp")), "SimpleTagSupportJspBodyTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/SimpleTagSupportJspContextTest.jsp")), "SimpleTagSupportJspContextTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/SimpleTagSupportParentTest.jsp")), "SimpleTagSupportParentTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/SimpleTagSupportSkipPageClassicTest.jsp")), "SimpleTagSupportSkipPageClassicTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/SimpleTagSupportSkipPageSimpleTest.jsp")), "SimpleTagSupportSkipPageSimpleTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/SimpleTagSupportVariableSynchronizationTest.jsp")), "SimpleTagSupportVariableSynchronizationTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/tagHandlerCacheTest.jsp")), "tagHandlerCacheTest.jsp"); + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: simpleTagSupportDoTagDefaultTest + * + * @assertion_ids: JSP:JAVADOC:301;JSP:JAVADOC:356 + * + * @test_Strategy: This validates that the default behavior of + * SimpleTagSupport.doTag() does nothing. If this is indeed the case, no + * output will be displayed by the tag nested within the SimpleTagSupport + * instance. + */ + @Test + public void simpleTagSupportDoTagDefaultTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_simtagsupport_web/SimpleTagSupportDoTagDefault.jsp HTTP/1.1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: simpleTagSupportSkipPageExceptionTest + * + * @assertion_ids: JSP:JAVADOC:304;JSP:JAVADOC:359 + * + * @test_Strategy: Validate the containers behavior with regards to: - Simple + * Tag Handler generated from a tag file throws a SkipPageException if an + * invoked Classic Tag Handler returns SKIP_PAGE. - Simple Tag Handler + * generated from a tag file throws a SkipPageException if an invoked Simple + * Tag Handler throws a SkipPageException. + */ + @Test + public void simpleTagSupportSkipPageExceptionTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_simtagsupport_web/SimpleTagSupportSkipPageClassicTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_simtagsupport_web/SimpleTagSupportSkipPageSimpleTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: simpleTagSupportGetSetJspContextTest + * + * @assertion_ids: JSP:JAVADOC:307;JSP:JAVADOC:308;JSP:JAVADOC:362 + * + * @test_Strategy: Validate that getJspContext() returnes a non-null value as + * the container called setJspContext() prior to invoking doGet(). + */ + @Test + public void simpleTagSupportGetSetJspContextTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_simtagsupport_web/SimpleTagSupportJspContextTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: simpleTagSupportGetSetJspBodyTest + * + * @assertion_ids: JSP:JAVADOC:309;JSP:JAVADOC:310;JSP:JAVADOC:363 + * + * @test_Strategy: Validate that getJspBody() returnes a non-null value as the + * container called setJspBody() prior to invoking doGet(). + */ + @Test + public void simpleTagSupportGetSetJspBodyTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_simtagsupport_web/SimpleTagSupportJspBodyTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: simpleTagSupportGetSetParentTest + * + * @assertion_ids: JSP:JAVADOC:305;JSP:JAVADOC:306;JSP:JAVADOC:360; + * JSP:JAVADOC:361 + * + * @test_Strategy: Validate that getParent() returnes a non-null value as the + * container called setParent() prior to invoking doGet(). + */ + @Test + public void simpleTagSupportGetSetParentTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_simtagsupport_web/SimpleTagSupportParentTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: simpleTagSupportFindAncestorTest + * + * @assertion_ids: JSP:JAVADOC:311 + * + * @test_Strategy: Validate that findAncestorWithClass() where the validation + * is preformed nested within a SimpleTag handler as well as a Classic Tag + * handler. + */ + @Test + public void simpleTagSupportFindAncestorTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_simtagsupport_web/SimpleTagSupportFindAncestorTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: simpleTagSupportVariableSynchronizationTest + * + * @assertion_ids: JSP:JAVADOC:400 + * + * @testStrategy: Validate variable synchronization for AT_END and and + * AT_BEGIN variables occurs after doTag() has been called. This should occur + * for SimpleTags declared as Tags in the TLD using either TEI or through + * variable elements, or for Tag files. + */ + @Test + public void simpleTagSupportVariableSynchronizationTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_simtagsupport_web/SimpleTagSupportVariableSynchronizationTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: tagHandlerCacheTest + * + * @assertion_ids: JSP:JAVADOC:300 + * + * @test_Strategy: compare instances of a simple tag handler class across + * different invocations. + */ + @Test + public void tagHandlerCacheTest() throws Exception { + String testName = "tagHandlerCacheTest"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_simtagsupport_web/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: emptySetJspBodyTest + * + * @assertion_ids: JSP:JAVADOC:300 + * + * @test_Strategy: If the action element is empty in the page, setJpsBody + * method is not called at all. + */ + @Test + public void emptySetJspBodyTest() throws Exception { + String testName = "emptySetJspBodyTest"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_simtagsupport_web/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: noParentTest + * + * @assertion_ids: JSP:JAVADOC:300 + * + * @test_Strategy: The container invokes setParent() method only if this tag + * invocation is nested within another tag invocation. + */ + @Test + public void noParentTest() throws Exception { + String testName = "noParentTest"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_simtagsupport_web/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: jspFragmentGetJspContextTest + * + * @assertion_ids: JSP:JAVADOC:300 + * + * @test_Strategy: jspFragment.getJspContext() returns the JspContext that is + * bound to this JspFragment. + */ + @Test + public void jspFragmentGetJspContextTest() throws Exception { + String testName = "jspFragmentGetJspContextTest"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_simtagsupport_web/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + TEST_PROPS.setProperty(SEARCH_STRING, + "Test PASSED in simple tag.|Test PASSED in classic tag."); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/TASimpleTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/TASimpleTag.java new file mode 100644 index 00000000..67e6fde3 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/TASimpleTag.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)TASimpleTag.java 1.2 11/07/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagadapter; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +/** + * SimpleTag instance to validate the that this SimpleTag is passed to the + * nested Classic tag wrapped with by a TagAdapter. + */ +public class TASimpleTag extends SimpleTagSupport { + + /** + * Default Constructor. + */ + public TASimpleTag() { + super(); + } + + /** + * Invokes the JspFragment, in this case, a nested Classic Tag. + * + * @throws JspException + * - if an unexpected error occurs + * @throws IOException + * - if an I/O error occurs + */ + public void doTag() throws JspException, IOException { + this.getJspBody().invoke(this.getJspContext().getOut()); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/TagAdapterVerifierTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/TagAdapterVerifierTag.java new file mode 100644 index 00000000..8606bca5 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/TagAdapterVerifierTag.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)TagAdapterVerifierTag.java 1.1 10/31/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagadapter; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.SimpleTag; +import jakarta.servlet.jsp.tagext.Tag; +import jakarta.servlet.jsp.tagext.TagAdapter; +import jakarta.servlet.jsp.tagext.TagSupport; + +/** + * Simple tag to verify adpated SimpleTag instance is provided though a call to + * Tag.getParent(). + */ +public class TagAdapterVerifierTag extends TagSupport { + + /** + * Default Constructor + */ + public TagAdapterVerifierTag() { + super(); + JspTestUtil.debug("[TagAdapterVerifierTag] new instance"); + } + + /** + * Validates that the parent of this Classic tag handler is an instance of + * SimpleTag adapted with a TagAdapter. + * + * @return Tag.EVAL_PAGE + * @throws JspException + * if an unexpected error occurs. + */ + public int doEndTag() throws JspException { + JspTestUtil.debug("[TagAdapterVerifierTag] in doEndTag()"); + Tag tag = this.getParent(); + try { + if (tag != null) { + if (tag instanceof TagAdapter) { + SimpleTag simpleTag = (SimpleTag) ((TagAdapter) tag).getAdaptee(); + if (simpleTag != null) { + pageContext.getOut().println("Test PASSED."); + } else { + pageContext.getOut().println("Test FAILED. Received a null" + + " value from TagAdapter.getAdaptee()"); + } + } else { + pageContext.getOut().println("Test FAILED. Tag.getParent() didn't" + + " returned the TagAdapter instance that was expected."); + } + } else { + pageContext.getOut().println( + "Test FAILED. Received a null value " + "from Tag.getParent()"); + } + } catch (IOException ioe) { + throw new JspException("[TagAdapterVeriferTag] Unexpected IOException.", + ioe); + } + JspTestUtil.debug("[TagAdapterVerifierTag] leaving doEndTag()"); + return EVAL_PAGE; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/URLClientIT.java new file mode 100644 index 00000000..66aadf66 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/URLClientIT.java @@ -0,0 +1,202 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.2 10/09/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagadapter; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +/** + * Test client for TagAdapter. There isn't much that can be done to really test + * the runtime functionality of TagAdapter as the container will provide the + * code to cause the wrapping to occur. This set of tests will perform basic API + * tests to make sure that methods that should not be called by the container + * throw an UnsupportedOperationException. The last test will make sure that a + * tag nested within a SimpleTag will be passed an instance of the TagAdapter. + */ +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_tagadapter_web"); + setTestJsp("TagAdapterTest"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_tagadapter_web.war"); + archive.addClasses(TagAdapterVerifierTag.class, + TASimpleTag.class, + JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_tagadapter_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tagadapter.tld", "tagadapter.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TagAdapterValidationTest.jsp")), "TagAdapterValidationTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TagAdapterTest.jsp")), "TagAdapterTest.jsp"); + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: tagAdapterCtorTest + * + * @assertion_ids: JSP:JAVADOC:285 + * + * @test_Strategy: Validates the constructor of the TagAdapter class. + */ + @Test + public void tagAdapterCtorTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "tagAdapterCtorTest"); + invoke(); + } + + /* + * @testName: tagAdapterSetPageContextTest + * + * @assertion_ids: JSP:JAVADOC:287 + * + * @test_Strategy: Validates that an UnsupportedOperationException is thrown + * if a call to TagAdapter.setPageContext() is made. + */ + @Test + public void tagAdapterSetPageContextTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "tagAdapterSetPageContextTest"); + invoke(); + } + + /* + * @testName: tagAdapterSetParentTest + * + * @assertion_ids: JSP:JAVADOC:289 + * + * @test_Strategy: Validates that an UnsupportedOperationException is thrown + * if a call to TagAdapter.setParent() is made. + */ + @Test + public void tagAdapterSetParentTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "tagAdapterSetParentTest"); + invoke(); + } + + /* + * @testName: tagAdapterGetParentTest + * + * @assertion_ids: JSP:JAVADOC:290 + * + * @test_Strategy: Validates that getParent always returns + * getAdaptee().getParent() + */ + @Test + public void tagAdapterGetParentTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "tagAdapterGetParentTest"); + invoke(); + } + + /* + * @testName: tagAdapterDoStartTagTest + * + * @assertion_ids: JSP:JAVADOC:293;JSP:JAVADOC:294 + * + * @test_Strategy: Validates that an UnsupportedOperationException is thrown + * if a call to TagAdapter.doStartTag() is made. + */ + @Test + public void tagAdapterDoStartTagTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "tagAdapterDoStartTagTest"); + invoke(); + } + + /* + * @testName: tagAdapterDoEndTagTest + * + * @assertion_ids: JSP:JAVADOC:296;JSP:JAVADOC:297 + * + * @test_Strategy: Validates that an UnsupportedOperationException is thrown + * if a call to TagAdapter.doEndTag() is made. + */ + @Test + public void tagAdapterDoEndTagTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "tagAdapterDoEndTagTest"); + invoke(); + } + + /* + * @testName: tagAdapterReleaseTest + * + * @assertion_ids: JSP:JAVADOC:299 + * + * @test_Strategy: Validates that an UnsupportedOperationException is thrown + * if a call to TagAdapter.release() is made. + */ + @Test + public void tagAdapterReleaseTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "tagAdapterReleaseTest"); + invoke(); + } + + /* + * @testName: tagAdapterValidationTest + * + * @assertion_ids: JSP:JAVADOC:286;JSP:JAVADOC:288;JSP:JAVADOC:291; + * JSP:JAVADOC:292;JSP:JAVADOC:295;JSP:JAVADOC:298; JSP:JAVADOC:290 + * + * @test_Strategy: This validates that the container properly wraps a + * SimpleTag instance with a TagAdapter when a Classic tag handler is a child + * of the SimpleTag handler within the JSP Page. This also makes the + * assumption, that all of the previous tests passed as it expects an + * UnsupportedOperationException to be thrown if an illegal method call is + * made on the TagAdapter. + */ + @Test + public void tagAdapterValidationTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagadapter_web/TagAdapterValidationTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/TagAttributeInfoTEI.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/TagAttributeInfoTEI.java new file mode 100644 index 00000000..6384cba3 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/TagAttributeInfoTEI.java @@ -0,0 +1,328 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagattributeinfo; + +import java.util.Arrays; + +import ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.tagext.TagAttributeInfo; + +/** + * A TagExtraInfo implementation to validate the methods of + * jakarta.servlet.jsp.tagext.TagAttributeInfo. + * + */ +public class TagAttributeInfoTEI extends BaseTCKExtraInfo { + + /** + * TagAttributeInfo for attribute test + */ + private TagAttributeInfo attr1 = null; + + /** + * TagAttributeInfo for attribute dynAttribute + */ + private TagAttributeInfo attr2 = null; + + /** + * TagAttributeInfo for attribute fragAttribute + */ + private TagAttributeInfo attr3 = null; + + /** + * Default constructor. + */ + public TagAttributeInfoTEI() { + } + + // ------------------------------------------- Test Definitions ---------- + + /** + * Validate the behavior of TagAttributeInfo.getName(). + * + * @return null if the test passes, otherwise a String containing the cause of + * the failure. + */ + public String getName() { + TagAttributeInfo[] info = this.getTagInfo().getAttributes(); + String message = null; + + if (info != null) { + if (info.length == 3) { + String[] names = { info[0].getName(), info[1].getName(), + info[2].getName() }; + Arrays.sort(names); + if (Arrays.binarySearch(names, "test") < 0) { + message = "Test FAILED. Expected attribute 'test' to be present" + + " in the TagAttributeInfo array returned by the container." + + " Attributes returned: " + JspTestUtil.getAsString(names); + } else if (Arrays.binarySearch(names, "dynAttribute") < 0) { + message = "Test FAILED. Expected attribute 'dynAttribute' to be present" + + " in the TagAttributeInfo array returned by the container." + + " Attributes returned: " + JspTestUtil.getAsString(names); + } else if (Arrays.binarySearch(names, "fragAttribute") < 0) { + message = "Test FAILED. Expected attribute 'fragAttribute' to be present" + + " in the TagAttributeInfo array returned by the container." + + " Attributes returned: " + JspTestUtil.getAsString(names); + } + } else { + message = "Test FAILED. Expected the TagAttributeInfo array length" + + " to be 3, but was actually " + info.length; + } + } else { + message = "Test FAILED. TagAttributeInfo was unexpectedly null."; + } + return message; + } + + /** + * Validate the behavior of TagAttributeInfo.getTypeName(). + * + * @return null if the test passes, otherwise a String containing the cause of + * the failure. + */ + public String getTypeName() { + TagAttributeInfo[] info = this.getTagInfo().getAttributes(); + String message = null; + + if (info != null) { + if (info.length == 3) { + initTagAttributeInfos(info); + String typeName = attr1.getTypeName(); + if (!"java.lang.String".equals(typeName)) { + message = "Test FAILED. Expected attribute type for attribute 'test' " + + "to be 'java.lang.String'. Received: " + typeName; + return message; + } + typeName = attr2.getTypeName(); + if (!"java.lang.Integer".equals(typeName)) { + message = "Test FAILED. Expected attribue type for attribute 'dynAttribute' " + + "to be 'java.lang.Integer'. Received: " + typeName; + return message; + } + typeName = attr3.getTypeName(); + if (!"jakarta.servlet.jsp.tagext.JspFragment".equals(typeName)) { + message = "Test FAILED. Expected attribue type for attribute 'fragAttribute' " + + "to be 'jakarta.servlet.jsp.tagext.JspFragment'. Received: " + + typeName; + return message; + } + } else { + message = "Test FAILED. Expected the TagAttributeInfo array length" + + " to be 3, but was actually " + info.length; + } + } else { + message = "Test FAILED. TagAttributeInfo was unexpectedly null."; + } + return message; + } + + /** + * Validate the behavior of TagAttributeInfo.canBeRequestTime(). + * + * @return null if the test passes, otherwise a String containing the cause of + * the failure. + */ + public String canBeRequestTime() { + TagAttributeInfo[] info = this.getTagInfo().getAttributes(); + String message = null; + + if (info != null) { + if (info.length == 3) { + initTagAttributeInfos(info); + // should return false + if (attr1.canBeRequestTime()) { + message = "Test FAILED. Expected TagAttributeInfo.canBeRequestTime() " + + "to return 'false' for attribute 'test'."; + return message; + } + + if (!attr2.canBeRequestTime()) { + message = "Test FAILED. Expected TagAttributeInfo.canBeRequestTime() " + + "to return 'true' for attribute 'dynAttribute'."; + return message; + } + } else { + message = "Test FAILED. Expected the TagAttributeInfo array length" + + " to be 3, but was actually " + info.length; + } + } else { + message = "Test FAILED. TagAttributeInfo was unexpectedly null."; + } + return message; + } + + /** + * Validate the behavior of TagAttributeInfo.isRequired(). + * + * @return null if the test passes, otherwise a String containing the cause of + * the failure. + */ + public String isRequired() { + TagAttributeInfo[] info = this.getTagInfo().getAttributes(); + String message = null; + + if (info != null) { + if (info.length == 3) { + initTagAttributeInfos(info); + if (!attr1.isRequired()) { + message = "Test FAILED. Expected TagAttributeInfo.isRequired() " + + "to return 'true' for attribute 'test'."; + return message; + } + if (attr2.isRequired()) { + message = "Test FAILED. Expected TagAttributeInfo.isRequired() " + + "to return 'false' for attribute 'dynAttribute'."; + return message; + } + } else { + message = "Test FAILED. Expected the TagAttributeInfo array length" + + " to be 3, but was actually " + info.length; + } + } else { + message = "Test FAILED. TagAttributeInfo was unexpectedly null."; + } + return message; + } + + /** + * Validate the behavior of TagAttributeInfo.getIdAttribute(). + * + * @return null if the test passes, otherwise a String containing the cause of + * the failure. + */ + public String getIdAttributeTest() { + TagAttributeInfo[] info = this.getTagInfo().getAttributes(); + String message = null; + + if (info != null) { + if (info.length == 3) { + initTagAttributeInfos(info); + TagAttributeInfo idAtt = TagAttributeInfo.getIdAttribute(info); + if (idAtt != null) { + message = "Test FAILED. Expected TagAttributeInfo.getIdAttribute(info) to return null, but got " + + idAtt.toString(); + } + } else { + message = "Test FAILED. Expected the TagAttributeInfo array length" + + " to be 3, but was actually " + info.length; + } + } else { + message = "Test FAILED. TagAttributeInfo[] was unexpectedly null."; + } + return message; + } + + /** + * Validate the behavior of TagAttributeInfo.isFragment(). + * + * @return null if the test passes, otherwise a String containing the cause of + * the failure. + */ + public String isFragment() { + TagAttributeInfo[] info = this.getTagInfo().getAttributes(); + String message = null; + + if (info != null) { + if (info.length == 3) { + initTagAttributeInfos(info); + if (attr1.isFragment()) { + message = "Test FAILED. Expected TagAttributeInfo.isFragment() " + + "to return 'false' for attribute 'test'."; + return message; + } + + if (!attr3.isFragment()) { + message = "Test FAILED. Expected TagAttributeInfo.isFragment() " + + "to return 'true' for attribute 'fragAttribute'."; + return message; + } + } else { + message = "Test FAILED. Expected the TagAttributeInfo array length" + + " to be 3, but was actually " + info.length; + } + } else { + message = "Test FAILED. TagAttributeInfo was unexpectedly null."; + } + return message; + } + + /** + * Validate the behavior of TagAttributeInfo.toString(). + * + * @return null if the test passes, otherwise a String containing the cause of + * the failure. + */ + public String toStringTest() { + TagAttributeInfo[] info = this.getTagInfo().getAttributes(); + String message = null; + + if (info != null) { + if (info.length == 3) { + initTagAttributeInfos(info); + if (attr1.toString() == null) { + message = "Test FAILED. TagAttributeInfo.toString() unexpectedly " + + "returned null for attribute 'test'."; + return message; + } + if (attr2.toString() == null) { + message = "Test FAILED. TagAttributeInfo.toString() unexpectedly " + + "returned null for attribute 'dynAttribute'."; + return message; + } + if (attr3.toString() == null) { + message = "Test FAILED. TagAttributeInfo.toString() unexpectedly " + + "returned null for attribute 'fragAttribute'."; + return message; + } + } else { + message = "Test FAILED. Expected the TagAttributeInfo array length" + + " to be 3, but was actually " + info.length; + } + } else { + message = "Test FAILED. TagAttributeInfo was unexpectedly null."; + } + return message; + } + + /** + * Initialize the TagAttributeInfo instance variables based on the provided + * array. + * + * @param infos + * - an array of TagAttributeInfo objects. + */ + private void initTagAttributeInfos(TagAttributeInfo[] infos) { + for (int i = 0; i < infos.length; i++) { + if ("test".equals(infos[i].getName())) { + attr1 = infos[i]; + } + if ("dynAttribute".equals(infos[i].getName())) { + attr2 = infos[i]; + } + if ("fragAttribute".equals(infos[i].getName())) { + attr3 = infos[i]; + } + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/URLClientIT.java new file mode 100644 index 00000000..14c5f9d5 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/URLClientIT.java @@ -0,0 +1,194 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.2 10/09/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagattributeinfo; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo; +import ee.jakarta.tck.pages.common.tags.tck.SimpleTag; + +/** + * Test client for TagAttributeInfo. Implementation note, all tests are + * performed within a TagExtraInfo class. If the test fails, a translation error + * will be generated and a ValidationMessage array will be returned. + */ +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_tagattrinfo_web.war"); + archive.addClasses(TagAttributeInfoTEI.class, + JspTestUtil.class, + BaseTCKExtraInfo.class, + SimpleTag.class); + + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_tagattrinfo_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tagattributeinfo.tld", "tagattributeinfo.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/CanBeRequestTimeTest.jsp")), "CanBeRequestTimeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetIdAttribute.jsp")), "GetIdAttribute.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetNameTest.jsp")), "GetNameTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetTypeNameTest.jsp")), "GetTypeNameTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/IsFragmentTest.jsp")), "IsFragmentTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/IsRequiredTest.jsp")), "IsRequiredTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ToStringTest.jsp")), "ToStringTest.jsp"); + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: tagAttributeInfoGetNameTest + * + * @assertion_ids: JSP:JAVADOC:278 + * + * @test_Strategy: Validate the behavior of TagAttributeInfo.getName(). + */ + @Test + public void tagAttributeInfoGetNameTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagattrinfo_web/GetNameTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: tagAttributeInfoGetTypeNameTest + * + * @assertion_ids: JSP:JAVADOC:279 + * + * @test_Strategy: Validate the behavior of TagAttributeInfo.getTypeName(). + */ + @Test + public void tagAttributeInfoGetTypeNameTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagattrinfo_web/GetTypeNameTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: tagAttributeInfoCanBeRequestTimeTest + * + * @assertion_ids: JSP:JAVADOC:280 + * + * @test_Strategy: Validate the behavior of + * TagAttributeInfo.catBeRequestTime(). + */ + @Test + public void tagAttributeInfoCanBeRequestTimeTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagattrinfo_web/CanBeRequestTimeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: tagAttributeInfoIsRequiredTest + * + * @assertion_ids: JSP:JAVADOC:281 + * + * @test_Strategy: Validate the behavior of TagAttributeInfo.isRequired(). + */ + @Test + public void tagAttributeInfoIsRequiredTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagattrinfo_web/IsRequiredTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: tagAttributeInfoIsFragmentTest + * + * @assertion_ids: JSP:JAVADOC:283 + * + * @test_Strategy: Validate the behavior of TagAttributeInfo.siFragment(). + */ + @Test + public void tagAttributeInfoIsFragmentTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagattrinfo_web/IsFragmentTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: tagAttributeInfoToStringTest + * + * @assertion_ids: JSP:JAVADOC:284 + * + * @test_Strategy: Validate the behavior of TagAttributeInfo.toString(). + */ + @Test + public void tagAttributeInfoToStringTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagattrinfo_web/ToStringTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: tagAttributeInfoGetIdAttribute + * + * @assertion_ids: JSP:JAVADOC:282 + * + * @test_Strategy: Convenience static method that goes through an array of + * TagAttributeInfo objects and looks for "id". + */ + @Test + public void tagAttributeInfoGetIdAttribute() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagattrinfo_web/GetIdAttribute.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/TagDataTEI.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/TagDataTEI.java new file mode 100644 index 00000000..be9d73d8 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/TagDataTEI.java @@ -0,0 +1,223 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagdata; + +import ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.tagext.TagData; + +public class TagDataTEI extends BaseTCKExtraInfo { + + /** + * Default constructor. + */ + public TagDataTEI() { + } + + // ------------------------------------------- Test Definitions ---------- + + /** + * Validate TagData.getId(); + * + * @return null if the test passes, or a String containing the reason for + * failure. + */ + public String getId() { + TagData data = this.getTagData(); + String message = null; + if (data != null) { + + } else { + message = "Test FAILED. TagData was null."; + } + return message; + } + + /** + * Validate TagData.getAttribute(). + * + * @return null if the test passes, or a String containing the reason for + * failure. + */ + public String getAttribute() { + debug("in getAttribute()"); + TagData data = this.getTagData(); + String message = null; + if (data != null) { + String attr = (String) data.getAttribute("test"); + if (!"getAttribute".equals(attr)) { + message = "Test FAILED. Expected TagData.getAttribute() to return" + + " 'getAttribute' for attribute 'test'. Received: " + attr; + } + + Object o = data.getAttribute("dynAttribute"); + if (o != TagData.REQUEST_TIME_VALUE) { + message = "Test FAILED. Expected TagData.getAttribute to return" + + " the distinquished TagData.REQUEST_TIME_VALUE object for a dynamic" + + " attribute defined in the TLD."; + + } + + o = data.getAttribute("dynAttribute2"); + if (o != TagData.REQUEST_TIME_VALUE) { + message = "Test FAILED. Expected TagData.getAttribute to return" + + " the distinquished TagData.REQUEST_TIME_VALUE object for a dynamic" + + " attribute defined in the TLD."; + } + + attr = (String) data.getAttribute("dynAttribute3"); + if (!"static".equals(attr)) { + message = "Test FAILED. Expected TagData.getAttribute() to return" + + " 'static' for attribute 'dynAttribute3'. Received: " + attr; + } + + if (data.getAttribute("dynAttribute4") != null) { + message = "Test FAILED. Expected null to be returned for an attribute " + + "not specified in the action."; + } + + } else { + message = "Test FAILED. TagData was null."; + } + return message; + } + + /** + * Validate TagData.setAttribute(). + * + * @return null if the test passes, or a String containing the reason for + * failure. + */ + public String setAttribute() { + debug("in setAttribute()"); + TagData data = this.getTagData(); + String message = null; + if (data != null) { + String val = "attributeSet"; + data.setAttribute("test", val); + String nVal = (String) data.getAttribute("test"); + if (!val.equals(nVal)) { + message = "Test FAILED. Attempted to set the 'test' attribute value " + + "to 'attributeSet'. Value of 'test' attribute after the call " + + "to setAttribute() was: " + nVal; + } + } else { + message = "Test FAILED. TagData was null."; + } + return message; + } + + /** + * Validate TagData.getAttributeString(). + * + * @return null if the test passes, or a String containing the reason for + * failure. + */ + public String getAttributeString() { + debug("in getAttributeString()"); + TagData data = this.getTagData(); + String message = null; + if (data != null) { + String val = data.getAttributeString("test"); + if (!"getAttributeString".equals(val)) { + message = "Test FAILED. TagData.getAttributeString() returned " + + "a String object, but the value, '" + val + "' is incorrected." + + " Expected: " + val; + } + + data.setAttribute("test", new Object()); + try { + data.getAttributeString("test"); + } catch (Throwable t) { + if (!(t instanceof ClassCastException)) { + message = "Test FAILED. Exception thrown when calling " + + "TagData.getAttributeString(), but it was not an instance " + + "of ClassCastException. Exception returned: " + + t.getClass().getName(); + } + return message; + } + message = "Test FAILED. No Exception thrown when calling TagData.getAttributeString()" + + " on an attribute whose value is not a String. " + + data.getAttribute("test").toString(); + } else { + message = "Test FAILED. TagData was null."; + } + return message; + } + + /** + * Validate TagData.getAttributes(). + * + * @return null if the test passes, or a String containing the reason for + * failure. + */ + public String getAttributes() { + debug("in getAttributes()"); + TagData data = this.getTagData(); + String message = null; + String[] expValues = { "test", "dynAttribute" }; + if (data != null) { + if (!JspTestUtil.checkEnumeration(data.getAttributes(), expValues)) { + message = "Test FAILED. The Enumeration returned by TagData.getAttributes()" + + " didn't contain the expected values of 'test' and 'dynAttribute." + + " Received: " + JspTestUtil.getAsString(data.getAttributes()); + } + } else { + message = "Test FAILED. TagData was null."; + } + return message; + } + + /** + * Validate TagData(Object[][]) + * + * @return null if the test passes, or a String containing the reason for + * failure. + */ + public String constructorTest() { + debug("in constructorTest()"); + String message = null; + Object[][] att = null; + Object[][] att2 = { { "connection", "conn0" }, { "id", "query0" } }; + TagData data = null; + TagData data2 = null; + try { + data = new TagData(att); + data2 = new TagData(att2); + } catch (Throwable th) { + message = "Test FAILED. Throwable caught when invoking TagData(Object[][]):" + + th.getMessage(); + } + if (data == null) { + message = "Test FAILED. TagaData data was null."; + } + if (data2 == null) { + message = "Test FAILED. TagaData data2 was null."; + } + return message; + } + + private static void debug(String message) { + JspTestUtil.debug("[TagDataTEI] " + message); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/URLClientIT.java new file mode 100644 index 00000000..c043c69a --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/URLClientIT.java @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.2 10/09/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagdata; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo; +import ee.jakarta.tck.pages.common.tags.tck.SimpleTag; + +/** + * Test client for TagData. Implementation note, all tests are performed within + * a TagExtraInfo class. If the test fails, a translation error will be + * generated and a ValidationMessage array will be returned. + */ +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_tagdata_web.war"); + archive.addClasses(TagDataTEI.class, + JspTestUtil.class, + BaseTCKExtraInfo.class, + SimpleTag.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_tagdata_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tagdata.tld", "tagdata.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ConstructorTest.jsp")), "ConstructorTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetAttributesTest.jsp")), "GetAttributesTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetAttributeStringTest.jsp")), "GetAttributeStringTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetAttributeTest.jsp")), "GetAttributeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/SetAttributeTest.jsp")), "SetAttributeTest.jsp"); + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: tagDataGetAttributeTest + * + * @assertion_ids: JSP:JAVADOC:271 + * + * @test_Strategy: Validate the behavior of TagData.getAttribute(). + */ + @Test + public void tagDataGetAttributeTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagdata_web/GetAttributeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: tagDataSetAttributeTest + * + * @assertion_ids: JSP:JAVADOC:272 + * + * @test_Strategy: Validate the behavior of TagData.setAttribute(). + */ + @Test + public void tagDataSetAttributeTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagdata_web/SetAttributeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: tagDataGetAttributeStringTest + * + * @assertion_ids: JSP:JAVADOC:273;JSP:JAVADOC:274 + * + * @test_Strategy: Validate the behavior of TagData.getAttributeString(). + */ + @Test + public void tagDataGetAttributeStringTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagdata_web/GetAttributeStringTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: tagDataGetAttributesTest + * + * @assertion_ids: JSP:JAVADOC:275 + * + * @test_Strategy: Validate the behavior of TagData.getAttributes(). + */ + @Test + public void tagDataGetAttributesTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagdata_web/GetAttributesTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: tagDataConstructorTest + * + * @assertion_ids: JSP:JAVADOC:268 + * + * @test_Strategy: validate the constructor TagData(Object[][]). + */ + @Test + public void tagDataConstructorTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagdata_web/ConstructorTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/TagExtraInfoTEI.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/TagExtraInfoTEI.java new file mode 100644 index 00000000..b3392bb4 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/TagExtraInfoTEI.java @@ -0,0 +1,167 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagextrainfo; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.tagext.TagData; +import jakarta.servlet.jsp.tagext.TagExtraInfo; +import jakarta.servlet.jsp.tagext.ValidationMessage; + +public class TagExtraInfoTEI extends TagExtraInfo { + + /** + * Flag to determine if TEI was indeed called by the container. + */ + private static boolean _wasCalled = false; + + private boolean _wasIsValidCalled = false; + + private boolean _returnFalse = false; + + /** + * Default Constructor. + */ + public TagExtraInfoTEI() { + } + + /** + * Validates that TagExtraInfo instances are properly handled by the + * container. + * + * @param tagData + * @return + */ + public ValidationMessage[] validate(TagData tagData) { + + // Checked within the JSP to make sure the TEI was + // called by the container. + _wasCalled = true; + + // Validate that TagExtraInfo.getTagInfo() returns a non-null + // value. This ensures that TagExtraInfo.setTagInfo() was + // called by the container prior to calling validate(). + if (this.getTagInfo() == null) { + return JspTestUtil.getValidationMessage( + "Test FAILED. " + tagData.getId(), + "TagExtraInfo.getTagInfo() returned null meaning " + + "TagExtraInfo.setTagInfo() was not called by the container."); + } + + String retType = tagData.getAttributeString("test"); + + if ("null".equals(retType)) { + // validating that a null return value doesn't cause a translation + // error + return null; + } else if ("empty".equals(retType)) { + // validating that an empty array of ValidationMessages doesn't cause + // a translation error + return new ValidationMessage[] {}; + } else if ("nonempty".equals(retType)) { + // validating that a non-empty array of ValidationMessages causes + // a translation error + return JspTestUtil.getValidationMessage(tagData.getId(), "Test PASSED"); + } else if ("isValid".equals(retType)) { + // validates the default behavior of the validate() method + ValidationMessage[] message = null; + message = super.validate(tagData); + if (_wasIsValidCalled) { + _wasIsValidCalled = false; + if (message != null && message.length > 0) { + return JspTestUtil.getValidationMessage(tagData.getId(), + "Test FAILED. TagExtraInfo." + + "validate() did call isValid(), but a non-null, or non-zero-length array" + + " of ValidationMessages was returned when isValid returned true."); + } + } else { + return JspTestUtil.getValidationMessage(tagData.getId(), + "Test FAILED. Default implementation" + + "of TagExtraInfo.validate() must call TagExtraInfo.isValid(), but this did not occur."); + } + _returnFalse = true; + message = super.validate(tagData); + if (_wasIsValidCalled) { + _wasIsValidCalled = false; + if (message == null || message.length == 0) { + return JspTestUtil.getValidationMessage(tagData.getId(), + "Test FAILED. TagExtraInfo." + + "validate() did call isValid(), but a null, or zero-length array" + + "of ValidationMessages was returned when isValid returned false."); + } + } else { + return JspTestUtil.getValidationMessage(tagData.getId(), + "Test FAILED. Default implementation" + + "of TagExtraInfo.validate() must call TagExtraInfo.isValid(), but this did not occur."); + } + } else { + return JspTestUtil.getValidationMessage( + "Test FAILED. Unexpected value" + ", '" + retType + + "' returned by container for attribute 'test'.", + tagData.getId()); + } + return null; + } + + /** + * Used to validate the proper default behavior of TagExtraInfo.validate(). + * + * @param data + * - a TagData instance + * @return - true of _returnFalse is false, otherwise true. + */ + public boolean isValid(TagData data) { + _wasIsValidCalled = true; + if (_returnFalse) { + return false; + } else { + return true; + } + } + + /** + * Called within the test pages to verify that the TEI was indeed called. + * + * @return true if called, otherwise false + */ + public static boolean teiWasCalled() { + return _wasCalled; + } + + /** + * Resets the state of this TEI. + */ + public static void reset() { + debug("Resetting _wasCalled to false."); + _wasCalled = false; + } + + /** + * Wraps JspTestUtil.debug. This also prepends this TEI's classname to the + * debug message. + * + * @param message + * - the debug message + */ + private static void debug(String message) { + JspTestUtil.debug("[TagExtraInfoTEI] " + message); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/URLClientIT.java new file mode 100644 index 00000000..804e30ee --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/URLClientIT.java @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.2 10/09/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagextrainfo; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.common.tags.tck.SimpleTag; + +/** + * Test client for TagExtraInfo. If the test fails, a translation error will be + * generated and a ValidationMessage array will be returned. + */ +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_tagextrainfo_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_tagextrainfo_web.war"); + archive.addClasses(TagExtraInfoTEI.class, + JspTestUtil.class, + SimpleTag.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_tagextrainfo_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tagextrainfo.tld", "tagextrainfo.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TagExtraInfoDefaultImplTest.jsp")), "TagExtraInfoDefaultImplTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TagExtraInfoEmptyReturnTest.jsp")), "TagExtraInfoEmptyReturnTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TagExtraInfoNonEmptyReturnTest.jsp")), "TagExtraInfoNonEmptyReturnTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TagExtraInfoNullReturnTest.jsp")), "TagExtraInfoNullReturnTest.jsp"); + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: tagExtraInfoTest + * + * @assertion_ids: + * JSP:JAVADOC:264;JSP:JAVADOC:265;JSP:JAVADOC:266;JSP:JAVADOC:267 + * + * @test_Strategy: Validate the following: - TagExtraInfo.getTagInfo() returns + * a non-null value as the container called TagExtraInfo.setTagInfo() prior to + * calling validate. - A null or an emtpy array of ValidationMessage returned + * by validate does not cause a translation error. - A non-empty array of + * ValiationMessages causes a translation error. - The default implementation + * of TagExtraInfo.validate() calls isValid(). If isValid() returns false, a + * default ValidationMessage array is returned. + */ + @Test + public void tagExtraInfoTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagextrainfo_web/TagExtraInfoNullReturnTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagextrainfo_web/TagExtraInfoEmptyReturnTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagextrainfo_web/TagExtraInfoNonEmptyReturnTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagextrainfo_web/TagExtraInfoDefaultImplTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/TagFileInfoTEI.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/TagFileInfoTEI.java new file mode 100644 index 00000000..bb2c2277 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/TagFileInfoTEI.java @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagfileinfo; + +import ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.tagext.TagFileInfo; +import jakarta.servlet.jsp.tagext.TagInfo; + +public class TagFileInfoTEI extends BaseTCKExtraInfo { + + /** + * Default Constructor + */ + public TagFileInfoTEI() { + } + + // ------------------------------------------- Test Definitions ---------- + + /** + * Validate TagFileInfo.getName(). + * + * @return null if the test passes, or a string containing the cause of test + * failure. + */ + public String getName() { + debug("in getName()"); + String message = null; + TagFileInfo[] info = this.getTagInfo().getTagLibrary().getTagFiles(); + if (info != null && info.length == 1) { + String name = info[0].getName(); + if (!"TagFile1".equals(name)) { + message = "Test FAILED. Expected TagFileInfo.getName() to return " + + "'TagFile1'. Received: '" + name + "'"; + } + } else { + message = "Test FAILED. TagFileInfo array was null or length was not 1."; + } + return message; + } + + /** + * Validate TagFileInfo.getPath(). + * + * @return null if the test passes, or a string containing the cause of test + * failure. + */ + public String getPath() { + debug("in getPath()"); + String message = null; + TagFileInfo[] info = this.getTagInfo().getTagLibrary().getTagFiles(); + if (info != null && info.length == 1) { + String path = info[0].getPath(); + if (!"/WEB-INF/tags/tagfileinfo/TagFile1.tag".equals(path)) { + message = "Test FAILED. Expected TagFileInfo.getPath to return " + + "'/WEB-INF/tags/TagFile1'. Received: '" + path + "'"; + } + } else { + message = "Test FAILED. TagFileInfo array was null or length was not 1."; + } + return message; + } + + /** + * Validate TagFileInfo.getTagInfo(). In addition, this will verify That the + * directives in the Tag file are properly parsed and the TagInfo object + * returned by TagFileInfo.getTagInfo() is as expected. + * + * @return null if the test passes, or a string containing the cause of test + * failure. + */ + public String getTagInfoTest() { + debug("in getTagInfo()"); + String message = null; + TagFileInfo[] info = this.getTagInfo().getTagLibrary().getTagFiles(); + if (info != null && info.length == 1) { + TagInfo tInfo = info[0].getTagInfo(); + if (tInfo != null) { + String dispName = tInfo.getDisplayName(); + if (!"TagFile1".equals(dispName)) { + message = "Test FAILED. TagInfo returned by TagFileInfo.getTagInfo()" + + " didn't return the expected value 'TagFile1' for " + + "the display-name attribute. Received: " + dispName; + } + + String content = tInfo.getBodyContent().toLowerCase(); + if (!"scriptless".equals(content)) { + message = "Test FAILED. TagInfo returned by TagFileInfo.getTagInfo()" + + " didn't return the expected value 'scriptless' for the " + + "body-content attribute. Received: " + content; + } + + if (!tInfo.hasDynamicAttributes()) { + message = "Test FAILED. TagInfo returned by TagFileInfo.getTagInfo()" + + " didn't return the expected value of 'true' for " + + "the dynamic-attributes attribute."; + } + + String sIcon = tInfo.getSmallIcon(); + if (!"/16/icon.jpg".equals(sIcon)) { + message = "Test FAILED. TagInfo returned by TagFileInfo.getTagInfo()" + + " didn't returned the expected value of '/16/icon.jpg' " + + "for the small-icon attribute. Received: " + sIcon; + } + + String lIcon = tInfo.getLargeIcon(); + if (!"/32/icon.jpg".equals(lIcon)) { + message = "Test FAILED. TagInfo returned by TagFileInfo.getTagInfo()" + + " didn't returned the expected value of '/32/icon.jpg' " + + "for the large-icon attribute. Received: " + lIcon; + } + + String desc = tInfo.getInfoString(); + if (!"Simple Tag File".equals(desc)) { + message = "Test FAILED. TagInfo returned by TagFileInfo.getTagInfo()" + + " didn't returned the expected value of 'Simple Tag File' " + + "for the description attribute. Received: " + desc; + } + } else { + message = "Test FAILED. TagFileInfo.getTagFile() returned null."; + } + } else { + message = "Test FAILED. TagFileInfo array was null or length was not 1."; + } + return message; + } + + /** + * Calls JspTestUtil.debug() and includes this class name in the debug + * message. + * + * @param message + * - debug message + */ + private static void debug(String message) { + JspTestUtil.debug("[TagFileInfoTEI] " + message); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/URLClientIT.java new file mode 100644 index 00000000..19183796 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/URLClientIT.java @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.2 10/09/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagfileinfo; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo; +import ee.jakarta.tck.pages.common.tags.tck.SimpleTag; + +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + +/** + * Test client for TagFileInfo. Implementation note, all tests are performed + * within a TagExtraInfo class. If the test fails, a translation error will be + * generated and a ValidationMessage array will be returned. + */ + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_taginfo_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_tagfileinfo_web.war"); + archive.addClasses(TagFileInfoTEI.class, + JspTestUtil.class, + BaseTCKExtraInfo.class, + SimpleTag.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_tagfileinfo_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tagfileinfo.tld", "tagfileinfo.tld"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/tagfileinfo/TagFile1.tag", "tags/tagfileinfo/TagFile1.tag"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetNameTest.jsp")), "GetNameTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetPathTest.jsp")), "GetPathTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetTagInfoTest.jsp")), "GetTagInfoTest.jsp"); + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: tagFileInfoGetNameTest + * + * @assertion_ids: JSP:JAVADOC:259 + * + * @test_Strategy: Validate TagFileInfo.getName returns the expected values + * based on what is defined in the TLD. + */ + @Test + public void tagFileInfoGetNameTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagfileinfo_web/GetNameTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagFileInfoGetPathTest + * + * @assertion_ids: JSP:JAVADOC:260 + * + * @test_Strategy: Validate TagFileInfo.getPath() returns the expected values + * based on what is defined in the TLD. + */ + @Test + public void tagFileInfoGetPathTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagfileinfo_web/GetPathTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagFileInfoGetTagInfoTest + * + * @assertion_ids: JSP:JAVADOC:261 + * + * @test_Strategy: Validate TagFileInfo.getTagInfo() returns the expected + * values based on what is defined in the tag file. + */ + @Test + public void tagFileInfoGetTagInfoTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagfileinfo_web/GetTagInfoTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/TagInfoTEI.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/TagInfoTEI.java new file mode 100644 index 00000000..e2a92d8b --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/TagInfoTEI.java @@ -0,0 +1,547 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.taginfo; + +import java.util.Arrays; + +import ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.tagext.TagAttributeInfo; +import jakarta.servlet.jsp.tagext.TagExtraInfo; +import jakarta.servlet.jsp.tagext.TagInfo; +import jakarta.servlet.jsp.tagext.TagLibraryInfo; +import jakarta.servlet.jsp.tagext.TagVariableInfo; + +/** + * A TagExtraInfo implementation to validate the methods of + * jakarta.servlet.jsp.tagext.TagInfo. + */ +public class TagInfoTEI extends BaseTCKExtraInfo { + + /** + * Test tag + */ + private static final String TEST_TAG = "test"; + + /** + * Test tag 2 + */ + private static final String TEST_TAG2 = "test2"; + + /** + * Default Constructor. + */ + public TagInfoTEI() { + } + + // ------------------------------------------- Test Definitions ---------- + + /** + * Validates TagInfo.getTagName(). + * + * @return null if the test passes, otherwise a String with a failure message. + */ + public String getTagName() { + debug("in getTagName()"); + TagInfo[] info = this.getTagInfo().getTagLibrary().getTags(); + String message = null; + + if (info != null && info.length == 2) { + debug("TagInfo length: " + info.length); + String tagName = info[0].getTagName(); + if (!TEST_TAG.equals(tagName) && !TEST_TAG2.equals(tagName)) { + message = "Test FAILED. Expected a tag name of 'test' or 'test2'" + + " to be returned. Received: " + tagName; + } + } else { + message = "Test FAILED. The TagInfo array provided to test method" + + " was null or did not have a length of 2."; + } + return message; + } + + /** + * Validates TagInfo.getAttributes(). + * + * @return null if the test passes, otherwise a String with a failure message. + */ + public String getAttributes() { + debug("in getAttributes()"); + TagInfo[] info = this.getTagInfo().getTagLibrary().getTags(); + String message = null; + debug("TagInfo length: " + info.length); + + if (info.length == 2) { + + for (int i = 0; i < info.length; i++) { + TagInfo inf = info[i]; + if (TEST_TAG.equals(inf.getTagName())) { + TagAttributeInfo[] attrInfo = inf.getAttributes(); + if (attrInfo != null) { + if (attrInfo.length != 1) { + message = "Test FAILED. Expected an attribute count for" + + " 'test' to be 1, but the actual count was: " + + attrInfo.length; + break; + } + } else { + message = "Test FAILED. Expected a non-null value to be returned" + + " from TagInfo.getAttributes() for 'test'."; + } + } else if (TEST_TAG2.equals(inf.getTagName())) { + TagAttributeInfo[] attrInfo = inf.getAttributes(); + if (attrInfo == null) { + message = "Test FAILED. Expected TagInfo.getAttributes() to" + + " return an empty array for 'test2' as no attributes were defined," + + " but null is returned "; + break; + } else if (attrInfo.length != 0) { + message = "Test FAILED. Expected TagInfo.getAttributes() to" + + " return an empty array for 'test2' as no attributes were defined," + + " but got: " + Arrays.asList(attrInfo).toString(); + break; + } + } else { + message = "Test FAILED. Unexpected tag returned: " + + info[i].getTagName(); + break; + } + } + } else { + message = "Test FAILED. Expected a TagInfo array length of 2, but was " + + "actually " + info.length; + } + + return message; + } + + /** + * Validates TagInfo.getTagExtraInfo(). This also indirectly validates + * TagInfo.setTagExtraInfo() as this must be called by container in order for + * getTagExtraInfo() to return anything valid. + * + * @return null if the test passes, otherwise a String with a failure message. + */ + public String getTagExtraInfo() { + debug("in getTagExtraInfo()"); + TagInfo[] info = this.getTagInfo().getTagLibrary().getTags(); + String message = null; + + if (info != null) { + if (info.length == 2) { + for (int i = 0; i < info.length; i++) { + String tagName = info[i].getTagName(); + if (TEST_TAG.equals(tagName)) { + TagExtraInfo tei = info[i].getTagExtraInfo(); + if (tei == null) { + message = "Test FAILED. Expected a non-null value " + + "to be returned from TagInfo.getTagExtraInfo() for tag 'test'."; + break; + } + } else if (TEST_TAG2.equals(tagName)) { + if (info[i].getTagExtraInfo() != null) { + message = "Test FAILED. TagInfo.getTagExtraInfo() returned a non-null" + + " value for tag 'test2' when null was expected."; + break; + } + } else { + message = "Test FAILED. Unexpected tag returned: " + + info[i].getTagName(); + break; + } + } + } else { + message = "Test FAILED. Expected a TagInfo array length of 2, but was " + + "actually " + info.length; + } + } else { + message = "Test FAILED. The TagInfo array provided to test method" + + " was null"; + } + return message; + } + + /** + * Validates TagInfo.getTagClassName(). + * + * @return null if the test passes, otherwise a String with a failure message. + */ + public String getTagClassName() { + debug("in getTagClassName"); + TagInfo[] info = this.getTagInfo().getTagLibrary().getTags(); + String message = null; + + if (info != null && info.length == 2) { + String className = "ee.jakarta.tck.pages.common.tags.tck.SimpleTag"; + String tagName = info[0].getTagName(); + if (!className.equals(info[0].getTagClassName())) { + message = "Test FAILED. Expected a class name of '" + className + + "' for tag '" + tagName + "'"; + } + } else { + message = "Test FAILED. The TagInfo array provided to test method" + + " was null or did not have a length of 2."; + } + return message; + } + + /** + * Validates TagInfo.getBodyContent(). + * + * @return null if the test passes, otherwise a String with a failure message. + */ + public String getBodyContent() { + debug("in getBodyContent"); + TagInfo[] info = this.getTagInfo().getTagLibrary().getTags(); + String message = null; + + if (info != null) { + if (info.length == 2) { + for (int i = 0; i < info.length; i++) { + if (TEST_TAG.equals(info[i].getTagName())) { + String bodyContent = info[i].getBodyContent(); + if (!"JSP".equals(bodyContent)) { + message = "Test FAILED. Expected TagInfo.getBodyContent() " + + "to return 'JSP'. Received: " + bodyContent; + break; + } + } else if (TEST_TAG2.equals(info[i].getTagName())) { + String bodyContent = info[i].getBodyContent().toLowerCase(); + if (!"tagdependent".equals(bodyContent)) { + message = "Test FAILED. Expected TagInfo.getBodyContent() " + + "to return 'tagdependent'. Received: " + bodyContent; + break; + } + } else { + message = "Test FAILED. Unexpected tag returned: " + + info[i].getTagName(); + break; + } + } + } else { + message = "Test FAILED. Expected a TagInfo array length of 2, but was " + + "actually " + info.length; + } + } else { + message = "Test FAILED. The TagInfo array provided to test method" + + " was null"; + } + return message; + } + + /** + * Validates TagInfo.getInfoString(). + * + * @return null if the test passes, otherwise a String with a failure message. + */ + public String getInfoString() { + debug("in getInfoString()"); + TagInfo[] info = this.getTagInfo().getTagLibrary().getTags(); + String message = null; + + if (info != null && info.length == 2) { + String description = info[0].getInfoString(); + if (!"simple test tag".equals(description)) { + message = "Test FAILED. Expected TagInfo.getInfoString() to " + + "return 'simple test tag'. Received: " + description; + } + } else { + message = "Test FAILED. The TagInfo array provided to test method" + + " was null or did not have a length of 2."; + } + + return message; + } + + /** + * Validates TagInfo.getTagLibrary(). This also indirectly validates + * TagInfo.setTagLibrary() as this must be called by container in order for + * getTagLibrary() to return anything valid. + * + * @return null if the test passes, otherwise a String with a failure message. + */ + public String getTagLibrary() { + debug("in getTagLibrary"); + TagInfo[] info = this.getTagInfo().getTagLibrary().getTags(); + String message = null; + + if (info != null && info.length == 2) { + if (info[0].getTagLibrary() == null) { + message = "Test FAILED. Expected TagInfo.getTagLibrary() to return " + + "a non-null value."; + } + } else { + message = "Test FAILED. The TagInfo array provided to test method" + + " was null or did not have a length of 2."; + } + return message; + } + + /** + * Validates TagInfo.getDisplayName(). + * + * @return null if the test passes, otherwise a String with a failure message. + */ + public String getDisplayName() { + debug("in getDisplayName"); + TagInfo[] info = this.getTagInfo().getTagLibrary().getTags(); + String message = null; + + if (info != null && info.length == 2) { + String displayName = info[0].getDisplayName(); + if ("test tag".equals(displayName)) { + if (info[1].getDisplayName() != null) { + message = "Test FAILED. Expected TagInfo.getDisplayName() to return " + + "null if the tag entry has no display-name element defined."; + } + } else { + message = "Test FAILED. Expected TagInfo.getDisplayName() to return " + + "'test tag'. Received: " + displayName; + } + } else { + message = "Test FAILED. The TagInfo array provided to test method" + + " was null or did not have a length of 2."; + } + return message; + } + + /** + * Validates TagInfo.getSmallIcon(). + * + * @return null if the test passes, otherwise a String with a failure message. + */ + public String getSmallIcon() { + debug("in getSmallIcon"); + TagInfo[] info = this.getTagInfo().getTagLibrary().getTags(); + String message = null; + + if (info != null && info.length == 2) { + String icon = info[0].getSmallIcon(); + if ("/16/icon.jpg".equals(icon)) { + if (info[1].getSmallIcon() != null) { + message = "Test FAILED. Expected TagInfo.getSmallIcon() to " + + "return null of no small-icon is defined for a tag."; + } + } else { + message = "Test FAILED. Expected TagInfo.getSmallIcon() to return " + + "'/16/icon.jpg'. Received: " + icon; + } + } else { + message = "Test FAILED. The TagInfo array provided to test method" + + " was null or did not have a length of 2."; + } + return message; + } + + /** + * Validates TagInfo.getLargeIcon(). + * + * @return null if the test passes, otherwise a String with a failure message. + */ + public String getLargeIcon() { + debug("in getLargeIcon"); + TagInfo[] info = this.getTagInfo().getTagLibrary().getTags(); + String message = null; + + if (info != null && info.length == 2) { + String icon = info[0].getLargeIcon(); + if ("/32/icon.jpg".equals(icon)) { + if (info[1].getLargeIcon() != null) { + message = "Test FAILED. Expected TagInfo.getLargeIcon() to " + + "return null of no large-icon is defined for a tag."; + } + } else { + message = "Test FAILED. Expected TagInfo.getLargeIcon() to return " + + "'/32/icon.jpg'. Received: " + icon; + } + } else { + message = "Test FAILED. The TagInfo array provided to test method" + + " was null or did not have a length of 2."; + } + return message; + } + + /** + * Validates TagInfo.getTagVariableInfos(). + * + * @return null if the test passes, otherwise a String with a failure message. + */ + public String getTagVariableInfos() { + debug("in getTagVariableInfos"); + TagInfo[] info = this.getTagInfo().getTagLibrary().getTags(); + String message = null; + boolean processed = false; + + if (info != null && info.length == 2) { + for (int i = 0; i < info.length; i++) { + if (TEST_TAG.equals(info[i].getTagName())) { + TagVariableInfo[] varInfo = info[i].getTagVariableInfos(); + if (varInfo != null) { + if (varInfo.length != 0) { + message = "Test FAILED. Expected TagInfo.getTagVariableInfos() " + + "to return zero-length array for a tag that defines no variables." + + " Actual length returned was: " + varInfo.length + + " for tag '" + TEST_TAG + "'"; + break; + } + } else { + message = "Test FAILED. Expected TagInfo.getTagVariableInfos() to return a " + + "zero-length array and not null for tag '" + TEST_TAG + "'"; + break; + } + } + if (TEST_TAG2.equals(info[i].getTagName())) { + processed = true; + TagVariableInfo[] varInfo = info[i].getTagVariableInfos(); + if (varInfo != null) { + if (varInfo.length != 2) { + message = "Test FAILED. TagInfo.getTagVariableInfos() " + + "returned a length of " + varInfo.length + + " 'test2'. Expected a length of 2."; + break; + } + } else { + message = "Test FAILED. TagInfo.getTagVariableInfos() unexpectedly " + + "returned null for tag 'test2'."; + break; + } + } + } + if (!processed) { + message = "Test FAILED. Tag 'test2' was not available in the TagInfo array."; + } + } else { + message = "Test FAILED. The TagInfo array provided to test method" + + " was null or did not have a length of 2."; + } + return message; + } + + /** + * Validates TagInfo.hasDynamicAttributes(). + * + * @return null if the test passes, otherwise a String with a failure message. + */ + public String hasDynamicAttributes() { + debug("in getTagVariableInfos"); + TagInfo[] info = this.getTagInfo().getTagLibrary().getTags(); + String message = null; + + if (info != null && info.length == 2) { + for (int i = 0; i < info.length; i++) { + if (TEST_TAG.equals(info[i].getTagName())) { + if (!info[i].hasDynamicAttributes()) { + message = "Test FAILED. TagInfo.hasDynamicAttributes() returned " + + "false for tag 'test'."; + } + } else if (TEST_TAG2.equals(info[i].getTagName())) { + if (info[i].hasDynamicAttributes()) { + message = "Test FAILED. TagInfo.hasDynamicAttributes() returned " + + "true for tag 'test2"; + } + } else { + message = "Test FAILED. Unexpected tag returned from TagInfo array. " + + "Tag: " + info[i].getTagName(); + } + } + } else { + message = "Test FAILED. The TagInfo array provided to test method" + + " was null or did not have a length of 2."; + } + return message; + } + + /** + * Validates TagInfo.setTagExtraInfo(TagExtraInfo). + * + * @return null if the test passes, otherwise a String with a failure message. + */ + public String setTagExtraInfoTest() { + debug("in setTagExtraInfoTest"); + TagInfo info = this.getTagInfo(); + String message = null; + + if (info != null) { + try { + TagExtraInfo tei0 = info.getTagExtraInfo(); + info.setTagExtraInfo(tei0); + TagExtraInfo tei1 = info.getTagExtraInfo(); + if (null == tei0 && null == tei1) { + // both are null, and they are same + } else if (null == tei0 || null == tei1) { + message = "Test FAILED. Invoking TagInfo.getTagExtraInfo() twice got a null and a non-null TagExtraInfo."; + } else if (!tei0.equals(tei1)) { + message = "Test FAILED. Invoking TagInfo.getTagExtraInfo() twice and returned TagExtraInfo instances have different content. tei0:" + + tei0.toString() + "\n\ntei1:" + tei1.toString(); + } + } catch (Throwable th) { + message = "Test FAILED. Throwable caught when invoking TagInfo.getTagExtraInfo() and TagInfo.setTagExtraInfo(TagExtraInfo)."; + } + } else { + message = "Test FAILED. The TagInfo provided to test method was null"; + } + return message; + } + + /** + * Validates TagInfo.setTagLibrary(TagLibraryInfo). + * + * @return null if the test passes, otherwise a String with a failure message. + */ + public String setTagLibraryTest() { + debug("in setTagLibraryTest"); + TagInfo info = this.getTagInfo(); + String message = null; + + if (info != null) { + try { + TagLibraryInfo tlib0 = info.getTagLibrary(); + info.setTagLibrary(tlib0); + TagLibraryInfo tlib1 = info.getTagLibrary(); + if (null == tlib0 && null == tlib1) { + // both are null, and they are same + } else if (null == tlib0 || null == tlib1) { + message = "Test FAILED. Invoking TagInfo.getTagLibrary() twice got a null and a non-null TagLibraryInfo."; + } else if (!tlib0.equals(tlib1)) { + message = "Test FAILED. Invoking TagInfo.getTagLibrary() twice and returned TagLibraryInfo instances have different content. tlib0:" + + tlib0.toString() + "\n\ntlib1:" + tlib1.toString(); + } + } catch (Throwable th) { + message = "Test FAILED. Throwable caught when invoking TagInfo.getTagLibrary() and TagInfo.setTagLibrary(TagLibraryInfo)."; + } + } else { + message = "Test FAILED. The TagInfo provided to test method was null"; + } + return message; + } + + /** + * Calls JspTestUtil.debug() and includes this class name in the debug + * message. + * + * @param message + * - debug message + */ + private static void debug(String message) { + JspTestUtil.debug("[TagInfoTEI] " + message); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/URLClientIT.java new file mode 100644 index 00000000..4ad7ffa9 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/URLClientIT.java @@ -0,0 +1,338 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.2 10/09/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.taginfo; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo; +import ee.jakarta.tck.pages.common.tags.tck.SimpleTag; +import com.sun.ts.tests.common.el.api.expression.ExpressionTest; + +/** + * Test client for TagInfo. Implementation note, all tests are performed within + * a TagExtraInfo class. If the test fails, a translation error will be + * generated and a ValidationMessage array will be returned. + */ +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; +import org.junit.jupiter.api.Disabled; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_taginfo_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_taginfo_web.war"); + archive.addClasses(TagInfoTEI.class, + JspTestUtil.class, + BaseTCKExtraInfo.class, + SimpleTag.class, + ExpressionTest.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_taginfo_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/taginfo.tld", "taginfo.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetAttributesTest.jsp")), "GetAttributesTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetBodyContentTest.jsp")), "GetBodyContentTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetDisplayNameTest.jsp")), "GetDisplayNameTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetInfoStringTest.jsp")), "GetInfoStringTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetLargeIconTest.jsp")), "GetLargeIconTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetSmallIconTest.jsp")), "GetSmallIconTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetTagClassNameTest.jsp")), "GetTagClassNameTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetTagExtraInfoTest.jsp")), "GetTagExtraInfoTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetTagLibraryTest.jsp")), "GetTagLibraryTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetTagNameTest.jsp")), "GetTagNameTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetTagVariableInfosTest.jsp")), "GetTagVariableInfosTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/HasDynamicAttributesTest.jsp")), "HasDynamicAttributesTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/SetTagExtraInfoTest.jsp")), "SetTagExtraInfoTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/SetTagLibraryTest.jsp")), "SetTagLibraryTest.jsp"); + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: tagInfoGetTagNameTest + * + * @assertion_ids: JSP:JAVADOC:232 + * + * @test_Strategy: Validate TagInfo.getTagName() returns the expected values + * based on what is defined in the TLD. + */ + @Test + public void tagInfoGetTagNameTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taginfo_web/GetTagNameTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagInfoGetAttributesTest + * + * @assertion_ids: JSP:JAVADOC:233 + * + * @test_Strategy: Validate TagInfo.getAttributes() returns the expected + * values based on what is defined in the TLD. + */ + @Test + public void tagInfoGetAttributesTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taginfo_web/GetAttributesTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagInfoGetTagExtraInfoTest + * + * @assertion_ids: JSP:JAVADOC:237;JSP:JAVADOC:238 + * + * @test_Strategy: Validate TagInfo.getTagExtraInfo() returns the expected + * values based on what is defined in the TLD. This implicitly tests + * TagInfo.setTagExtraInfo(). + */ + @Test + public void tagInfoGetTagExtraInfoTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taginfo_web/GetTagExtraInfoTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagInfoGetTagClassNameTest + * + * @assertion_ids: JSP:JAVADOC:239 + * + * @test_Strategy: Validate TagInfo.getTagClassName() returns the expected + * values based on what is defined in the TLD. + */ + @Test + public void tagInfoGetTagClassNameTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taginfo_web/GetTagClassNameTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagInfoGetBodyContentTest + * + * @assertion_ids: JSP:JAVADOC:240 + * + * @test_Strategy: Validate TagInfo.getBodyContent() returns the expected + * values based on what is defined in the TLD. + */ + @Test + public void tagInfoGetBodyContentTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taginfo_web/GetBodyContentTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagInfoGetInfoStringTest + * + * @assertion_ids: JSP:JAVADOC:241 + * + * @test_Strategy: Validate TagInfo.getInfoString() returns the expected + * values based on what is defined in the TLD. + */ + @Test + public void tagInfoGetInfoStringTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taginfo_web/GetInfoStringTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagInfoGetTagLibraryTest + * + * @assertion_ids: JSP:JAVADOC:242;JSP:JAVADOC:243 + * + * @test_Strategy: Validate TagInfo.getAttributes() returns the expected + * values based on what is defined in the TLD. This implicitly tests + * TagInfo.setTagLibrary(). + */ + @Test + public void tagInfoGetTagLibraryTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taginfo_web/GetTagLibraryTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagInfoGetDisplayNameTest + * + * @assertion_ids: JSP:JAVADOC:244 + * + * @test_Strategy: Validate TagInfo.getDisplayName() returns the expected + * values based on what is defined in the TLD. + */ + @Test + public void tagInfoGetDisplayNameTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taginfo_web/GetDisplayNameTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagInfoGetSmallIconTest + * + * @assertion_ids: JSP:JAVADOC:245 + * + * @test_Strategy: Validate TagInfo.getSmallIconName() returns the expected + * values based on what is defined in the TLD. + */ + @Test + public void tagInfoGetSmallIconTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taginfo_web/GetSmallIconTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagInfoGetLargeIconTest + * + * @assertion_ids: JSP:JAVADOC:246 + * + * @test_Strategy: Validate TagInfo.getLargeIconName() returns the expected + * values based on what is defined in the TLD. + */ + @Test + public void tagInfoGetLargeIconTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taginfo_web/GetLargeIconTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagInfoGetTagVariableInfosTest + * + * @assertion_ids: JSP:JAVADOC:247 + * + * @test_Strategy: Validate TagInfo.getTagVariableInfos() returns the expected + * values based on what is defined in the TLD. + */ + @Test + public void tagInfoGetTagVariableInfosTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taginfo_web/GetTagVariableInfosTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagInfoHasDynamicAttributesTest + * + * @assertion_ids: JSP:JAVADOC:248 + * + * @test_Strategy: Validate TagInfo.hasDynamicAttributes() returns the + * expected values based on what is defined in the TLD. + */ + @Test + public void tagInfoHasDynamicAttributesTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taginfo_web/HasDynamicAttributesTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * testName: tagInfoIsValidTest assertion_ids: JSP:JAVADOC:235 test_Strategy: + * Translation-time validation of the attributes. This is a convenience method + * on the associated TagExtraInfo class. This method should be exercised with + * a jsp 1.1 tld. See tagInfoConstructor11Test. + */ + // @Test + // @Disabled("Disabled in legacy") + public void tagInfoIsValidTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taginfo_web/IsValidTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagInfoSetTagExtraInfoTest + * + * @assertion_ids: JSP:JAVADOC:237 + * + * @test_Strategy: Set the instance for extra tag information + */ + @Test + public void tagInfoSetTagExtraInfoTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taginfo_web/SetTagExtraInfoTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagInfoSetTagLibraryTest + * + * @assertion_ids: JSP:JAVADOC:242 + * + * @test_Strategy: Set the TagLibraryInfo property. + */ + @Test + public void tagInfoSetTagLibraryTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taginfo_web/SetTagLibraryTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/TagLibraryInfoTEI.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/TagLibraryInfoTEI.java new file mode 100644 index 00000000..5c811860 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/TagLibraryInfoTEI.java @@ -0,0 +1,268 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.taglibraryinfo; + +import java.util.Arrays; + +import ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.tagext.FunctionInfo; +import jakarta.servlet.jsp.tagext.TagFileInfo; +import jakarta.servlet.jsp.tagext.TagInfo; +import jakarta.servlet.jsp.tagext.TagLibraryInfo; + +/** + * A TagExtraInfo implementation to validate the methods of + * jakarta.servlet.jsp.tagext.TagLibraryInfo. + */ +public class TagLibraryInfoTEI extends BaseTCKExtraInfo { + + /** + * Default constructor. + */ + public TagLibraryInfoTEI() { + } + + // ------------------------------------------- Test Definitions ---------- + + // TagLibraryInfo.getURI() + public String getURI() { + TagLibraryInfo info = this.getTagInfo().getTagLibrary(); + JspTestUtil.debug("[TagLibraryInfoTEI] In getURL()"); + String uri = info.getURI(); + if (!"http://java.sun.com/tck/jsp/taglibinfo".equals(uri)) { + return "Test FAILED. TagLibraryInfo.getURI() returned an unexpected " + + "value. Expected: 'http://java.sun.com/tck/jsp/taglibinfo', " + + "received: " + uri; + } + return null; + } + + // TagLibraryInfo.getTagDir() + // public String getTagDir(Object o) { + // TagLibraryInfo info = (TagLibraryInfo) o; + // JspTestUtil.debug("[TagLibraryInfoTEI] In getTagDir()"); + // String tagDir = info.getTag("TagFile1").getTagLibrary().getTagdir(); + // if (!"/WEB-INF/tags/taglibinfo".equals(tagDir)) { + // return "Test FAILED. TagLibraryInfo.getTagDir() returned an unexpected " + + // "value. Expected: '/WEB-INF/tags/taglibinfo', received: " + tagDir; + // } + // return null; + // } + + // TagLibraryInfo.getPrefixString() + public String getPrefixString() { + TagLibraryInfo info = this.getTagInfo().getTagLibrary(); + JspTestUtil.debug("[TagLibraryInfoTEI] In getPrefixString()"); + String tagPrefix = info.getPrefixString(); + if (!"taglibinfo".equals(tagPrefix)) { + return "Test FAILED. TagLibraryInfo.getPrefixString() returned an " + + "unexpected value. Expected 'test', received: " + tagPrefix; + } + return null; + } + + // TagLibraryInfo.getShortName() + public String getShortName() { + TagLibraryInfo info = this.getTagInfo().getTagLibrary(); + JspTestUtil.debug("[TagLibraryInfoTEI] In getShortName()"); + String shortName = info.getShortName(); + if (!"taglibinfo".equals(shortName)) { + return "Test FAILED. TagLibraryInfo.getShortName() returned an " + + "unexpected value. Expected 'taglibinfo', received: " + shortName; + } + return null; + } + + // TagLibraryInfo.getReliableURN() + public String getReliableURN() { + TagLibraryInfo info = this.getTagInfo().getTagLibrary(); + JspTestUtil.debug("[TagLibraryInfoTEI] In getReliableURN()"); + String urn = info.getReliableURN(); + if (!"http://java.sun.com/tck/jsp/taglibinfo".equals(urn)) { + return "Test FAILED. TagLibraryInfo.getReliableURN() returned an unexpected " + + "value. Expected: 'http://java.sun.com/tck/jsp/taglibinfo', " + + "received: " + urn; + } + return null; + } + + // TagLibraryInfo.getInfoString() + public String getInfoString() { + TagLibraryInfo info = this.getTagInfo().getTagLibrary(); + JspTestUtil.debug("[TagLibraryInfoTEI] In getInfoString()"); + String infoString = info.getInfoString(); + if (!"TagLibraryInfo Validation".equals(infoString)) { + return "Test FAILED. TagLibraryInfo.getInfoString() returned an unexpected " + + "value. Expected: 'TagLibraryInfo Validation', received: " + + infoString; + } + return null; + } + + // TagLibraryInfo.getRequiredVersion() + public String getRequiredVersion() { + TagLibraryInfo info = this.getTagInfo().getTagLibrary(); + JspTestUtil.debug("[TagLibraryInfoTEI] In getRequiredVersion()"); + String version = info.getRequiredVersion(); + if (!"3.0".equals(version)) { + return "Test FAILED. TagLibraryInfo.getRequiredVersion() returned an " + + "unexpected value. Expected: '3.0', received: " + version; + } + return null; + } + + // TagLibraryInfo.getTags() + public String getTags() { + TagLibraryInfo info = this.getTagInfo().getTagLibrary(); + JspTestUtil.debug("[TagLibraryInfoTEI] In getTags()"); + TagInfo[] tagInfo = info.getTags(); + if (tagInfo == null) { + return "Test FAILED. TagLibraryInfo.getTags() returned a null " + + "value."; + } + if (tagInfo.length != 2) { + return "Test FAILED. Expected the TagInfo array length as returned " + + "by TagLibraryInfo.getTags() to be 2, actual length was: " + + tagInfo.length; + } + return null; + } + + // TagLibraryInfo.getTagFiles() + public String getTagFiles() { + TagLibraryInfo info = this.getTagInfo().getTagLibrary(); + JspTestUtil.debug("[TagLibraryInfoTEI] In getTagFiles()"); + TagFileInfo[] tagInfo = info.getTagFiles(); + if (tagInfo == null) { + return "Test FAILED. TagLibraryInfo.getTagFiles() returned a null " + + "value."; + } + if (tagInfo.length != 2) { + return "Test FAILED. Expected the TagFileInfo array length as returned " + + "by TagLibraryInfo.getTagFiles() to be 2, actual length was: " + + tagInfo.length; + } + return null; + } + + // TagLibraryInfo.getTag() + public String getTag() { + TagLibraryInfo info = this.getTagInfo().getTagLibrary(); + JspTestUtil.debug("[TagLibraryInfoTEI] In getTag()"); + TagInfo tagInfo1 = info.getTag("tag1"); + TagInfo tagInfo2 = info.getTag("tag2"); + if (tagInfo1 == null) { + return "Test FAILED. TagLibraryInfo.getTag('tag1') returned a null " + + "value."; + } + if (tagInfo2 == null) { + return "Test FAILED. TagLibraryInfo.getTag('tag2') returned a null " + + "value."; + } + return null; + } + + // TagLibraryInfo.getTagFile() + public String getTagFile() { + TagLibraryInfo info = this.getTagInfo().getTagLibrary(); + JspTestUtil.debug("[TagLibraryInfoTEI] In getTagFile()"); + TagFileInfo tagInfo1 = info.getTagFile("TagFile1"); + TagFileInfo tagInfo2 = info.getTagFile("TagFile2"); + if (tagInfo1 == null) { + return "Test FAILED. TagLibraryInfo.getTagFile('TagFile1') returned a null " + + "value."; + } + if (tagInfo2 == null) { + return "Test FAILED. TagLibraryInfo.getTagFile('TagFile2') returned a null " + + "value."; + } + return null; + } + + // TagLibraryInfo.getFunctions() + public String getFunctions() { + TagLibraryInfo info = this.getTagInfo().getTagLibrary(); + JspTestUtil.debug("[TagLibraryInfoTEI] In getFunctions()"); + FunctionInfo[] funcInfo = info.getFunctions(); + if (funcInfo == null) { + return "Test FAILED. TagLibraryInfo.getFunctions() returned a null " + + "value."; + } + + if (funcInfo.length != 2) { + return "Test FAILED. Expected the FunctionInfo array length as returned " + + "by TagLibraryInfo.getFunctions() to be 2, actual length was: " + + funcInfo.length; + } + return null; + } + + // TagLibraryInfo.getFunction() + public String getFunction() { + TagLibraryInfo info = this.getTagInfo().getTagLibrary(); + JspTestUtil.debug("[TagLibraryInfoTEI] In getFunction()"); + FunctionInfo func1 = info.getFunction("lowerCase"); + FunctionInfo func2 = info.getFunction("upperCase"); + if (func1 == null) { + return "Test FAILED. TagLibraryInfo.getFunction('lowerCase') returned a null " + + "value."; + } + if (func2 == null) { + return "Test FAILED. TagLibraryInfo.getFunction('upperCase') returned a null " + + "value."; + } + return null; + } + + // TagLibraryInfo.getTagLibraryInfos() + public String getTagLibraryInfos() { + TagLibraryInfo[] infos = this.getTagInfo().getTagLibrary() + .getTagLibraryInfos(); + if (infos.length != 2) { + return "Test FAILED. Expected length of array returned by getTagLibraryInfos()" + + " to be 2, but the actual length was " + infos.length; + } + + String[] controlUris = { "http://java.sun.com/tck/jsp/taglibinfo", + "http://java.sun.com/tck/jsp/taglibinfo2" }; + + String[] testUris = new String[2]; + + for (int i = 0, size = infos.length; i < size; i++) { + testUris[i] = infos[i].getReliableURN(); + } + + Arrays.sort(controlUris); + Arrays.sort(testUris); + + if (!Arrays.equals(controlUris, testUris)) { + return "Test FAILED. Unexpected TagLibrary information returned by" + + "getTagLibraryInfos().\n Expected to find two TagLibraryInfo instances" + + " with reliable URNs of 'http://java.sun.com/tck/jsp/taglibraryinfo'" + + " and 'http://java.sun.com/tck/jsp/taglibinfo2'.\nThe test found the" + + " following URIs '" + testUris[0] + "', '" + testUris[1] + "'."; + } + + return null; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/URLClientIT.java new file mode 100644 index 00000000..78f6b8aa --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/URLClientIT.java @@ -0,0 +1,315 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.2 10/09/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.taglibraryinfo; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.common.util.JspFunctions; +import ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo; +import ee.jakarta.tck.pages.common.tags.tck.SimpleTag; + +/** + * Test client for TagLibraryInfo. Implementation note, all tests are performed + * within a TagExtraInfo class. If the test fails, a translation error will be + * generated and a ValidationMessage array will be returned. + */ +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_tagvarinfo_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_taglibinfo_web.war"); + archive.addClasses(TagLibraryInfoTEI.class, + JspTestUtil.class, + JspFunctions.class, + BaseTCKExtraInfo.class, + SimpleTag.class); + + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_taglibinfo_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/taglibinfo.tld", "taglibinfo.tld"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/taglibinfo2.tld", "taglibinfo2.tld"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/taglibinfo/TagFile1.tag", "tags/taglibinfo/TagFile1.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/taglibinfo/TagFile2.tag", "tags/taglibinfo/TagFile2.tag"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetFunctionsTest.jsp")), "GetFunctionsTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetFunctionTest.jsp")), "GetFunctionTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetInfoStringTest.jsp")), "GetInfoStringTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetPrefixStringTest.jsp")), "GetPrefixStringTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetReliableURNTest.jsp")), "GetReliableURNTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetRequiredVersionTest.jsp")), "GetRequiredVersionTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetShortNameTest.jsp")), "GetShortNameTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetTagFilesTest.jsp")), "GetTagFilesTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetTagFileTest.jsp")), "GetTagFileTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetTagLibraryInfosTest.jsp")), "GetTagLibraryInfosTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetTagsTest.jsp")), "GetTagsTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetTagTest.jsp")), "GetTagTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetURITest.jsp")), "GetURITest.jsp"); + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: tagLibraryInfoGetURITest + * + * @assertion_ids: JSP:JAVADOC:216 + * + * @test_Strategy: Validate that TagLibaryInfo.getURI() returns the URI as + * defined by the taglib directive within a JSP page. + */ + @Test + public void tagLibraryInfoGetURITest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taglibinfo_web/GetURITest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagLibraryInfoGetPrefixStringTest + * + * @assertion_ids: JSP:JAVADOC:218 + * + * @testStrategy: Validate that TagLibraryInfo.getPrefixString() returns the + * prefix as specified by the prefix attribute of the taglib directive within + * a JSP page. + */ + @Test + public void tagLibraryInfoGetPrefixStringTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taglibinfo_web/GetPrefixStringTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagLibraryInfoGetShortNameTest + * + * @assertion_ids: JSP:JAVADOC:219 + * + * @testStrategy: Validate that TagLibraryInfo.getShortName() returns the + * short name of the tag library as specified by the <short-name> + * element in a TLD. + */ + @Test + public void tagLibraryInfoGetShortNameTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taglibinfo_web/GetShortNameTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagLibraryInfoGetReliableURNTest + * + * @assertion_ids: JSP:JAVADOC:220 + * + * @testStrategy: Validate that TagLibraryInfo.getShortName() returns the uri + * of the tag library as specified by the <uri> element in a TLD. + */ + @Test + public void tagLibraryInfoGetReliableURNTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taglibinfo_web/GetReliableURNTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagLibraryInfoGetInfoStringTest + * + * @assertion_ids: JSP:JAVADOC:221 + * + * @testStrategy: Validate that TagLibraryInfo.getInfoString() returns the + * description of the tag library as specified by the <description> + * element in a TLD. + */ + @Test + public void tagLibraryInfoGetInfoStringTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taglibinfo_web/GetInfoStringTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagLibraryInfoGetRequiredVersionTest + * + * @assertion_ids: JSP:JAVADOC:222 + * + * @testStrategy: Validate that TagLibraryInfo.getRequiredVersion() returns + * the require version of the tag library as specified by the + * <required-version> element in a TLD. + */ + @Test + public void tagLibraryInfoGetRequiredVersionTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taglibinfo_web/GetRequiredVersionTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagLibraryInfoGetTagsTest + * + * @assertion_ids: JSP:JAVADOC:223 + * + * @testStrategy: Validate that TagLibraryInfo.getTags() returns an array of + * TagInfo objects based off the tags defined by the <tag> elements in a + * TLD. + */ + @Test + public void tagLibraryInfoGetTagsTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taglibinfo_web/GetTagsTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagLibraryInfoGetTagFilesTest + * + * @assertion_ids: JSP:JAVADOC:224 + * + * @testStrategy: Validate that TagLibraryInfo.getTagFiles() returns an array + * of TagFileInfo objects based off the tags files defined by the + * <tag-file> elements in a TLD. + */ + @Test + public void tagLibraryInfoGetTagFilesTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taglibinfo_web/GetTagFilesTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagLibraryInfoGetTagTest + * + * @assertion_ids: JSP:JAVADOC:225 + * + * @testStrategy: Validate that TagLibraryInfo.getTag() returns a TagInfo + * object based off the provided discriminate. + */ + @Test + public void tagLibraryInfoGetTagTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taglibinfo_web/GetTagTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagLibraryInfoGetTagFileTest + * + * @assertion_ids: JSP:JAVADOC:226 + * + * @testStrategy: Validate that TagLibraryInfo.getTagFile() returns a + * TagFileInfo object based off the provided discriminate. + */ + @Test + public void tagLibraryInfoGetTagFileTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taglibinfo_web/GetTagFileTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagLibraryInfoGetFunctionsTest + * + * @assertion_ids: JSP:JAVADOC:227 + * + * @testStrategy: Validate that TagLibraryInfo.getFunctions() returns an array + * of FunctionInfo objects based off the functions defined by the + * <function> elements in a TLD. + */ + @Test + public void tagLibraryInfoGetFunctionsTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taglibinfo_web/GetFunctionsTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagLibraryInfoGetFunctionTest + * + * @assertion_ids: JSP:JAVADOC:228 + * + * @testStrategy: Validate that TagLibraryInfo.getFunction() returns a + * FunctionInfo object based off the provided discriminate. + */ + @Test + public void tagLibraryInfoGetFunctionTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taglibinfo_web/GetFunctionTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } + + /* + * @testName: tagLibraryInfoGetTagLibraryInfosTest + * + * @assertion_ids: JSP:JAVADOC:440 + * + * @testStrategy: Validate TagLibaryInfo.getTagLibraryInfos() returns an array + * of TagLibraryInfo objects for all taglibraries declared in the JSP. + */ + @Test + public void tagLibraryInfoGetTagLibraryInfosTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taglibinfo_web/GetTagLibraryInfosTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED."); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/APIValidator.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/APIValidator.java new file mode 100644 index 00000000..8387ab0c --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/APIValidator.java @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.taglibraryvalidator; + +import java.util.Map; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.tagext.PageData; +import jakarta.servlet.jsp.tagext.TagLibraryValidator; +import jakarta.servlet.jsp.tagext.ValidationMessage; + +public class APIValidator extends TagLibraryValidator { + + /** + * Count to track the number of times the validation method has been called. + */ + public static int callCount = 0; + + /** + * The prefix expected to be passed by the container. + */ + private static final String PREFIX = "tlv1"; + + /** + * The URI expected to be passed by the container. + */ + private static final String URI = "http://java.sun.com/tck/jsp/tlv"; + + /** + * Indicates that setInitParameters() has been called by the container. + */ + private boolean _setInitParametersCalled = false; + + /** + * Default constructor + */ + public APIValidator() { + } + + /** + * Validates the interaction between the TLV class, and the container. + * + * @param prefix + * - the taglib prefix + * @param uri + * - the taglib URI + * @param pageData + * - PageData object + * @return - Null or an Empty array of ValidationMessages. + */ + public ValidationMessage[] validate(String prefix, String uri, + PageData pageData) { + callCount++; + + // check the arguments passed in. Prefix should be one + // of the values in PREFIXES, uri, should be the same as URI. + // The PageData object should be non-null. + if (pageData == null) { + return JspTestUtil.getValidationMessage(null, + "Test FAILED. Container passed a null PageData object."); + } + + if (!URI.equals(uri)) { + return JspTestUtil.getValidationMessage(null, + "Test FAILED. Container passed in an unexpted taglib URI. Expected: " + + URI + ", recieved: " + uri); + } + + if (!PREFIX.equals(prefix)) { + return JspTestUtil.getValidationMessage(null, + "Test FAILED. Container passed in an unexpected taglib prefix." + + " Expected 'tlv1', received: " + prefix); + } + + // check that setInitParamteres was indeed called. + if (!_setInitParametersCalled) { + return JspTestUtil.getValidationMessage(null, + "Test FAILED. setInitParameters() was not called on the TLV."); + } + + // check the initialization parameters that are passed are correct. + Map map = this.getInitParameters(); + if (map != null) { + String parValue = (String) map.get("initParam"); + if (!"paramValue".equals(parValue)) { + return JspTestUtil.getValidationMessage(null, + "Test FAILED. getInitParameters returned a non-null value," + + "but an unexpected init param value was returned. Expected 'paramValue' " + + "Received: " + parValue); + } + } else { + return JspTestUtil.getValidationMessage(null, + "Test FAILED. getInitParameters" + " returned null."); + } + + // The TLV for should be called for each taglib directive. + // The test page has two such directives. + if (callCount == 2) { + System.out.println( + "[APIValidator] " + "Returning empty ValidationMessage Array."); + return new ValidationMessage[] {}; + } + System.out.println("[APIValidator] Returning null."); + return null; + + } + + /** + * Returns the initialization parameters for this TLV. + * + * @return a map containing this TLV's initialziation parameters + */ + public Map getInitParameters() { + return super.getInitParameters(); + } + + /** + * Called by the container to set this TLV's initialization parameters. + * + * @param map + * - map containing the parameters + */ + public void setInitParameters(Map map) { + super.setInitParameters(map); + _setInitParametersCalled = true; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/FailingValidator.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/FailingValidator.java new file mode 100644 index 00000000..9a63de8f --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/FailingValidator.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.taglibraryvalidator; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.tagext.PageData; +import jakarta.servlet.jsp.tagext.TagLibraryValidator; +import jakarta.servlet.jsp.tagext.ValidationMessage; + +public class FailingValidator extends TagLibraryValidator { + + public FailingValidator() { + } + + public ValidationMessage[] validate(String s, String s1, PageData pageData) { + return JspTestUtil.getValidationMessage(null, + "Test PASSED. Translation failure occurred."); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/URLClientIT.java new file mode 100644 index 00000000..cdf0b064 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/URLClientIT.java @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.2 10/09/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.taglibraryvalidator; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_taglibvalidator_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_taglibvalidator_web.war"); + archive.addClasses(APIValidator.class, FailingValidator.class, + JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_taglibvalidator_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/taglibvalfail.tld", "taglibvalfail.tld"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/taglibvalidator.tld", "taglibvalidator.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TLVTranslationErrorTest.jsp")), "TLVTranslationErrorTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TagLibraryValidatorTest.jsp")), "TagLibraryValidatorTest.jsp"); + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: tagLibraryValidatorAPITest + * + * @assertion_ids: JSP:JAVADOC:212;JSP:JAVADOC:213;JSP:JAVADOC:214 + * + * @test_Strategy: Validate the setInitParameters(), getInitParameters(), and + * validate() methods of the TagLibraryValidator class. This will verify that + * the configured TLV is called only once for each taglibrary URI defined + * within the page, that setInitParameters() is invoked by the container + * before validate is called, and that an empty array of ValidationMessages or + * a null return value from validate() indicates the page is valid, thus no + * translation error will occur. + */ + @Test + public void tagLibraryValidatorAPITest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taglibvalidator_web/TagLibraryValidatorTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + TEST_PROPS.setProperty(SEARCH_STRING, + "Test PASSED. Validator call count was 1"); + invoke(); + } + + /* + * @testName: tagLibraryValidatorTranslationFailureTest + * + * @assertion_ids: JSP:JAVADOC:182;JSP:JAVADOC:183; + * JSP:JAVADOC:184;JSP:JAVADOC:386 + * + * @test_Strategy: Validate that a translation error will occur if a non-null + * or non-empty array of ValidationMessages is returned when the validation() + * method is called. This also validates the use of the ValidationMessage + * class. + */ + @Test + public void tagLibraryValidatorTranslationFailureTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_taglibvalidator_web/TLVTranslationErrorTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/ContainerInteractionTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/ContainerInteractionTag.java new file mode 100644 index 00000000..f88c2e4a --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/ContainerInteractionTag.java @@ -0,0 +1,248 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagsupport; + +import java.util.ArrayList; +import java.util.List; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.PageContext; +import jakarta.servlet.jsp.tagext.TagSupport; + +public class ContainerInteractionTag extends TagSupport { + + /** + * Name of the application scoped where method results are stored. + */ + private String _result = null; + + /** + * Default constructor. + */ + public ContainerInteractionTag() { + super(); + } + + /** + * Gets the name of the application scoped list. + * + * @return the name of the application scoped list + */ + public String getResult() { + return _result; + } + + /** + * Sets the name of the application scoped list. + * + * @param result + * - the name of the list + */ + public void setResult(String result) { + _result = result; + } + + /** + * Return value for doStartTag(). + */ + protected String _doStartTag = null; + + /** + * Return value for doEndTag(). + */ + protected String _doEndTag = null; + + /** + * Return value for doAfterBody(). + */ + protected String _doAfterBody = null; + + /** + * The number of times to iterate over the body content minus the intial + * evaluation. + */ + private int _bodyCount = 0; + + /** + * Returns the current configured return value for doStartTag(). + * + * @return the current configured return value for doStartTag() + */ + public String getDoStartTag() { + return _doStartTag; + } + + /** + * Configures the return value for doStartTag(). + * + * @param doStartTag + * - the return value + */ + public void setDoStartTag(String doStartTag) { + _doStartTag = doStartTag; + } + + /** + * Returns the current configured return value for doEndTag(). + * + * @return the current configured return value for doEndTag() + */ + public String getDoEndTag() { + return _doEndTag; + } + + /** + * Configures the return value for doEndTag(). + * + * @param doEndTag + * - the return value + */ + public void setDoEndTag(String doEndTag) { + _doEndTag = doEndTag; + } + + /** + * Returns the number of times the body content will be evaluated minus the + * initial evaluation. + * + * @return the number of times the body content will be evaluated minus the + * initial evaluation. + */ + public Integer getBodyCount() { + return Integer.valueOf(++_bodyCount); + } + + /** + * Sets the number of times the body will be evaluated after the initial + * evaluation. + * + * @param bodyCount + * - the body evaluation count + */ + public void setBodyCount(Integer bodyCount) { + _bodyCount = bodyCount.intValue() - 1; + } + + /** + * Returns the configured value for doAfterBody(). + * + * @return the current configured value for doAfterBody() + */ + public String getDoAfterBody() { + return _doAfterBody; + } + + /** + * Configures the return value for doAfterBody(); + * + * @param doAfterBody + * - the return value for doAfterBody() + */ + public void setDoAfterBody(String doAfterBody) { + _doAfterBody = doAfterBody; + } + + /** + * Validate container behavior when returning either EVAL_BODY_INCLUDE, + * SKIP_BODY, or SKIP_PAGE. + * + * @return an int value based on the doStartTag attribute. + * @throws JspException + * if an error occurs + */ + public int doStartTag() throws JspException { + addMethodToList("doStartTag"); + int retValue = SKIP_BODY; + if ("EVAL_BODY_INCLUDE".equals(_doStartTag)) { + retValue = EVAL_BODY_INCLUDE; + } + return retValue; + } + + /** + * Validate container behavior when returning either SKIP_PAGE or EVAL_PAGE. + * + * @return an int value based on the doEndTag attribute. + * @throws JspException + * if an error occurs + */ + public int doEndTag() throws JspException { + addMethodToList("doEndTag"); + int retValue = EVAL_PAGE; + if ("SKIP_PAGE".equals(_doEndTag)) { + retValue = SKIP_PAGE; + } + return retValue; + } + + /** + * Validate container behavior when returning either EVAL_BODY_AGAIN or + * SKIP_BODY. + * + * @return an int value based on the doAfterBody attribute. + * @throws JspException + * - if an error occurs. + */ + public int doAfterBody() throws JspException { + addMethodToList("doAfterBody"); + int retValue = SKIP_BODY; + if (_bodyCount != 0) { + _bodyCount--; + retValue = EVAL_BODY_AGAIN; + } + return retValue; + } + + /** + * This will add an application scoped List to the page context based of the + * name (_result). The list contains the methods called against this tag + * handler by the container. + * + * @param methodName + * - the method name to add to the list. + */ + protected void addMethodToList(String methodName) { + if (_result != null) { + List list = (List) pageContext.getAttribute(_result, + PageContext.APPLICATION_SCOPE); + if (list == null) { + list = new ArrayList(); + list.add(methodName); + pageContext.setAttribute(_result, list, PageContext.APPLICATION_SCOPE); + } else { + list.add(methodName); + } + } + } + + /** + * Utility method to return the int value based on an Integer based + * PageContext attribute. + * + * @param varName + * - the PageContext attribute to retrieve the int value from + * @return an int representation of the Integer attribute + */ + protected int getIntValue(String varName) { + Integer i = (Integer) pageContext.findAttribute(varName); + return (i != null) ? i.intValue() : 0; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/FindAncestorTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/FindAncestorTag.java new file mode 100644 index 00000000..79896249 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/FindAncestorTag.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagsupport; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.PageContext; +import jakarta.servlet.jsp.tagext.Tag; +import jakarta.servlet.jsp.tagext.TagSupport; + +/** + * Simple tag to verify TagSupport.findAncestorWithClass(). + */ +public class FindAncestorTag extends TagSupport { + + /** + * Default constructor. + */ + public FindAncestorTag() { + super(); + } + + /** + * Validate the behavior of TagSupport.findAncestorWithClass() behaves as + * expected when test tag is nested within multiple parent tags. + * + * @return Tag.EVAL_PAGE + * @throws JspException + * if an error occurs + */ + public int doEndTag() throws JspException { + Tag tag = findAncestorWithClass(this, ParentTag.class); + try { + if (tag != null) { + if (tag instanceof ParentTag) { + String result = ((ParentTag) tag).getResult(); + if (result.equals("nested2")) { + pageContext.getOut().println("Test PASSED"); + } else { + pageContext.getOut() + .println("Test FAILED. Expected" + + "the returned ParentTag instance to return 'nested2" + + "after calling getResult() on the instance. Received:" + + " " + result); + } + } else { + pageContext.getOut() + .println("Test FAILED. findAncestor" + + "WithClass() returned a non null value, but object returned" + + "was not an instance of ParentTag. Received: " + + tag.getClass().getName()); + } + } else { + pageContext.getOut() + .println("Test FAILED. TagSupport.find" + + "AncestorWithClass returned null when is should have returned" + + "an actual Tag instance."); + } + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } finally { + pageContext.removeAttribute("nested1", PageContext.APPLICATION_SCOPE); + pageContext.removeAttribute("nested2", PageContext.APPLICATION_SCOPE); + } + return EVAL_PAGE; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/InitializationTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/InitializationTag.java new file mode 100644 index 00000000..936b55a3 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/InitializationTag.java @@ -0,0 +1,216 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagsupport; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.PageContext; +import jakarta.servlet.jsp.tagext.Tag; +import jakarta.servlet.jsp.tagext.TagSupport; + +/** + * Tag to verify that the JSP implementation object properly initialized any + * attributes present with the in tag as well as setting the pageContext and + * parent + */ +public class InitializationTag extends TagSupport { + + /** + * The first attribute. + */ + private String _attribute1 = null; + + /** + * The second attribute. + */ + private String _attribute2 = null; + + /** + * The third attribute. + */ + private String _attribute3 = null; + + /** + * The parent of this tag instance. + */ + private Tag _parent = null; + + /** + * The pageContext + */ + private PageContext _context = null; + + /** + * Default Constructor. + */ + public InitializationTag() { + } + + /** + * Returns the value of _attribute1. + * + * @return _attribute1 + */ + public String getAttribute1() { + return _attribute1; + } + + /** + * Sets the value for _attribute1. + * + * @param attribute1 + * - the value for _attribute1 + */ + public void setAttribute1(String attribute1) { + _attribute1 = attribute1; + } + + /** + * Returns the value of _attribute2. + * + * @return _attribute2 + */ + public String getAttribute2() { + return _attribute2; + } + + /** + * Sets the value for _attribute2. + * + * @param attribute2 + * - the value for _attribute2 + */ + public void setAttribute2(String attribute2) { + _attribute2 = attribute2; + } + + /** + * Returns the value for _attribute3. + * + * @return the value for _attribute3 + */ + public String getAttribute3() { + return _attribute3; + } + + /** + * Sets the value for _attribute3. + * + * @param attribute3 + * - the value for _attribute3 + */ + public void setAttribute3(String attribute3) { + _attribute3 = attribute3; + } + + /** + * Set the current page context. This method is invoked by the JSP page + * implementation object prior to doStartTag(). + *

+ * This value is *not* reset by doEndTag() and must be explicitly reset by a + * page implementation if it changes between calls to doStartTag(). + * + * @param pc + * The page context for this tag handler. + */ + public void setPageContext(PageContext pc) { + _context = pc; + } + + /** + * Set the parent (closest enclosing tag handler) of this tag handler. Invoked + * by the JSP page implementation object prior to doStartTag(). + *

+ * This value is *not* reset by doEndTag() and must be explicitly reset by a + * page implementation. + * + * @param t + * The parent tag, or null. + */ + public void setParent(Tag t) { + _parent = t; + } + + /** + * Get the parent (closest enclosing tag handler) for this tag handler. + * + * @return the current parent, or null if none. + * @see jakarta.servlet.jsp.tagext.TagSupport#findAncestorWithClass + */ + public Tag getParent() { + return _parent; + } + + /** + * Validates that the tag initialization occurs before calling doStartTag(). + * + * @return Tag.SKIP_BODY + * @throws JspException + * if an error occurred while processing this tag + */ + public int doStartTag() throws JspException { + if (_context == null) { + throw new JspException("Test FAILED. setPageContext() was not" + + " called by the container before calling doStartTag()."); + } + JspWriter out = _context.getOut(); + try { + if ("attribute1".equals(_attribute1)) { + if ("attribute2".equals(_attribute2)) { + if ("attribute3".equals(_attribute3)) { + Tag tag = this.getParent(); + if (tag != null) { + if (tag instanceof ParentTag) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. getParent() returned an " + + "unexpected value. Expected: ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagsupport.ParentTag" + + ". Received: " + tag.getClass().getName()); + } + } else { + out.println( + "Test FAILED. setParent() was not called by the container" + + " before it called doStartTag()."); + } + } else { + out.println("Test FAILED. Attribute3 was not properly" + + " initialized before the container called doStartTag()."); + } + } else { + out.println("Test FAILED. Attribute2 was not properly" + + " initialized before the container called doStartTag()."); + } + } else { + out.println("Test FAILED. Attribute1 was not properly" + + " initialized before the container called doStartTag()."); + } + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + return SKIP_BODY; + } + + public int doEndTag() throws JspException { + return EVAL_PAGE; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/ParentTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/ParentTag.java new file mode 100644 index 00000000..253db689 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/ParentTag.java @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagsupport; + +import java.util.ArrayList; +import java.util.List; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.PageContext; +import jakarta.servlet.jsp.tagext.TagSupport; + +public class ParentTag extends TagSupport { + + /** + * Name of the application scoped object where the result of the method calls + * is stored. + */ + String _result = null; + + /** + * Default constructor. + */ + public ParentTag() { + super(); + } + + /** + * Gets the name of the application scoped list. + * + * @return the name of the application scoped list + */ + public String getResult() { + return _result; + } + + /** + * Sets the name of the application scoped list. + * + * @param result + * - the name of the list + */ + public void setResult(String result) { + _result = result; + } + + /** + * Simple tag that includes the evaluation of it's body. + * + * @return Tag.EVAL_BODY_INCLUDE + * @throws jakarta.servlet.jsp.JspException + * if an error occurs. + */ + public int doStartTag() throws JspException { + addMethodToList("doStartTag"); + return EVAL_BODY_INCLUDE; + } + + /** + * Adds this method name to the method list and returns Tag.EVAL_PAGE. + * + * @return Tag.EVAL_PAGE + * @throws jakarta.servlet.jsp.JspException + * if an error occurs + */ + public int doEndTag() throws JspException { + addMethodToList("doEndTag"); + return EVAL_PAGE; + } + + /** + * Adds this method name to the method list and returns Tag.SKIP_BODY. + * + * @return Tag.SKIP_BODY + * @throws jakarta.servlet.jsp.JspException + * if an error occurs + */ + public int doAfterBody() throws JspException { + addMethodToList("doAfterBody"); + return SKIP_BODY; + } + + /** + * This will add an application scoped List to the page context based of the + * name (_result). The list contains the methods called against this tag + * handler by the container. + * + * @param methodName + * - the method name to add to the list. + */ + protected void addMethodToList(String methodName) { + if (_result == null) { + return; + } + List list = (List) pageContext.getAttribute(_result, + PageContext.APPLICATION_SCOPE); + if (list == null) { + list = new ArrayList(); + list.add(methodName); + pageContext.setAttribute(_result, list, PageContext.APPLICATION_SCOPE); + } else { + list.add(methodName); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/SynchronizationTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/SynchronizationTag.java new file mode 100644 index 00000000..37b83794 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/SynchronizationTag.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagsupport; + +import jakarta.servlet.jsp.JspException; + +public class SynchronizationTag extends ContainerInteractionTag { + + /** + * Default constructor. + */ + public SynchronizationTag() { + super(); + } + + /** + * Adds attributes for begin and nested scripting variables and returns what + * ever value is configured by the tag. + * + * @return an int value based on what the tag is configured to return + * @throws JspException + * if an error occurs + */ + public int doStartTag() throws JspException { + pageContext.setAttribute("begin", Integer.valueOf(1)); + pageContext.setAttribute("nested", Integer.valueOf(1)); + return super.doStartTag(); + } + + /** + * Adds attributes for begin and end scripting variables as well as removing + * nested from the PageContext. + * + * @return an int value based on what the tag is configured to return + * @throws JspException + */ + public int doEndTag() throws JspException { + pageContext.setAttribute("begin", + Integer.valueOf(getIntValue("begin") + 1)); + pageContext.setAttribute("end", Integer.valueOf(getIntValue("nested") + 1)); + pageContext.removeAttribute("nested"); + return super.doEndTag(); + } + + /** + * Adds attributes for begin and nested scripting variables. + * + * @return an int value based on what the tag is configured to return + * @throws JspException + */ + public int doAfterBody() throws JspException { + pageContext.setAttribute("begin", + Integer.valueOf(getIntValue("begin") + 1)); + pageContext.setAttribute("nested", + Integer.valueOf(getIntValue("nested") + 1)); + return super.doAfterBody(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/URLClientIT.java new file mode 100644 index 00000000..b8fd2c6a --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/URLClientIT.java @@ -0,0 +1,342 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.2 10/09/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagsupport; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.common.util.MethodValidatorBean; + +/** + * Test client for Container interaction with objects implementing Tag.. + */ +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_tagsupport_web"); + setTestJsp("TagSupportApiTest"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_tagsupport_web.war"); + archive.addClasses(ContainerInteractionTag.class, + FindAncestorTag.class, InitializationTag.class, + ParentTag.class, SynchronizationTag.class, + JspTestUtil.class, + MethodValidatorBean.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_tagsupport_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tagsupport.tld", "tagsupport.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/DoAfterBodyEvalBodyAgainTest.jsp")), "DoAfterBodyEvalBodyAgainTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/DoAfterBodySkipBodyTest.jsp")), "DoAfterBodySkipBodyTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/DoEndTagEvalPageTest.jsp")), "DoEndTagEvalPageTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/DoEndTagSkipPageTest.jsp")), "DoEndTagSkipPageTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/DoStartEvalBodyIncludeTest.jsp")), "DoStartEvalBodyIncludeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/DoStartSkipBodyTest.jsp")), "DoStartSkipBodyTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/FindAncestorTest.jsp")), "FindAncestorTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/MethodValidation.jsp")), "MethodValidation.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TagInitializationTest.jsp")), "TagInitializationTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TagSupportApiTest.jsp")), "TagSupportApiTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TagSupportSynchronizationTest.jsp")), "TagSupportSynchronizationTest.jsp"); + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: tagSupportTagInitializationTest + * + * @assertion_ids: + * JSP:JAVADOC:342;JSP:JAVADOC:343;JSP:JAVADOC:344;JSP:JAVADOC:345; + * JSP:JAVADOC:202;JSP:JAVADOC:203;JSP:JAVADOC:204;JSP:JAVADOC:205; + * JSP:JAVADOC:206 + * + * @test_Strategy: Validates that the container performs the proper + * initialization steps for a new tag handler instance. The PageContext, + * parent Tag (if any), and all attributes must be set prior to calling + * doStartTag(). + */ + @Test + public void tagSupportTagInitializationTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagsupport_web/TagInitializationTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: tagSupportDoStartEvalBodyIncludeTest + * + * @assertion_ids: JSP:JAVADOC:345 + * + * @test_Strategy: Validate the when doStartTag returns EVAL_BODY_INCLUDE will + * include the evaluation of the body in the current out. This will be + * verified by flushing the same out the tag should be using. The evaluated + * body shouldn't be present in the stream after the flush. This also performs + * validation on the method sequence called by the container. + */ + @Test + public void tagSupportDoStartEvalBodyIncludeTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagsupport_web/DoStartEvalBodyIncludeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: tagSupportDoStartSkipBodyTest + * + * @assertion_ids: JSP:JAVADOC:402 + * + * @test_Strategy: Validate the when doStartTag returns SKIP_BODY, the body of + * the tag is not included in the current out as the body related methods are + * not called.. + */ + @Test + public void tagSupportDoStartSkipBodyTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagsupport_web/DoStartSkipBodyTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: tagSupportDoAfterBodySkipBodyTest + * + * @assertion_ids: JSP:JAVADOC:368 + * + * @test_Strategy: Validate the doAfterBody() is called exactly once when + * doStartTag() returns EVAL_BODY_INCLUDE and doAfterBody() returns SKIP_BODY. + */ + @Test + public void tagSupportDoAfterBodySkipBodyTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagsupport_web/DoAfterBodySkipBodyTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Body Evaluated1|Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, + "Test FAILED|Body Evaluated2"); + invoke(); + } + + /* + * @testName: tagSupportDoAfterBodyEvalBodyAgainTest + * + * @assertion_ids: JSP:JAVADOC:369 + * + * @test_Strategy: Validate the doAfterBody() is called subsequent of + * doAfterBody() being called and returning EVAL_BODY_AGAIN. + */ + @Test + public void tagSupportDoAfterBodyEvalBodyAgainTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagsupport_web/DoAfterBodyEvalBodyAgainTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(SEARCH_STRING, "Body Evaluated1|Body Evaluated2"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, + "Test FAILED|Body Evaluated3"); + invoke(); + } + + /* + * @testName: tagSupportDoEndTagSkipPageTest + * + * @assertion_ids: JSP:JAVADOC:351;JSP:JAVADOC:347 + * + * @test_Strategy: Validate that page evaluation ceases when doEndTagReturns + * SKIP_PAGE. This also ensures that doEndTag will not be called in any parent + * tags. + */ + @Test + public void tagSupportDoEndTagSkipPageTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagsupport_web/DoEndTagSkipPageTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagsupport_web/MethodValidation.jsp?name=interaction&methods=doStartTag,doEndTag HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagsupport_web/MethodValidation.jsp?name=parent&methods=doStartTag HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: tagSupportDoEndTagEvalPageTest + * + * @assertion_ids: JSP:JAVADOC:350 + * + * @test_Strategy: Validate that if doEndTag() returns EVAL_PAGE, the page + * continues to evaluate. + */ + @Test + public void tagSupportDoEndTagEvalPageTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagsupport_web/DoEndTagEvalPageTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED|Test PASSED1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: tagSupportFindAncestorWithClassTest + * + * @assertion_ids: JSP:JAVADOC:194 + * + * @test_Strategy: Validate the behavior of findAncestorWithClass when test + * tag is nested with multiple tag instances of the same type. + */ + @Test + public void tagSupportFindAncestorWithClassTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagsupport_web/FindAncestorTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: tagSupportDoStartTagDefaultValueTest + * + * @assertion_ids: JSP:JAVADOC:195 + * + * @test_Strategy: Validate the default return value of + * TagSupport.doStartTag(). + */ + @Test + public void tagSupportDoStartTagDefaultValueTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "doStartTagTest"); + invoke(); + } + + /* + * @testName: tagSupportDoEndTagDefaultValueTest + * + * @assertion_ids: JSP:JAVADOC:197 + * + * @test_Strategy: Validate the default return value of TagSupport.doEndTag(). + */ + @Test + public void tagSupportDoEndTagDefaultValueTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "doEndTagTest"); + invoke(); + } + + /* + * @testName: tagSupportDoAfterBodyDefaultValueTest + * + * @assertion_ids: JSP:JAVADOC:199 + * + * @test_Strategy: Validate the default return value of + * TagSupport.doAfterBody(). + */ + @Test + public void tagSupportDoAfterBodyDefaultValueTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "doAfterBodyTest"); + invoke(); + } + + /* + * @testName: tagSupportGetSetValueTest + * + * @assertion_ids: JSP:JAVADOC:207;JSP:JAVADOC:208 + * + * @test_Strategy: Validate the behavior of TagSupport.setValue() and + * TagSupport.getValue(). + */ + @Test + public void tagSupportGetSetValueTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "setGetValue"); + invoke(); + } + + /* + * @testName: tagSupportGetValuesTest + * + * @assertion_ids: JSP:JAVADOC:210 + * + * @test_Strategy: Validate the behavior of TagSupport.getValues(). + */ + @Test + public void tagSupportGetValuesTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "getValues"); + invoke(); + } + + /* + * @testName: tagSupportRemoveValueTest + * + * @assertion_ids: JSP:JAVADOC:209 + * + * @test_Strategy: Validate the behavior of TagSupport.removeValue(). + */ + @Test + public void tagSupportRemoveValueTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "removeValue"); + invoke(); + } + + /* + * @testName: tagSupportVariableSynchronizationTest + * + * @assertion_ids: JSP:JAVADOC:348;JSP:JAVADOC:353;JSP:JAVADOC:371 + * + * @test_Strategy: Validate scripting variables are synchronized at the proper + * locations by the container. + */ + @Test + public void tagSupportVariableSynchronizationTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagsupport_web/TagSupportSynchronizationTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/TagVarInfoTEI.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/TagVarInfoTEI.java new file mode 100644 index 00000000..b647888b --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/TagVarInfoTEI.java @@ -0,0 +1,237 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagvariableinfo; + +import ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo; + +import jakarta.servlet.jsp.tagext.TagData; +import jakarta.servlet.jsp.tagext.TagVariableInfo; +import jakarta.servlet.jsp.tagext.VariableInfo; + +/** + * A TagExtraInfo implementation to validate the methods of + * jakarta.servlet.jsp.tagext.TagVariableInfo. + */ +public class TagVarInfoTEI extends BaseTCKExtraInfo { + + /** + * This is var1. + */ + private TagVariableInfo _var1 = null; + + /** + * This is var2. + */ + private TagVariableInfo _var2 = null; + + /** + * This is var3. + */ + private TagVariableInfo _var3 = null; + + /** + * This is a variable based of the value determined at translation time. + */ + private TagVariableInfo _var4 = null; + + /** + * Returns any variables defined by this TEI. + * + * @param data + * - TagData + * @return - returns null so a translation error isn't raised. + */ + public VariableInfo[] getVariableInfo(TagData data) { + return null; + } + + // ---------------------------------- Begin Tests ----------------- + + /** + * Validates TagVariableInfo.getClassName(). + * + * @return null if the test passes, otherwise a String indicating the cause of + * the failure. + */ + public String getClassName() { + initVariableInfos(this.getTagInfo().getTagVariableInfos()); + // this should be java.lang.Integer + String class1 = _var1.getClassName(); + + // this should be the default of java.lang.String + String class2 = _var2.getClassName(); + + if (!"java.lang.Integer".equals(class1)) { + return "Test FAILED. Expected getClassName() for var1 to return 'java.lang.Integer'. " + + "Received: " + class1; + } + + if (!"java.lang.String".equals(class2)) { + return "Test FAILED. Expected getClassName() for var2 to return 'java.lang.String. " + + "Received: " + class2; + } + return null; + } + + /** + * Validates TagVariableInfo.getDeclare(). + * + * @return null if the test passes, otherwise a String indicating the cause of + * the failure. + */ + public String getDeclare() { + /* + * var1 should return true var2 should return false var3 not specified, so + * return true + */ + initVariableInfos(this.getTagInfo().getTagVariableInfos()); + if (_var1.getDeclare()) { + if (!_var2.getDeclare()) { + if (_var3.getDeclare()) { + return null; + } else { + return "Test FAILED. Expected getDeclare for var3 to return true."; + } + } else { + return "Test FAILED. Expected getDeclare() for var2 to return false."; + } + } else { + return "Test FAILED. Expected getDeclare() for var1 to return true."; + } + } + + /** + * Validates TagVariableInfo.getNameFromAttribute(). + * + * @return null if the test passes, otherwise a String indicating the cause of + * the failure. + */ + public String getNameFromAttribute() { + initVariableInfos(this.getTagInfo().getTagVariableInfos()); + if (!"test".equals(_var4.getNameFromAttribute())) { + return "Test FAILED. Expected getNameFromAttribute() to return 'test'. " + + "Received: " + _var4.getNameFromAttribute(); + } + return null; + } + + /** + * Validates TagVariableInfo.getNameGiven(). + * + * @return null if the test passes, otherwise a String indicating the cause of + * the failure. + */ + public String getNameGiven() { + initVariableInfos(this.getTagInfo().getTagVariableInfos()); + if (!"var1".equals(_var1.getNameGiven())) { + return "Test FAILED. Expected getNameGiven() for var1 to return 'var1'. " + + "Received: " + _var1.getNameGiven(); + } + return null; + } + + /** + * Validates TagVariableInfo.getScope(). + * + * @return null if the test passes, otherwise a String indicating the cause of + * the failure. + */ + public String getScope() { + initVariableInfos(this.getTagInfo().getTagVariableInfos()); + // not declared, so it must be NESTED + int var1Scope = _var1.getScope(); + // should be AT_END + int var2Scope = _var2.getScope(); + // should be NESTED + int var3Scope = _var3.getScope(); + // should be AT_BEGIN + int var4Scope = _var4.getScope(); + + if (var1Scope != VariableInfo.NESTED) { + return "Test FAILED. Expected getScope() for var1 to return NESTED. " + + "Received: " + getVariableScope(var1Scope); + } + + if (var2Scope != VariableInfo.AT_END) { + return "Test FAILED. Expected getScope for var2 to return AT_END. " + + "Received: " + getVariableScope(var2Scope); + } + + if (var3Scope != VariableInfo.NESTED) { + return "Test FAILED. Expected getScope for var3 to return NESTED" + + "Received: " + getVariableScope(var3Scope); + } + + if (var4Scope != VariableInfo.AT_BEGIN) { + return "Test FAILED. Expected getScope for var4 to return AT_BEGIN" + + "Received: " + getVariableScope(var3Scope); + } + return null; + } + + /** + * Utility method to get a meaningful representation of the provided scope. + * + * @param scope + * - the variable scope + * @return a String representation of the provided scope + */ + private String getVariableScope(int scope) { + if (scope == VariableInfo.NESTED) { + return "NESTED"; + } else if (scope == VariableInfo.AT_BEGIN) { + return "AT_BEGIN"; + } else if (scope == VariableInfo.AT_END) { + return "AT_END"; + } else { + return "UNKNOWN SCOPE"; + } + } + + /** + * Initializes the VariableInfo instance variables used by the test. + * + * @param varInfo + * - an array of TagVariableInfo objects + * @return - null if the initialization process succeeds, otherwise a String + * indicating the failure. + */ + private String initVariableInfos(TagVariableInfo[] varInfo) { + if (varInfo.length != 4) { + return "Test FAILED." + + " Expected a TagVariableInfo[] length of 4, but the actual length " + + "was " + varInfo.length; + } + + for (int i = 0; i < varInfo.length; i++) { + if ("var1".equals(varInfo[i].getNameGiven())) { + _var1 = varInfo[i]; + } else if ("var2".equals(varInfo[i].getNameGiven())) { + _var2 = varInfo[i]; + } else if ("var3".equals(varInfo[i].getNameGiven())) { + _var3 = varInfo[i]; + } else { + _var4 = varInfo[i]; + } + } + return null; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/URLClientIT.java new file mode 100644 index 00000000..74b648ba --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/URLClientIT.java @@ -0,0 +1,187 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.2 10/09/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagvariableinfo; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo; +import ee.jakarta.tck.pages.common.tags.tck.SimpleTag; + +/** + * Test client for TagVariableInfo. Implementation note, all tests are performed + * within a TagExtraInfo class. If the test fails, a translation error will be + * generated and a ValidationMessage array will be returned. + */ + +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_tagvarinfo_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_tagvarinfo_web.war"); + archive.addClasses(TagVarInfoTEI.class, + JspTestUtil.class, + BaseTCKExtraInfo.class, + SimpleTag.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_tagvarinfo_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tagvarinfo.tld", "tagvarinfo.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetClassNameTest.jsp")), "GetClassNameTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetDeclareTest.jsp")), "GetDeclareTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetNameFromAttributeTest.jsp")), "GetNameFromAttributeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetNameGivenTest.jsp")), "GetNameGivenTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/GetScopeTest.jsp")), "GetScopeTest.jsp"); + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: tagVariableInfoGetClassNameTest + * + * @assertion_ids: JSP:JAVADOC:189 + * + * @test_Strategy: Validate the JSP container properly parses the specified + * TLD as refereneced by the taglib directive and that the TagVariableInfo + * objects created at translation time return the expected values when calling + * getClassName(). A translation error will occur if the test fails. + */ + @Test + public void tagVariableInfoGetClassNameTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagvarinfo_web/GetClassNameTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: tagVariableInfoGetNameGivenTest + * + * @assertion_ids: JSP:JAVADOC:187 + * + * @test_Strategy: Validate the JSP container properly parses the specified + * TLD as refereneced by the taglib directive and that the TagVariableInfo + * objects created at translation time return the expected values when calling + * getNameGiven(). A translation error will occur if the test fails. + */ + @Test + public void tagVariableInfoGetNameGivenTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagvarinfo_web/GetNameGivenTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: tagVariableInfoGetNameFromAttributeTest + * + * @assertion_ids: JSP:JAVADOC:188 + * + * @test_Strategy: Validate the JSP container properly parses the specified + * TLD as refereneced by the taglib directive and that the TagVariableInfo + * objects created at translation time return the expected values when calling + * getNameFromAttribute(). A translation error will occur if the test fails. + */ + @Test + public void tagVariableInfoGetNameFromAttributeTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagvarinfo_web/GetNameFromAttributeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: tagVariableInfoGetDeclareTest + * + * @assertion_ids: JSP:JAVADOC:190 + * + * @test_Strategy: Validate the JSP container properly parses the specified + * TLD as refereneced by the taglib directive and that the TagVariableInfo + * objects created at translation time return the expected values when calling + * getDeclare(). A translation error will occur if the test fails. + */ + @Test + public void tagVariableInfoGetDeclareTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagvarinfo_web/GetDeclareTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: tagVariableInfoGetScopeTest + * + * @assertion_ids: JSP:JAVADOC:191 + * + * @test_Strategy: Validate the JSP container properly parses the specified + * TLD as refereneced by the taglib directive and that the TagVariableInfo + * objects created at translation time return the expected values when calling + * getScope(). A translation error will occur if the test fails. + */ + @Test + public void tagVariableInfoGetScopeTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagvarinfo_web/GetScopeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/ResultVerifierBean.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/ResultVerifierBean.java new file mode 100644 index 00000000..01237b16 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/ResultVerifierBean.java @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.trycatchfinally; + +import java.util.Arrays; +import java.util.List; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.PageContext; + +public class ResultVerifierBean { + + /** + * JSP PageContext. + */ + private PageContext _context = null; + + /** + * Default constructor. + */ + public ResultVerifierBean() { + } + + public void setResult(String result) { + // No-Op...just trying to be a good bean + } + + public String getResult() { + return checkResults(); + } + + /** + * Returns the PageContext of this bean. + * + * @return the PageContext + */ + public PageContext getContext() { + return _context; + } + + /** + * Sets the PageContext of this bean. + * + * @param context + * - the PageContext + */ + public void setContext(PageContext context) { + _context = context; + } + + /** + * Validates the results of the Lists stored in the PageContext. + */ + private String checkResults() { + final int SIZE = 5; + final String[] EXPECTED = { "doStartTag", "doEndTag", "body", "doInitBody", + "doAfterBody" }; + String message = "Test PASSED"; + List catchList = (List) _context.getAttribute("cresults"); + List finallyList = (List) _context.getAttribute("fresults"); + + if (catchList == null || finallyList == null) { + message = "Test FAILED. Either one or both lists were null."; + } else { + if (catchList.size() != SIZE || finallyList.size() != SIZE) { + message = "Test FAILED. Either one or both lists had an incorrect size." + + "this inicates that the method call sequence for TryCatchFinally" + + " was performed too many times, or not enough.\n" + + "doCatch invoked for: " + + JspTestUtil.getAsString( + (String[]) catchList.toArray(new String[catchList.size()])) + + "\n" + "doFinally invoked for: " + JspTestUtil.getAsString( + (String[]) finallyList.toArray(new String[finallyList.size()])); + } else { + if (catchList.contains("attribute")) { + if (finallyList.contains("attribute")) { + message = "Test FAILED. doCatch/doFinally invoked when" + + " attribute setter method threw an Exception"; + } else { + message = "Test FAILED. doCatch invoked when attribute " + + "setter method threw an Exception."; + } + } else if (finallyList.contains("attribute")) { + message = "Test FAILED. doFinally invoked when attribute" + + " setter method threw an Exception."; + } else { + String[] ccatch = (String[]) catchList.toArray(new String[SIZE]); + String[] ffinally = (String[]) finallyList.toArray(new String[SIZE]); + Arrays.sort(ccatch); + Arrays.sort(ffinally); + for (int i = 0; i < SIZE; i++) { + if (Arrays.binarySearch(ccatch, EXPECTED[i]) < 0) { + message = "Test FAILED. doCatch not invoked when" + + " Exception thrown from " + EXPECTED[i]; + break; + } + } + + for (int i = 0; i < SIZE; i++) { + if (Arrays.binarySearch(ffinally, EXPECTED[i]) < 0) { + message = "Test FAILED. doFinally not invoked when" + + " Exception thrown from " + EXPECTED[i]; + break; + } + } + } + } + } + return message; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/TCFTestTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/TCFTestTag.java new file mode 100644 index 00000000..3c091391 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/TCFTestTag.java @@ -0,0 +1,200 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.trycatchfinally; + +import java.util.ArrayList; +import java.util.List; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.BodyTag; +import jakarta.servlet.jsp.tagext.BodyTagSupport; +import jakarta.servlet.jsp.tagext.Tag; +import jakarta.servlet.jsp.tagext.TryCatchFinally; + +public class TCFTestTag extends BodyTagSupport implements TryCatchFinally { + + private static final String DO_START_TAG = "doStartTag"; + + private static final String DO_END_TAG = "doEndTag"; + + private static final String DO_AFTER_BODY = "doAfterBody"; + + private static final String DO_INIT_BODY = "doInitBody"; + + private static final String ATTRIBUTE = "attribute"; + + private static final String BODY = "body"; + + private String _location = BODY; + + /** + * Default constructor. + */ + public TCFTestTag() { + super(); + } + + /** + * Returns the location the exception will be thrown from. + * + * @return the location of the exception + */ + public String getLocation() { + return _location; + } + + /** + * Sets the location where an exception will occur. + * + * @param location + * - the location + */ + public void setLocation(String location) throws JspException { + this._location = location; + if (ATTRIBUTE.equals(location)) { + _location = BODY; + throw new JspException(ATTRIBUTE); + } + } + + /** + * Default processing of the start tag returning EVAL_BODY_BUFFERED + * + * @return EVAL_BODY_BUFFERED + * @throws JspException + * if an error occurred while processing this tag + * @see BodyTag#doStartTag + */ + public int doStartTag() throws JspException { + if (DO_START_TAG.equals(_location)) { + throw new JspException(DO_START_TAG); + } + return super.doStartTag(); + } + + /** + * Default processing of the end tag returning EVAL_PAGE. + * + * @return EVAL_PAGE + * @throws JspException + * if an error occurred while processing this tag + * @see Tag#doEndTag + */ + public int doEndTag() throws JspException { + if (DO_END_TAG.equals(_location)) { + throw new JspException(DO_END_TAG); + } + return super.doEndTag(); + } + + /** + * Prepare for evaluation of the body just before the first body evaluation: + * no action. + * + * @throws JspException + * if an error occurred while processing this tag + * @see #setBodyContent + * @see #doAfterBody + * @see BodyTag#doInitBody + */ + public void doInitBody() throws JspException { + if (DO_INIT_BODY.equals(_location)) { + throw new JspException(DO_INIT_BODY); + } + super.doInitBody(); + } + + /** + * After the body evaluation: do not reevaluate and continue with the page. By + * default nothing is done with the bodyContent data (if any). + * + * @return SKIP_BODY + * @throws JspException + * if an error occurred while processing this tag + * @see #doInitBody + * @see BodyTag#doAfterBody + */ + public int doAfterBody() throws JspException { + if (DO_AFTER_BODY.equals(_location)) { + throw new JspException(DO_AFTER_BODY); + } + return super.doAfterBody(); + } + + /** + * Invoked if a Throwable occurs while evaluating the BODY inside a tag or in + * any of the following methods: Tag.doStartTag(), Tag.doEndTag(), + * IterationTag.doAfterBody() and BodyTag.doInitBody(). + * + *

+ * This method is not invoked if the Throwable occurs during one of the setter + * methods. + * + *

+ * This method may throw an exception (the same or a new one) that will be + * propagated further the nest chain. If an exception is thrown, doFinally() + * will be invoked. + * + *

+ * This method is intended to be used to respond to an exceptional condition. + * + * @param t + * The throwable exception navigating through this tag. + */ + public void doCatch(Throwable t) throws Throwable { + List list = (List) pageContext.getAttribute("cresults"); + if (list == null) { + list = new ArrayList(); + pageContext.setAttribute("cresults", list); + } + list.add(t.getMessage()); + + } + + /** + * Invoked in all cases after doEndTag() for any class implementing Tag, + * IterationTag or BodyTag. This method is invoked even if an exception has + * occurred in the BODY of the tag, or in any of the following methods: + * Tag.doStartTag(), Tag.doEndTag(), IterationTag.doAfterBody() and + * BodyTag.doInitBody(). + * + *

+ * This method is not invoked if the Throwable occurs during one of the setter + * methods. + * + *

+ * This method should not throw an Exception. + * + *

+ * This method is intended to maintain per-invocation data integrity and + * resource management actions. + */ + public void doFinally() { + List list = (List) pageContext.getAttribute("fresults"); + if (list == null) { + list = new ArrayList(); + pageContext.setAttribute("fresults", list); + } + list.add(_location); + _location = BODY; + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/ThrowTag.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/ThrowTag.java new file mode 100644 index 00000000..7e1f4942 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/ThrowTag.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.trycatchfinally; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.TagSupport; + +public class ThrowTag extends TagSupport { + + /** + * Default constructor. + */ + public ThrowTag() { + super(); + } + + /** + * Throws an exception. + */ + public int doEndTag() throws JspException { + throw new JspException("body"); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/URLClientIT.java new file mode 100644 index 00000000..8ab7aa2e --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/URLClientIT.java @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.2 10/09/02 + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.trycatchfinally; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + +/** + * Test client for TryCatchFinally tag tests. + */ + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_varinfo_web"); + setTestJsp("VariableInfoTest"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_tcfinally_web.war"); + archive.addClasses(ResultVerifierBean.class, + TCFTestTag.class, ThrowTag.class, + JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_tcfinally_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/trycatchfinally.tld", "trycatchfinally.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TryCatchFinallyTest.jsp")), "TryCatchFinallyTest.jsp"); + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: tryCatchFinallyTest + * + * @assertion_ids: JSP:JAVADOC:339;JSP:JAVADOC:341 + * + * @test_Strategy: Validate the behavior of the container when a tag + * implements the TryCatchFinally interface. + */ + @Test + public void tryCatchFinallyTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tcfinally_web/TryCatchFinallyTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/variableinfo/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/variableinfo/URLClientIT.java new file mode 100644 index 00000000..cacfa67b --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/variableinfo/URLClientIT.java @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.variableinfo; + + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import java.io.IOException; +import java.io.InputStream; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_varinfo_web"); + setTestJsp("VariableInfoTest"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_varinfo_web.war"); + archive.addClasses( + JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_varinfo_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/VariableInfoTest.jsp")), "VariableInfoTest.jsp"); + + return archive; + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: variableInfoCtorTest + * + * @assertion_ids: JSP:JAVADOC:177 + * + * @test_Strategy: Validate the construction of the VariableInfo object. + */ + @Test + public void variableInfoCtorTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "variableInfoCtorTest"); + invoke(); + } + + /* + * @testName: variableInfoGetVarNameTest + * + * @assertion_ids: JSP:JAVADOC:178 + * + * @test_Strategy: Validate the behavior of VariableInfo.getVarName(). + */ + @Test + public void variableInfoGetVarNameTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "variableInfoGetVarNameTest"); + invoke(); + } + + /* + * @testName: variableInfoGetClassNameTest + * + * @assertion_ids: JSP:JAVADOC:179 + * + * @test_Strategy: Validate the behavior of VariableInfo.getClassName(). + */ + @Test + public void variableInfoGetClassNameTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "variableInfoGetClassNameTest"); + invoke(); + } + + /* + * @testName: variableInfoGetDeclareTest + * + * @assertion_ids: JSP:JAVADOC:180 + * + * @test_Strategy: Validate the behavior of VariableInfo.getDeclare(). + */ + @Test + public void variableInfoGetDeclareTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "variableInfoGetDeclareTest"); + invoke(); + } + + /* + * @testName: variableInfoGetScopeTest + * + * @assertion_ids: JSP:JAVADOC:181 + * + * @test_Strategy: Validate the behavior of VariableInfo.getScopeTest(); + */ + @Test + public void variableInfoGetScopeTest() throws Exception { + TEST_PROPS.setProperty(APITEST, "variableInfoGetScopeTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/common/client/AbstractUrlClient.java b/tck/src/main/java/ee/jakarta/tck/pages/common/client/AbstractUrlClient.java new file mode 100644 index 00000000..49cc7f44 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/common/client/AbstractUrlClient.java @@ -0,0 +1,270 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.common.client; + +import com.sun.ts.tests.common.webclient.BaseUrlClient; +import com.sun.ts.tests.common.webclient.WebTestCase; +import com.sun.ts.tests.common.webclient.http.HttpRequest; + +import java.net.URL; + +import java.util.stream.Collectors; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; + +import org.jboss.arquillian.container.test.api.OperateOnDeployment; +import org.jboss.arquillian.test.api.ArquillianResource; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.TestInfo; +import static org.junit.jupiter.api.Assertions.assertFalse; +import java.lang.System.Logger; + +/** + * Base client for JSP tests. + */ +public abstract class AbstractUrlClient extends BaseUrlClient { + + private static final Logger logger = System.getLogger(AbstractUrlClient.class.getName()); + + @BeforeEach + void logStartTest(TestInfo testInfo) { + logger.log(Logger.Level.INFO, "STARTING TEST : "+testInfo.getDisplayName()); + } + + @AfterEach + void logFinishTest(TestInfo testInfo) { + logger.log(Logger.Level.INFO, "FINISHED TEST : "+testInfo.getDisplayName()); + } + + + @ArquillianResource + @OperateOnDeployment("_DEFAULT_") + public URL url; + + /** + * Identifier for a set of properties to be used for API Tests. + */ + protected static final String APITEST = "apitest"; + + /** + * Alternate API test identifier, + */ + protected static final String APITEST1 = "apitest1"; + + /** + * Test pass notification. + */ + private static final String PASSED = "Test PASSED"; + + /** + * Test failure notification. + */ + private static final String FAILED = "Test FAILED"; + + /** + * The test JSP. + */ + private String _jspName = null; + + protected InputStream goldenFileStream = null; + + public InputStream getGoldenFileStream() { + return goldenFileStream; + } + + public void setGoldenFileStream(InputStream gfStream) { + goldenFileStream = gfStream; + } + + /** + * Sets the test properties for this testCase. + * + * @param testCase + * - the current test case + */ + protected void setTestProperties(WebTestCase testCase) { + + setStandardProperties(TEST_PROPS.getProperty(STANDARD), testCase); + setGoldenFileStreamProperty(testCase, goldenFileStream); + setApiTestProperties(TEST_PROPS.getProperty(APITEST), testCase); + setApiTest1Properties(TEST_PROPS.getProperty(APITEST1), testCase); + super.setTestProperties(testCase); + } + + private void setGoldenFileStreamProperty(WebTestCase testCase, InputStream gfStream) { + testCase.setGoldenFileStream(gfStream); + } + + protected boolean isNullOrEmpty(String val) { + if (val == null || val.equals("")) { + return true; + } + return false; + } + + @BeforeEach + public void setup() throws Exception { + + logger.log(Logger.Level.INFO, "setup method AbstractUrlClient"); + + if (url == null){ + throw new Exception( + "[AbstractUrlClient] The url was not injected"); + } + + String hostname = url.getHost(); + String portnum = Integer.toString(url.getPort()); + + assertFalse(isNullOrEmpty(hostname), "[AbstractUrlClient] 'webServerHost' was not set."); + _hostname = hostname.trim(); + assertFalse(isNullOrEmpty(portnum), "[AbstractUrlClient] 'webServerPort' was not set."); + _port = Integer.parseInt(portnum.trim()); + + logger.log(Logger.Level.INFO, "[AbstractUrlClient] Test setup OK"); + } + + /** + * Sets the name of the JSP when building the request. + * + * @param jsp + * - JSP name + */ + public void setTestJsp(String jsp) { + _jspName = jsp; + } + + /** + * Sets the request and test name properties. + * + * @param testValue + * - a logical test identifier + * @param testCase + * - the current test case + */ + private void setApiTest1Properties(String testValue, WebTestCase testCase) { + if (testValue == null) { + return; + } + + // This altername API test just sets the test name and the request. + _testName = testValue; + String request = getApiTestRequest(_contextRoot, _jspName, testValue); + HttpRequest req = new HttpRequest(request, _hostname, _port); + testCase.setRequest(req); + } + + /** + * Sets the request, testname, and a search string for test passed. A search + * is also added for test failure. If found, the test will fail. + * + * @param testValue + * - a logical test identifier + * @param testCase + * - the current test case + */ + private void setApiTestProperties(String testValue, WebTestCase testCase) { + if (testValue == null) { + return; + } + + // An API test consists of a request with a request parameter of + // testname, a search string of Test PASSED, and a logical test name. + + // set the testname + _testName = testValue; + + // set the request + String request = getApiTestRequest(_contextRoot, _jspName, testValue); + + HttpRequest req = new HttpRequest(request, _hostname, _port); + testCase.setRequest(req); + + testCase.setResponseSearchString(PASSED); + testCase.setUnexpectedResponseSearchString(FAILED); + + } + + /** + * Consists of a test name, a request, and a goldenfile. + * + * @param testValue + * - a logical test identifier + * @param testCase + * - the current test case + */ + private void setStandardProperties(String testValue, WebTestCase testCase) { + + if (testValue == null) { + return; + } + // A standard test sets consists of a testname + // a request, and a goldenfile. The URI is not used + // in this case since the JSP's are assumed to be located + // at the top of the contextRoot + StringBuffer sb = new StringBuffer(50); + + // set the testname + _testName = testValue; + + // set the request + sb.append(GET).append(_contextRoot).append(SL); + sb.append(testValue).append(JSP_SUFFIX).append(HTTP10); + // setRequest(sb.toString()); + HttpRequest req = new HttpRequest(sb.toString(), _hostname, _port); + testCase.setRequest(req); + + // set the goldenfile + sb = new StringBuffer(50); + sb.append(_tsHome).append(GOLDENFILEDIR); + sb.append(_generalURI).append(SL); + sb.append(testValue).append(GF_SUFFIX); + // setGoldenFilePath(sb.toString()); + testCase.setGoldenFilePath(sb.toString()); + } + + /** + * Returns full request based of provided context root, jsp name, and test + * name. + * + * @param contextRoot + * - request context root + * @param jspName + * - JSP name + * @param testName + * - test name to execute. + * @return - Absolution URL to invoke the specified test. + */ + private static String getApiTestRequest(String contextRoot, String jspName, + String testName) { + StringBuffer sb = new StringBuffer(50); + sb.append(GET).append(contextRoot).append(SL); + sb.append(jspName).append(JSP_SUFFIX).append("?testname="); + sb.append(testName).append(HTTP11); + return sb.toString(); + } + + public static String toString(InputStream inStream) throws IOException{ + try (BufferedReader bufReader = new BufferedReader(new InputStreamReader(inStream, StandardCharsets.UTF_8))) { + return bufReader.lines().collect(Collectors.joining(System.lineSeparator())); + } + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/common/client/ServletAbstractUrlClient.java b/tck/src/main/java/ee/jakarta/tck/pages/common/client/ServletAbstractUrlClient.java new file mode 100644 index 00000000..c27f4c91 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/common/client/ServletAbstractUrlClient.java @@ -0,0 +1,293 @@ +/* + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.common.client; + +import com.sun.ts.tests.common.webclient.BaseUrlClient; +import com.sun.ts.tests.common.webclient.http.HttpRequest; +import com.sun.ts.tests.common.webclient.WebTestCase; +import com.sun.ts.tests.servlet.common.util.Data; + +import org.jboss.arquillian.container.test.api.OperateOnDeployment; +import org.jboss.arquillian.test.api.ArquillianResource; +import org.junit.jupiter.api.BeforeEach; +import static org.junit.jupiter.api.Assertions.assertFalse; + +import java.net.URL; + +import java.io.IOException; +import java.net.InetAddress; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; +import java.net.UnknownHostException; +import java.lang.System.Logger; + +/** + * Base client for Servlet tests. + */ + +public abstract class ServletAbstractUrlClient extends BaseUrlClient { + + private static final Logger logger = System.getLogger(ServletAbstractUrlClient.class.getName()); + + protected static final String APITEST = "apitest"; + + protected static final String DONOTUSEServletName = "NoServletName"; + + private InetAddress[] _addrs = null; + + private String _servlet = null; + + @ArquillianResource + @OperateOnDeployment("_DEFAULT_") + public URL url; + + + protected ServletAbstractUrlClient() { + // Construct a default context root based on the class name of + // the concrete subclass of this class. + String cname = this.getClass().getName(); + String prefix = "com.sun.ts.tests."; + if (cname.startsWith(prefix)) + cname = cname.substring(prefix.length()); + String suffix = ".URLClient"; + if (cname.endsWith(suffix)) + cname = cname.substring(0, cname.length() - suffix.length()); + cname = cname.replace('.', '_'); + cname = "/" + cname + "_web"; + setContextRoot(cname); + } + + protected void setTestProperties(WebTestCase testCase) { + setStandardProperties(TEST_PROPS.getProperty(STANDARD), testCase); + setApiTestProperties(TEST_PROPS.getProperty(APITEST), testCase); + super.setTestProperties(testCase); + } + + private boolean isNullOrEmpty(String val) { + if (val == null || val.equals("")) { + return true; + } + return false; + } + + @BeforeEach + public void setup() throws Exception { + + logger.log(Logger.Level.INFO, "setup method ServletAbstractUrlClient"); + + if (url == null){ + throw new Exception( + "[ServletAbstractUrlClient] The url was not injected"); + } + + String hostname = url.getHost(); + String portnum = Integer.toString(url.getPort()); + + assertFalse(isNullOrEmpty(hostname), "[ServletAbstractUrlClient] 'webServerHost' was not set."); + _hostname = hostname.trim(); + assertFalse(isNullOrEmpty(portnum), "[ServletAbstractUrlClient] 'webServerPort' was not set."); + _port = Integer.parseInt(portnum.trim()); + + logger.log(Logger.Level.INFO, "[ServletAbstractUrlClient] Test setup OK"); + + } + + /** + * Sets the request, testname, and a search string for test passed. A search + * is also added for test failure. If found, the test will fail. + * + * @param testValue + * - a logical test identifier + * @param testCase + * - the current test case + */ + private void setApiTestProperties(String testValue, WebTestCase testCase) { + if (testValue == null) { + return; + } + + // An API test consists of a request with a request parameter of + // testname, a search string of Test PASSED, and a logical test name. + + // set the testname + _testName = testValue; + + // set the request + StringBuilder sb = new StringBuilder(50); + if ((_servlet != null) + && (TEST_PROPS.getProperty(DONOTUSEServletName) == null)) { + sb.append(GET).append(_contextRoot).append(SL); + sb.append(_servlet).append("?testname=").append(testValue); + sb.append(HTTP11); + } else { + sb.append(GET).append(_contextRoot).append(SL); + sb.append(testValue).append(HTTP10); + } + logger.log(Logger.Level.DEBUG, "REQUEST LINE: {}", sb); + + HttpRequest req = new HttpRequest(sb.toString(), _hostname, _port); + testCase.setRequest(req); + + if ((TEST_PROPS.getProperty(SEARCH_STRING) == null) + || ((TEST_PROPS.getProperty(SEARCH_STRING)).equals(""))) { + testCase.setResponseSearchString(Data.PASSED); + testCase.setUnexpectedResponseSearchString(Data.FAILED); + } + + } + + /** + * Consists of a test name, a request, and a goldenfile. + * + * @param testValue + * - a logical test identifier + * @param testCase + * - the current test case + */ + private void setStandardProperties(String testValue, WebTestCase testCase) { + + if (testValue == null) { + return; + } + // A standard test sets consists of a testname + // a request, and a goldenfile. The URI is not used + // in this case since the JSP's are assumed to be located + // at the top of the contextRoot + StringBuffer sb = new StringBuffer(50); + + // set the testname + _testName = testValue; + + // set the request + // sb.append(GET).append(_contextRoot).append(SL); + // sb.append(testValue).append(JSP_SUFFIX).append(HTTP10); + // setRequest(sb.toString()); + // HttpRequest req = new HttpRequest(sb.toString(), _hostname, _port); + // testCase.setRequest(req); + + if (_servlet != null) { + sb.append(GET).append(_contextRoot).append(SL); + sb.append(_servlet).append("?testname=").append(testValue); + sb.append(HTTP11); + } else { + sb.append(GET).append(_contextRoot).append(SL); + sb.append(testValue).append(HTTP10); + } + logger.log(Logger.Level.DEBUG, "REQUEST LINE: {}", sb); + HttpRequest req = new HttpRequest(sb.toString(), _hostname, _port); + testCase.setRequest(req); + } + + /** + * Sets the name of the servlet to use when building a request for a single + * servlet API test. + * + * @param servlet + * - the name of the servlet + */ + protected void setServletName(String servlet) { + _servlet = servlet; + } + + protected String getServletName() { + return _servlet; + } + + protected String getLocalInterfaceInfo(boolean returnAddresses) { + String result = null; + initInetAddress(); + if (_addrs.length != 0) { + StringBuilder sb = new StringBuilder(32); + if (!returnAddresses) { + // localhost might not show up if aliased + sb.append("localhost,"); + } else { + // add 127.0.0.1 + sb.append("127.0.0.1,"); + } + + for (int i = 0; i < _addrs.length; i++) { + if (returnAddresses) { + String ip = _addrs[i].getHostAddress(); + if (!ip.equals("127.0.0.1")) { + if (ip.contains("%")) { + int scope_id = ip.indexOf("%"); + ip = ip.substring(0, scope_id); + } + sb.append(ip); + } + } else { + String host = _addrs[i].getCanonicalHostName(); + if (!host.equals("localhost")) { + sb.append(host); + } + } + if (i + 1 != _addrs.length) { + sb.append(","); + } + } + result = sb.toString(); + logger.log(Logger.Level.TRACE, "[AbstractUrlClient] Interface info: {}", result); + } + return result; + } + + private void initInetAddress() { + if (_addrs == null) { + try { + _addrs = InetAddress + .getAllByName(InetAddress.getLocalHost().getCanonicalHostName()); + } catch (UnknownHostException uhe) { + logger.log(Logger.Level.INFO, + "[AbstractUrlClient][WARNING] Unable to obtain local host information."); + } + } + } + + protected String getRequest(String rq) { + return rq; + } + + protected String getURLString(String protocol, String hostname, int portnum, String sContext) { + return protocol + "://" + hostname + ":" + portnum + "/" + sContext; + } + + protected URL getURL(String protocol, String hostname, int portnum, String sContext) throws MalformedURLException { + return new URL(protocol + "://" + hostname + ":" + portnum + "/" + sContext); + } + + + public URLConnection getHttpsURLConnection(URL newURL) + throws IOException { + // open HttpsURLConnection using TSHttpsURLConnection + URLConnection httpsURLConn = null; + + httpsURLConn = newURL.openConnection(); + if (httpsURLConn != null) { + httpsURLConn.setDoInput(true); + httpsURLConn.setDoOutput(true); + httpsURLConn.setUseCaches(false); + + } else + throw new IOException("Error opening httsURLConnection"); + + return httpsURLConn; + } + +} + diff --git a/tck/src/main/java/ee/jakarta/tck/pages/common/servlet/GenericTCKServlet.java b/tck/src/main/java/ee/jakarta/tck/pages/common/servlet/GenericTCKServlet.java new file mode 100644 index 00000000..664d03e8 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/common/servlet/GenericTCKServlet.java @@ -0,0 +1,98 @@ +/* +* Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. +* +* This program and the accompanying materials are made available under the +* terms of the Eclipse Public License v. 2.0, which is available at +* http://www.eclipse.org/legal/epl-2.0. +* +* This Source Code may also be made available under the following Secondary +* Licenses when the conditions for such availability set forth in the +* Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +* version 2 with the GNU Classpath Exception, which is available at +* https://www.gnu.org/software/classpath/license.html. +* +* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +*/ + + +package ee.jakarta.tck.pages.common.servlet; + +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import jakarta.servlet.GenericServlet; +import jakarta.servlet.ServletConfig; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; + +/** + * GenericTCKServlet.java +* +* Any test that would normally extend GenericServlet will instead extend this +* class. This will provide a simple framework from invoking various tests +* defined as methods within the servlet that extends this class. +* +* Created: Wed Jul 31 20:57:16 2002 +* +* @author Ryan Lubke +* @version %I% +*/ + +public abstract class GenericTCKServlet extends GenericServlet { + + /** + * TEST_HEADER is the constant for the testname + * header. + */ + private static final String TEST_HEADER = "testname"; + + /** + * TEST_ARGS is an array of Classes used during reflection. + */ + private static final Class[] TEST_ARGS = { ServletRequest.class, + ServletResponse.class }; + + /** + * init initializes the servlet. + * + * @param config + * - ServletConfig + */ + public void init(ServletConfig config) throws ServletException { + super.init(config); + } + + public void service(ServletRequest req, ServletResponse res) + throws ServletException, IOException { + invokeTest(req, res); + } + + /** + * invokeTest uses reflection to invoke test methods in child + * classes of this particular class. + * + * @param req + * - ServletRequest + * @param res + * - ServletResponse + * @exception ServletException + * if an error occurs + */ + protected void invokeTest(ServletRequest req, ServletResponse res) + throws ServletException { + String test = req.getParameter(TEST_HEADER); + try { + Method method = this.getClass().getMethod(test, TEST_ARGS); + method.invoke(this, req, res); + } catch (InvocationTargetException ite) { + throw new ServletException(ite.getTargetException()); + } catch (NoSuchMethodException nsme) { + throw new ServletException("Test: " + test + " does not exist"); + } catch (Throwable t) { + throw new ServletException("Error executing test: " + test, t); + } + } + +}// GenericTCKServlet \ No newline at end of file diff --git a/tck/src/main/java/ee/jakarta/tck/pages/common/servlet/HttpTCKServlet.java b/tck/src/main/java/ee/jakarta/tck/pages/common/servlet/HttpTCKServlet.java new file mode 100644 index 00000000..310bde1f --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/common/servlet/HttpTCKServlet.java @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.common.servlet; + +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import jakarta.servlet.ServletConfig; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import java.lang.System.Logger; + + /** + * GenericTCKServlet.java + * + * Any test that would normally extend GenericServlet will instead extend this + * class. This will provide a simple framework from invoking various tests + * defined as methods within the servlet that extends this class. + * + * Created: Wed Jul 31 20:57:16 2002 + * + * @version %I% + */ + +public abstract class HttpTCKServlet extends HttpServlet { + + private static final String TEXT_PLAIN = "text/plain"; + + private static final Logger logger = System.getLogger(HttpTCKServlet.class.getName()); + + /** + * TEST_HEADER is the constant for the testname + * header. + */ + private static final String TEST_HEADER = "testname"; + + /** + * TEST_ARGS is an array of Classes used during reflection. + */ + private static final Class[] TEST_ARGS = { HttpServletRequest.class, + HttpServletResponse.class }; + + /** + * init initializes the servlet. + * + * @param config + * - ServletConfig + */ + public void init(ServletConfig config) throws ServletException { + super.init(config); + } + + /** + * invokeTest uses reflection to invoke test methods in child + * classes of this particular class. + * + * @param req + * - HttpServletRequest + * @param res + * - HttpServletResponse + * @exception ServletException + * if an error occurs + */ + protected void invokeTest(HttpServletRequest req, HttpServletResponse res) + throws ServletException { + res.setContentType(TEXT_PLAIN); + char[] temp = req.getParameter(TEST_HEADER).toCharArray(); + temp[0] = Character.toLowerCase(temp[0]); + String test = new String(temp); + + try { + Method method = this.getClass().getMethod(test, TEST_ARGS); + method.invoke(this, req, res); + } catch (InvocationTargetException ite) { + throw new ServletException(ite.getTargetException()); + } catch (NoSuchMethodException nsme) { + throw new ServletException("Test: " + test + " does not exist"); + } catch (Throwable t) { + throw new ServletException("Error executing test: " + test, t); + } + } + + /** + * A basic implementation of the doGet method which will call + * invokeTest. + * + * @param req + * - HttpServletRequest + * @param res + * - HttpServletResponse + * @exception ServletException + * if an error occurs + * @exception IOException + * if an IO error occurs + */ + public void doGet(HttpServletRequest req, HttpServletResponse res) + throws ServletException, IOException { + invokeTest(req, res); + } + + /** + * A basic implementation of the doPost method which will call + * invokeTest. + * + * @param req + * - HttpServletRequest + * @param res + * - HttpServletResponse + * @exception ServletException + * if an error occurs + * @exception IOException + * if an IO error occurs + */ + public void doPost(HttpServletRequest req, HttpServletResponse res) + throws ServletException, IOException { + invokeTest(req, res); + } + +}// HttpTCKServlet \ No newline at end of file diff --git a/tck/src/main/java/ee/jakarta/tck/pages/common/tags/tck/SetTag.java b/tck/src/main/java/ee/jakarta/tck/pages/common/tags/tck/SetTag.java new file mode 100644 index 00000000..5b4a59da --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/common/tags/tck/SetTag.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.common.tags.tck; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.PageContext; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +/** + * This tag is a simplified version of the jstl c:set tag. It assigns a String + * value to a variable. + */ +public class SetTag extends SimpleTagSupport { + + private String var, value; + + public void setVar(String var) { + this.var = var; + } + + public void setValue(String value) { + this.value = value; + } + + public void doTag() throws JspException { + getJspContext().setAttribute(var, value, PageContext.PAGE_SCOPE); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/common/tags/tck/SimpleTag.java b/tck/src/main/java/ee/jakarta/tck/pages/common/tags/tck/SimpleTag.java new file mode 100644 index 00000000..c710ef75 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/common/tags/tck/SimpleTag.java @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)SimpleTag.java 1.1 10/17/02 + */ + +package ee.jakarta.tck.pages.common.tags.tck; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.DynamicAttributes; +import jakarta.servlet.jsp.tagext.JspFragment; +import jakarta.servlet.jsp.tagext.TagSupport; + +/** + * Simple tag that accepts a single string attribute. This tag generates no + * output. All work is done by TEI classes. + */ +public class SimpleTag extends TagSupport implements DynamicAttributes { + + private String _test = null; + + private String _methods = null; + + private String _echo = null; + + private Object _dynAttr = null; + + private Object _dynAttr2 = null; + + private Object _dynAttr3 = null; + + private Object _dynAttr4 = null; + + private JspFragment _fragAttr = null; + + public SimpleTag() { + super(); + } + + public void release() { + _test = null; + _methods = null; + super.release(); + } + + public int doEndTag() throws JspException { + if (_echo != null) { + try { + pageContext.getOut().println(_echo); + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + } + return super.doEndTag(); + } + + public void setTest(String test) { + _test = test; + } + + public String getTest() { + return _test; + } + + public void setDynAttribute(Object attr) { + _dynAttr = attr; + } + + public void setDynAttribute2(Object attr) { + _dynAttr2 = attr; + } + + public void setDynAttribute3(Object attr) { + _dynAttr3 = attr; + } + + public void setDynAttribute4(Object attr) { + _dynAttr4 = attr; + } + + public void setEcho(String echo) { + _echo = echo; + } + + public Object getDynAttribute() { + return _dynAttr; + } + + public void setFragAttribute(JspFragment attr) { + _fragAttr = attr; + } + + public JspFragment getFragAttribute() { + return _fragAttr; + } + + public void setDynamicAttribute(String s, String s1, Object o) + throws JspException { + // no-op + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/common/util/BaseTCKExtraInfo.java b/tck/src/main/java/ee/jakarta/tck/pages/common/util/BaseTCKExtraInfo.java new file mode 100644 index 00000000..c66ca04d --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/common/util/BaseTCKExtraInfo.java @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.common.util; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import jakarta.servlet.jsp.tagext.TagData; +import jakarta.servlet.jsp.tagext.TagExtraInfo; +import jakarta.servlet.jsp.tagext.ValidationMessage; + +public abstract class BaseTCKExtraInfo extends TagExtraInfo { + + /** + * Flag to determine if TEI was indeed called by the container. + */ + private static boolean _wasCalled = false; + + /** + * TagData instanced passed to validate method. + */ + private TagData _data = null; + + /** + * Default constructor. + */ + public BaseTCKExtraInfo() { + } + + /** + * Called by the container to validate the page. This implementation will + * inspect the test attribute and invoke a method based on its value. + * These test methods will exist in subclasses of this base class. + * + * @param tagData + * - A TagData instance provided by the container. + * @return - null if the test passes, or a non-zero lenght array of + * ValidationMessages if the test fails. + */ + public ValidationMessage[] validate(TagData tagData) { + debug("In validate(). Setting _wasCalled to true."); + _wasCalled = true; + _data = tagData; + String message = null; + String testMethod = tagData.getAttributeString("test"); + ValidationMessage[] msg = null; + + // We have the test name, use reflection and invoke the test. + try { + Method tMethod = this.getClass().getMethod(testMethod); + debug("Invoking test method " + testMethod + "() on " + + this.getClass().getName()); + String result = (String) tMethod.invoke(this); + if (result != null) { + msg = JspTestUtil.getValidationMessage(tagData.getId(), result); + } + } catch (Throwable t) { + if (t instanceof InvocationTargetException) { + Throwable root = ((InvocationTargetException) t).getTargetException(); + message = "Test FAILED. Unexpected TargetInvocationException. Root cause: " + + root.toString() + " : " + root.getMessage(); + } else { + message = "Test FAILED. Unexpected exception during test invocation. " + + t.toString() + " : " + t.getMessage(); + } + msg = JspTestUtil.getValidationMessage(tagData.getId(), message); + } + + // Everything worked as expected. Return null. + return msg; + } + + /** + * Called within the test pages to verify that the TEI was indeed called. + * + * @return true if called, otherwise false + */ + public static boolean teiWasCalled() { + return _wasCalled; + } + + /** + * Resets the state of this TEI. + */ + public static void reset() { + debug("Resetting _wasCalled to false."); + _wasCalled = false; + } + + /** + * Returns this TEI's TagData instance. + * + * @return this TEI's TagData instance. + */ + protected TagData getTagData() { + return _data; + } + + /** + * Utility method that calls JspTestUtil.debug. This method adds this class + * name to the message provided. + * + * @param message + * - a debug message + */ + private static void debug(String message) { + JspTestUtil.debug("[BaseTCKExtraInfo] " + message); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/common/util/Data.java b/tck/src/main/java/ee/jakarta/tck/pages/common/util/Data.java new file mode 100644 index 00000000..76b2ef66 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/common/util/Data.java @@ -0,0 +1,66 @@ +/* +* +* The Apache Software License, Version 1.1 +* +* Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. +* Copyright (c) 1999-2001 The Apache Software Foundation. All rights +* reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* 1. Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* +* 3. The end-user documentation included with the redistribution, if +* any, must include the following acknowlegement: +* "This product includes software developed by the +* Apache Software Foundation (http://www.apache.org/)." +* Alternately, this acknowlegement may appear in the software itself, +* if and wherever such third-party acknowlegements normally appear. +* +* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software +* Foundation" must not be used to endorse or promote products derived +* from this software without prior written permission. For written +* permission, please contact apache@apache.org. +* +* 5. Products derived from this software may not be called "Apache" +* nor may "Apache" appear in their names without prior written +* permission of the Apache Group. +* +* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR +* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +* SUCH DAMAGE. +* ==================================================================== +* +* This software consists of voluntary contributions made by many +* individuals on behalf of the Apache Software Foundation. For more +* information on the Apache Software Foundation, please see +* . +* +*/ + +package ee.jakarta.tck.pages.common.util; + +// TODO REMOVE +public final class Data { + + public static final String PASSED = "Test PASSED"; + + public static final String FAILED = "Test FAILED"; +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/common/util/InstallCompositeELResolverListener.java b/tck/src/main/java/ee/jakarta/tck/pages/common/util/InstallCompositeELResolverListener.java new file mode 100644 index 00000000..3bd86395 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/common/util/InstallCompositeELResolverListener.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.common.util; + +import jakarta.el.CompositeELResolver; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletContextEvent; +import jakarta.servlet.ServletContextListener; +import jakarta.servlet.jsp.JspApplicationContext; +import jakarta.servlet.jsp.JspFactory; + +/** + * ServletContextListener that installs a CompositeELResolver. + */ +public class InstallCompositeELResolverListener + implements ServletContextListener { + public static CompositeELResolver compResolver; + + public void contextInitialized(ServletContextEvent evt) { + + compResolver = new CompositeELResolver(); + ServletContext context = evt.getServletContext(); + JspApplicationContext jspContext = JspFactory.getDefaultFactory() + .getJspApplicationContext(context); + jspContext.addELResolver(compResolver); + + } + + public void contextDestroyed(ServletContextEvent evt) { + } + + public static CompositeELResolver getCompositeELResolver() { + return compResolver; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/common/util/JspFunctions.java b/tck/src/main/java/ee/jakarta/tck/pages/common/util/JspFunctions.java new file mode 100644 index 00000000..43f896f1 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/common/util/JspFunctions.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.common.util; + +/** + * Defines functions to be used in EL expressions and various other tests. + */ + +public class JspFunctions { + + /** + * Private construtor as all methods are static. + */ + private JspFunctions() { + } + + /** + * Returns the provided string in all lower case characters. + * + * @param value + * - string to lower case + * @return the provided value as lower case characters + */ + public static String lowerCase(String value) { + return value.toLowerCase(); + } + + /** + * Returns the provided string in all upper case characters + * + * @param value + * - string to upper case + * @return the provided value as upper case characters + */ + public static String upperCase(String value) { + return value.toUpperCase(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/common/util/JspResolverTest.java b/tck/src/main/java/ee/jakarta/tck/pages/common/util/JspResolverTest.java new file mode 100644 index 00000000..c901583b --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/common/util/JspResolverTest.java @@ -0,0 +1,236 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.common.util; + +import java.util.Iterator; + +import com.sun.ts.tests.common.el.api.resolver.ResolverTest; + +import jakarta.el.ELContext; +import jakarta.el.PropertyNotWritableException; +import jakarta.servlet.jsp.el.ImplicitObjectELResolver; +import jakarta.servlet.jsp.el.ScopedAttributeELResolver; + +public class JspResolverTest { + + /** + * Private as this class will only have static methods and members. + */ + private JspResolverTest() { + } + + public static boolean testImplicitObjELResolver(ELContext elContext, + ImplicitObjectELResolver resolver, Object base, Object property, + Object value, StringBuffer buf) throws ClassNotFoundException { + + boolean pass = true; + + buf.append("base is " + base + "\n"); + buf.append("property is " + property + "\n"); + buf.append("value is " + value + "\n"); + + // setValue() + elContext.setPropertyResolved(false); + try { + resolver.setValue(elContext, base, property, value); + if (base != null) { + buf.append("setValue() returned when base was non-null\n"); + } else { + buf.append("setValue() allowed to write a value\n"); + pass = false; + } + } catch (PropertyNotWritableException pnwe) { + if (base != null) { + buf.append("setValue() - PropertyNotWritableException "); + buf.append("when base is non-null\n"); + pass = false; + } else { + buf.append("setValue() tested successfully\n"); + buf.append("PropertyNotWritableException caught as expected\n"); + } + } + + // getValue() + elContext.setPropertyResolved(false); + Object valueRetrieved = resolver.getValue(elContext, base, property); + if (base != null) { + buf.append("getValue() returned when base was non-null\n"); + } else if (!elContext.isPropertyResolved()) { + buf.append("getValue() did not resolve\n"); + pass = false; + } else { + buf.append("getValue() tested successfully\n"); + buf.append("Value retrieved: " + valueRetrieved.toString() + "\n"); + } + + // getType() + elContext.setPropertyResolved(false); + Class type = resolver.getType(elContext, base, property); + if (base != null) { + buf.append("getType() returned when base was non-null\n"); + } else if (!elContext.isPropertyResolved()) { + buf.append("getType() did not resolve\n"); + pass = false; + } else if (type != null) { + buf.append("getType() did not return null as expected\n"); + pass = false; + } else { + buf.append("getType() returns null as expected\n"); + } + + // isReadOnly + elContext.setPropertyResolved(false); + boolean readOnly = resolver.isReadOnly(elContext, base, property); + if (base != null) { + buf.append("isReadOnly() returned when base was non-null\n"); + } else if (!elContext.isPropertyResolved()) { + buf.append("isReadOnly() did not resolve\n"); + pass = false; + } else if (!readOnly) { + buf.append("isReadOnly() returned false\n"); + pass = false; + } else + buf.append("isReadOnly() returns true as expected\n"); + + // getCommonPropertyType() + elContext.setPropertyResolved(false); + Class commonPropertyType = (resolver.getCommonPropertyType(elContext, + base)); + if (base != null) { + if (commonPropertyType != null) { + buf.append("getCommonPropertyType() returned non-null value "); + buf.append("for non-null value of base\n"); + pass = false; + } else { + buf.append("getCommonPropertyType() returned null value "); + buf.append("for non-null value of base as expected\n"); + } + + } else if (commonPropertyType != Class.forName("java.lang.String")) { + buf.append("getCommonPropertyType did not return String as expecte\n"); + pass = false; + } else { + buf.append("getCommonPropertyType() returns Class java.lang.String\n"); + } + + return pass; + } + + public static boolean testScopedAttrELResolver(ELContext elContext, + ScopedAttributeELResolver resolver, Object base, Object property, + Object value, StringBuffer buf) throws ClassNotFoundException { + + boolean pass = true; + + buf.append("base is " + base + "\n"); + buf.append("property is " + property + "\n"); + buf.append("value is " + value + "\n"); + + // setValue() + elContext.setPropertyResolved(false); + try { + resolver.setValue(elContext, base, property, value); + if (base != null) { + buf.append("setValue() returned when base was non-null\n"); + } else { + buf.append("setValue() allowed to write a value as expected\n"); + } + } catch (PropertyNotWritableException pnwe) { + buf.append("setValue() - PropertyNotWritableException "); + pass = false; + } + + // getValue() + elContext.setPropertyResolved(false); + Object valueRetrieved = resolver.getValue(elContext, base, property); + if (base != null) { + buf.append("getValue() returned when base was non-null\n"); + } else if (!elContext.isPropertyResolved()) { + buf.append("getValue() did not resolve\n"); + pass = false; + } else if (valueRetrieved == null) { + buf.append("Unexpected null value for valueRetrieved\n"); + pass = false; + } else if (valueRetrieved.toString().equals(value.toString())) { + buf.append("getValue() tested successfully\n"); + } else { + buf.append("getValue() returned incorrect value:\n"); + buf.append("Value retrieved: " + valueRetrieved.toString() + "\n"); + buf.append("Value expected: " + value.toString() + "\n"); + pass = false; + } + + // getType() + elContext.setPropertyResolved(false); + Class type = resolver.getType(elContext, base, property); + if (base != null) { + buf.append("getType() returned when base was non-null\n"); + } else if (!elContext.isPropertyResolved()) { + buf.append("getType() did not resolve\n"); + pass = false; + } else if (type == null) { + buf.append("getType() returned null unexpectedly\n"); + pass = false; + } else if (type == Class.forName("java.lang.Object")) { + buf.append("getType() returned Object as expected\n"); + } else { + buf.append("getType() returned " + type.toString() + "\n"); + pass = false; + } + + // isReadOnly + elContext.setPropertyResolved(false); + boolean readOnly = resolver.isReadOnly(elContext, base, property); + if (base != null) { + buf.append("isReadOnly() returned when base was non-null\n"); + } else if (!elContext.isPropertyResolved()) { + buf.append("isReadOnly() did not resolve\n"); + pass = false; + } else if (readOnly) { + buf.append("isReadOnly() returned true\n"); + pass = false; + } else + buf.append("isReadOnly() returns false as expected\n"); + + // getCommonPropertyType() + elContext.setPropertyResolved(false); + Class commonPropertyType = (resolver.getCommonPropertyType(elContext, + base)); + if (base != null) { + if (commonPropertyType != null) { + buf.append("getCommonPropertyType() returned non-null value "); + buf.append("for non-null value of base\n"); + pass = false; + } else { + buf.append("getCommonPropertyType() returned null value "); + buf.append("for non-null value of base as expected\n"); + } + + } else if (commonPropertyType != Class.forName("java.lang.String")) { + buf.append("getCommonPropertyType did not return String as expected\n"); + pass = false; + } else { + buf.append("getCommonPropertyType() returns Class java.lang.String\n"); + } + + return pass; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/common/util/JspTestUtil.java b/tck/src/main/java/ee/jakarta/tck/pages/common/util/JspTestUtil.java new file mode 100644 index 00000000..570c720d --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/common/util/JspTestUtil.java @@ -0,0 +1,381 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.common.util; + +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Enumeration; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; +import java.util.StringTokenizer; + +import jakarta.servlet.ServletException; +import jakarta.servlet.http.Cookie; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.PageContext; +import jakarta.servlet.jsp.tagext.BodyTag; +import jakarta.servlet.jsp.tagext.IterationTag; +import jakarta.servlet.jsp.tagext.Tag; +import jakarta.servlet.jsp.tagext.ValidationMessage; +//replacing the removed jakarta.servlet.jsp.el.ELException class from JSP 4.0 +import jakarta.el.ELException; +/** + * JSP TCK Utility class. + */ + +public class JspTestUtil { + + /** + * Flag to enabled the printing of debug statements. + */ + public static boolean DEBUG = true; + + /** + * TEST_HEADER is the constant for the testname + * header. + */ + private static final String TEST_HEADER = "testname"; + + /** + * TEST_ARGS is an array of Classes used during reflection. + */ + private static final Class[] TEST_ARGS = { HttpServletRequest.class, + HttpServletResponse.class, JspWriter.class }; + + /** + * Private as this class will only have static methods and members. + */ + private JspTestUtil() { + } + + /** + * Utility method to invoke JSP API Tests. + * + * @param testObject + * - the JSP test object + * @param req + * - the incoming client request + * @param res + * - response to the client + * @param out + * - used to write the response + * @throws ServletException + * - if an error occurs + */ + public static void invokeTest(Object testObject, HttpServletRequest req, + HttpServletResponse res, JspWriter out) throws ServletException { + String test = req.getParameter(TEST_HEADER); + debug("[JspTestUtil] Test to invoke: " + test); + try { + Method method = testObject.getClass().getMethod(test, TEST_ARGS); + method.invoke(testObject, new Object[] { req, res, out }); + } catch (InvocationTargetException ite) { + throw new ServletException(ite.getTargetException().toString()); + } catch (NoSuchMethodException nsme) { + throw new ServletException("Test: " + test + " does not exist"); + } catch (Throwable t) { + throw new ServletException("Error executing test: " + test, t); + } + } + + /** + * Utility method to handle exceptions from tests in a generic fashion. + * + * @param t + * - offending Throwable instance + * @param out + * - JspWriter to write the error info to + * @param identifier + * - a test name or other logical identifier + * @throws IOException + * if an I/O error occurs when writing to the stream. + */ + public static void handleThrowable(Throwable t, JspWriter out, + String identifier) throws IOException { + out.println("Test FAILED. " + identifier + " Unexpected Throwable caught"); + out.println("Type: " + t.getClass().getName()); + out.println("Message: " + t.getMessage()); + if (t instanceof ELException) { + Throwable sub = ((ELException) t).getCause(); + if (sub != null) { + out.println("Root Cause: " + sub); + out.println("Root Cause Message: " + sub.getMessage()); + } + } + } + + /** + * Compares the String values in an Enumeration against the provides String + * array of values. The number of elements in the enumeration must be the same + * as the size of the array, or false will be returned. False will also be + * returned if the provided Enumeration or String array is null. + * + * If all values are found, true will be returned. + * + * The comparison is performed in a case sensitive manner. + * + * @param e + * - Enumeration to validate + * @param values + * - the values expected to be found in the Enumeration + * @return true if all the expected values are found, otherwise false. + */ + public static boolean checkEnumeration(Enumeration e, String[] values) { + if (e == null || values == null) { + return false; + } + + boolean valuesFound = true; + Arrays.sort(values); + for (int i = 0; i < values.length; i++) { + String val; + try { + val = (String) e.nextElement(); + } catch (NoSuchElementException nsee) { + debug("[JspTestUtil] There were less elements in the " + + "Enumeration than expected"); + valuesFound = false; + break; + } + debug("[JspTestUtil] Looking for '" + val + "' in values: " + + getAsString(values)); + if (Arrays.binarySearch(values, val) < 0) { + debug("[JspTestUtil] Value '" + val + "' not found."); + valuesFound = false; + break; + } + } + if (e.hasMoreElements()) { + // more elements than should have been. + debug("[JspTestUtil] There were more elements in the Enumeration " + + "than expected."); + valuesFound = false; + } + + return valuesFound; + } + + /** + * Returns the provided String array in the following format: + * [n1,n2,n...] + * + * @param sArray + * - an array of String values + * @return - a String based off the values in the array + */ + public static String getAsString(String[] sArray) { + if (sArray == null) { + return null; + } + StringBuffer buf = new StringBuffer(); + buf.append("["); + for (int i = 0; i < sArray.length; i++) { + buf.append(sArray[i]); + if ((i + 1) != sArray.length) { + buf.append(","); + } + } + buf.append("]"); + return buf.toString(); + } + + /** + * Returns the provided Enumeration as a String in the following format: + * [n1,n2,n...] + * + * @param e + * - an Enumeration + * @return - a printable version of the contents of the Enumeration + */ + public static String getAsString(Enumeration e) { + return getAsString(getAsStringArray(e)); + } + + /** + * Returnes the provides Enumeration as an Array of String Arguments. + * + * @param e + * - an Enumeration + * @return - the elements of the Enumeration as an array of Strings + */ + public static String[] getAsStringArray(Enumeration e) { + List list = new ArrayList(); + while (e.hasMoreElements()) { + list.add(e.nextElement()); + } + return (String[]) list.toArray(new String[list.size()]); + } + + public static String[] getAsStringArray(Iterator i) { + List list = new ArrayList(); + while (i.hasNext()) { + Object o = i.next(); + if (o instanceof String[]) { + o = getAsString((String[]) o); + } + list.add(o); + } + return (String[]) list.toArray(new String[list.size()]); + } + + public static String[] getAsStringArray(String s) { + StringTokenizer st = new StringTokenizer(s, ","); + List list = new ArrayList(); + while (st.hasMoreTokens()) { + list.add(st.nextToken()); + } + return (String[]) list.toArray(new String[list.size()]); + } + + /** + * Writes the provided message to System.out when the debug is set. + * + * @param message + * - the message to write to System.out + */ + public static void debug(String message) { + if (DEBUG) { + System.out.println(message); + } + } + + /** + * Creates an array of ValidationMessages. + * + * @param id + * - the jsp:id + * @param message + * - the error message + * @return an arrary of ValidationMessages, or null if message is null. + */ + public static ValidationMessage[] getValidationMessage(String id, + String message) { + if (message == null) { + return null; + } else { + return new ValidationMessage[] { new ValidationMessage(id, message) }; + } + } + + /** + *

+ * Returns a String representation of the {@link Map} provided. + *

+ * + * @param map + * input map + * @return String representation of the Map + */ + public static String getAsString(Map map) { + StringBuffer sb = new StringBuffer(32); + Set entrySet = map.entrySet(); + sb.append("Map Entries\n----------------\n"); + for (Iterator i = entrySet.iterator(); i.hasNext();) { + Map.Entry entry = (Map.Entry) i.next(); + sb.append(entry.getKey()).append(", "); + sb.append(entry.getValue() instanceof Cookie + ? ((Cookie) entry.getValue()).getValue() + : entry.getValue()); + sb.append('\n'); + } + sb.append('\n'); + return sb.toString(); + } + + /** + * Utility class to get a String version of a Tag return value based on the + * int value, the type, and the method it was returned from. + * + * @param method + * - the Tag method returning the int status + * @param type + * - the tag interface type (i.e. Tag, IterationTag) + * @param status + * - the return value from the method + * @return a String representation of the information provided + */ + public static String getTagStatusAsString(String method, String type, + int status) { + String value = "UNIDENTIFIED VALUE"; + if ("doStartTag".equals(method)) { + switch (status) { + case Tag.EVAL_BODY_INCLUDE: + value = "EVAL_BODY_INCLUDE"; + break; + case Tag.SKIP_BODY: + value = "SKIP_BODY"; + break; + } + } else if ("doEndTag".equals(method)) { + switch (status) { + case Tag.SKIP_PAGE: + value = "SKIP_PAGE"; + break; + case Tag.EVAL_PAGE: + value = "EVAL_PAGE"; + break; + } + } else if ("doAfterBody".equals(method) && "IterationTag".equals(type)) { + switch (status) { + case Tag.SKIP_BODY: + value = "SKIP_BODY"; + break; + case IterationTag.EVAL_BODY_AGAIN: + value = "EVAL_BODY_AGAIN"; + break; + } + } else if ("doAfterBody".equals(method) && "BodyTag".equals(type)) { + switch (status) { + case Tag.SKIP_BODY: + value = "SKIP_BODY"; + break; + case BodyTag.EVAL_BODY_BUFFERED: + value = "EVAL_BODY_BUFFERED"; + break; + } + } + return value; + } + + public static String getScopeName(int scope) { + final String UNKNOWN_SCOPE = "Unknown Scope"; + switch (scope) { + case PageContext.PAGE_SCOPE: + return "Page"; + case PageContext.REQUEST_SCOPE: + return "Request"; + case PageContext.SESSION_SCOPE: + return "Session"; + case PageContext.APPLICATION_SCOPE: + return "Application"; + default: + return UNKNOWN_SCOPE; + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/common/util/MethodValidatorBean.java b/tck/src/main/java/ee/jakarta/tck/pages/common/util/MethodValidatorBean.java new file mode 100644 index 00000000..93512536 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/common/util/MethodValidatorBean.java @@ -0,0 +1,180 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.common.util; + +import java.util.ArrayList; +import java.util.List; +import java.util.StringTokenizer; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.PageContext; + +/** + * Simple bean to validate a set of values passed in via the PageContext against + * a user configured set of values. + */ +public class MethodValidatorBean { + + private String _methods = null; + + private PageContext _context = null; + + private String _name = null; + + /** + * Default constructor. + */ + public MethodValidatorBean() { + } + + /** + * Gets the methods used to validated against the methods added to the + * PageContext. + * + * @return - a comma separated list of methods + */ + public String getMethods() { + return _methods; + } + + /** + * Sets the methods used to validated against the methods added to the + * PageContext. + * + * @param methods + * - the methods to validate + */ + public void setMethods(String methods) { + this._methods = methods; + } + + /** + * Gets the PageContext for this bean. + * + * @return this bean's PageContext + */ + public PageContext getContext() { + return _context; + } + + /** + * Sets this bean's PageContext. + * + * @param context + * - the PageContext for this bean + */ + public void setContext(PageContext context) { + this._context = context; + } + + public String getName() { + return _name; + } + + public void setName(String name) { + _name = name; + } + + /** + * Obtains a page scoped List object from the PageContext that obtains a list + * of methods that have been called by a particular tag handler. This List + * will be compared with the methods passed to this handler via the methods + * attribute. + * + * @return a String representing the result of the check. + * @throws jakarta.servlet.jsp.JspException + */ + public String getResult() throws JspException { + String message = null; + List list = (List) _context.getAttribute(_name, + PageContext.APPLICATION_SCOPE); + + if (list != null) { + String[] calledMethods = getMethodsFromList(list); + String[] expectedMethods = getMethodsAsArray(); + + // arrays should be of equal length elements common + // between the two arrays have the same index. + if (calledMethods.length == expectedMethods.length) { + for (int i = 0; i < expectedMethods.length; i++) { + if (calledMethods[i].equals(expectedMethods[i])) { + message = "Test PASSED"; + } else { + message = "Test FAILED. Expected the following method " + + "method sequence to be called against the tag handler" + + " by the container: [ " + _methods + " ]\n" + + "Actual sequence: " + JspTestUtil.getAsString(calledMethods); + } + } + } else { + if (calledMethods.length > expectedMethods.length) { + message = "Test FAILED. The container called more methods" + + " against the tag handler than expected. " + "Expected: [ " + + _methods + " ]\n" + "Actual: " + + JspTestUtil.getAsString(calledMethods); + } else { + message = "Test FAILED. The container called fewer methods" + + " against the tag handler than expected. " + "Expected: [ " + + _methods + " ]\n" + "Actual: " + + JspTestUtil.getAsString(calledMethods); + } + } + } else { + message = "Test FAILED. Unable to obtain List of methods from " + + "the PageContext."; + } + + // reset for the next test run + _context.removeAttribute(_name, PageContext.APPLICATION_SCOPE); + return message; + } + + /** + * Returns the current value of _methods as a String array. + * + * @return a String array of values based on _methods + */ + private String[] getMethodsAsArray() { + if (_methods == null) { + return new String[0]; + } + List list = new ArrayList(); + for (StringTokenizer st = new StringTokenizer(_methods, ","); st + .hasMoreTokens();) { + list.add(st.nextToken()); + } + return getMethodsFromList(list); + } + + /** + * Returns an array of String values based on values in a List. + * + * @param list + * - List to extract the String values from + * @return a String array of values + */ + private static String[] getMethodsFromList(List list) { + if (list == null) { + return new String[0]; + } + return (String[]) list.toArray(new String[list.size()]); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/common/util/ServletTestUtil.java b/tck/src/main/java/ee/jakarta/tck/pages/common/util/ServletTestUtil.java new file mode 100644 index 00000000..bac6765b --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/common/util/ServletTestUtil.java @@ -0,0 +1,370 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.common.util; + +import jakarta.servlet.ServletOutputStream; +import jakarta.servlet.http.Cookie; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Enumeration; +import java.util.List; +import java.util.NoSuchElementException; +import java.util.StringTokenizer; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import java.lang.System.Logger; + +/** + * A set of useful utility methods to help perform test functions. + */ +public class ServletTestUtil { + + private static final Logger LOGGER = System.getLogger(ServletTestUtil.class.getName()); + + /** + * Private as this class contains only public static methods. + */ + private ServletTestUtil() { + } + + /** + * Compares the String values in an Enumeration against the provides String + * array of values. The number of elements in the enumeration must be the same + * as the size of the array, or false will be returned. False will also be + * returned if the provided Enumeration or String array is null. + * + * If all values are found, true will be returned. + * + * Note: This method isn't concerned with the presence of duplicate + * values contained in the enumeration. + * + * The comparison is performed in a case sensitive manner. + * + * @param e + * - Enumeration to validate + * @param values + * - the values expected to be found in the Enumeration + * + * @return true if all the expected values are found, otherwise false. + */ + public static boolean checkEnumeration(Enumeration e, String[] values) { + return checkEnumeration(e, values, true, true); + } + + /** + * Compares the String values in an Enumeration against the provides String + * array of values. The number of elements in the enumeration must be the same + * as the size of the array, or false will be returned. False will also be + * returned if the provided Enumeration or String array is null. + * + * If all values are found, true will be returned. + * + * Note: This method isn't concerned with the presence of duplicate + * values contained in the enumeration. + * + * The comparison is performed in a case sensitive manner. + * + * @param e + * - Enumeration to validate + * @param values + * - the values expected to be found in the Enumeration + * @param enforceSizes + * - ensures that the number of elements in the Enumeration matches + * the number of elements in the array of values + * @param allowDuplicates + * - If true, the method will true if duplicate elements are found in + * the Enumeration, if false, then false will be return if duplicate + * elements have been found. + * + * @return true if all the expected values are found, otherwise false. + */ + public static boolean checkEnumeration(Enumeration e, String[] values, + boolean enforceSizes, boolean allowDuplicates) { + List foundValues = null; + + if (e == null || !e.hasMoreElements() || values == null) { + return false; + } + + if (!allowDuplicates) { + foundValues = new ArrayList(); + } + + boolean valuesFound = true; + Arrays.sort(values); + int count = 0; + while (e.hasMoreElements()) { + Object val; + try { + val = e.nextElement(); + count++; + if (!allowDuplicates) { + if (foundValues.contains(val)) { + LOGGER.log(Logger.Level.DEBUG, "[ServletTestUtil] Duplicate values found in " + + "Enumeration when duplicates are not allowed." + + "Values found in the Enumeration: {}", getAsString(e)); + valuesFound = false; + break; + } + foundValues.add(val); + } + + } catch (NoSuchElementException nsee) { + LOGGER.log(Logger.Level.INFO, "[ServletTestUtil] There were less elements in the " + + "Enumeration than expected"); + valuesFound = false; + break; + } + LOGGER.log(Logger.Level.DEBUG, "[ServletTestUtil] Looking for '{}' in values: {}", val, getAsString(values)); + if ((Arrays.binarySearch(values, val) < 0) && (enforceSizes)) { + LOGGER.log(Logger.Level.INFO, "[ServletTestUtil] Value '{}' not found.", val); + valuesFound = false; + continue; + } + } + + if (enforceSizes) { + if (e.hasMoreElements()) { + // more elements than should have been. + LOGGER.log(Logger.Level.INFO, "[ServletTestUtil] There were more elements in the Enumeration than expected."); + valuesFound = false; + } + if (count != values.length) { + LOGGER.log(Logger.Level.INFO, "[ServletTestUtil] There number of elements in the Enumeration did not match number of expected values." + + "Expected number of Values= {}, Actual number of Enumeration elements= {}", values.length, count); + + valuesFound = false; + } + } + return valuesFound; + } + + public static boolean checkArrayList(ArrayList al, String[] values, + boolean enforceSizes, boolean allowDuplicates) { + List foundValues = null; + + if (al == null || al.isEmpty() || values == null) { + return false; + } + + if (!allowDuplicates) { + foundValues = new ArrayList(); + } + + al.trimToSize(); + boolean valuesFound = true; + Arrays.sort(values); + int len = al.size(); + for (int i = 0; i < len; i++) { + Object val = null; + val = (String) al.get(i); + LOGGER.log(Logger.Level.DEBUG, "[ServletTestUtil] val= {}", val); + if (!allowDuplicates) { + if (foundValues.contains(val)) { + LOGGER.log(Logger.Level.INFO, "[ServletTestUtil] Duplicate values found in ArrayList when duplicates are not allowed." + + "Values found in the ArrayList: {}", getAsString(al)); + valuesFound = false; + break; + } + foundValues.add(val); + } + LOGGER.log(Logger.Level.DEBUG, "[ServletTestUtil] Looking for '{}' in values: {}", val, getAsString(values)); + if ((Arrays.binarySearch(values, val) < 0) && (enforceSizes)) { + LOGGER.log(Logger.Level.INFO, "[ServletTestUtil] Value '{}' not found.", val); + valuesFound = false; + continue; + } + } + + if (enforceSizes) { + if (len != values.length) { + LOGGER.log(Logger.Level.INFO, "[ServletTestUtil] There number of elements in the ArrayList " + + "did not match number of expected values." + + "Expected number of Values= {}, Actual number of ArrayList elements= {}", values.length, len); + + valuesFound = false; + } + } + return valuesFound; + } + + public static boolean compareString(String expected, String actual) { + String[] list_expected = expected.split("[|]"); + boolean found = true; + for (int i = 0, n = list_expected.length, startIdx = 0, bodyLength = actual + .length(); i < n; i++) { + + String search = list_expected[i]; + if (startIdx >= bodyLength) { + startIdx = bodyLength; + } + + int searchIdx = actual.toLowerCase().indexOf(search.toLowerCase(), + startIdx); + + LOGGER.log(Logger.Level.DEBUG, "[ServletTestUtil] Scanning response for search string: '{}' starting at index " + "location: {}", + search , startIdx); + if (searchIdx < 0) { + found = false; + StringBuffer sb = new StringBuffer(255); + sb.append("[ServletTestUtil] Unable to find the following search string in the server's response: '") + .append(search).append("' at index: ") + .append(startIdx) + .append("\n[ServletTestUtil] Server's response:\n") + .append("-------------------------------------------\n") + .append(actual) + .append("\n-------------------------------------------\n"); + LOGGER.log(Logger.Level.DEBUG, sb.toString()); + break; + } + + LOGGER.log(Logger.Level.DEBUG, "[ServletTestUtil] Found search string: '{}' at index '{}' in the server's response", + search, searchIdx); + // the new searchIdx is the old index plus the lenght of the + // search string. + startIdx = searchIdx + search.length(); + } + return found; + } + + /** + * Returns the provided String array in the following format: + * [n1,n2,n...] + * + * @param sArray + * - an array of Objects + * @return - a String based off the values in the array + */ + public static String getAsString(Object[] sArray) { + return sArray == null ? null : Stream.of(sArray).map(Object::toString).collect(Collectors.joining(",","[","]")); + + } + + public static String getAsString(List al) { + return al == null ? null : al.stream().collect(Collectors.joining(",","[","]")); + + } + + /** + * Returns the provided Enumeration as a String in the following format: + * [n1,n2,n...] + * + * @param e + * - an Enumeration + * @return - a printable version of the contents of the Enumeration + */ + public static String getAsString(Enumeration e) { + return getAsString(getAsArray(e)); + } + + /** + * Returnes the provides Enumeration as an Array of String Arguments. + * + * @param e + * - an Enumeration + * @return - the elements of the Enumeration as an array of Objects + */ + public static Object[] getAsArray(Enumeration e) { + List list = new ArrayList<>(); + while (e.hasMoreElements()) { + list.add(e.nextElement()); + } + return list.toArray(new Object[0]); + } + + /** + * Returnes the provided string as an Array of Strings. + * + * @param value String + * @return - the elements of the String as an array of Strings + */ + public static String[] getAsArray(String value) { + StringTokenizer st = new StringTokenizer(value, ","); + String[] retValues = new String[st.countTokens()]; + for (int i = 0; st.hasMoreTokens(); i++) { + retValues[i] = st.nextToken(); + } + return retValues; + } + + public static void printResult(PrintWriter pw, String s) { + + // if string is null or empty, then it passed + if (s == null || s.equals("")) { + pw.println(Data.PASSED); + } else { + pw.println(Data.FAILED + ": " + s); + } + } + + public static void printResult(PrintWriter pw, boolean b) { + if (b) { + pw.println(Data.PASSED); + } else { + pw.println(Data.FAILED); + } + } + + public static void printResult(ServletOutputStream pw, boolean b) + throws IOException { + if (b) { + pw.println(Data.PASSED); + } else { + pw.println(Data.FAILED); + } + } + + public static void printFailureData(PrintWriter pw, ArrayList result, + Object[] expected) { + pw.println("Unable to find the expected values:\n " + " " + + ServletTestUtil.getAsString(expected) + + "\nin the results returned by the test which were:\n" + " " + + ServletTestUtil.getAsString(result)); + } + + public static void printFailureData(PrintWriter pw, Enumeration result, + Object[] expected) { + pw.println("Unable to find the expected values:\n " + " " + + ServletTestUtil.getAsString(expected) + + "\nin the results returned by the test which were:\n" + " " + + ServletTestUtil.getAsString(result)); + } + + public static int findCookie(Cookie[] cookie, String name) { + boolean found = false; + int i = 0; + if (cookie != null) { + while ((!found) && (i < cookie.length)) { + if (cookie[i].getName().equals(name)) { + found = true; + } else { + i++; + } + } + } else { + found = false; + } + if (found) { + return i; + } else { + return -1; + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/common/util/SimpleContext.java b/tck/src/main/java/ee/jakarta/tck/pages/common/util/SimpleContext.java new file mode 100644 index 00000000..a019f6b9 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/common/util/SimpleContext.java @@ -0,0 +1,303 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.common.util; + +import java.io.IOException; +import java.util.Enumeration; + +import jakarta.servlet.Servlet; +import jakarta.servlet.ServletConfig; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpSession; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.PageContext; + +/** + * Simple class to validate release is called on the PageContext object provide + * to JspFactory.release. + */ + +public class SimpleContext extends PageContext { + + /** + * Flag to determine if release() has been called. + */ + private boolean _releaseCalled = false; + + public SimpleContext() { + } + + /** + * No-op. + * + * @param servlet + * @param servletRequest + * @param servletResponse + * @param s + * @param b + * @param i + * @param b1 + * @throws IOException + * @throws IllegalStateException + * @throws IllegalArgumentException + */ + public void initialize(Servlet servlet, ServletRequest servletRequest, + ServletResponse servletResponse, String s, boolean b, int i, boolean b1) + throws IOException, IllegalStateException, IllegalArgumentException { + return; + } + + /** + * Returns null. + * + * @return null + */ + public ServletResponse getResponse() { + return null; + } + + /** + * Returns null. + * + * @return null + */ + public ServletRequest getRequest() { + return null; + } + + /** + * Returns null. + * + * @return null + */ + public jakarta.el.ELContext getELContext() { + return null; + } + + /** + * Returns null. + * + * @return null + */ + public Object getPage() { + return null; + } + + /** + * Returns null + * + * @return null + */ + public HttpSession getSession() { + return null; + } + + /** + * Returns null. + * + * @return null + */ + public JspWriter getOut() { + return null; + } + + /** + * Returns null + * + * @param i + * @return null + */ + public Enumeration getAttributeNamesInScope(int i) { + return null; + } + + /** + * Returns 0. + * + * @param s + * @return 0 + */ + public int getAttributesScope(String s) { + return 0; + } + + /** + * No-op. + * + * @param s + * @param i + */ + public void removeAttribute(String s, int i) { + } + + /** + * No-op. + * + * @param s + */ + public void removeAttribute(String s) { + } + + /** + * Returns null. + * + * @param s + * @return null + */ + public Object findAttribute(String s) { + return null; + } + + /** + * Returns null. + * + * @param s + * @param i + * @return null + */ + public Object getAttribute(String s, int i) { + return null; + } + + /** + * Returns null. + * + * @param s + * @return null + */ + public Object getAttribute(String s) { + return null; + } + + /** + * No-op. + * + * @param s + * @param o + * @param i + */ + public void setAttribute(String s, Object o, int i) { + } + + /** + * No-op. + * + * @param s + * @param o + */ + public void setAttribute(String s, Object o) { + } + + /** + * No-op. + * + * @param throwable + * @throws ServletException + * @throws IOException + */ + public void handlePageException(Throwable throwable) + throws ServletException, IOException { + } + + /** + * No-op + * + * @param e + * @throws ServletException + * @throws IOException + */ + public void handlePageException(Exception e) + throws ServletException, IOException { + } + + /** + * No-op. + * + * @param s + * @param b + * @throws ServletException + * @throws IOException + */ + public void include(String s, boolean b) + throws ServletException, IOException { + } + + /** + * No-op + * + * @param s + * @throws ServletException + * @throws IOException + */ + public void include(String s) throws ServletException, IOException { + } + + /** + * No-op + * + * @param s + * @throws ServletException + * @throws IOException + */ + public void forward(String s) throws ServletException, IOException { + } + + /** + * Returns null. + * + * @return null + */ + public ServletContext getServletContext() { + return null; + } + + /** + * Returns null. + * + * @return null + */ + public ServletConfig getServletConfig() { + return null; + } + + /** + * Returns null. + * + * @return null + */ + public Exception getException() { + return null; + } + + /** + * Performs cleanup of PageContext when called by JspFactory. + */ + public void release() { + _releaseCalled = true; + } + + public boolean isReleased() { + return _releaseCalled; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/common/xml/common.xml b/tck/src/main/java/ee/jakarta/tck/pages/common/xml/common.xml new file mode 100644 index 00000000..129cdf43 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/common/xml/common.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/tck/src/main/java/ee/jakarta/tck/pages/lib/implementation/sun/common/SunRIURL.java b/tck/src/main/java/ee/jakarta/tck/pages/lib/implementation/sun/common/SunRIURL.java new file mode 100644 index 00000000..c519ec73 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/lib/implementation/sun/common/SunRIURL.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.lib.implementation.sun.common; + +import java.net.*; +import com.sun.ts.lib.util.*; +import com.sun.ts.lib.porting.*; + +/** + * This is a J2EE Reference specific implementation of the TSURLInterface which + * is to be used for J2EE-TS testing. TS tests use this interface to obtain the + * URL String to use to access a given web component. If a given J2EE Server + * implmentation requires that URLs be created in a different manner, then this + * implementation can be replaced. + * + * @author Kyle Grucci + */ +public class SunRIURL implements TSURLInterface { + private URL url = null; + + /** + * This method is called by TS tests to get the URL to use to access a given + * web component. + * + * @param protocol + * - the name of the protocol. + * @param host + * - the name of the host. + * @param port + * - the port number. + * @param file + * - the host file. + * @return a valid URL object. + */ + public URL getURL(String protocol, String host, int port, String file) + throws MalformedURLException { + try { + url = new URL(protocol, host, port, file); + } catch (MalformedURLException e) { + // TestUtil.logErr("Failed during URL creation", e); + throw e; + } + return url; + } + + /** + * This method is called by TS tests to get the URL to use to access a given + * web component. + * + * @param protocol + * - the name of the protocol. + * @param host + * - the name of the host. + * @param port + * - the port number. + * @param file + * - the host file. + * @return a valid URL as a String. + */ + public String getURLString(String protocol, String host, int port, + String file) { + if (file.startsWith("/")) + return protocol + "://" + host + ":" + port + file; + else + return protocol + "://" + host + ":" + port + "/" + file; + } + + /** + * This method is called by TS tests to get the request string to use to + * access a given web component. + * + * @param request + * - the request file. + * @return a valid String object. + */ + public String getRequest(String request) { + return request; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/signaturetest/jsp/JSPSigTestIT.java b/tck/src/main/java/ee/jakarta/tck/pages/signaturetest/jsp/JSPSigTestIT.java new file mode 100644 index 00000000..d097b919 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/signaturetest/jsp/JSPSigTestIT.java @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.signaturetest.jsp; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.PrintWriter; +import java.util.ArrayList; + +import org.junit.jupiter.api.Test; + +import com.sun.ts.tests.signaturetest.SigTest; +import com.sun.ts.tests.signaturetest.SigTestResult; +import java.util.Properties; +import java.lang.System.Logger; + + +/* + * This class is a simple example of a signature test that extends the + * SigTest framework class. This signature test is run outside of the + * Java EE containers. This class also contains the boilerplate + * code necessary to create a signature test using the test framework. + * To see a complete TCK example see the javaee directory for the Java EE + * TCK signature test class. + */ +public class JSPSigTestIT extends SigTest { + + private static final Logger logger = System.getLogger(JSPSigTestIT.class.getName()); + + public JSPSigTestIT() { + setup(); + } + + /***** Abstract Method Implementation *****/ + + /** + * Returns a list of strings where each string represents a package name. Each + * package name will have it's signature tested by the signature test + * framework. + * + * @return String[] The names of the packages whose signatures should be + * verified. + */ + protected String[] getPackages() { + return new String[] { "jakarta.servlet.jsp", "jakarta.servlet.jsp.el", + "jakarta.servlet.jsp.tagext" }; + } + + + /* + * The following comments are specified in the base class that defines the + * signature tests. This is done so the test finders will find the right class + * to run. The implementation of these methods is inherited from the super + * class which is part of the signature test framework. + */ + + // NOTE: If the API under test is not part of your testing runtime + // environment, you may use the property sigTestClasspath to specify + // where the API under test lives. This should almost never be used. + // Normally the API under test should be specified in the classpath + // of the VM running the signature tests. Use either the first + // comment or the one below it depending on which properties your + // signature tests need. Please do not use both comments. + + + + /* + * The following comments are specified in the base class that defines the + * signature tests. This is done so the test finders will find the right class + * to run. The implementation of these methods is inherited from the super + * class which is part of the signature test framework. + */ + + // NOTE: If the API under test is not part of your testing runtime + // environment, you may use the property sigTestClasspath to specify + // where the API under test lives. This should almost never be used. + // Normally the API under test should be specified in the classpath + // of the VM running the signature tests. Use either the first + // comment or the one below it depending on which properties your + // signature tests need. Please do not use both comments. + + + /* + * @testName: signatureTest + * + * @assertion: A JSP container must implement the required classes and APIs + * specified in the JSP Specification. + * + * @test_Strategy: Using reflection, gather the implementation specific + * classes and APIs. Compare these results with the expected (required) + * classes and APIs. + * + */ + @Test + public void signatureTest() throws Exception { + + logger.log(Logger.Level.INFO, "$$$ SigTestIT.signatureTest() called"); + String mapFile = null; + String packageFile = null; + String repositoryDir = null; + Properties mapFileAsProps = null; + String[] packages = getPackages(); + String apiPackage = "jakarta.servlet.jsp"; + + try { + + InputStream inStreamMapfile = JSPSigTestIT.class.getClassLoader().getResourceAsStream("ee/jakarta/tck/pages/signaturetest/jsp/sig-test.map"); + File mFile = writeStreamToTempFile(inStreamMapfile, "sig-test", ".map"); + mapFile = mFile.getCanonicalPath(); + logger.log(Logger.Level.INFO, "mapFile location is :"+mapFile); + + InputStream inStreamPackageFile = JSPSigTestIT.class.getClassLoader().getResourceAsStream("ee/jakarta/tck/pages/signaturetest/jsp/sig-test-pkg-list.txt"); + File pFile = writeStreamToTempFile(inStreamPackageFile, "sig-test-pkg-list", ".txt"); + packageFile = pFile.getCanonicalPath(); + logger.log(Logger.Level.INFO, "packageFile location is :"+packageFile); + + mapFileAsProps = getSigTestDriver().loadMapFile(mapFile); + String packageVersion = mapFileAsProps.getProperty(apiPackage); + logger.log(Logger.Level.INFO, "Package version from mapfile :"+packageVersion); + + InputStream inStreamSigFile = JSPSigTestIT.class.getClassLoader().getResourceAsStream("ee/jakarta/tck/pages/signaturetest/jsp/jakarta.servlet.jsp.sig_"+packageVersion); + File sigFile = writeStreamToSigFile(inStreamSigFile, apiPackage, packageVersion); + logger.log(Logger.Level.INFO, "signature File location is :"+sigFile.getCanonicalPath()); + + } catch(IOException ex) { + logger.log(Logger.Level.ERROR , "Exception while creating temp files :"+ex); + } + + super.signatureTest(mapFile, packageFile, mapFileAsProps, packages); + } + + /* + * Call the parent class's cleanup method. + */ + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/build.xml b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/build.xml new file mode 100644 index 00000000..c29be0dd --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/build.xml @@ -0,0 +1,22 @@ + + + + + + diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/charsequence/DeferredSyntaxAllowedAsLiteralTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/charsequence/DeferredSyntaxAllowedAsLiteralTag.java new file mode 100644 index 00000000..82f43d8e --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/charsequence/DeferredSyntaxAllowedAsLiteralTag.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.configuration.charsequence; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class DeferredSyntaxAllowedAsLiteralTag extends SimpleTagSupport { + + private String poundExpr; + + public void setPoundExpr(String poundExpr) { + this.poundExpr = poundExpr; + } + + public void doTag() throws JspException, IOException { + JspWriter out = getJspContext().getOut(); + + try { + out.println("From tag handler: " + poundExpr); + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "DeferredSyntaxAllowedAsLiteralTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/charsequence/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/charsequence/URLClientIT.java new file mode 100644 index 00000000..7eda64a2 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/charsequence/URLClientIT.java @@ -0,0 +1,195 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.configuration.charsequence; + + +import java.io.IOException; +import java.io.InputStream; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + private static final String CONTEXT_ROOT = "/jsp_config_charsequence_web"; + + public static String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + + public URLClientIT() throws Exception { + + setGeneralURI("/jsp/spec/configuration/charsequence"); + setContextRoot(CONTEXT_ROOT); + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_config_charsequence_web.war"); + archive.addClasses(DeferredSyntaxAllowedAsLiteralTag.class, + JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_config_charsequence_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/config_charsequence.tld", "config_charsequence.tld"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/noDeferredSyntaxAllowedAsLiteralTemplateTextTest.jsp")), "noDeferredSyntaxAllowedAsLiteralTemplateTextTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/noDeferredSyntaxAllowedAsLiteralActionTest.jsp")), "noDeferredSyntaxAllowedAsLiteralActionTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/deferredSyntaxAllowedAsLiteralTrueTemplateTextTest.jsp")), "deferredSyntaxAllowedAsLiteralTrueTemplateTextTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/deferredSyntaxAllowedAsLiteralTrueActionTest.jsp")), "deferredSyntaxAllowedAsLiteralTrueActionTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/deferredSyntaxAllowedAsLiteralFalseTemplateTextTest.jsp")), "deferredSyntaxAllowedAsLiteralFalseTemplateTextTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/deferredSyntaxAllowedAsLiteralFalseActionTest.jsp")), "deferredSyntaxAllowedAsLiteralFalseActionTest.jsp"); + + return archive; + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: deferredSyntaxAllowedAsLiteralTrueTemplateTextTest + * + * @assertion_ids: JSP:SPEC:296 + * + * @test_Strategy: Invoke a jsp that is a member of a jsp-property-group in + * which the deferred-syntax-allowed-as-literal element is set to true. Verify + * that when the character sequence "#{" appears in template text, the + * sequence is treated as literal characters. + * [DeferredSyntaxAllowedAsLiteralElement] + */ + @Test + public void deferredSyntaxAllowedAsLiteralTrueTemplateTextTest() + throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/deferredSyntaxAllowedAsLiteralTrueTemplateTextTest.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, + "deferredSyntaxAllowedAsLiteralTrueTemplateTextTest"); + invoke(); + } + + /* + * @testName: deferredSyntaxAllowedAsLiteralFalseTemplateTextTest + * + * @assertion_ids: JSP:SPEC:295 + * + * @test_Strategy: Invoke a jsp that is a member of a jsp-property-group in + * which the deferred-syntax-allowed-as-literal element is set to false. + * Verify that when the character sequence "#{" appears in template text, an + * internal server error results. [TranslationError#{Sequence] + */ + @Test + public void deferredSyntaxAllowedAsLiteralFalseTemplateTextTest() + throws Exception { + TEST_PROPS.setProperty(REQUEST, "GET " + CONTEXT_ROOT + + "/deferredSyntaxAllowedAsLiteralFalseTemplateTextTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: deferredSyntaxAllowedAsLiteralTrueActionTest + * + * @assertion_ids: JSP:SPEC:296 + * + * @test_Strategy: Invoke a jsp that is a member of a jsp-property-group in + * which the deferred-syntax-allowed-as-literal element is set to true. Verify + * that when the character sequence "#{" is passed as an attribute to an + * action, the sequence is treated as literal characters. + * [DeferredSyntaxAllowedAsLiteralElement] + */ + @Test + public void deferredSyntaxAllowedAsLiteralTrueActionTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/deferredSyntaxAllowedAsLiteralTrueActionTest.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, + "deferredSyntaxAllowedAsLiteralTrueActionTest"); + invoke(); + } + + /* + * @testName: deferredSyntaxAllowedAsLiteralFalseActionTest + * + * @assertion_ids: JSP:SPEC:295 + * + * @test_Strategy: Invoke a jsp that is a member of a jsp-property-group in + * which the deferred-syntax-allowed-as-literal element is set to false. + * Verify that when the character sequence "#{" is passed as an attribute to + * an action, and the tld does not specify a deferred-value element for the + * attribute, an internal server error results. [TranslationError#{Sequence] + */ + @Test + public void deferredSyntaxAllowedAsLiteralFalseActionTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/deferredSyntaxAllowedAsLiteralTrueTemplateTextTest.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(REQUEST, "GET " + CONTEXT_ROOT + + "/deferredSyntaxAllowedAsLiteralFalseActionTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: noDeferredSyntaxAllowedAsLiteralTemplateTextTest + * + * @assertion_ids: JSP:SPEC:295 + * + * @test_Strategy: Invoke a jsp that is a member of a jsp-property-group in + * which there is no deferred-syntax-allowed-as-literal element. Verify that + * when the character sequence "#{" appears in template text, an internal + * server error results. [TranslationError#{Sequence] + */ + @Test + public void noDeferredSyntaxAllowedAsLiteralTemplateTextTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, "GET " + CONTEXT_ROOT + + "/noDeferredSyntaxAllowedAsLiteralTemplateTextTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: noDeferredSyntaxAllowedAsLiteralActionTest + * + * @assertion_ids: JSP:SPEC:295 + * + * @test_Strategy: Invoke a jsp that is a member of a jsp-property-group in + * which there is no deferred-syntax-allowed-as-literal element. Verify that + * when the character sequence "#{" is passed as an attribute to an action, + * and the tld does not specify a deferred-value element for the attribute, an + * internal server error results. [TranslationError#{Sequence] + */ + @Test + public void noDeferredSyntaxAllowedAsLiteralActionTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, "GET " + CONTEXT_ROOT + + "/noDeferredSyntaxAllowedAsLiteralActionTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/elevaluation/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/elevaluation/URLClientIT.java new file mode 100644 index 00000000..0434e67f --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/elevaluation/URLClientIT.java @@ -0,0 +1,242 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.36 02/11/04 + */ + +package ee.jakarta.tck.pages.spec.configuration.elevaluation; + +import java.lang.System.Logger; +import java.net.URL; + +import static org.junit.jupiter.api.Assertions.assertFalse; + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.container.test.api.OperateOnDeployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.arquillian.test.api.ArquillianResource; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + private static final Logger logger = System.getLogger(URLClientIT.class.getName()); + + public URLClientIT() throws Exception { + + setGeneralURI("/jsp/spec/configuration/elevaluation"); + setContextRoot("/jsp_config_eleval_web"); + + } + + public void setup2() throws Exception { + + logger.log(Logger.Level.INFO, "setup2 method URLClientIT"); + + if (url2 == null){ + throw new Exception( + "[URLClientIT] The url was not injected"); + } + + String hostname = url2.getHost(); + String portnum = Integer.toString(url2.getPort()); + + assertFalse(isNullOrEmpty(hostname), "[URLClientIT] 'webServerHost' was not set in the properties."); + _hostname = hostname.trim(); + assertFalse(isNullOrEmpty(portnum), "[URLClientIT] 'webServerPort' was not set in the properties."); + _port = Integer.parseInt(portnum.trim()); + + logger.log(Logger.Level.INFO, "[URLClientIT] Test setup2 OK"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_config_eleval_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_config_eleval_web.xml")); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/compat13/ElCompatTest.jsp")), "compat13/ElCompatTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/elconffalse/ElEvaluationTest.jsp")), "elconffalse/ElEvaluationTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/elconffalsex/ElEvaluationTest.jspx")), "elconffalsex/ElEvaluationTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/elconftrue/ElEvaluationTest.jsp")), "elconftrue/ElEvaluationTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/elconftruex/ElEvaluationTest.jspx")), "elconftruex/ElEvaluationTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/elpagefalse/ElEvaluationTest.jsp")), "elpagefalse/ElEvaluationTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/elpagefalsex/ElEvaluationTest.jspx")), "elpagefalsex/ElEvaluationTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/elpagetrue/ElEvaluationTest.jsp")), "elpagetrue/ElEvaluationTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/elpagetruex/ElEvaluationTest.jspx")), "elpagetruex/ElEvaluationTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/elunspec/ElEvaluationTest.jsp")), "elunspec/ElEvaluationTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/elunspecx/ElEvaluationTest.jspx")), "elunspecx/ElEvaluationTest.jspx"); + + return archive; + + } + + @ArquillianResource + @OperateOnDeployment("jsp_config_eleval23_web") + public URL url2; + + + @Deployment(testable = false, name="jsp_config_eleval23_web") + public static WebArchive createDeployment23() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_config_eleval23_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_config_eleval23_web.xml")); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/compat13/ElCompatTest.jsp")), "ElCompatTest.jsp"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: elEvaluationUnspecifiedTest + * + * @assertion_ids: JSP:SPEC:254 + * + * @test_Strategy: Validate that if the web application uses a 2.4 deployment + * descriptor and the jsp-property-group element nor the JSP identified by the + * jsp-property-group specifies no EL evaluation information, EL will be + * evaluated by the container. This validates both JSPs in standard syntax and + * JSP documents. + */ + @Test + public void elEvaluationUnspecifiedTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_eleval_web/elunspec/ElEvaluationTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_eleval_web/elunspecx/ElEvaluationTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: elEvaluationConfigurationFalseTest + * + * @assertion_ids: JSP:SPEC:142 + * + * @test_Strategy: Validate that if the web application uses a 2.4 deployment + * descriptor and the jsp-property-group element sets the el-ignored element + * to false, and the JSP page specifies no special EL handling, that EL + * expressions will be evaluated. This validates both JSPs in standard syntax + * and JSP documents. + */ + @Test + public void elEvaluationConfigurationFalseTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_eleval_web/elconffalse/ElEvaluationTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_eleval_web/elconffalsex/ElEvaluationTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: elEvaluationConfigurationTrueTest + * + * @assertion_ids: JSP:SPEC:141 + * + * @test_Strategy: Validate that if the web application uses a 2.4 deployment + * descriptor and the jsp-property-group element sets the el-ignored element + * to true, and the JSP page specifies no special EL handling, that EL + * expressions will not be evaluated. This validates both JSPs in standard + * syntax and JSP documents. + */ + @Test + public void elEvaluationConfigurationTrueTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_eleval_web/elconftrue/ElEvaluationTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "${testPassed}"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_eleval_web/elconftruex/ElEvaluationTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "${testPassed}"); + invoke(); + } + + /* + * @testName: elEvaluationPageDirectiveOverrideTest + * + * @assertion_ids: JSP:SPEC:255 + * + * @test_Strategy: Validate that if the web application uses a 2.4 deployment + * descriptor, that the page directive attribute isELIgnored takes precedence + * over the configuration of the JSP property group. + */ + @Test + public void elEvaluationPageDirectiveOverrideTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_eleval_web/elpagetrue/ElEvaluationTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "${testPassed}"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_eleval_web/elpagetruex/ElEvaluationTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "${testPassed}"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_eleval_web/elpagefalse/ElEvaluationTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_eleval_web/elpagefalsex/ElEvaluationTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: elEvaluation23WebApplicationTest + * + * @assertion_ids: JSP:SPEC:252 + * + * @test_Strategy: Validate a JSP 2.0 container when presented with a 2.3 + * based web application, and it encounters a JSP with an EL-like construct + * (i.e. ${expr}), that EL Evaluation is not performed. + */ + @Test + public void elEvaluation23WebApplicationTest() throws Exception { + setup2(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_eleval23_web/ElCompatTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "${testPassed}"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/elevaluation/build.xml b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/elevaluation/build.xml new file mode 100644 index 00000000..b6b13604 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/elevaluation/build.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/elevaluation/jsp_config_eleval23_web.xml b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/elevaluation/jsp_config_eleval23_web.xml new file mode 100644 index 00000000..87d6d5b4 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/elevaluation/jsp_config_eleval23_web.xml @@ -0,0 +1,26 @@ + + + + + + JspConfigurationElEval23 + + 5 + + diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/elevaluation/jsp_config_eleval_web.xml b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/elevaluation/jsp_config_eleval_web.xml new file mode 100644 index 00000000..9c489a3d --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/elevaluation/jsp_config_eleval_web.xml @@ -0,0 +1,82 @@ + + + + + JspConfigurationElEval + + 5 + + + + + Unspecified in configuration and by JSP + /elunspec/* + + + Set to false in configuration not specified in JSP + /elconffalse/* + false + + + Set to true in config not specified in JSP + /elconftrue/* + true + + + Set to false in page...overrides config + /elpagefalse/* + true + + + Set to true in page...overrides config + /elpagetrue/* + false + + + + Unspecified in configuration and by JSP + /elunspecx/* + true + + + Set to false in configuration not specified in JSP + /elconffalsex/* + false + true + + + Set to true in config not specified in JSP + /elconftruex/* + true + true + + + Set to false in page...overrides config + /elpagefalsex/* + true + true + + + Set to true in page...overrides config + /elpagetruex/* + false + true + + + diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/encoding/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/encoding/URLClientIT.java new file mode 100644 index 00000000..906ce971 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/encoding/URLClientIT.java @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.36 02/11/04 + */ + +package ee.jakarta.tck.pages.spec.configuration.encoding; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + public URLClientIT() throws Exception { + + + setContextRoot("/jsp_config_encode_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_config_encode_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_config_encode_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/DifferentEncodingSpecifiedTest.jsp")), "DifferentEncodingSpecifiedTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/DifferentEncodingSpecifiedTest.jspx")), "DifferentEncodingSpecifiedTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/NoEncodingSpecifiedTest.jsp")), "NoEncodingSpecifiedTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/SameEncodingSpecifiedTest.jsp")), "SameEncodingSpecifiedTest.jsp"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: jspConfigurationEncodingTest + * + * @assertion_ids: JSP:SPEC:253 + * + * @test_Strategy: Validate that if a JSP configuration element specifies an + * encoding for a group of pages, the encoding is properly set for those pages + * when no encoding is set by the page(s) themselves. + */ + @Test + public void jspConfigurationEncodingTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_encode_web/NoEncodingSpecifiedTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type:text/plain;charset=UTF-8"); + invoke(); + } + + /* + * @testName: jspConfigurationSameEncodingTest + * + * @assertion_ids: JSP:SPEC:146 + * + * @test_Strategy: Validate that if a JSP configuration element specifies an + * encoding for a group of pages, and the target page specifies the same + * encoding as that of the property group, no translation error occurs and the + * encoding is properly set. + */ + @Test + public void jspConfigurationSameEncodingTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_encode_web/SameEncodingSpecifiedTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type:text/plain;charset=UTF-8"); + invoke(); + } + + /* + * @testName: jspConfigurationDifferentEncodingTest + * + * @assertion_ids: JSP:SPEC:145 + * + * @test_Strategy: Validate that if a JSP configuration element specifies an + * encoding for a group of pages, and the target page specifies a different + * encoding as that of the property group, a translation error occurs. + */ + @Test + public void jspConfigurationDifferentEncodingTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_encode_web/DifferentEncodingSpecifiedTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_encode_web/DifferentEncodingSpecifiedTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/general/AServlet.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/general/AServlet.java new file mode 100644 index 00000000..02b3187c --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/general/AServlet.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.configuration.general; + +import java.io.IOException; +import java.io.PrintWriter; + +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +public class AServlet extends HttpServlet { + public void service(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + PrintWriter pw = response.getWriter(); + pw.println("In mapped servlet"); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/general/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/general/URLClientIT.java new file mode 100644 index 00000000..aade3a4a --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/general/URLClientIT.java @@ -0,0 +1,133 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.configuration.general; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + private static final String CONTEXT_ROOT = "/jsp_config_general_web"; + + public URLClientIT() throws Exception { + + + setContextRoot(CONTEXT_ROOT); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_config_general_web.war"); + archive.addClass(AServlet.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_config_general_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/prelude3.jsp")), "prelude3.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/prelude2.jsp")), "prelude2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/prelude1.jsp")), "prelude1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/coda3.jsp")), "coda3.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/coda2.jsp")), "coda2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/coda1.jsp")), "coda1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/mostSpecific/page/willSee.jsp")), "mostSpecific/page/willSee.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/identical/willSee.jsp")), "identical/willSee.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/specific/svr/willNotSee.jsp")), "specific/svr/willNotSee.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/specific/svr/page/willSee.jsp")), "specific/svr/page/willSee.jsp"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: moreSpecificMappingTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: + */ + + @Test + public void moreSpecificMappingTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/specific/svr/willNotSee.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "In mapped servlet"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/specific/svr/page/willSee.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "In coda1|In coda1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "In mapped servlet"); + invoke(); + } + + /* + * @testName: identicalMappingTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: + */ + + @Test + public void identicalMappingTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/identical/willSee.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "In coda1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "In mapped servlet"); + invoke(); + } + + /* + * @testName: mostSpecificMappingTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: + */ + + @Test + public void mostSpecificMappingTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/mostSpecific/page/willSee.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "In prelude1|In prelude2|In prelude3|el is enabled|In coda1|In coda2|In coda3"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "In mapped servlet"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/includes/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/includes/URLClientIT.java new file mode 100644 index 00000000..fc15302d --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/includes/URLClientIT.java @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.36 02/11/04 + */ + +package ee.jakarta.tck.pages.spec.configuration.includes; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public URLClientIT() throws Exception { + + setContextRoot("/jsp_config_includes_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_config_includes_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_config_includes_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/jspf/prelude3.jspf", "jspf/prelude3.jspf"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/jspf/prelude2.jspf", "jspf/prelude2.jspf"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/jspf/prelude1.jspf", "jspf/prelude1.jspf"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/jspf/coda3.jspf", "jspf/coda3.jspf"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/jspf/coda2.jspf", "jspf/coda2.jspf"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/jspf/coda1.jspf", "jspf/coda1.jspf"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/IncludesTest.jsp")), "IncludesTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/two/Includes2Test.jsp")), "two/Includes2Test.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/three/Includes3Test.jspx")), "three/Includes3Test.jspx"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: jspConfigurationIncludesTest + * + * @assertion_ids: JSP:SPEC:147;JSP:SPEC:148;JSP:SPEC:149 + * + * @test_Strategy: Validate the following: - The container properly recognizes + * prelude and coda configuration elements. - Prelude includes are includes at + * the beginning of the target JSP(s) identified by the url-pattern, and are + * included in the order they appear in the deployment descriptor. - Coda + * includes are inserted at the end of the target JSP(s) identified by the + * url-pattern, and are included in the order they appear in the deployment + * descriptor. - Validate with both standard syntax JSPs and JSP documents. + */ + @Test + public void jspConfigurationIncludesTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_includes_web/IncludesTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Prelude1|JSP Body|Coda1"); + invoke(); + } + + /* + * @testName: jspConfigurationIncludes2Test + * + * @assertion_ids: JSP:SPEC:147;JSP:SPEC:148;JSP:SPEC:149 + * + * @test_Strategy: Validate the same as above test. + */ + @Test + public void jspConfigurationIncludes2Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_includes_web/two/Includes2Test.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "Prelude1|Prelude2|JSP Body 2|Coda1|Coda2"); + invoke(); + } + + /* + * @testName: jspConfigurationIncludes3Test + * + * @assertion_ids: JSP:SPEC:147;JSP:SPEC:148;JSP:SPEC:149 + * + * @test_Strategy: Validate the same as above test. JSP.1.10.4 states that + * implicit includes can use either the same syntax as the including page, or + * a different syntax. + */ + @Test + public void jspConfigurationIncludes3Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_includes_web/three/Includes3Test.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "Prelude2|Prelude3|JSP Body 3|Coda2|Coda3"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/scripting/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/scripting/URLClientIT.java new file mode 100644 index 00000000..3ef2e9f4 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/scripting/URLClientIT.java @@ -0,0 +1,226 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.36 02/11/04 + */ + +package ee.jakarta.tck.pages.spec.configuration.scripting; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.tags.tck.SimpleTag; + +import org.apache.maven.artifact.versioning.ArtifactVersion; +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + public URLClientIT() throws Exception { + + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_config_scr_web.war"); + archive.addClasses(SimpleTag.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_config_scr_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tag.tld", "tag.tld"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrunspecx/ScriptletTest.jspx")), "scrunspecx/ScriptletTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrunspecx/ExpressionTest.jspx")), "scrunspecx/ExpressionTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrunspecx/DeclarationTest.jspx")), "scrunspecx/DeclarationTest.jspx"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrunspec/ScriptletTest.jsp")), "scrunspec/ScriptletTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrunspec/ExpressionTest.jsp")), "scrunspec/ExpressionTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrunspec/DeclarationTest.jsp")), "scrunspec/DeclarationTest.jsp"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrtruex/ScriptletTest.jspx")), "scrtruex/ScriptletTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrtruex/ExpressionTest.jspx")), "scrtruex/ExpressionTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrtruex/AttributeExpressionTest.jspx")), "scrtruex/AttributeExpressionTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrtruex/DeclarationTest.jspx")), "scrtruex/DeclarationTest.jspx"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrunspecx/ScriptletTest.jspx")), "scrunspecx/ScriptletTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrunspecx/DeclarationTest.jspx")), "scrunspecx/DeclarationTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrunspecx/ExpressionTest.jspx")), "scrunspecx/ExpressionTest.jspx"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrtrue/ScriptletTest.jsp")), "scrtrue/ScriptletTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrtrue/ExpressionTest.jsp")), "scrtrue/ExpressionTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrtrue/DeclarationTest.jsp")), "scrtrue/DeclarationTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrtrue/AttributeExpressionTest.jsp")), "scrtrue/AttributeExpressionTest.jsp"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrfalsex/ScriptletTest.jspx")), "scrfalsex/ScriptletTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrfalsex/ExpressionTest.jspx")), "scrfalsex/ExpressionTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrfalsex/DeclarationTest.jspx")), "scrfalsex/DeclarationTest.jspx"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrfalse/ScriptletTest.jsp")), "scrfalse/ScriptletTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrfalse/ExpressionTest.jsp")), "scrfalse/ExpressionTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scrfalse/DeclarationTest.jsp")), "scrfalse/DeclarationTest.jsp"); + + return archive; + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: jspConfigurationScriptingUnspecifiedTest + * + * @assertion_ids: JSP:SPEC:256 + * + * @test_Strategy: Validate that if scripting-invalid is not specified in the + * target property-group, that a translation error is not generated and the + * scripting elements are evaluated. This test is performed against standard + * syntax JSP pages as well as JSP documents. + */ + @Test + public void jspConfigurationScriptingUnspecifiedTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrunspec/DeclarationTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrunspec/ExpressionTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrunspec/ScriptletTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrunspecx/DeclarationTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrunspecx/ExpressionTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrunspecx/ScriptletTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: jspConfigurationScriptingFalseTest + * + * @assertion_ids: JSP:SPEC:144 + * + * @test_Strategy: Validate that if scripting-invalid is set to false in the + * target property-group, that a translation error is not generated and the + * scripting elements are evaluated. This test is performed against standard + * syntax JSP pages as well as JSP documents. + */ + @Test + public void jspConfigurationScriptingFalseTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrfalse/DeclarationTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrfalse/ExpressionTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrfalse/ScriptletTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrfalsex/DeclarationTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrfalsex/ExpressionTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrfalsex/ScriptletTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrfalsex/ScriptletTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: jspConfigurationScriptingTrueTest + * + * @assertion_ids: JSP:SPEC:143 + * + * @test_Strategy: Validate that if scripting-invalid is set to false in the + * target property-group, that a translation error is generated (except in the + * case of RT expressions). This test is performed against standard syntax JSP + * pages as well as JSP documents. + */ + @Test + public void jspConfigurationScriptingTrueTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrtrue/DeclarationTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrtrue/ExpressionTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrtrue/ScriptletTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrtrue/AttributeExpressionTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrtruex/DeclarationTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrtruex/ExpressionTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrtruex/ScriptletTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_scr_web/scrtruex/AttributeExpressionTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/xml/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/xml/URLClientIT.java new file mode 100644 index 00000000..98fc37fd --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/configuration/xml/URLClientIT.java @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.36 02/11/04 + */ + +package ee.jakarta.tck.pages.spec.configuration.xml; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + public URLClientIT() throws Exception { + + + setContextRoot("/jsp_config_xml_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_config_xml_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_config_xml_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/xmltrue/XmlJspTest.xsp")), "xmltrue/XmlJspTest.xsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/xmlfalse/NonXmlTest.jsp")), "xmlfalse/NonXmlTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/unspec/NonXmlTest.jsp")), "unspec/NonXmlTest.jsp"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: jspConfigurationIsXmlUnspecTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that if is-xml is not specified for a property + * group, that the files matched by the url-pattern will not be considered JSP + * documents. + * + */ + @Test + public void jspConfigurationIsXmlUnspecTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_xml_web/unspec/NonXmlTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: jspConfigurationIsXmlFalseTest + * + * @assertion_ids: JSP:SPEC:150.2 + * + * @test_Strategy: Validate that if is-xml is set to false for a property + * group, that the files matched by the url-pattern will not be considered JSP + * documents. + */ + @Test + public void jspConfigurationIsXmlFalseTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_xml_web/xmlfalse/NonXmlTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: jspConfigurationIsXmlTrueTest + * + * @assertion_ids: JSP:SPEC:150.1 + * + * @test_Strategy: Validate that if is-xml is set to true for a property + * group, that the files matched by the url-pattern will be considered JSP + * documents. + */ + @Test + public void jspConfigurationIsXmlTrueTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_config_xml_web/xmltrue/XmlJspTest.xsp HTTP/1.1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "jsp:page|directive"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/AttributeTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/AttributeTag.java new file mode 100644 index 00000000..9bd54af3 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/AttributeTag.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.attribute; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.TagSupport; + +public class AttributeTag extends TagSupport { + private static final String NL = System.getProperty("line.separator", "\n"); + + /** + * The attribute as evaluated by the container. + */ + private String _attribute = null; + + /** + * What the test expects to be the result of the evaluation by the container. + */ + private String _expected = null; + + /** + * Sets the attribute as evaluated by the container. + * + * @param attribute + * - the evaluated attribute value + */ + public void setAttribute(String attribute) { + _attribute = attribute; + } + + /** + * Sets the expected result of the attribute evaluation. + * + * @param expected + * - the result the test expects + */ + public void setExpected(String expected) { + _expected = expected; + } + + /** + * Prints 'Test PASSED' if the evaluated result is the same as the expected + * result, otherwise 'Test FAILED' will be printed along with an explanation. + * + * @return EVAL_PAGE + * @throws JspException + * if an unexpected error occurs + */ + public int doEndTag() throws JspException { + JspWriter out = pageContext.getOut(); + try { + if (_expected.equals(_attribute)) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected the attribute value to be:" + " '" + + _expected + "'." + NL + "Received: '" + _attribute + "'."); + } + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + return EVAL_PAGE; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/ClassicAttributeTestTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/ClassicAttributeTestTag.java new file mode 100644 index 00000000..f201723c --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/ClassicAttributeTestTag.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.attribute; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.DynamicAttributes; +import jakarta.servlet.jsp.tagext.JspFragment; +import jakarta.servlet.jsp.tagext.TagSupport; + +public class ClassicAttributeTestTag extends TagSupport + implements DynamicAttributes { + + /** + * JspFragment instance. + */ + Object _fragment = null; + + /** + * Holder for value set by setDynamicAttribute. + */ + Object _dynamic = null; + + /** + * Sets _fragment. This should be an instance of JspFragment. + * + * @param o + * - a JspFragment instance + */ + public void setFragment(Object o) { + _fragment = o; + } + + /** + * Sets a dynamic attribute. + * + * @param s + * - the URL of the attribute + * @param s1 + * - the attribute name + * @param o + * - the attribute value + * @throws JspException + * if an unexpected error occurs + */ + public void setDynamicAttribute(String s, String s1, Object o) + throws JspException { + _dynamic = o; + } + + /** + * If _fragment is not null, it validates the the attribute set was indeed a + * JspFragment. If _dynamic is not null it validates the attribute is a String + * instance. If in either case the tests fails, a detailed message will be + * displayed. + * + * @return SKIP_BODY + * @throws JspException + * if an error occurs + */ + public int doStartTag() throws JspException { + if (_fragment != null) { + JspWriter out = pageContext.getOut(); + try { + if (_fragment instanceof JspFragment) { + out.println("Test PASSED"); + } else { + out.println("Object passed to the fragment attribute was not" + + "an instance of JspFragment. Actual type: " + + _fragment.getClass().getName()); + } + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + } else if (_dynamic != null) { + JspWriter out = pageContext.getOut(); + try { + if (_dynamic instanceof String) { + out.println("Test PASSED"); + } else { + out.println("Object passed to the fragment attribute was not" + + "an instance of String."); + } + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + } + return SKIP_BODY; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/ClassicTypeTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/ClassicTypeTag.java new file mode 100644 index 00000000..2606fa62 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/ClassicTypeTag.java @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.attribute; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.TagSupport; + +public class ClassicTypeTag extends TagSupport { + private static final String FAIL_MSG = "Test FAILED."; + + private Boolean _boolean = null; + + private Character _character = null; + + private Short _short = null; + + private Integer _integer = null; + + private Long _long = null; + + private Float _float = null; + + private Double _double = null; + + private String _string = null; + + public void setString(String _string) { + this._string = _string; + } + + public void setBoolean(Boolean _boolean) { + this._boolean = _boolean; + } + + public void setCharacter(Character _character) { + this._character = _character; + } + + public void setShort(Short _short) { + this._short = _short; + } + + public void setInteger(Integer _integer) { + this._integer = _integer; + } + + public void setLong(Long _long) { + this._long = _long; + } + + public void setFloat(Float _float) { + this._float = _float; + } + + public void setDouble(Double _double) { + this._double = _double; + } + + public int doStartTag() throws JspException { + try { + JspWriter out = pageContext.getOut(); + if (_boolean == null) { + out.println(FAIL_MSG + " boolean value not set."); + + } else if (_character == null) { + out.println(FAIL_MSG + " character value not set."); + + } else if (_short == null) { + out.println(FAIL_MSG + " short value not set."); + + } else if (_integer == null) { + out.println(FAIL_MSG + " integer value not set."); + + } else if (_long == null) { + out.println(FAIL_MSG + " long value not set."); + + } else if (_float == null) { + out.println(FAIL_MSG + " float value not set."); + + } else if (_double == null) { + out.println(FAIL_MSG + " double value not set."); + + } else if (_string == null) { + out.println(FAIL_MSG + " string value not set."); + + } else { + out.println("Test PASSED"); + } + + } catch (IOException ioe) { + throw new JspException(FAIL_MSG + " Unexpected IOException!", ioe); + } + return SKIP_BODY; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/DynamicTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/DynamicTag.java new file mode 100644 index 00000000..5524689f --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/DynamicTag.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.attribute; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.DynamicAttributes; +import jakarta.servlet.jsp.tagext.TagSupport; + +public class DynamicTag extends TagSupport implements DynamicAttributes { + + public void setDynamicAttribute(String s, String s1, Object o) + throws JspException { + try { + pageContext.getOut().println(s1 + "=\"" + o + "\""); + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/SimpleAttributeTestTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/SimpleAttributeTestTag.java new file mode 100644 index 00000000..0901e5cd --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/SimpleAttributeTestTag.java @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.attribute; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.DynamicAttributes; +import jakarta.servlet.jsp.tagext.JspFragment; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class SimpleAttributeTestTag extends SimpleTagSupport + implements DynamicAttributes { + + Object _fragment = null; + + Object _dynamic = null; + + public void setFragment(Object o) { + _fragment = o; + } + + public void doTag() throws JspException, IOException { + if (_fragment != null) { + JspWriter out = getJspContext().getOut(); + try { + if (_fragment instanceof JspFragment) { + out.println("Test PASSED"); + } else { + out.println("Object passed to the fragment attribute was not" + + "an instance of JspFragment. Actual type: " + + _fragment.getClass().getName()); + } + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + } else if (_dynamic != null) { + JspWriter out = getJspContext().getOut(); + try { + if (_dynamic instanceof String) { + out.println("Test PASSED"); + } else { + out.println("Object passed to the fragment attribute was not" + + "an instance of String. Actual type: " + + _fragment.getClass().getName()); + } + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + } + } + + public void setDynamicAttribute(String s, String s1, Object o) + throws JspException { + _dynamic = o; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/SimpleTypeTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/SimpleTypeTag.java new file mode 100644 index 00000000..25d19d3c --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/SimpleTypeTag.java @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.attribute; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class SimpleTypeTag extends SimpleTagSupport { + private static final String FAIL_MSG = "Test FAILED."; + + private Boolean _boolean = null; + + private Character _character = null; + + private Short _short = null; + + private Integer _integer = null; + + private Long _long = null; + + private Float _float = null; + + private Double _double = null; + + private String _string = null; + + public void setString(String _string) { + this._string = _string; + } + + public void setBoolean(Boolean _boolean) { + this._boolean = _boolean; + } + + public void setCharacter(Character _character) { + this._character = _character; + } + + public void setShort(Short _short) { + this._short = _short; + } + + public void setInteger(Integer _integer) { + this._integer = _integer; + } + + public void setLong(Long _long) { + this._long = _long; + } + + public void setFloat(Float _float) { + this._float = _float; + } + + public void setDouble(Double _double) { + this._double = _double; + } + + public void doTag() throws JspException { + try { + JspWriter out = getJspContext().getOut(); + + if (_boolean == null) { + out.println(FAIL_MSG + " boolean value not set."); + + } else if (_character == null) { + out.println(FAIL_MSG + " character value not set."); + + } else if (_short == null) { + out.println(FAIL_MSG + " short value not set."); + + } else if (_integer == null) { + out.println(FAIL_MSG + " integer value not set."); + + } else if (_long == null) { + out.println(FAIL_MSG + " long value not set."); + + } else if (_float == null) { + out.println(FAIL_MSG + " float value not set."); + + } else if (_double == null) { + out.println(FAIL_MSG + " double value not set."); + + } else if (_string == null) { + out.println(FAIL_MSG + " string value not set."); + + } else { + out.println("Test PASSED"); + } + + } catch (IOException ioe) { + throw new JspException(FAIL_MSG + " Unexpected IOException!", ioe); + } + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/URLClientIT.java new file mode 100644 index 00000000..aa004dbe --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/URLClientIT.java @@ -0,0 +1,361 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.1 12/09/02 + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.attribute; + +import java.io.IOException; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.asset.UrlAsset; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + public URLClientIT() throws Exception { + + + setContextRoot("/jsp_core_act_attribute_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_core_act_attribute_web.war"); + archive.addClasses( + JspTestUtil.class); + archive.addPackages(true, Filters.exclude(URLClientIT.class), + URLClientIT.class.getPackageName()); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_core_act_attribute_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/attribute.tld", "attribute.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeDuplicatedAttributeTest.jsp")), "JspAttributeDuplicatedAttributeTest.jsp"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeDynamicTest1.jsp")), "JspAttributeDynamicTest1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeDynamicTest2.jsp")), "JspAttributeDynamicTest2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeElementInteractionTest.jspx")), "JspAttributeElementInteractionTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeEmptyBodyTest.jsp")), "JspAttributeEmptyBodyTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeFragmentNonScrBodyTest1.jsp")), "JspAttributeFragmentNonScrBodyTest1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeFragmentNonScrBodyTest2.jsp")), "JspAttributeFragmentNonScrBodyTest2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeFragmentNonScrBodyTest3.jsp")), "JspAttributeFragmentNonScrBodyTest3.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeFragmentNonScrBodyTest4.jsp")), "JspAttributeFragmentNonScrBodyTest4.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeFragmentNonScrBodyTest5.jsp")), "JspAttributeFragmentNonScrBodyTest5.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeFragmentNonScrBodyTest6.jsp")), "JspAttributeFragmentNonScrBodyTest6.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeFragmentTest.jsp")), "JspAttributeFragmentTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeNameReqAttributeTest.jsp")), "JspAttributeNameReqAttributeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeNoAttributeFoundTest.jsp")), "JspAttributeNoAttributeFoundTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeQNameTest1.jsp")), "JspAttributeQNameTest1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeQNameTest2.jsp")), "JspAttributeQNameTest2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeQNameTest3.jspx")), "JspAttributeQNameTest3.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeQNameTest4.jsp")), "JspAttributeQNameTest4.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeRtTest.jsp")), "JspAttributeRtTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeTrimTest.jsp")), "JspAttributeTrimTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeUsageContextTest1.jsp")), "JspAttributeUsageContextTest1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeUsageContextTest2.jspx")), "JspAttributeUsageContextTest2.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspAttributeUsageContextTest3.jsp")), "JspAttributeUsageContextTest3.jsp"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: jspAttributeFragmentTest + * + * @assertion_ids: JSP:SPEC:168.3;JSP:SPEC:168.4 + * + * @test_Strategy: Validate that container passes an instance of JspFragment + * when the target attribute is being set by jsp:attribute. This test will + * validate the above statement using both Classic and Simple tag handlers. + */ + @Test + public void jspAttributeFragmentTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeFragmentTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED|Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: jspAttributeUsageContextTest + * + * @assertion_ids: JSP:SPEC:168.2;JSP:SPEC:168.11 + * + * @test_Strategy: Validate a translation-time error occurs for the following + * use cases: - jsp:attribute is not a child of a standard or custom action. - + * jsp:attribute is used to provide the attribute of another jsp:attribute + * action. + */ + @Test + public void jspAttributeUsageContextTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeUsageContextTest3.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeUsageContextTest1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeUsageContextTest2.jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + + } + + /* + * @testName: jspAttributeFragmentNonScriptingBodyTest + * + * @assertion_ids: JSP:SPEC:168.5 + * + * @test_Strategy: Validate a translation error occurs if providing an + * attribute value using jsp:attribute to an attribute accepting JspFragment + * values and the body of the jsp:attribute action contains scripting elements + * (<%=, <%, <%!). + */ + @Test + public void jspAttributeFragmentNonScriptingBodyTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeFragmentNonScrBodyTest1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeFragmentNonScrBodyTest2.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeFragmentNonScrBodyTest3.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeFragmentNonScrBodyTest4.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeFragmentNonScrBodyTest5.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeFragmentNonScrBodyTest6.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: jspAttributeDynamicAttributesTest + * + * @assertion_ids: JSP:SPEC:168.6 + * + * @test_Strategy: Validate that dynamic attribute values provided via + * jsp:attribute are provided to the tag handler as java.lang.String objects. + */ + @Test + public void jspAttributeDynamicAttributesTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeDynamicTest1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED|Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeDynamicTest2.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED|Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: jspAttributeRtExprTest + * + * @assertion_ids: JSP:SPEC:168.7 + * + * @test_Strategy: Validate that if a tag handler (either Classic or Simple) + * accepts RT expressions and the attribute values are provided via + * jsp:attribute actions, type conversions are properly performed and the + * attributes are set. + */ + @Test + public void jspAttributeRtExprTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeRtTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED|Test PASSED|" + + "Test PASSED|Test PASSED|Test PASSED|Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: jspAttributeElementInteractionTest + * + * @assertion_ids: JSP:SPEC:168.9 + * + * @test_Strategy: Validate that when a jsp:attribute element is nexted within + * a jsp:element element within a JSP document, that the element is + * constructed with element name being the value of the name attribute of + * jsp:attribute and the body of the element being the body of the + * jsp:attribute element. + * + */ + @Test + public void jspAttributeElementInteractionTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeElementInteractionTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + ""); + invoke(); + } + + /* + * @testName: jspAttributeTrimTest + * + * @assertion_ids: JSP:SPEC:168.13;JSP:SPEC:168.14;JSP:SPEC:168.15 + * + * @test_Strategy: Validate the behavior of the trim attribute when set to + * true or false, or when not specified when handling static values at + * translation time vs. runtime. + */ + @Test + public void jspAttributeTrimTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeTrimTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "Test PASSED|Test PASSED|Test PASSED|Test PASSED|Test PASSED|Test PASSED"); + invoke(); + } + + /* + * @testName: jspAttributeDuplicatedAttributeTest + * + * @assertion_ids: JSP:SPEC:168.1.2 + * + * @test_Strategy: Validate that if an attribute is already specified for an + * action (using the xml style) and a jsp:attribute action is used to define + * the value for that same attribute, a translation-time error occurs. + */ + @Test + public void jspAttributeDuplicatedAttributeTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeDuplicatedAttributeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: jspAttributeQNameTest + * + * @assertion_ids: JSP:SPEC:168.1.4;JSP:SPEC:168.12 + * + * @test_Strategy: Validate the following: - qname attribute names can be + * provided to the name attribute of jsp:attribute an work the same as a + * non-qname value, as long as the qname prefix matches the prefix of the + * surrounding action. - If the qname prefix doesn't match the prefix of the + * surrounding action, a translation error must occur. + */ + @Test + public void jspAttributeQNameTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeQNameTest1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeQNameTest2.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeQNameTest3.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + ""); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeQNameTest4.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "dynamic|dynamic value"); + invoke(); + } + + /* + * @testName: jspAttributeEmptyBodyTest + * + * @assertion_ids: JSP:SPEC:168.10 + * + * @test_Strategy: Validate that if the body of jsp:attribute is empty, it + * sets the value of the attribute to "". + */ + @Test + public void jspAttributeEmptyBodyTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeEmptyBodyTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED|Test PASSED"); + invoke(); + } + + /* + * @testName: jspAttributeNoAttributeFoundTest + * + * @assertion_ids: JSP:SPEC:168.1.1 + * + * @test_Strategy: Validate that if jsp:attribute specifies an attribute of an + * action that does not exist, and that action does not accept dynamic + * attributes, a translation-time error occurs. + */ + @Test + public void jspAttributeNoAttributeFoundTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeNoAttributeFoundTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: jspAttributeNameRequiredAttributeTest + * + * @assertion_ids: JSP:SPEC:168.1.3 + * + * @test_Strategy: Validate the name attribute is indeed a required attribute + * of the jsp:attribute standard action by omitting it and checking for a + * translation-time error. + */ + @Test + public void jspAttributeNameRequiredAttributeTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_attribute_web/JspAttributeNameReqAttributeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/ClassicBodyTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/ClassicBodyTag.java new file mode 100644 index 00000000..d032bd5a --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/ClassicBodyTag.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.body; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.BodyContent; +import jakarta.servlet.jsp.tagext.BodyTagSupport; +import jakarta.servlet.jsp.tagext.DynamicAttributes; + +public class ClassicBodyTag extends BodyTagSupport + implements DynamicAttributes { + + public void setDynamicAttribute(String s, String s1, Object o) + throws JspException { + // no op + } + + public int doEndTag() throws JspException { + BodyContent content = getBodyContent(); + if (content != null) { + try { + String body = content.getString().trim(); + if ("testpassed".equals(body)) { + content.getEnclosingWriter().println("Test PASSED"); + } else { + content.getEnclosingWriter().println("Test FAILED." + + " Expected body to be 'testpassed'. Received: " + body); + } + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + } + return EVAL_PAGE; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/ClassicEmptyBodyTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/ClassicEmptyBodyTag.java new file mode 100644 index 00000000..21f02e31 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/ClassicEmptyBodyTag.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.body; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.BodyTagSupport; +import jakarta.servlet.jsp.tagext.DynamicAttributes; + +public class ClassicEmptyBodyTag extends BodyTagSupport + implements DynamicAttributes { + + public void setDynamicAttribute(String s, String s1, Object o) + throws JspException { + // no-op + } + + public int doEndTag() throws JspException { + JspWriter out = pageContext.getOut(); + try { + if (getBodyContent() == null) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. The body of the action was not empty"); + } + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + return EVAL_PAGE; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/ClassicNoBodyTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/ClassicNoBodyTag.java new file mode 100644 index 00000000..9d2c8df2 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/ClassicNoBodyTag.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.body; + +import jakarta.servlet.jsp.tagext.TagSupport; + +public class ClassicNoBodyTag extends TagSupport { + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/SimpleBodyTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/SimpleBodyTag.java new file mode 100644 index 00000000..ab39a663 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/SimpleBodyTag.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.body; + +import java.io.IOException; +import java.io.StringWriter; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.DynamicAttributes; +import jakarta.servlet.jsp.tagext.JspFragment; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class SimpleBodyTag extends SimpleTagSupport + implements DynamicAttributes { + + public void setDynamicAttribute(String s, String s1, Object o) + throws JspException { + // no-op + } + + public void doTag() throws JspException, IOException { + JspFragment body = getJspBody(); + if (body != null) { + StringWriter writer = new StringWriter(); + body.invoke(writer); + String bodyValue = writer.toString().trim(); + JspWriter out = getJspContext().getOut(); + if ("testpassed".equals(bodyValue)) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected body to be 'testpassed'." + + " Received: " + bodyValue); + } + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/SimpleEmptyBodyTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/SimpleEmptyBodyTag.java new file mode 100644 index 00000000..4f3c827b --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/SimpleEmptyBodyTag.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.body; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.DynamicAttributes; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class SimpleEmptyBodyTag extends SimpleTagSupport + implements DynamicAttributes { + + public void setDynamicAttribute(String s, String s1, Object o) + throws JspException { + // no-op + } + + public void doTag() throws JspException, IOException { + JspWriter out = getJspContext().getOut(); + if (getJspBody() == null) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. The body of the action was not empty."); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/SimpleNoBodyTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/SimpleNoBodyTag.java new file mode 100644 index 00000000..fb7b1b3a --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/SimpleNoBodyTag.java @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.body; + +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class SimpleNoBodyTag extends SimpleTagSupport { + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/URLClientIT.java new file mode 100644 index 00000000..ca31f4ac --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/body/URLClientIT.java @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.1 12/09/02 + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.body; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + public URLClientIT() throws Exception { + + + setContextRoot("/jsp_core_act_body_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_core_act_body_web.war"); + archive.addClasses(JspTestUtil.class); + archive.addPackages(true, Filters.exclude(URLClientIT.class), + URLClientIT.class.getPackageName()); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_core_act_body_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/body.tld", "body.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspBodyTest.jsp")), "JspBodyTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspBodyEmptyBodyTest.jsp")), "JspBodyEmptyBodyTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspBodyUsageContextTest1.jsp")), "JspBodyUsageContextTest1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspBodyUsageContextTest2.jsp")), "JspBodyUsageContextTest2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspBodyUsageContextTest3.jsp")), "JspBodyUsageContextTest3.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspBodyUsageContextTest4.jsp")), "JspBodyUsageContextTest4.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspBodyUsageContextTest5.jsp")), "JspBodyUsageContextTest5.jsp"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: jspBodyTest + * + * @assertion_ids: JSP:SPEC:248 + * + * @test_Strategy: Validate that the body of an action is properly delivered + * to a custom action when provided through jsp:body. + */ + @Test + public void jspBodyTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_body_web/JspBodyTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "Test PASSED|Test PASSED|Test PASSED|Test PASSED"); + invoke(); + } + + /* + * @testName: jspBodyUsageContextTest + * + * @assertion_ids: JSP:SPEC:248.2;JSP:SPEC:248.3 + * + * @test_Strategy: Validate that translation-time errors will occur when + * jsp:body is used in an incorrected context. - Not nested within a standard + * or custom action - attempting to provide a body to an action not accepting + * a body - jsp:body nested within a jsp:body - jsp:body nested within + * jsp:attribute + */ + @Test + public void jspBodyUsageContextTest() throws Exception { + for (int i = 0; i < 5; i++) { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_body_web/JspBodyUsageContextTest" + (i + 1) + + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + } + + /* + * @testName: jspBodyEmptyBodyTest + * + * @assertion_ids: JSP:SPEC:248.1 + * + * @test_Strategy: Verify that following empty body semantics involving + * jsp:body: - If an action has one or more jsp:attribute elements and no + * jsp:body element, then the action is considered empty. - Empty bodies can + * be provided via jsp:body in the forms of <jsp:body/> and + * <jsp:body></jsp:body> + */ + @Test + public void jspBodyEmptyBodyTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_body_web/JspBodyEmptyBodyTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "Test PASSED|Test PASSED|Test PASSED|Test PASSED|Test PASSED|Test PASSED"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/URLClientIT.java new file mode 100644 index 00000000..b3027f69 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/URLClientIT.java @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.1 12/09/02 + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.declaration; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + public URLClientIT() throws Exception { + + + setContextRoot("/jsp_core_act_decl_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_core_act_decl_web.war"); + // archive.addPackages(true, Filters.exclude(URLClient.class), + // URLClient.class.getPackageName()); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_core_act_decl_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspDeclarationTag2.tagx", "tags/JspDeclarationTag2.tagx"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspDeclarationTag1.tag", "tags/JspDeclarationTag1.tag"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDeclarationUsageContextTest1.jsp")), "JspDeclarationUsageContextTest1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDeclarationUsageContextTest2.jspx")), "JspDeclarationUsageContextTest2.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDeclarationUsageContextTest3.jsp")), "JspDeclarationUsageContextTest3.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDeclarationUsageContextTest4.jspx")), "JspDeclarationUsageContextTest4.jspx"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: jspDeclarationUsageContextTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the container's acceptance of the use of + * jsp:declaration in standard JSP pages, JSP documents and Tag files in both + * standard and XML syntax. + */ + @Test + public void jspDeclarationUsageContextTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_decl_web/JspDeclarationUsageContextTest1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_decl_web/JspDeclarationUsageContextTest2.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_decl_web/JspDeclarationUsageContextTest3.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_decl_web/JspDeclarationUsageContextTest4.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "Test PASSED"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/URLClientIT.java new file mode 100644 index 00000000..d2e8129f --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/URLClientIT.java @@ -0,0 +1,338 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.dobody; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + private static final String CONTEXT_ROOT = "/jsp_core_act_dobody_web"; + + public URLClientIT() throws Exception { + + + setGeneralURI("/jsp/spec/core_syntax/action/dobody"); + setContextRoot(CONTEXT_ROOT); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_core_act_dobody_web.war"); + archive.addClasses(JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_core_act_dobody_web.xml")); + + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DoBodyVarVarReaderTag.tag", "tags/DoBodyVarVarReaderTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DoBodyVarTag.tag", "tags/DoBodyVarTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DoBodyVarReaderTag.tag", "tags/DoBodyVarReaderTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DoBodyUsageContextTagB.tagx", "tags/DoBodyUsageContextTagB.tagx"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DoBodyUsageContextTagA.tag", "tags/DoBodyUsageContextTagA.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DoBodyScopeTag.tag", "tags/DoBodyScopeTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DoBodyNoVarVarReaderScopeTag.tag", "tags/DoBodyNoVarVarReaderScopeTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DoBodyNonEmptyBodyTag2.tag", "tags/DoBodyNonEmptyBodyTag2.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DoBodyNonEmptyBodyTag1.tag", "tags/DoBodyNonEmptyBodyTag1.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DoBodyInvalidSessionScopeTag.tag", "tags/DoBodyNonEmptyBodyTag1.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DoBodyInvalidScopeTag.tag", "tags/DoBodyInvalidScopeTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DoBodyInvalidRequestScopeTag.tag", "tags/DoBodyInvalidRequestScopeTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DoBodyInvalidPageScopeTag.tag", "tags/DoBodyInvalidPageScopeTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DoBodyInvalidApplicationScopeTag.tag", "tags/DoBodyInvalidApplicationScopeTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DoBodyAttributeTag.tag", "tags/DoBodyAttributeTag.tag"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDoBodyVarVarReaderTest.jsp")), "JspDoBodyVarVarReaderTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDoBodyVarTest.jsp")), "JspDoBodyVarTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDoBodyVarReaderTest.jsp")), "JspDoBodyVarReaderTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDoBodyUsageContextTest3.jsp")), "JspDoBodyUsageContextTest3.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDoBodyUsageContextTest2.jspx")), "JspDoBodyUsageContextTest2.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDoBodyUsageContextTest1.jsp")), "JspDoBodyUsageContextTest1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDoBodyScopeTest.jsp")), "JspDoBodyScopeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDoBodyNoVarVarReaderScopeTest.jsp")), "JspDoBodyNoVarVarReaderScopeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDoBodyNonEmptyBodyTest2.jsp")), "JspDoBodyNonEmptyBodyTest2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDoBodyNonEmptyBodyTest1.jsp")), "JspDoBodyNonEmptyBodyTest1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDoBodyJspAttributeTest.jsp")), "JspDoBodyJspAttributeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDoBodyInvalidSessionScopeTest.jsp")), "JspDoBodyInvalidSessionScopeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDoBodyInvalidScopeTest.jsp")), "JspDoBodyInvalidScopeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDoBodyInvalidRequestScopeTest.jsp")), "JspDoBodyInvalidRequestScopeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDoBodyInvalidPageScopeTest.jsp")), "JspDoBodyInvalidPageScopeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspDoBodyInvalidApplicationScopeTest.jsp")), "JspDoBodyInvalidApplicationScopeTest.jsp"); + + return archive; + + } + + + /* + * @testName: jspDoBodyNonEmptyBodyTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: + */ + + @Test + public void jspDoBodyNonEmptyBodyTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, "GET " + CONTEXT_ROOT + "/" + + "JspDoBodyNonEmptyBodyTest1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, "GET " + CONTEXT_ROOT + "/" + + "JspDoBodyNonEmptyBodyTest2.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: jspDoBodyInvalidPageScopeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: + */ + + @Test + public void jspDoBodyInvalidPageScopeTest() throws Exception { + String testName = "JspDoBodyInvalidPageScopeTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: jspDoBodyInvalidRequestScopeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: + */ + + @Test + public void jspDoBodyInvalidRequestScopeTest() throws Exception { + String testName = "JspDoBodyInvalidRequestScopeTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: jspDoBodyInvalidApplicationScopeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: + */ + + @Test + public void jspDoBodyInvalidApplicationScopeTest() throws Exception { + String testName = "JspDoBodyInvalidApplicationScopeTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + /* + * @testName: jspDoBodyInvalidSessionScopeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: + */ + + @Test + public void jspDoBodyInvalidSessionScopeTest() throws Exception { + String testName = "JspDoBodyInvalidSessionScopeTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + /* + * @testName: jspDoBodyInvalidScopeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: + */ + + @Test + public void jspDoBodyInvalidScopeTest() throws Exception { + String testName = "JspDoBodyInvalidScopeTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: jspDoBodyJspAttributeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: + */ + + @Test + public void jspDoBodyJspAttributeTest() throws Exception { + String testName = "JspDoBodyJspAttributeTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: jspDoBodyVarTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: + */ + + @Test + public void jspDoBodyVarTest() throws Exception { + String testName = "JspDoBodyVarTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: jspDoBodyVarReaderTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: + */ + + @Test + public void jspDoBodyVarReaderTest() throws Exception { + String testName = "JspDoBodyVarReaderTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: jspDoBodyScopeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: + */ + + @Test + public void jspDoBodyScopeTest() throws Exception { + String testName = "JspDoBodyScopeTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: jspDoBodyNoVarVarReaderScopeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: + */ + + @Test + public void jspDoBodyNoVarVarReaderScopeTest() throws Exception { + String testName = "JspDoBodyNoVarVarReaderScopeTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: jspDoBodyVarVarReaderTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: + */ + + @Test + public void jspDoBodyVarVarReaderTest() throws Exception { + String testName = "JspDoBodyVarVarReaderTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeJspDoBodyUsageContextTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: + */ + + @Test + public void negativeJspDoBodyUsageContextTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, "GET " + CONTEXT_ROOT + "/" + + "JspDoBodyUsageContextTest1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, "GET " + CONTEXT_ROOT + "/" + + "JspDoBodyUsageContextTest2.jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: positiveJspDoBodyUsageContextTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: + */ + + @Test + public void positiveJspDoBodyUsageContextTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, "GET " + CONTEXT_ROOT + "/" + + "JspDoBodyUsageContextTest3.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/element/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/element/URLClientIT.java new file mode 100644 index 00000000..475c121a --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/element/URLClientIT.java @@ -0,0 +1,222 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.1 12/09/02 + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.element; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + public URLClientIT() throws Exception { + + + setContextRoot("/jsp_core_act_element_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_core_act_element_web.war"); + archive.addClasses(JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_core_act_element_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/NameAttrTag.tag", "tags/NameAttrTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspElementTag.tag", "tags/JspElementTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspElementJspBodyTag.tag", "tags/JspElementJspBodyTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspElementJspAttributeTag.tag", "tags/JspElementJspAttributeTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspElementDynAttrTag.tag", "tags/JspElementDynAttrTag.tag"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspElementTest3.jsp")), "JspElementTest3.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspElementTest2.jspx")), "JspElementTest2.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspElementTest1.jsp")), "JspElementTest1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspElementNameReqAttributeTest3.jsp")), "JspElementNameReqAttributeTest3.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspElementNameReqAttributeTest2.jspx")), "JspElementNameReqAttributeTest2.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspElementNameReqAttributeTest1.jsp")), "JspElementNameReqAttributeTest1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspElementJspBodyTest3.jsp")), "JspElementJspBodyTest3.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspElementJspBodyTest2.jspx")), "JspElementJspBodyTest2.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspElementJspBodyTest1.jsp")), "JspElementJspBodyTest1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspElementJspAttributeTest3.jsp")), "JspElementJspAttributeTest3.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspElementJspAttributeTest2.jspx")), "JspElementJspAttributeTest2.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspElementJspAttributeTest1.jsp")), "JspElementJspAttributeTest1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspElementDynamicAttributeTest3.jsp")), "JspElementDynamicAttributeTest3.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspElementDynamicAttributeTest2.jspx")), "JspElementDynamicAttributeTest2.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspElementDynamicAttributeTest1.jsp")), "JspElementDynamicAttributeTest1.jsp"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: jspElementTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the use of jsp:element with a simple body (not + * using jsp:body). + */ + @Test + public void jspElementTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_element_web/JspElementTest1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "|body1|"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_element_web/JspElementTest2.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "|body1|"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, + "xmlns:jsp|http://java.sun.com/JSP/Page"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_element_web/JspElementTest3.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "|body1|"); + invoke(); + } + + /* + * @testName: jspElementJspAttributeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the use of jsp:attribute as a child of + * jsp:element. The attributes specified by jsp:attribute should be translated + * into the attributes of the new XML element. + */ + @Test + public void jspElementJspAttributeTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_element_web/JspElementJspAttributeTest1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "|body1|"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_element_web/JspElementJspBodyTest2.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "|body1|"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, + "http://java.sun.com/JSP/Page"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_element_web/JspElementJspBodyTest3.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "|body1|"); + invoke(); + } + + /* + * @testName: jspElementNameReqAttributeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that the name attribute of the jsp:element action + * is indeed required by the container. + */ + @Test + public void jspElementNameReqAttributeTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_element_web/JspElementNameReqAttributeTest1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_element_web/JspElementNameReqAttributeTest2.jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_element_web/JspElementNameReqAttributeTest3.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + + } + + /* + * @testName: jspElementDynamicAttributeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the name attribute of jsp:element can accept both + * EL and RT expressions. + */ + @Test + public void jspElementDynamicAttributeTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_element_web/JspElementDynamicAttributeTest1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "|body1|||body2|"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_element_web/JspElementDynamicAttributeTest2.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "|body1|||body2|"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_element_web/JspElementDynamicAttributeTest3.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "|body1|||body2|"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/URLClientIT.java new file mode 100644 index 00000000..7013b36b --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/URLClientIT.java @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.1 12/09/02 + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.expression; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + public URLClientIT() throws Exception { + + + setContextRoot("/jsp_core_act_decl_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_core_act_expr_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_core_act_expr_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspExpressionTag1.tag", "tags/JspExpressionTag1.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspExpressionTag2.tagx", "tags/JspExpressionTag2.tagx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspExpressionUsageContextTest1.jsp")), "JspExpressionUsageContextTest1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspExpressionUsageContextTest2.jspx")), "JspExpressionUsageContextTest2.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspExpressionUsageContextTest3.jsp")), "JspExpressionUsageContextTest3.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspExpressionUsageContextTest4.jspx")), "JspExpressionUsageContextTest4.jspx"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: jspExpressionUsageContextTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the container's acceptance of the use of + * jsp:expression in standard JSP pages, JSP documents and Tag files in both + * standard and XML syntax. + */ + @Test + public void jspExpressionUsageContextTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_expr_web/JspExpressionUsageContextTest1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_expr_web/JspExpressionUsageContextTest2.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_expr_web/JspExpressionUsageContextTest3.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_expr_web/JspExpressionUsageContextTest4.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "Test PASSED"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/URLClientIT.java new file mode 100644 index 00000000..ee8bec2c --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/URLClientIT.java @@ -0,0 +1,209 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.forward; + + + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public static String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + + public URLClientIT() throws Exception { + + + setGeneralURI("/jsp/spec/core_syntax/actions/forward"); + setContextRoot("/jsp_coresyntx_act_forward_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_coresyntx_act_forward_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_coresyntx_act_forward_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/unbufferedWriteForwardTest.jsp")), "unbufferedWriteForwardTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/unbufferedWriteForwardTest_error.jsp")), "unbufferedWriteForwardTest_error.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveRequestAttrPageRelative.jsp")), "positiveRequestAttrPageRelative.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveRequestAttrCtxRelative.jsp")), "positiveRequestAttrCtxRelative.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForwardPageRelativeHtml.jsp")), "positiveForwardPageRelativeHtml.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForwardPageRelative.jsp")), "positiveForwardPageRelative.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForwardCtxRelativeHtml.jsp")), "positiveForwardCtxRelativeHtml.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveForwardCtxRelative.jsp")), "positiveForwardCtxRelative.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/forwardcommon.jsp")), "forwardcommon.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/forwardcommon.html")), "forwardcommon.html"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/flushedBufferForwardTest1.jsp")), "flushedBufferForwardTest1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/flushedBufferForwardTest.jsp")), "flushedBufferForwardTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/flushedBufferForwardTest_error.jsp")), "flushedBufferForwardTest_error.jsp"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: positiveForwardCtxRelativeTest + * + * @assertion_ids: JSP:SPEC:165.1 + * + * @test_Strategy: Validate that jsp:forward can forward a request to a JSP + * page within the same context using a page relative-path. PENDING Merege + * existing forward tests + */ + + @Test + public void positiveForwardCtxRelativeTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveForwardCtxRelative.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveForwardCtxRelative"); + invoke(); + } + + /* + * @testName: positiveForwardCtxRelativeHtmlTest + * + * @assertion_ids: JSP:SPEC:165.1 + * + * @test_Strategy: Validate that jsp:forward can forward a request to a static + * resource within the same context using a page-relative path. + */ + + @Test + public void positiveForwardCtxRelativeHtmlTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveForwardCtxRelativeHtml.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveForwardCtxRelativeHtml"); + invoke(); + } + + /* + * @testName: positiveForwardPageRelativeTest + * + * @assertion_ids: JSP:SPEC:165.1 + * + * @test_Strategy: Validate that jsp:forward can forward a request to a JSP + * page within the same context using a page-relative path. + */ + + @Test + public void positiveForwardPageRelativeTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveForwardPageRelative.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveForwardPageRelative"); + invoke(); + } + + /* + * @testName: positiveForwardPageRelativeHtmlTest + * + * @assertion_ids: JSP:SPEC:165.1 + * + * @test_Strategy: Validate that jsp:forward can forward a request to a static + * resource within the same context using a page-relative path. + */ + + @Test + public void positiveForwardPageRelativeHtmlTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveForwardPageRelativeHtml.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveForwardPageRelativeHtml"); + invoke(); + } + + /* + * @testName: positiveRequestAttrCtxRelativeTest + * + * @assertion_ids: JSP:SPEC:165.8 + * + * @test_Strategy: Validate that jsp:forward can properly accept a + * request-time attribute containing a context-relative path value. + */ + + @Test + public void positiveRequestAttrCtxRelativeTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveRequestAttrCtxRelative.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveRequestAttrCtxRelative"); + invoke(); + } + + /* + * @testName: positiveRequestAttrPageRelativeTest + * + * @assertion_ids: JSP:SPEC:165.8 + * + * @test_Strategy: Validate that jsp:forward can properly accept a + * request-time attribute containing a page-relative path value. + */ + + @Test + public void positiveRequestAttrPageRelativeTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveRequestAttrPageRelative.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveRequestAttrPageRelative"); + invoke(); + } + + /* + * @testName: unbufferedWriteForwardTest + * + * @assertion_ids: JSP:SPEC:165.5 + * + * @test_Strategy:If the page output was unbuffered and anything has been + * written to it, an attempt to forward the request will result in an + * IllegalStateException. + */ + + @Test + public void unbufferedWriteForwardTest() throws Exception { + String testName = "unbufferedWriteForwardTest"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_act_forward_web/unbufferedWriteForwardTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Got IllegalStateException"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/getproperty/StringBean.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/getproperty/StringBean.java new file mode 100644 index 00000000..bd4e5e58 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/getproperty/StringBean.java @@ -0,0 +1,102 @@ +/* + * + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999-2001 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, if + * any, must include the following acknowlegement: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowlegement may appear in the software itself, + * if and wherever such third-party acknowlegements normally appear. + * + * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software + * Foundation" must not be used to endorse or promote products derived + * from this software without prior written permission. For written + * permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache" + * nor may "Apache" appear in their names without prior written + * permission of the Apache Group. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + */ +package ee.jakarta.tck.pages.spec.core_syntax.actions.getproperty; + +import java.util.Arrays; + +public class StringBean { + + // Declaring the variables + private String name = "hello"; + + private int[] intAry = { 5, 10, 15 }; + + private String bar = "write-only"; + + /** + * Property 'name' + */ + public String getName() { + return name; + } + + public void setName(String s) { + this.name = s; + } + + /** + * property 'intAry' This is an indexed property + */ + + public int[] getIntAry() { + return Arrays.copyOf(intAry, intAry.length); + } + + public void setIntAry(int[] i) { + if (!(i.length == 0)) { + this.intAry = Arrays.copyOf(i, i.length); + } + } + + /** + * Property 'bar' String and Write only + */ + + public void setBar(String s) { + this.bar = s; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/getproperty/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/getproperty/URLClientIT.java new file mode 100644 index 00000000..18bcc437 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/getproperty/URLClientIT.java @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.getproperty; + + +import java.io.IOException; +import java.io.InputStream; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + private static final String CONTEXT_ROOT = "/jsp_coresyntx_act_getproperty_web"; + + public static String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + + public URLClientIT() throws Exception { + + + setGeneralURI("/jsp/spec/core_syntax/actions/getproperty"); + setContextRoot("/jsp_coresyntx_act_getproperty_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_coresyntx_act_getproperty_web.war"); + archive.addClasses(StringBean.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_coresyntx_act_getproperty_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveGetProps.jsp")), "positiveGetProps.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/nullPropertyValueTest.jsp")), "nullPropertyValueTest.jsp"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: positiveGetPropsTest + * + * @assertion_ids: JSP:SPEC:163.1;JSP:SPEC:163.2;JSP:SPEC:163.4 + * + * @test_Strategy: Create a bean using jsp:useBean tag, use jsp:getProperty to + * access and validate the property. + */ + + @Test + public void positiveGetPropsTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveGetProps.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveGetProps"); + invoke(); + } + + /* + * @testName: nullPropertyValueTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: if the target property value is null, "null" rather than "" + * must be outputed, done as in println method. + */ + + @Test + public void nullPropertyValueTest() throws Exception { + String testName = "nullPropertyValueTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "null"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/include/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/include/URLClientIT.java new file mode 100644 index 00000000..33fa62e6 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/include/URLClientIT.java @@ -0,0 +1,302 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.include; + + +import java.io.IOException; +import java.io.InputStream; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + private static final String CONTEXT_ROOT = "/jsp_coresyntx_act_include_web"; + + public static String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + + public URLClientIT() throws Exception { + + + setGeneralURI("/jsp/spec/core_syntax/actions/include"); + setContextRoot("/jsp_coresyntx_act_include_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_coresyntx_act_include_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_coresyntx_act_include_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/staticStatic_A.jsp")), "staticStatic_A.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/staticDynamic_A.jsp")), "staticDynamic_A.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveRequestAttrPageRelative.jsp")), "positiveRequestAttrPageRelative.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveRequestAttrCtxRelative.jsp")), "positiveRequestAttrCtxRelative.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveIncludePageRelativeHtml.jsp")), "positiveIncludePageRelativeHtml.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveIncludePageRelative2.jsp")), "positiveIncludePageRelative2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveIncludePageRelative.jsp")), "positiveIncludePageRelative.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveIncludeForward.jsp")), "positiveIncludeForward.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveIncludeCtxRelativeHtml.jsp")), "positiveIncludeCtxRelativeHtml.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveIncludeCtxRelative.jsp")), "positiveIncludeCtxRelative.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/includeMappedServletTest.jsp")), "includeMappedServletTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/includeforward.jsp")), "includeforward.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/includecommon.jsp")), "includecommon.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/includecommon.html")), "includecommon.html"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/forwardtarget.html")), "forwardtarget.html"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/dynamicStatic_A.jsp")), "dynamicStatic_A.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/dynamicDynamic_A.jsp")), "dynamicDynamic_A.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/C.jsp")), "C.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/include/static_B.jsp")), "include/static_B.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/include/includeMappedServlet.jsp")), "include/includeMappedServlet.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/include/includeMappedServlet.html")), "include/includeMappedServlet.html"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/include/include2.jsp")), "include/include2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/include/dynamic_B.jsp")), "include/dynamic_B.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/include/C.jsp")), "include/C.jsp"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: positiveIncludeCtxRelativeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Include content, using a context-relative path, from JSP + * page into the current JSP page. + * + * jsp:include provides for the inclusion of dynamic resources, within the + * same context, using a context-relative path. JavaServer Pages Specification + * v1.2, Sec. 4.4 + */ + + @Test + public void positiveIncludeCtxRelativeTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveIncludeCtxRelative.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveIncludeCtxRelative"); + invoke(); + } + + /* + * @testName: positiveIncludeCtxRelativeHtmlTest + * + * @assertion_ids: JSP:SPEC:164.1 + * + * @test_Strategy: Include content, using a context-relative path, from a + * static HTML page into the current JSP page. PENDING Merge existing tests + * into one test. + */ + + @Test + public void positiveIncludeCtxRelativeHtmlTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveIncludeCtxRelativeHtml.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveIncludeCtxRelativeHtml"); + invoke(); + } + + /* + * @testName: positiveIncludePageRelativeTest + * + * @assertion_ids: JSP:SPEC:164.1 + * + * @test_Strategy: Include content, using a page-relative path, from a JSP + * page into the current JSP page. + */ + @Test + public void positiveIncludePageRelativeTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveIncludePageRelative.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveIncludePageRelative"); + invoke(); + } + + /* + * @testName: positiveRequestAttrCtxRelativeTest + * + * @assertion_ids: JSP:SPEC:164.1;JSP:SPEC:164.9 + * + * @test_Strategy: Validate the page attribute of jsp:include can correctly + * accept request-time attribute values which contain context-relative paths. + */ + + @Test + public void positiveRequestAttrCtxRelativeTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveRequestAttrCtxRelative.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveRequestAttrCtxRelative"); + invoke(); + } + + /* + * @testName: positiveRequestAttrPageRelativeTest + * + * @assertion_ids: JSP:SPEC:164.1 + * + * @test_Strategy: Validate the page attribute of jsp:include can correctly + * accept request-time attribute values which contain page-relative paths. + */ + + @Test + public void positiveRequestAttrPageRelativeTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveRequestAttrPageRelative.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveRequestAttrPageRelative"); + invoke(); + } + + /* + * @testName: positiveIncludePageRelative2Test + * + * @assertion_ids: JSP:SPEC:164.1 + * + * @test_Strategy: Include content, using a page-relative path, from a JSP + * page in a different dir into the current JSP page, with a jsp-config + * url-pattern in web.xml + */ + @Test + public void positiveIncludePageRelative2Test() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveIncludePageRelative2.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveIncludePageRelative2"); + invoke(); + } + + /* + * @testName: positiveIncludeForwardTest + * + * @assertion_ids: JSP:SPEC:164.1 + * + * @test_Strategy: Include a jsp, which forwards to a html file Only the + * output from the forwarded target should be sent to client, because the test + * jsp and included jsp shared the same out (JSP 5.4), and a forwarding clears + * the response buffer (SVR 8.4). + * + */ + @Test + public void positiveIncludeForwardTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveIncludeForward.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveIncludeForward"); + invoke(); + } + + /* + * @testName: includeMappedServletTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: set page attribute to a mapped servlet. + */ + + @Test + public void includeMappedServletTest() throws Exception { + String testName = "includeMappedServletTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "shoule not be served"); + invoke(); + } + + /* + * @testName: staticStaticTest + * + * @assertion_ids: PENDING + * + * @test_Strategy:complex set of inclusions in JSP.5.4 + */ + + @Test + public void staticStaticTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/staticStatic_A.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "In /include/C.jsp"); + invoke(); + } + + /* + * @testName: dynamicDynamicTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: complex set of inclusions in JSP.5.4 + */ + + @Test + public void dynamicDynamicTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/dynamicDynamic_A.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "In /include/C.jsp"); + invoke(); + } + + /* + * @testName: dynamicStaticTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: complex set of inclusions in JSP.5.4 + */ + + @Test + public void dynamicStaticTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/dynamicStatic_A.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "In /include/C.jsp"); + invoke(); + } + + /* + * @testName: staticDynamicTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: complex set of inclusions in JSP.5.4 + */ + + @Test + public void staticDynamicTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/staticDynamic_A.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "In /C.jsp"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/URLClientIT.java new file mode 100644 index 00000000..98beb06e --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/URLClientIT.java @@ -0,0 +1,346 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.1 12/09/02 + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.invoke; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + public URLClientIT() throws Exception { + + + setContextRoot("/jsp_core_act_invoke_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_core_act_invoke_web.war"); + archive.addClasses(JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_core_act_invoke_web.xml")); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspInvokeVarVarReaderTest.jsp")), "JspInvokeVarVarReaderTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspInvokeVarTest.jsp")), "JspInvokeVarTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspInvokeVarReaderTest.jsp")), "JspInvokeVarReaderTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspInvokeUsageContextTest3.jsp")), "JspInvokeUsageContextTest3.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspInvokeUsageContextTest2.jspx")), "JspInvokeUsageContextTest2.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspInvokeUsageContextTest1.jsp")), "JspInvokeUsageContextTest1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspInvokeScopeTest.jsp")), "JspInvokeScopeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspInvokeNoVarVarReaderScopeTest.jsp")), "JspInvokeNoVarVarReaderScopeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspInvokeNotInSessionTest.jsp")), "JspInvokeNotInSessionTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspInvokeNonEmptyBodyTest.jsp")), "JspInvokeNonEmptyBodyTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspInvokeJspAttributeTest.jsp")), "JspInvokeJspAttributeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspInvokeInvalidSessionScopeTest.jsp")), "JspInvokeInvalidSessionScopeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspInvokeInvalidScopeTest.jsp")), "JspInvokeInvalidScopeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspInvokeInvalidRequestScopeTest.jsp")), "JspInvokeInvalidRequestScopeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspInvokeInvalidPageScopeTest.jsp")), "JspInvokeInvalidPageScopeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspInvokeInvalidApplicationScopeTest.jsp")), "JspInvokeInvalidApplicationScopeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspInvokeFragmentReqAttributeTest.jsp")), "JspInvokeFragmentReqAttributeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/jspFragmentNullTest.jsp")), "jspFragmentNullTest.jsp"); + + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/VarVarReaderTag.tag", "tags/VarVarReaderTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/ScopeTag.tag", "tags/ScopeTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/NoVarVarReaderScopeTag.tag", "tags/NoVarVarReaderScopeTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/NotInSessionTag.tag", "tags/NotInSessionTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/NonEmptyBodyTag.tag", "tags/NonEmptyBodyTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspInvokeVarTag.tag", "tags/JspInvokeVarTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspInvokeVarReaderTag.tag", "tags/JspInvokeVarReaderTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspInvokeUsageContextTag3b.tagx", "tags/JspInvokeUsageContextTag3b.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspInvokeUsageContextTag3a.tag", "tags/JspInvokeUsageContextTag3a.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/jspFragmentNullTest.tag", "tags/jspFragmentNullTest.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspAttributeTag.tag", "tags/JspAttributeTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/InvalidSessionScopeTag.tag", "tags/InvalidSessionScopeTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/InvalidScopeTag.tag", "tags/InvalidScopeTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/InvalidRequestScopeTag.tag", "tags/InvalidRequestScopeTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/InvalidPageScopeTag.tag", "tags/InvalidPageScopeTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/InvalidApplicationScopeTag.tag", "tags/InvalidApplicationScopeTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/FragmentReqAttributeTag.tag", "tags/FragmentReqAttributeTag.tag"); + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: jspInvokeUsageContextTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the following usage contexts of jsp:invoke: - + * jsp:invoke present in a JSP or JSP document is a translation error. - + * jsp:invoke is valid within a tag file. + */ + @Test + public void jspInvokeUsageContextTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_invoke_web/JspInvokeUsageContextTest1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_invoke_web/JspInvokeUsageContextTest2.jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_invoke_web/JspInvokeUsageContextTest3.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED|Test PASSED"); + invoke(); + } + + /* + * @testName: jspInvokeVarTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the behavior of jsp:invoke when the var attribute + * is specified. The tag file should export the result of the invocation to a + * request-scoped variable. The type and value of the exported variable will + * be validated by the invoking page. + */ + @Test + public void jspInvokeVarTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_invoke_web/JspInvokeVarTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: jspInvokeVarReaderTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the behavior of jsp:invoke when the varReader + * attribute is specified. The tag file should export the result of the + * invocation to a request-scoped variable. The type and value of the exported + * variable will be validated by the invoking page as well as verification + * that the exported reader is resettable. + */ + @Test + public void jspInvokeVarReaderTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_invoke_web/JspInvokeVarReaderTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: jspInvokeScopeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the behavior of jsp:invoke when the scope + * attribute is and is not specified. If not specified, the result of the + * invocation should be in the page scope of the tag file. If the scope is + * 'page' the result of the invocation should be in the page scope of the tag + * file. If scope is specified as 'request', 'session', or 'application', the + * result of the invocation should be in the page context of the invoking + * page. + */ + @Test + public void jspInvokeScopeTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_invoke_web/JspInvokeScopeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "Test PASSED|Test PASSED|Test PASSED|Test PASSED|Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: jspInvokeVarVarReaderTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that if both var and varReader are specified + * within one particular jsp:invoke action, a translation- time error is + * raised. + */ + @Test + public void jspInvokeVarVarReaderTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_invoke_web/JspInvokeVarVarReaderTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: jspInvokeNoVarVarReaderTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that if the scope attribute of jsp:invoke is + * specified but neither the var nor varReader are specified, a + * translation-time error is raised. + */ + @Test + public void jspInvokeNoVarVarReaderTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_invoke_web/JspInvokeNoVarVarReaderScopeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: jspInvokeNotInSessionTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that jsp:invoke will cause an + * IllegalStateException to be raised if the jsp:invoke action tries to export + * a result into the session scope where the calling page does not participate + * in a session. + */ + @Test + public void jspInvokeNotInSessionTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_invoke_web/JspInvokeNotInSessionTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: jspInvokeJspAttributeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the attributes of jspInvoke can all be specified + * using the jsp:attribute action. + */ + @Test + public void jspInvokeJspAttributeTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_invoke_web/JspInvokeJspAttributeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: jspInvokeInvalidScopeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that a translation-time error is generated if the + * scope attribute of jsp:invoke is provided an invalid value (i.e. not + * 'page', 'request', 'session', or 'application'). + */ + @Test + public void jspInvokeInvalidScopeTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_invoke_web/JspInvokeInvalidScopeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_invoke_web/JspInvokeInvalidPageScopeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_invoke_web/JspInvokeInvalidRequestScopeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_invoke_web/JspInvokeInvalidSessionScopeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_invoke_web/JspInvokeInvalidApplicationScopeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: jspInvokeFragmentReqAttributeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that the 'fragment' attribute of jsp:invoke is + * indeed required by the container. Validate by calling jsp:invoke without + * the attribute and look for a translation- time error. + */ + @Test + public void jspInvokeFragmentReqAttributeTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_invoke_web/JspInvokeFragmentReqAttributeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: jspInvokeNonEmptyBodyTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate a translation-time error is raised if the + * jsp:invoke action has a non-empty body. + */ + @Test + public void jspInvokeNonEmptyBodyTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_invoke_web/JspInvokeNonEmptyBodyTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: jspFragmentNullTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: If the fragment identified by the given name is null, will + * behave as though a fragment was passed in that produces no output. + */ + @Test + public void jspFragmentNullTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_invoke_web/jspFragmentNullTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "BEGINEND"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/output/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/output/URLClientIT.java new file mode 100644 index 00000000..5b4ec1c6 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/output/URLClientIT.java @@ -0,0 +1,379 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.1 12/09/02 + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.output; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + private static final String CONTEXT_ROOT = "/jsp_core_act_output_web"; + + public URLClientIT() throws Exception { + + + setContextRoot("/jsp_core_act_output_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_core_act_output_web.war"); + archive.addClasses(JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_core_act_output_web.xml")); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/simpleDefaultTest.jspx")), "simpleDefaultTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeMultipleDoctypeTest.jspx")), "negativeMultipleDoctypeTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDoctypeSystemNoRoot.jspx")), "negativeDoctypeSystemNoRoot.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDoctypeRootNoSystem.jspx")), "negativeDoctypeRootNoSystem.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDoctypePublicNoSystemTest.jspx")), "negativeDoctypePublicNoSystemTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspOutputUsageContextTest4.jsp")), "JspOutputUsageContextTest4.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspOutputUsageContextTest3.jspx")), "JspOutputUsageContextTest3.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspOutputUsageContextTest2.jsp")), "JspOutputUsageContextTest2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspOutputUsageContextTest1.jsp")), "JspOutputUsageContextTest1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspOutputOmitDeclValidValuesTest8.jsp")), "JspOutputOmitDeclValidValuesTest8.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspOutputOmitDeclValidValuesTest7.jsp")), "JspOutputOmitDeclValidValuesTest7.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspOutputOmitDeclValidValuesTest6.jsp")), "JspOutputOmitDeclValidValuesTest6.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspOutputOmitDeclValidValuesTest5.jsp")), "JspOutputOmitDeclValidValuesTest5.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspOutputOmitDeclValidValuesTest4.jspx")), "JspOutputOmitDeclValidValuesTest4.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspOutputOmitDeclValidValuesTest3.jspx")), "JspOutputOmitDeclValidValuesTest3.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspOutputOmitDeclValidValuesTest2.jspx")), "JspOutputOmitDeclValidValuesTest2.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspOutputOmitDeclValidValuesTest1.jspx")), "JspOutputOmitDeclValidValuesTest1.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspOutputOmitDeclDefaultTest.jspx")), "JspOutputOmitDeclDefaultTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspOutputOmitDeclDefaultTagTest.jsp")), "JspOutputOmitDeclDefaultTagTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspOutputJspRootOmitDeclDefaultTest.jspx")), "JspOutputJspRootOmitDeclDefaultTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspOutputBodyTest2.jsp")), "JspOutputBodyTest2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspOutputBodyTest1.jspx")), "JspOutputBodyTest1.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/doctypeSystemTest.jspx")), "doctypeSystemTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/doctypeSystemPublicTest.jspx")), "doctypeSystemPublicTest.jspx"); + + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspOutputUsageXMLTag.tagx", "tags/JspOutputUsageXMLTag.tagx"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspOutputUsageTag.tag", "tags/JspOutputUsageTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspOutputOmitDeclYesTag.tagx", "tags/JspOutputOmitDeclYesTag.tagx"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspOutputOmitDeclTrueTag.tagx", "tags/JspOutputOmitDeclTrueTag.tagx"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspOutputOmitDeclNoTag.tagx", "tags/JspOutputOmitDeclNoTag.tagx"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspOutputOmitDeclFalseTag.tagx", "tags/JspOutputOmitDeclFalseTag.tagx"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspOutputDefaultTag.tagx", "tags/JspOutputDefaultTag.tagx"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspOutputBodyTag.tagx", "tags/JspOutputBodyTag.tagx"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: jspOutputUsageContextTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that jsp:output can be used within JSP documents + * and Tag files in XML syntax and that a translation-time error is raised if + * used within the context of a standard syntax JSP or Tag file. + */ + @Test + public void jspOutputUsageContextTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_output_web/JspOutputUsageContextTest1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_output_web/JspOutputUsageContextTest2.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_output_web/JspOutputUsageContextTest3.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "|"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_output_web/JspOutputUsageContextTest4.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "|"); + invoke(); + } + + /* + * @testName: jspOutputOmitDeclValidValuesTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the valid values for the omit-xml-declaration are + * 'true', 'false', 'yes', and 'no'. If the attribute values are 'false' or + * 'no', then the xml declaration will be generated. If 'true' or 'yes' no + * declaration will be generated. + */ + @Test + public void jspOutputOmitDeclValidValuesTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_output_web/JspOutputOmitDeclValidValuesTest1.jspx HTTP/1.1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, ""); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_output_web/JspOutputOmitDeclValidValuesTest4.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + ""); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_output_web/JspOutputOmitDeclValidValuesTest5.jsp HTTP/1.1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, ""); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_output_web/JspOutputOmitDeclValidValuesTest8.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + ""); + invoke(); + } + + /* + * @testName: jspOutputJspRootOmitDeclDefaultTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that if a JSP document contains jsp:root, and a + * jsp:output action is present without the omit-xml-declaration attribute, + * the xml declaration will not be generated. + */ + @Test + public void jspOutputJspRootOmitDeclDefaultTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_output_web/JspOutputJspRootOmitDeclDefaultTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, ""); + invoke(); + } + + /* + * @testName: jspOutputOmitDeclDefaultTagTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that if jsp:output is present in a Tag file in XML + * syntax, and the omit-xml-declaration attribute is not present, the default + * behavior will be the generation of an XML declaration. + */ + @Test + public void jspOutputOmitDeclDefaultTagTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_output_web/JspOutputOmitDeclDefaultTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + ""); + invoke(); + } + + /* + * @testName: jspOutputBodyTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that a translation error occurs if the body of + * jsp:output is not empty. + */ + @Test + public void jspOutputBodyTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_output_web/JspOutputBodyTest1.jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_output_web/JspOutputBodyTest2.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: simpleDefaultTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: use a jsp document without jsp:output. response encoding is + * not set so use default for jsp document + */ + + @Test + public void simpleDefaultTest() throws Exception { + String testName = "simpleDefaultTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + ""); + invoke(); + } + + /* + * @testName: doctypeSystemTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: A DOCTYPE must be automatically output if and only if the + * doctype-system element appears in the translation unit as part of a + * action. The format of the DOCTYPE: + */ + + @Test + public void doctypeSystemTest() throws Exception { + String testName = "doctypeSystemTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + " action. The format of the DOCTYPE: + */ + + @Test + public void doctypeSystemPublicTest() throws Exception { + String testName = "doctypeSystemPublicTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "jsp:root"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_root_web/JspRootUsageContextTest3.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "jsp:root"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_root_web/JspRootUsageContextTest4.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: jspRootVersionAttrAllowableValuesTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the container accepts both "1.2" and "2.0" as + * allowable values for the version attribute of the jsp:root element. + */ + @Test + public void jspRootVersionAttrAllowableValuesTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_root_web/JspRootVersionAttrAllowableValuesTest1.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "jsp:root"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_root_web/JspRootVersionAttrAllowableValuesTest2.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "jsp:root"); + invoke(); + } + + /* + * @testName: jspRootVersionAttrInvalidValueTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the container generates a translation-time error + * when the version attribute of jsp:root is provided a value other than "1.2" + * or "2.0" + */ + @Test + public void jspRootVersionAttrInvalidValueTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_root_web/JspRootVersionAttrInvalidValueTest1.jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_root_web/JspRootVersionAttrInvalidValueTest2.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: jspRootVersionReqAttrTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that the version attribute of jsp:root is indeed + * required by looking for a translation error from the container when the + * attribute is not present. + */ + @Test + public void jspRootVersionReqAttrTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_root_web/JspRootVersionReqAttrTest1.jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_root_web/JspRootVersionReqAttrTest2.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: jspRootJspBodyTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that jsp:body can be used to specify the body of + * the jsp:root action. + */ + @Test + public void jspRootJspBodyTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_root_web/JspRootJspBodyTest1.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "jsp:root"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_root_web/JspRootJspBodyTest2.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "jsp:root"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/URLClientIT.java new file mode 100644 index 00000000..43db5357 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/URLClientIT.java @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.1 12/09/02 + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.scriptlet; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + public URLClientIT() throws Exception { + + + setContextRoot("/jsp_core_act_decl_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_core_act_scr_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_core_act_scr_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspScriptletTag1.tag", "tags/JspScriptletTag1.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspScriptletTag2.tagx", "tags/JspScriptletTag2.tagx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspScriptletUsageContextTest1.jsp")), "JspScriptletUsageContextTest1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspScriptletUsageContextTest2.jspx")), "JspScriptletUsageContextTest2.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspScriptletUsageContextTest3.jsp")), "JspScriptletUsageContextTest3.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspScriptletUsageContextTest4.jspx")), "JspScriptletUsageContextTest4.jspx"); + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: jspScriptletUsageContextTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the container's acceptance of the use of + * jsp:scriptlet in standard JSP pages, JSP documents and Tag files in both + * standard and XML syntax. + */ + @Test + public void jspScriptletUsageContextTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_scr_web/JspScriptletUsageContextTest1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_scr_web/JspScriptletUsageContextTest2.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_scr_web/JspScriptletUsageContextTest3.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_scr_web/JspScriptletUsageContextTest4.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "Test PASSED"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/MiscBean.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/MiscBean.java new file mode 100644 index 00000000..c9705395 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/MiscBean.java @@ -0,0 +1,259 @@ +/* +* +* The Apache Software License, Version 1.1 +* +* Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. +* Copyright (c) 1999-2001 The Apache Software Foundation. All rights +* reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* 1. Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* +* 3. The end-user documentation included with the redistribution, if +* any, must include the following acknowlegement: +* "This product includes software developed by the +* Apache Software Foundation (http://www.apache.org/)." +* Alternately, this acknowlegement may appear in the software itself, +* if and wherever such third-party acknowlegements normally appear. +* +* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software +* Foundation" must not be used to endorse or promote products derived +* from this software without prior written permission. For written +* permission, please contact apache@apache.org. +* +* 5. Products derived from this software may not be called "Apache" +* nor may "Apache" appear in their names without prior written +* permission of the Apache Group. +* +* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR +* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +* SUCH DAMAGE. +* ==================================================================== +* +* This software consists of voluntary contributions made by many +* individuals on behalf of the Apache Software Foundation. For more +* information on the Apache Software Foundation, please see +* . +* +*/ +package ee.jakarta.tck.pages.spec.core_syntax.actions.setproperty; + +public class MiscBean { + + // Declaring the variables + private boolean primitiveBoolean; + + private Boolean objectBoolean; + + private byte primitiveByte; + + private Byte objectByte; + + private char primitiveChar; + + private Character objectChar; + + private double primitiveDouble; + + private Double objectDouble; + + private int primitiveInt; + + private Integer objectInt; + + private float primitiveFloat; + + private Float objectFloat; + + private long primitiveLong; + + private Long objectLong; + + private String path; + + /** + * we define set and get methods for boolean variable + */ + + public void setPrimitiveBoolean(boolean b) { + this.primitiveBoolean = b; + } + + public boolean getPrimitiveBoolean() { + return primitiveBoolean; + } + + /** + * we define set and get methods for Boolean variable + */ + public void setObjectBoolean(Boolean b) { + this.objectBoolean = b; + } + + public Boolean getObjectBoolean() { + return objectBoolean; + } + + /** + * we define set and get methods for byte variable + */ + public void setPrimitiveByte(byte b) { + this.primitiveByte = b; + } + + public byte getPrimitiveByte() { + return primitiveByte; + } + + /** + * we define set and get methods for Byte variable + */ + public void setObjectByte(Byte b) { + this.objectByte = b; + } + + public Byte getObjectByte() { + return objectByte; + } + + /** + * we define set and get methods for char variable + */ + public void setPrimitiveChar(char b) { + this.primitiveChar = b; + } + + public char getPrimitiveChar() { + return primitiveChar; + } + + /** + * we define set and get methods for Character variable + */ + public void setObjectChar(Character b) { + this.objectChar = b; + } + + public Character getObjectChar() { + return objectChar; + } + + /** + * we define set and get methods for double variable + */ + public void setPrimitiveDouble(double b) { + this.primitiveDouble = b; + } + + public double getPrimitiveDouble() { + return primitiveDouble; + } + + /** + * we define set and get methods for Double variable + */ + public void setObjectDouble(Double b) { + this.objectDouble = b; + } + + public Double getObjectDouble() { + return objectDouble; + } + + /** + * we define set and get methods for int variable + */ + public void setPrimitiveInt(int i) { + primitiveInt = i; + } + + public int getPrimitiveInt() { + return primitiveInt; + } + + /** + * we define set and get methods for Integer variable + */ + public void setObjectInt(Integer in) { + this.objectInt = in; + } + + public Integer getObjectInt() { + return objectInt; + } + + /** + * we define set and get methods for float variable + */ + public void setPrimitiveFloat(float f) { + primitiveFloat = f; + } + + public float getPrimitiveFloat() { + return primitiveFloat; + } + + /** + * we define set and get methods for Float variable + */ + public void setObjectFloat(Float fl) { + this.objectFloat = fl; + } + + public Float getObjectFloat() { + return objectFloat; + } + + /** + * we define set and get methods for long variable + */ + public void setPrimitiveLong(long l) { + primitiveLong = l; + } + + public long getPrimitiveLong() { + return primitiveLong; + } + + /** + * we define set and get methods for Long variable + */ + public void setObjectLong(Long ln) { + this.objectLong = ln; + } + + public Long getObjectLong() { + return objectLong; + } + + /** + * we define set and get methods for path variable which is a String + */ + + public void setPath(String path) { + this.path = path; + } + + public String getPath() { + return path; + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/PBooleanPropertyEditor.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/PBooleanPropertyEditor.java new file mode 100644 index 00000000..c00cf440 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/PBooleanPropertyEditor.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.setproperty; + +import java.beans.PropertyEditorSupport; + +public class PBooleanPropertyEditor extends PropertyEditorSupport { + public PBooleanPropertyEditor() { + + } + + /** + * + * @param param1 + * String value of "true" or "false" + * @exception java.lang.IllegalArgumentException + * if unable to set the property. + */ + public void setAsText(String param1) throws IllegalArgumentException { + if (param1.equals("true")) { + setValue(Boolean.FALSE); + } else { + setValue(Boolean.TRUE); + } + } + +}// PBooleanPropertyEditor diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/PIntegerPropertyEditor.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/PIntegerPropertyEditor.java new file mode 100644 index 00000000..535bf5b6 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/PIntegerPropertyEditor.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.setproperty; + +import java.beans.PropertyEditorSupport; + +public class PIntegerPropertyEditor extends PropertyEditorSupport { + public PIntegerPropertyEditor() { + + } + + /** + * + * @param param1 + * a valid String-based integer value. The String value of "314" will + * be appended to whatever value is passed. + * @exception java.lang.IllegalArgumentException + * if unable to set property + */ + public void setAsText(String param1) throws IllegalArgumentException { + setValue(new Integer(param1 + "314")); + } + +}// PIntegerPropertyEditor diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/PStringPropertyEditor.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/PStringPropertyEditor.java new file mode 100644 index 00000000..c3b545b7 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/PStringPropertyEditor.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.setproperty; + +import java.beans.PropertyEditorSupport; + +public class PStringPropertyEditor extends PropertyEditorSupport { + public PStringPropertyEditor() { + + } + + /** + * + * @param param1 + * a string value. The String "PString" will be prepended to any + * value passed. + * @exception java.lang.IllegalArgumentException + * if unable to set the property. + */ + public void setAsText(String param1) throws IllegalArgumentException { + setValue("PString " + param1); + } + +}// PStringPropertyEditor diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/PropertyBean.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/PropertyBean.java new file mode 100644 index 00000000..6bf747b1 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/PropertyBean.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.setproperty; + +import java.io.Serializable; + +/** + * PropertyBean.java Simple Java Bean to verify that a JSP Container will make + * use of a Bean's PropertyEditory class if one is available. + */ + +public class PropertyBean implements Serializable { + + private String _pString = null; + + private Boolean _pBoolean = null; + + private Integer _pInt = null; + + public PropertyBean() { + _pString = "StringValue"; + _pBoolean = Boolean.FALSE; + _pInt = new Integer("10"); + } + + /** + * Get the value of pString. + * + * @return value of pString. + */ + public String getPString() { + return _pString; + } + + /** + * Set the value of pString. + * + * @param v + * Value to assign to pString. + */ + public void setPString(String v) { + this._pString = v; + } + + /** + * Get the value of pBoolean. + * + * @return value of pBoolean. + */ + public Boolean getPBoolean() { + return _pBoolean; + } + + /** + * Set the value of pBoolean. + * + * @param v + * Value to assign to pBoolean. + */ + public void setPBoolean(Boolean v) { + this._pBoolean = v; + } + + /** + * Get the value of pInt. + * + * @return value of pInt. + */ + public Integer getPInteger() { + return _pInt; + } + + /** + * Set the value of pInt. + * + * @param v + * Value to assign to pInt. + */ + public void setPInteger(Integer v) { + this._pInt = v; + } + +}// PropertyBean diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/PropertyBeanBeanInfo.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/PropertyBeanBeanInfo.java new file mode 100644 index 00000000..70181e77 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/PropertyBeanBeanInfo.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.setproperty; + +import java.beans.IntrospectionException; +import java.beans.PropertyDescriptor; +import java.beans.SimpleBeanInfo; +import java.util.Arrays; + +public class PropertyBeanBeanInfo extends SimpleBeanInfo { + private PropertyDescriptor[] pd = null; + + public PropertyBeanBeanInfo() { + + } + + /** + * + * @return an array of PropertyDescriptors describing the PropertyBean's + * exposed properties. + */ + public PropertyDescriptor[] getPropertyDescriptors() { + if (pd == null) { + try { + pd = new PropertyDescriptor[] { + new PropertyDescriptor("PString", PropertyBean.class), + new PropertyDescriptor("PBoolean", PropertyBean.class), + new PropertyDescriptor("PInteger", PropertyBean.class) }; + + pd[0].setPropertyEditorClass(PStringPropertyEditor.class); + pd[1].setPropertyEditorClass(PBooleanPropertyEditor.class); + pd[2].setPropertyEditorClass(PIntegerPropertyEditor.class); + } catch (IntrospectionException ie) { + pd = super.getPropertyDescriptors(); + } + } + return Arrays.copyOf(pd, pd.length); + } + +}// PropertyBeanBeanInfo diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/SetpropBean.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/SetpropBean.java new file mode 100644 index 00000000..54cbadbe --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/SetpropBean.java @@ -0,0 +1,278 @@ +/* +* +* The Apache Software License, Version 1.1 +* +* Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. +* Copyright (c) 1999-2001 The Apache Software Foundation. All rights +* reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* 1. Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* +* 3. The end-user documentation included with the redistribution, if +* any, must include the following acknowlegement: +* "This product includes software developed by the +* Apache Software Foundation (http://www.apache.org/)." +* Alternately, this acknowlegement may appear in the software itself, +* if and wherever such third-party acknowlegements normally appear. +* +* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software +* Foundation" must not be used to endorse or promote products derived +* from this software without prior written permission. For written +* permission, please contact apache@apache.org. +* +* 5. Products derived from this software may not be called "Apache" +* nor may "Apache" appear in their names without prior written +* permission of the Apache Group. +* +* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR +* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +* SUCH DAMAGE. +* ==================================================================== +* +* This software consists of voluntary contributions made by many +* individuals on behalf of the Apache Software Foundation. For more +* information on the Apache Software Foundation, please see +* . +* +*/ +package ee.jakarta.tck.pages.spec.core_syntax.actions.setproperty; + +import java.util.Arrays; + +public class SetpropBean { + + // Declaring the variables + private String name = "hello"; + + private int num = 0; + + private String str; + + private int[] iArray = { 15, 20, 35 }; + + private byte[] bArray = null; + + private char[] cArray = null; + + private short[] sArray = null; + + private float[] fArray = null; + + private long[] lArray = null; + + private double[] dArray = null; + + private boolean[] boArray = null; + + private Byte[] byteArray = null; + + private Character[] charArray = null; + + private Short[] shortArray = null; + + private Integer[] integerArray = null; + + private Float[] floatArray = null; + + private Long[] longArray = null; + + private Double[] doubleArray = null; + + private Boolean[] booleanArray = null; + + private String bar = "read-only"; + + /** + * Property 'Str' + */ + + public String getStr() { + return str; + } + + public void setStr(String a) { + this.str = a; + } + + /** + * Property 'Name' + */ + public String getName() { + return name; + } + + public void setName(String s) { + this.name = s; + } + + /** + * Property 'Num' + */ + public int getNum() { + return num; + } + + public void setNum(int numb) { + this.num = numb; + } + + /** + * property 'intAry' This is an indexed property + */ + + public int[] getIArray() { + return Arrays.copyOf(iArray, iArray.length); + } + + public void setIArray(int[] i) { + this.iArray = Arrays.copyOf(i, i.length); + } + + public byte[] getBArray() { + return Arrays.copyOf(bArray, bArray.length); + } + + public void setBArray(byte[] b) { + this.bArray = Arrays.copyOf(b, b.length); + } + + public char[] getCArray() { + return Arrays.copyOf(cArray, cArray.length); + } + + public void setCArray(char[] c) { + this.cArray = Arrays.copyOf(c, c.length); + } + + public short[] getSArray() { + return Arrays.copyOf(sArray, sArray.length); + } + + public void setSArray(short[] s) { + this.sArray = Arrays.copyOf(s, s.length); + } + + public float[] getFArray() { + return Arrays.copyOf(fArray, fArray.length); + } + + public void setFArray(float[] f) { + this.fArray = Arrays.copyOf(f, f.length); + } + + public double[] getDArray() { + return Arrays.copyOf(dArray, dArray.length); + } + + public void setDArray(double[] d) { + this.dArray = Arrays.copyOf(d, d.length); + } + + public long[] getLArray() { + return Arrays.copyOf(lArray, lArray.length); + } + + public void setLArray(long[] l) { + this.lArray = Arrays.copyOf(l, l.length); + } + + public boolean[] getBoArray() { + return Arrays.copyOf(boArray, boArray.length); + } + + public void setBoArray(boolean[] b) { + this.boArray = Arrays.copyOf(b, b.length); + } + + public Byte[] getByteArray() { + return Arrays.copyOf(byteArray, byteArray.length); + } + + public void setByteArray(Byte[] b) { + this.byteArray = Arrays.copyOf(b, b.length); + } + + public Character[] getCharArray() { + return Arrays.copyOf(charArray, charArray.length); + } + + public void setCharArray(Character[] c) { + this.charArray = Arrays.copyOf(c, c.length); + } + + public Short[] getShortArray() { + return Arrays.copyOf(shortArray, shortArray.length); + } + + public void setShortArray(Short[] s) { + this.shortArray = Arrays.copyOf(s, s.length); + } + + public Integer[] getIntegerArray() { + return Arrays.copyOf(integerArray, integerArray.length); + } + + public void setIntegerArray(Integer[] i) { + this.integerArray = Arrays.copyOf(i, i.length); + } + + public Float[] getFloatArray() { + return Arrays.copyOf(floatArray, floatArray.length); + } + + public void setFloatArray(Float[] f) { + this.floatArray = Arrays.copyOf(f, f.length); + } + + public Long[] getLongArray() { + return Arrays.copyOf(longArray, longArray.length); + } + + public void setLongArray(Long[] l) { + this.longArray = Arrays.copyOf(l, l.length); + } + + public Double[] getDoubleArray() { + return Arrays.copyOf(doubleArray, doubleArray.length); + } + + public void setDoubleArray(Double[] d) { + this.doubleArray = Arrays.copyOf(d, d.length); + } + + public Boolean[] getBooleanArray() { + return Arrays.copyOf(booleanArray, booleanArray.length); + } + + public void setBooleanArray(Boolean[] b) { + this.booleanArray = Arrays.copyOf(b, b.length); + } + + /** + * property 'bar' This is a read only property + */ + + public String getBar() { + return bar; + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/URLClientIT.java new file mode 100644 index 00000000..184cfa71 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/URLClientIT.java @@ -0,0 +1,508 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.setproperty; + + +import java.io.IOException; +import java.io.InputStream; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public static String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + + public URLClientIT() throws Exception { + + + setGeneralURI("/jsp/spec/core_syntax/actions/setproperty"); + setContextRoot("/jsp_coresyntx_act_setproperty_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_coresyntx_act_setproperty_web.war"); + // archive.addClasses(SetpropBean.class, MiscBean.class); + archive.addPackages(true, Filters.exclude(URLClientIT.class), + URLClientIT.class.getPackageName()); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_coresyntx_act_setproperty_web.xml")); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetPropValue.jsp")), "positiveSetPropValue.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetPropReqTimeSingleQuotes.jsp")), "positiveSetPropReqTimeSingleQuotes.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetPropReqTimeDoubleQuotes.jsp")), "positiveSetPropReqTimeDoubleQuotes.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetPropParam.jsp")), "positiveSetPropParam.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetPropNoParam.jsp")), "positiveSetPropNoParam.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetPropAll.jsp")), "positiveSetPropAll.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetLongPrim.jsp")), "positiveSetLongPrim.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetLongObj.jsp")), "positiveSetLongObj.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetIntPrim.jsp")), "positiveSetIntPrim.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetIntObj.jsp")), "positiveSetIntObj.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetIndexedProp.jsp")), "positiveSetIndexedProp.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetFloatPrim.jsp")), "positiveSetFloatPrim.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetFloatObj.jsp")), "positiveSetFloatObj.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDoublePrim.jsp")), "positiveSetDoublePrim.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetDoubleObj.jsp")), "positiveSetDoubleObj.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetCharPrim.jsp")), "positiveSetCharPrim.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetCharObj.jsp")), "positiveSetCharObj.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetBytePrim.jsp")), "positiveSetBytePrim.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetByteObj.jsp")), "positiveSetByteObj.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetBooleanPrim.jsp")), "positiveSetBooleanPrim.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSetBooleanObj.jsp")), "positiveSetBooleanObj.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveBeanPropertyEditor.jsp")), "positiveBeanPropertyEditor.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/Errorpage.jsp")), "Errorpage.jsp"); + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: positiveSetBooleanObjTest + * + * @assertion_ids: JSP:SPEC:87; JSP:SPEC:162.10 + * + * @test_Strategy: Using jsp:useBean, create a new bean instance and set a + * Boolean property of the bean using a String constant. PENDING Merge with + * prim test + */ + + @Test + public void positiveSetBooleanObjTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetBooleanObj.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveSetBooleanObj"); + invoke(); + } + + /* + * @testName: positiveSetBooleanPrimTest + * + * @assertion_ids: JSP:SPEC:87 + * + * @test_Strategy: Using jsp:useBean, create a new bean instance and set a + * boolean property of the bean using a String constant. + * + */ + + @Test + public void positiveSetBooleanPrimTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetBooleanPrim.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveSetBooleanPrim"); + invoke(); + } + + /* + * @testName: positiveSetByteObjTest + * + * @assertion_ids: JSP:SPEC:88;JSP:SPEC:162.10 + * + * @test_Strategy: Using jsp:useBean, create a new bean instance and set a + * Byte property of the bean using a String constant. PENDING Merge with prim + * test + */ + + @Test + public void positiveSetByteObjTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetByteObj.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveSetByteObj"); + invoke(); + } + + /* + * @testName: positiveSetBytePrimTest + * + * @assertion_ids: JSP:SPEC:88 + * + * @test_Strategy: Set a byte property of the bean using a String constant. + * + */ + + @Test + public void positiveSetBytePrimTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetBytePrim.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveSetBytePrim"); + invoke(); + } + + /* + * @testName: positiveSetCharObjTest + * + * @assertion_ids: JSP:SPEC:89;JSP:SPEC:162.10 + * + * @test_Strategy: Using jsp:useBean, create a new bean instance and set a + * Character property of the bean using a String constant. PENDING Merge with + * prim test + */ + + @Test + public void positiveSetCharObjTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetCharObj.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveSetCharObj"); + invoke(); + } + + /* + * @testName: positiveSetCharPrimTest + * + * @assertion_ids: JSP:SPEC:89 + * + * @test_Strategy: Using jsp:useBean, create a new bean instance and set a + * char property of the bean using a String constant. + * + */ + + @Test + public void positiveSetCharPrimTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetCharPrim.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveSetCharPrim"); + invoke(); + } + + /* + * @testName: positiveSetDoubleObjTest + * + * @assertion_ids: JSP:SPEC:90; JSP:SPEC:162.10 + * + * @test_Strategy: and set a Double property of the bean using a String + * constant. PENDING Merge with prim test + */ + + @Test + public void positiveSetDoubleObjTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDoubleObj.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveSetDoubleObj"); + invoke(); + } + + /* + * @testName: positiveSetDoublePrimTest + * + * @assertion_ids: JSP:SPEC:90 + * + * @test_Strategy: Using jsp:useBean, create a new bean instance and set a + * double property of the bean using a String constant. + * + */ + + @Test + public void positiveSetDoublePrimTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetDoublePrim.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveSetDoublePrim"); + invoke(); + } + + /* + * @testName: positiveSetFloatObjTest + * + * @assertion_ids: JSP:SPEC:92;JSP:SPEC:162.10 + * + * @test_Strategy: and set a Float property of the bean using a String + * constant. PENDING Merge with prim test + */ + + @Test + public void positiveSetFloatObjTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetFloatObj.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveSetFloatObj"); + invoke(); + } + + /* + * @testName: positiveSetFloatPrimTest + * + * @assertion_ids: JSP:SPEC:92 + * + * @test_Strategy: Using jsp:useBean, create a new bean instance and set a + * float property of the bean using a String constant. + * + */ + + @Test + public void positiveSetFloatPrimTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetFloatPrim.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveSetFloatPrim"); + invoke(); + } + + /* + * @testName: positiveSetIndexedPropTest + * + * @assertion_ids: JSP:SPEC:162.12 + * + * @test_Strategy: Create a bean using useBean tag, use setProperty and set + * properties using the following array types:
  • byte
  • char
  • + * short
  • int
  • float
  • long
  • double
  • boolean
  • Byte
  • + * Character
  • Short
  • Integer
  • Float
  • Long
  • Double
  • + * Boolean
      Access each of the properties via scripting, iterate through + * the array, and display the values. + */ + + @Test + public void positiveSetIndexedPropTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetIndexedProp.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveSetIndexedProp"); + invoke(); + } + + /* + * @testName: positiveSetIntObjTest + * + * @assertion_ids: JSP:SPEC:91;JSP:SPEC:162.10 + * + * @test_Strategy: Using jsp:useBean, create a new bean instance and set an + * Integer property of the bean using a String constant. PENDING Merge with + * prim test + */ + + @Test + public void positiveSetIntObjTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetIntObj.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveSetIntObj"); + invoke(); + } + + /* + * @testName: positiveSetIntPrimTest + * + * @assertion_ids: JSP:SPEC:91 + * + * @test_Strategy: Using jsp:useBean, create a new bean instance and set an + * int property of the bean using a String constant. + */ + + @Test + public void positiveSetIntPrimTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetIntPrim.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveSetIntPrim"); + invoke(); + } + + /* + * @testName: positiveSetLongObjTest + * + * @assertion_ids: JSP:SPEC:93;JSP:SPEC:162.10 + * + * @test_Strategy: Using jsp:useBean, create a new bean instance and set an + * Long property of the bean using a String constant. + */ + + @Test + public void positiveSetLongObjTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetLongObj.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveSetLongObj"); + invoke(); + } + + /* + * @testName: positiveSetLongPrimTest + * + * @assertion_ids: JSP:SPEC:93 + * + * @test_Strategy: Using jsp:useBean, create a new bean instance and set a + * long property of the bean using a String constant. PENDING Merge with prim + * test + */ + @Test + public void positiveSetLongPrimTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetLongPrim.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveSetLongPrim"); + invoke(); + } + + /* + * @testName: positiveSetPropAllTest + * + * @assertion_ids: JSP:SPEC:162.2.1 + * + * @test_Strategy: Using jsp:useBean, create a new bean instance and set the + * property attribute to '*'. The following properties should be set by the + * tag: name, num, str. + */ + + @Test + public void positiveSetPropAllTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetPropAll.gf"); + setGoldenFileStream(gfStream); + String testName = "positiveSetPropAll"; + TEST_PROPS.setProperty(TEST_NAME, testName); + TEST_PROPS.setProperty(GOLDENFILE, testName + ".gf"); + TEST_PROPS.setProperty(REQUEST, "GET /jsp_coresyntx_act_setproperty_web/" + + testName + ".jsp?name=Frodo&num=116165&str=Validated HTTP/1.0"); + + invoke(); + } + + /* + * @testName: positiveSetPropNoParamTest + * + * @assertion_ids: JSP:SPEC:162.4 + * + * @test_Strategy: Using jsp:useBean, create a new bean instance. + * jsp:setProperty only specifies the name and property properties. The + * container should set the value of the Bean's property to the value of the + * request parameter that has the same name as specified by the property + * attribute. + */ + + @Test + public void positiveSetPropNoParamTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetPropNoParam.gf"); + setGoldenFileStream(gfStream); + String testName = "positiveSetPropNoParam"; + TEST_PROPS.setProperty(TEST_NAME, testName); + TEST_PROPS.setProperty(GOLDENFILE, testName + ".gf"); + TEST_PROPS.setProperty(REQUEST, "GET /jsp_coresyntx_act_setproperty_web/" + + testName + ".jsp?str=SAPPOTA HTTP/1.0"); + + invoke(); + } + + /* + * @testName: positiveSetPropParamTest + * + * @assertion_ids: JSP:SPEC:162.3 + * + * @test_Strategy: Using jsp:useBean, create a new bean instance. + * jsp:setProperty only specifies the param property. The container should set + * the value of the Bean's property to the value of the request parameter that + * has the same name as specified by the param attribute. + */ + + @Test + public void positiveSetPropParamTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetPropParam.gf"); + setGoldenFileStream(gfStream); + String testName = "positiveSetPropParam"; + TEST_PROPS.setProperty(TEST_NAME, testName); + TEST_PROPS.setProperty(GOLDENFILE, testName + ".gf"); + TEST_PROPS.setProperty(REQUEST, "GET /jsp_coresyntx_act_setproperty_web/" + + testName + ".jsp?Name=MANGO HTTP/1.0"); + + invoke(); + } + + /* + * @testName: positiveSetPropReqTimeSingleQuotesTest + * + * @assertion_ids: JSP:SPEC:162.7.1 + * + * @test_Strategy: Using jsp:useBean, create a new bean instance. Set the + * value of a bean property using a request-time attribute expression + * delimited by single quotes. PENDING Merge with + * positiveSetPropReqTimeDoubleQuotesTest + */ + + @Test + public void positiveSetPropReqTimeSingleQuotesTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetPropReqTimeSingleQuotes.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveSetPropReqTimeSingleQuotes"); + invoke(); + } + + /* + * @testName: positiveSetPropReqTimeDoubleQuotesTest + * + * @assertion_ids: JSP:SPEC:162.7.1 + * + * @test_Strategy: Using jsp:useBean, create a new bean instance. Set the + * value of a bean property using a request-time attribute expression + * delimited by double quotes. + * + */ + + @Test + public void positiveSetPropReqTimeDoubleQuotesTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetPropReqTimeDoubleQuotes.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveSetPropReqTimeDoubleQuotes"); + invoke(); + } + + /* + * @testName: positiveSetPropValueTest + * + * @assertion_ids: JSP:SPEC:162.1; JSP:SPEC:162.2; JSP:SPEC:162.7 + * + * @test_Strategy: Using jsp:useBean, create a new bean instance. Set the + * value of a bean property using the value attribute. + */ + + @Test + public void positiveSetPropValueTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveSetPropValue.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveSetPropValue"); + invoke(); + } + + /* + * @testName: positiveBeanPropertyEditorTest + * + * @assertion_ids: JSP:SPEC:86 + * + * @test_Strategy: Create a bean using useBean tag, use setProperty and and + * verfiy results using getProperty. + */ + + @Test + public void positiveBeanPropertyEditorTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveBeanPropertyEditor.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveBeanPropertyEditor"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/text/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/text/URLClientIT.java new file mode 100644 index 00000000..dc9f5f92 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/text/URLClientIT.java @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.text; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + public URLClientIT() throws Exception { + + + setContextRoot("/jsp_core_act_text_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_core_act_text_web.war"); + archive.addClasses(JspTestUtil.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_core_act_text_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspTextTag.tag", "tags/JspTextTag.tag"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspTextBodyRestrictionsTest1.jsp")), "JspTextBodyRestrictionsTest1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspTextBodyRestrictionsTest2.jsp")), "JspTextBodyRestrictionsTest2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspTextBodyRestrictionsTest3.jsp")), "JspTextBodyRestrictionsTest3.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspTextBodyRestrictionsTest4.jsp")), "JspTextBodyRestrictionsTest4.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspTextBodyRestrictionsTest5.jspx")), "JspTextBodyRestrictionsTest5.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspTextUsageContextTest1.jsp")), "JspTextUsageContextTest1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspTextUsageContextTest2.jspx")), "JspTextUsageContextTest2.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspTextUsageContextTest3.jsp")), "JspTextUsageContextTest3.jsp"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: jspTextUsageContextTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the behavior of jsp:text. + */ + @Test + public void jspTextUsageContextTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_text_web/JspTextUsageContextTest1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Template\nText|Template Text2"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_text_web/JspTextUsageContextTest2.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Template\nText|Template Text2"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_text_web/JspTextUsageContextTest3.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Template Text|Template\nText2"); + invoke(); + } + + /* + * @testName: jspTextBodyRestrictionsTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that neiter nested actions nor scripting elements + * are allowed in the body of jsp:text. + */ + @Test + public void jspTextBodyRestrictionsTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_text_web/JspTextBodyRestrictionsTest1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_text_web/JspTextBodyRestrictionsTest2.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_text_web/JspTextBodyRestrictionsTest3.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_text_web/JspTextBodyRestrictionsTest4.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_act_text_web/JspTextBodyRestrictionsTest5.jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/Counter.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/Counter.java new file mode 100644 index 00000000..209d2342 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/Counter.java @@ -0,0 +1,76 @@ +/* +* +* The Apache Software License, Version 1.1 +* +* Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. +* Copyright (c) 1999-2001 The Apache Software Foundation. All rights +* reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* 1. Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* +* 3. The end-user documentation included with the redistribution, if +* any, must include the following acknowlegement: +* "This product includes software developed by the +* Apache Software Foundation (http://www.apache.org/)." +* Alternately, this acknowlegement may appear in the software itself, +* if and wherever such third-party acknowlegements normally appear. +* +* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software +* Foundation" must not be used to endorse or promote products derived +* from this software without prior written permission. For written +* permission, please contact apache@apache.org. +* +* 5. Products derived from this software may not be called "Apache" +* nor may "Apache" appear in their names without prior written +* permission of the Apache Group. +* +* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR +* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +* SUCH DAMAGE. +* ==================================================================== +* +* This software consists of voluntary contributions made by many +* individuals on behalf of the Apache Software Foundation. For more +* information on the Apache Software Foundation, please see +* . +* +*/ +package ee.jakarta.tck.pages.spec.core_syntax.actions.usebean; + +public class Counter implements java.io.Serializable { + + int count; + + public Counter() { + super(); + count = 0; + } + + public int getCount() { + + return count++; + } + + public void setCount(int a) { + this.count = a; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/NewCounter.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/NewCounter.java new file mode 100644 index 00000000..ecf7415f --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/NewCounter.java @@ -0,0 +1,94 @@ +/* +* +* The Apache Software License, Version 1.1 +* +* Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved. +* Copyright (c) 1999-2001 The Apache Software Foundation. All rights +* reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* 1. Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* +* 3. The end-user documentation included with the redistribution, if +* any, must include the following acknowlegement: +* "This product includes software developed by the +* Apache Software Foundation (http://www.apache.org/)." +* Alternately, this acknowlegement may appear in the software itself, +* if and wherever such third-party acknowlegements normally appear. +* +* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software +* Foundation" must not be used to endorse or promote products derived +* from this software without prior written permission. For written +* permission, please contact apache@apache.org. +* +* 5. Products derived from this software may not be called "Apache" +* nor may "Apache" appear in their names without prior written +* permission of the Apache Group. +* +* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR +* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +* SUCH DAMAGE. +* ==================================================================== +* +* This software consists of voluntary contributions made by many +* individuals on behalf of the Apache Software Foundation. For more +* information on the Apache Software Foundation, please see +* . +* +*/ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.usebean; + +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.ObjectOutputStream; + +public class NewCounter extends Counter implements java.io.Serializable { + + String ex; + + public NewCounter() { + super(); + } + + public void resetCounter() { + this.count = 0; + } + + public String getEx() { + return ex; + } + + public void serialize() { + try { + FileOutputStream fos = new FileOutputStream("NewCounter.ser"); + ObjectOutputStream oos = new ObjectOutputStream(fos); + oos.writeObject(this); + oos.flush(); + oos.close(); + fos.close(); + } catch (IOException ioe) { + ex = ioe.getMessage(); + } + + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/String_IntBean.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/String_IntBean.java new file mode 100644 index 00000000..2b32ebce --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/String_IntBean.java @@ -0,0 +1,114 @@ +/* + * + * * + * * The Apache Software License, Version 1.1 + * * + * * Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved. + * * Copyright (c) 1999-2001 The Apache Software Foundation. All rights + * * reserved. + * * + * * Redistribution and use in source and binary forms, with or without + * * modification, are permitted provided that the following conditions + * * are met: + * * + * * 1. Redistributions of source code must retain the above copyright + * * notice, this list of conditions and the following disclaimer. + * * + * * 2. Redistributions in binary form must reproduce the above copyright + * * notice, this list of conditions and the following disclaimer in + * * the documentation and/or other materials provided with the + * * distribution. + * * + * * 3. The end-user documentation included with the redistribution, if + * * any, must include the following acknowlegement: + * * "This product includes software developed by the + * * Apache Software Foundation (http://www.apache.org/)." + * * Alternately, this acknowlegement may appear in the software itself, + * * if and wherever such third-party acknowlegements normally appear. + * * + * * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software + * * Foundation" must not be used to endorse or promote products derived + * * from this software without prior written permission. For written + * * permission, please contact apache@apache.org. + * * + * * 5. Products derived from this software may not be called "Apache" + * * nor may "Apache" appear in their names without prior written + * * permission of the Apache Group. + * * + * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * * SUCH DAMAGE. + * * ==================================================================== + * * + * * This software consists of voluntary contributions made by many + * * individuals on behalf of the Apache Software Foundation. For more + * * information on the Apache Software Foundation, please see + * * . + * * + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.usebean; + +public class String_IntBean { + + // Declaring the variables + private String name = "hello"; + + private String requ = "polo"; + + private int num = 0; + + private String str; + + /** + * Property 'Str' + */ + + public String getStr() { + return str; + } + + public void setStr(String a) { + this.str = a; + } + + /** + * Property 'Name' + */ + public String getName() { + return name; + } + + public void setName(String s) { + this.name = s; + } + + /** + * Property 'Request' + */ + public String getRequest() { + + return requ; + } + + /** + * Property 'Num' + */ + public int getNum() { + return num; + } + + public void setNum(int numb) { + this.num = numb; + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/URLClientIT.java new file mode 100644 index 00000000..1e5ffcab --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/URLClientIT.java @@ -0,0 +1,426 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.usebean; + + +import java.io.IOException; +import java.io.InputStream; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + public static String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + + public URLClientIT() throws Exception { + + + setGeneralURI("/jsp/spec/core_syntax/actions/usebean"); + setContextRoot("/jsp_coresyntx_act_usebean_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_coresyntx_act_usebean_web.war"); + archive.addClasses(Counter.class, NewCounter.class, String_IntBean.class); + + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_coresyntx_act_usebean_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/date.ser")), "WEB-INF/classes/date.ser"); + + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/serBeanName.jsp")), "serBeanName.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ScopeResult.jsp")), "ScopeResult.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/requestTimeBeanName.jsp")), "requestTimeBeanName.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSessionScopedObject.jsp")), "positiveSessionScopedObject.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveRequestScopedObject.jsp")), "positiveRequestScopedObject.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positivePageScopedObject.jsp")), "positivePageScopedObject.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveNoBody.jsp")), "positiveNoBody.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveClassTypeCast.jsp")), "positiveClassTypeCast.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveBodyNew.jsp")), "positiveBodyNew.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveBeanNameTypeCast.jsp")), "positiveBeanNameTypeCast.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveBeanNameType.jsp")), "positiveBeanNameType.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveApplicationScopedObject.jsp")), "positiveApplicationScopedObject.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeTypeAssignable.jsp")), "negativeTypeAssignable.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeSessionScopeFatalTranslationError.jsp")), "negativeSessionScopeFatalTranslationError.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeInvalidScope.jsp")), "negativeInvalidScope.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateIDFatalTranslationError.jsp")), "negativeDuplicateIDFatalTranslationError.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeClassCastExceptionFwd.jsp")), "negativeClassCastExceptionFwd.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeClassCastException.jsp")), "negativeClassCastException.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/errorPage.jsp")), "errorPage.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/defaultScope.jsp")), "defaultScope.jsp"); + + return archive; + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: positiveBeanNameTypeTest + * + * @assertion_ids: JSP:SPEC:155.1;JSP:SPEC:156;JSP:SPEC:162.2;JSP:SPEC:168.8 + * + * @test_Strategy: Use jsp:useBean to create a bean where the beanName and + * type attributes have the same values. Verify that the bean can be used by + * invoking a method on the bean inside a scriplet. + */ + + @Test + public void positiveBeanNameTypeTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveBeanNameType.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveBeanNameType"); + invoke(); + } + + /* + * @testName: positiveBeanNameTypeCastTest + * + * @assertion_ids: JSP:SPEC:162.1 + * + * @test_Strategy: Use jsp:useBean to create a bean where the beanName + * specifies one particular type, and type specifies a superclass of the value + * specified by beanName. Verify that the bean can be used by invoking a + * method on the bean inside a scriplet. + */ + + @Test + public void positiveBeanNameTypeCastTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveBeanNameTypeCast.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveBeanNameTypeCast"); + invoke(); + } + + /* + * @testName: positiveBodyNewTest + * + * @assertion_ids: JSP:SPEC:161.7.1 + * + * @test_Strategy: Using jsp:useBean, create a new instance. Within the body + * of the jsp:useBean action, use jsp:setProperty to initialize a Bean + * property. After closing the jsp:useBean action, use jsp:getProperty to + * validate that the property was indeed set. + */ + + @Test + public void positiveBodyNewTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveBodyNew.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveBodyNew"); + invoke(); + } + + /* + * @testName: positivePageScopedObjectTest + * + * @assertion_ids: JSP:SPEC:158; JSP:SPEC:158.2;JSP:SPEC:8 + * + * @test_Strategy: In one JSP page, create a new bean object using jsp:useBean + * with the scope set to "page". After the object has been created, forward + * the request to a second JSP page to validate that an object associated with + * the same ID used in the first JSP page is not available in the current + * PageContext. + */ + + @Test + public void positivePageScopedObjectTest() throws Exception { + String testName = "positivePageScopedObject"; + TEST_PROPS.setProperty(TEST_NAME, testName); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_act_usebean_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, "status:Test Status=PASSED"); + invoke(); + } + + /* + * @testName: positiveRequestScopedObjectTest + * + * @assertion_ids: JSP:SPEC:158; JSP:SPEC:158.3;JSP:SPEC:9 + * + * @test_Strategy: In one JSP page, create a new bean object using jsp:useBean + * with the scope set to "request". After the object has been created, forward + * the request to a second JSP page to validate that an object associated with + * the same ID used in the first JSP page is available in the current + * HttpServletRequest. + */ + + @Test + public void positiveRequestScopedObjectTest() throws Exception { + String testName = "positiveRequestScopedObject"; + TEST_PROPS.setProperty(TEST_NAME, testName); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_act_usebean_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, "status:Test Status=PASSED"); + invoke(); + } + + /* + * @testName: positiveSessionScopedObjectTest + * + * @assertion_ids: JSP:SPEC:158; JSP:SPEC:158.4;JSP:SPEC:10 + * + * @test_Strategy: In one JSP page, create a new bean object using jsp:useBean + * with the scope set to "session". After the object has been created, forward + * the request to a second JSP page to validate that an object associated with + * the same ID used in the first JSP page is available in the current + * HttpSession. + */ + + @Test + public void positiveSessionScopedObjectTest() throws Exception { + String testName = "positiveSessionScopedObject"; + TEST_PROPS.setProperty(TEST_NAME, testName); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_act_usebean_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, "status:Test Status=PASSED"); + invoke(); + } + + /* + * @testName: positiveApplicationScopedObjectTest + * + * @assertion_ids: JSP:SPEC:158; JSP:SPEC:158.5;JSP:SPEC:11 + * + * @test_Strategy: In one JSP page, create a new bean object using jsp:useBean + * with the scope set to "application". After the object has been created, + * forward the request to a second JSP page to validate that an object + * associated with the same ID used in the first JSP page is available in the + * current ServletContext. + */ + + @Test + public void positiveApplicationScopedObjectTest() throws Exception { + String testName = "positiveApplicationScopedObject"; + TEST_PROPS.setProperty(TEST_NAME, testName); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_act_usebean_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, "status:Test Status=PASSED"); + invoke(); + } + + /* + * @testName: positiveNoBodyTest + * + * @assertion_ids: JSP:SPEC:161.5 + * + * @test_Strategy: Explicit test to ensure that the jsp:useBean action can be + * used without a body. + */ + + @Test + public void positiveNoBodyTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveNoBody.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveNoBody"); + invoke(); + } + + /* + * @testName: positiveClassTypeCastTest + * + * @assertion_ids: JSP:SPEC:161.8 + * + * @test_Strategy: Create a new bean instance with a particular class set for + * the class attribute, and a parent class for the type attribute. Validate + * That the instance is cast without an Exception. + */ + + @Test + public void positiveClassTypeCastTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveClassTypeCast.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveClassTypeCast"); + invoke(); + } + + /* + * @testName: negativeDuplicateIDFatalTranslationErrorTest + * + * @assertion_ids: JSP:SPEC:157 + * + * @test_Strategy: Create two beans with the same id attribute. Validate that + * a Fatal Translation error occurs. + */ + + @Test + public void negativeDuplicateIDFatalTranslationErrorTest() throws Exception { + String testName = "negativeDuplicateIDFatalTranslationError"; + TEST_PROPS.setProperty(TEST_NAME, testName); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_act_usebean_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeSessionScopeFatalTranslationErrorTest + * + * @assertion_ids: JSP:SPEC:10;JSP:SPEC:159 + * + * @test_Strategy: Use the page directive to set the session attribute to + * false and then declare a bean with session scope. Validate that a Fatal + * Translation error occurs. + */ + + @Test + public void negativeSessionScopeFatalTranslationErrorTest() throws Exception { + String testName = "negativeSessionScopeFatalTranslationError"; + TEST_PROPS.setProperty(TEST_NAME, testName); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_act_usebean_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeClassCastExceptionTest + * + * @assertion_ids: JSP:SPEC:161.4 + * + * @test_Strategy: In one JSP page, declare a bean of a particular type with + * session scope. Once declared, this page will forward to a second JSP page + * which will try to reference the previously declared bean in the session + * scope, but will define the type attribute with an incompatible type. + */ + + @Test + public void negativeClassCastExceptionTest() throws Exception { + String testName = "negativeClassCastException"; + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeClassCastException.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(TEST_NAME, testName); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_act_usebean_web/" + testName + "Fwd.jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + invoke(); + } + + /* + * @testName: negativeTypeAssignableTest + * + * @assertion_ids: JSP:SPEC:152 + * + * @test_Strategy: both type and class attributes are present and class is not + * assignable to type + */ + + @Test + public void negativeTypeAssignableTest() throws Exception { + String testName = "negativeTypeAssignable"; + TEST_PROPS.setProperty(TEST_NAME, testName); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_act_usebean_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeInvalidScopeTest + * + * @assertion_ids: JSP:SPEC:158.6 + * + * @test_Strategy: both type and class attributes are present and class is not + * assignable to type + */ + + @Test + public void negativeInvalidScopeTest() throws Exception { + String testName = "negativeInvalidScope"; + TEST_PROPS.setProperty(TEST_NAME, testName); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_act_usebean_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: defaultScopeTest + * + * @assertion_ids: JSP:SPEC:158.1 + * + * @test_Strategy: check if the default scope is page + */ + + @Test + public void defaultScopeTest() throws Exception { + String testName = "defaultScope"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_act_usebean_web/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: requestTimeBeanNameTest + * + * @assertion_ids: JSP:SPEC:154; JSP:SPEC:155 + * + * @test_Strategy: use a request-time attribute expression for beanName + */ + + @Test + public void requestTimeBeanNameTest() throws Exception { + String testName = "requestTimeBeanName"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_act_usebean_web/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: serBeanNameTest + * + * @assertion_ids: JSP:SPEC:155; JSP:SPEC:152 + * + * @test_Strategy: use beanName of the form a.b.c.ser + */ + + @Test + public void serBeanNameTest() throws Exception { + String testName = "serBeanName"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_act_usebean_web/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + TEST_PROPS.setProperty(SEARCH_STRING, "1062014879125|Test PASSED"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/URLClientIT.java new file mode 100644 index 00000000..00905119 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/URLClientIT.java @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * %W 06/02/11 + */ + +package ee.jakarta.tck.pages.spec.core_syntax.actions.usebean2; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + private static final String CONTEXT_ROOT = "/jsp_coresyntx_act_usebean2_web"; + + public URLClientIT() throws Exception { + + + setGeneralURI("/jsp/spec/core_syntax/actions/usebean2"); + setContextRoot("/jsp_coresyntx_act_usebean2_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_coresyntx_act_usebean2_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_coresyntx_act_usebean2_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/beanBody.tag", "tags/beanBody.tag"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/unrestrictedBodyTestInclude.jsp")), "unrestrictedBodyTestInclude.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/unrestrictedBodyTest.jsp")), "unrestrictedBodyTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/noClassNoBeanNameTest.jsp")), "noClassNoBeanNameTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/inScriptlessTest.jsp")), "inScriptlessTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/existingWithBodyTestInclude.jsp")), "existingWithBodyTestInclude.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/existingWithBodyTest.jsp")), "existingWithBodyTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/blockSCopeTest.jsp")), "blockSCopeTest.jsp"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* + * @testName: inScriptlessTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: when used in scriptless context, an EL variable is created. + */ + + @Test + public void inScriptlessTest() throws Exception { + String testName = "inScriptlessTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "[|]|invoke tag|[|]"); + // TEST_PROPS.setProperty(SEARCH_STRING, "invoke tag"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "${list"); + invoke(); + } + + /* + * @testName: blockSCopeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: The scope of the scripting language variable is dependent + * upon the scoping rules and capabilities of the scripting language + */ + + @Test + public void blockSCopeTest() throws Exception { + String testName = "blockSCopeTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "one"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "two"); + invoke(); + } + + /* + * @testName: existingWithBodyTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: If the jsp:useBean action had a non-empty body it is + * ignored if this bean already exists. + */ + + @Test + public void existingWithBodyTest() throws Exception { + String testName = "existingWithBodyTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "one"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, + "This body should be ignored"); + invoke(); + } + + /* + * @testName: noClassNoBeanNameTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: If the object is not found in the specified scope and + * neither class nor beanName are given, a java.lang.InstantiationException + * shall occur. + */ + + @Test + public void noClassNoBeanNameTest() throws Exception { + String testName = "noClassNoBeanNameTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED|InstantiationException"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: unrestrictedBodyTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: The variable is initialized and available within the scope + * of the body. Body content is not restricted. + */ + + @Test + public void unrestrictedBodyTest() throws Exception { + String testName = "unrestrictedBodyTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "add to list|added to list|In unrestrictedBodyTestInclude.jsp|one"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/include/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/include/URLClientIT.java new file mode 100644 index 00000000..84042f30 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/include/URLClientIT.java @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.directives.include; + + +import java.io.IOException; +import java.io.InputStream; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public static String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + + public URLClientIT() throws Exception { + + + setGeneralURI("/jsp/spec/core_syntax/directives/include"); + setContextRoot("/jsp_coresyntx_direct_include_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_coresyntx_direct_include_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_coresyntx_direct_include_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/includecommon.jsp")), "includecommon.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveIncludeCtxRelativeDirective.jsp")), "positiveIncludeCtxRelativeDirective.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveIncludePageRelativeDirective.jsp")), "positiveIncludePageRelativeDirective.jsp"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* + * @testName: positiveIncludeCtxRelativeDirectiveTest + * + * @assertion_ids: JSP:SPEC:69 + * + * @test_Strategy: Using an include directive, include content referenced by a + * context-relative path. PENDING Merge with test below + */ + + @Test + public void positiveIncludeCtxRelativeDirectiveTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveIncludeCtxRelativeDirective.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveIncludeCtxRelativeDirective"); + invoke(); + } + + /* + * @testName: positiveIncludePageRelativeDirectiveTest + * + * @assertion_ids: JSP:SPEC:69 + * + * @test_Strategy: Using an include directive, include content referenced by a + * page-relative path. + */ + + @Test + public void positiveIncludePageRelativeDirectiveTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveIncludePageRelativeDirective.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveIncludePageRelativeDirective"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxActionTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxActionTag.java new file mode 100644 index 00000000..6d97623e --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxActionTag.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.spec.core_syntax.directives.page; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class DeferredSyntaxActionTag extends SimpleTagSupport { + + private String literal; + + public void setLiteral(String literal) { + this.literal = literal; + } + + public void doTag() throws JspException, IOException { + JspWriter out = getJspContext().getOut(); + try { + out.println(literal); + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "DeferredSyntaxActionTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredFalseActionTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredFalseActionTag.java new file mode 100644 index 00000000..b2e9a2ae --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredFalseActionTag.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.spec.core_syntax.directives.page; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.el.ELContext; +import jakarta.el.ValueExpression; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class IsELIgnoredFalseActionTag extends SimpleTagSupport { + + private String dollarValue; + + private ValueExpression poundExpr; + + public void setDollarExpr(String dollarExpr) { + this.dollarValue = dollarExpr; + } + + public void setPoundExpr(ValueExpression poundExpr) { + this.poundExpr = poundExpr; + } + + public void doTag() throws JspException, IOException { + ELContext elContext = getJspContext().getELContext(); + JspWriter out = getJspContext().getOut(); + + try { + String poundValue = (String) poundExpr.getValue(elContext); + out.println("Non-deferred value = " + dollarValue); + out.println("Deferred value = " + poundValue); + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "IsELIgnoredFalseActionTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredTrueActionTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredTrueActionTag.java new file mode 100644 index 00000000..241bb347 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredTrueActionTag.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.spec.core_syntax.directives.page; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class IsELIgnoredTrueActionTag extends SimpleTagSupport { + + private String dollarValue; + + private String poundValue; + + public void setDollarValue(String dollarValue) { + this.dollarValue = dollarValue; + } + + public void setPoundValue(String poundValue) { + this.poundValue = poundValue; + } + + public void doTag() throws JspException, IOException { + JspWriter out = getJspContext().getOut(); + + try { + out.println("Dollar value = " + dollarValue); + out.println("Pound value = " + poundValue); + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "IsELIgnoredTrueActionTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/page/SuperPage.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/page/SuperPage.java new file mode 100644 index 00000000..be4c2903 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/page/SuperPage.java @@ -0,0 +1,112 @@ +/* + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999-2001 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, if + * any, must include the following acknowlegement: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowlegement may appear in the software itself, + * if and wherever such third-party acknowlegements normally appear. + * + * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software + * Foundation" must not be used to endorse or promote products derived + * from this software without prior written permission. For written + * permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache" + * nor may "Apache" appear in their names without prior written + * permission of the Apache Group. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + */ + +package ee.jakarta.tck.pages.spec.core_syntax.directives.page; + +import java.io.IOException; + +import jakarta.servlet.ServletConfig; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRequest; +import jakarta.servlet.ServletResponse; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.servlet.jsp.HttpJspPage; + +public abstract class SuperPage extends HttpServlet implements HttpJspPage { + private ServletConfig config; + + final public void init(ServletConfig config) throws ServletException { + this.config = config; + jspInit(); + } + + final public ServletConfig getServletConfig() { + return config; + } + + /** + * Here is the entry point to service + */ + + final public void service(ServletRequest req, ServletResponse res) + throws ServletException, IOException { + + HttpServletRequest request = (HttpServletRequest) req; + HttpServletResponse response = (HttpServletResponse) res; + _jspService(request, response); + } + + public String getServletInfo() { + return "This is for JCK testing"; + } + + final public void destroy() { + jspDestroy(); + } + + public void jspInit() { + } + + public void jspDestroy() { + } + + // to be provided by JSP processor + + abstract public void _jspService(HttpServletRequest request, + HttpServletResponse response) throws ServletException, IOException; + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/page/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/page/URLClientIT.java new file mode 100644 index 00000000..dd51f6cf --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/page/URLClientIT.java @@ -0,0 +1,1422 @@ +/* + * Copyright (c) 2007, 2021 Oracle and/or its affiliates and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.directives.page; + + +import java.io.IOException; +import java.io.InputStream; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public static String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + + public URLClientIT() throws Exception { + + + setGeneralURI("/jsp/spec/core_syntax/directives/page"); + setContextRoot("/jsp_coresyntx_directive_page_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_coresyntx_directive_page_web.war"); + archive.addClasses(JspTestUtil.class); + archive.addPackages(false, Filters.exclude(URLClientIT.class), + URLClientIT.class.getPackageName()); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_coresyntx_directive_page_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/iselignoredaction.tld", "iselignoredaction.tld"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/deferredsyntaxaction.tld", "deferredsyntaxaction.tld"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/willNotSee.jsp")), "willNotSee.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSessionDefault.jsp")), "positiveSessionDefault.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveSession.jsp")), "positiveSession.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveMultipleImport.jsp")), "positiveMultipleImport.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveLang.jsp")), "positiveLang.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveInfo.jsp")), "positiveInfo.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveImport.jsp")), "positiveImport.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveExtends.jsp")), "positiveExtends.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveErrorPage.jsp")), "positiveErrorPage.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDuplicateSession.jsp")), "positiveDuplicateSession.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDuplicateLanguage.jsp")), "positiveDuplicateLanguage.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDuplicateIsErrorPage.jsp")), "positiveDuplicateIsErrorPage.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDuplicateIsELIgnored.jsp")), "positiveDuplicateIsELIgnored.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDuplicateInfo.jsp")), "positiveDuplicateInfo.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDuplicateExtends.jsp")), "positiveDuplicateExtends.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDuplicateErrorPage.jsp")), "positiveDuplicateErrorPage.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDuplicateContent.jsp")), "positiveDuplicateContent.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDuplicateBuffer.jsp")), "positiveDuplicateBuffer.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDuplicateAutoFlush.jsp")), "positiveDuplicateAutoFlush.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDefaultIsErrorPage.jsp")), "positiveDefaultIsErrorPage.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveContenttype.jsp")), "positiveContenttype.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveBuffCreate.jsp")), "positiveBuffCreate.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveBuffAutoflush.jsp")), "positiveBuffAutoflush.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeSessionFatalTranslationError.jsp")), "negativeSessionFatalTranslationError.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeMultiplePageEncoding.jsp")), "negativeMultiplePageEncoding.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeImportUtil.jsp")), "negativeImportUtil.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeImportIo.jsp")), "negativeImportIo.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeFatalTranslationError.jsp")), "negativeFatalTranslationError.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateSessionFatalTranslationError2.jsp")), "negativeDuplicateSessionFatalTranslationError2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateSessionFatalTranslationError.jsp")), "negativeDuplicateSessionFatalTranslationError.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateLanguageFatalTranslationError2.jsp")), "negativeDuplicateLanguageFatalTranslationError2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateLanguageFatalTranslationError.jsp")), "negativeDuplicateLanguageFatalTranslationError.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateIsErrorPageFatalTranslationError2.jsp")), "negativeDuplicateIsErrorPageFatalTranslationError2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateIsErrorPageFatalTranslationError.jsp")), "negativeDuplicateIsErrorPageFatalTranslationError.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateIsELIgnoredFatalTranslationError2.jsp")), "negativeDuplicateIsELIgnoredFatalTranslationError2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateIsELIgnoredFatalTranslationError.jsp")), "negativeDuplicateIsELIgnoredFatalTranslationError.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateInfoFatalTranslationError2.jsp")), "negativeDuplicateInfoFatalTranslationError2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateInfoFatalTranslationError.jsp")), "negativeDuplicateInfoFatalTranslationError.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateExtendsFatalTranslationError2.jsp")), "negativeDuplicateExtendsFatalTranslationError2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateExtendsFatalTranslationError.jsp")), "negativeDuplicateExtendsFatalTranslationError.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateErrorPageFatalTranslationError2.jsp")), "negativeDuplicateErrorPageFatalTranslationError2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateErrorPageFatalTranslationError.jsp")), "negativeDuplicateErrorPageFatalTranslationError.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateContentFatalTranslationError2.jsp")), "negativeDuplicateContentFatalTranslationError2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateContentFatalTranslationError.jsp")), "negativeDuplicateContentFatalTranslationError.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateBufferFatalTranslationError2.jsp")), "negativeDuplicateBufferFatalTranslationError2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateBufferFatalTranslationError.jsp")), "negativeDuplicateBufferFatalTranslationError.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateAutoFlushFatalTranslationError2.jsp")), "negativeDuplicateAutoFlushFatalTranslationError2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateAutoFlushFatalTranslationError.jsp")), "negativeDuplicateAutoFlushFatalTranslationError.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeBufferSuffix2.jsp")), "negativeBufferSuffix2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeBufferSuffix.jsp")), "negativeBufferSuffix.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeBufferOverflowException.jsp")), "negativeBufferOverflowException.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeBuffAutoflush.jsp")), "negativeBuffAutoflush.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/myerrorpage.jsp")), "myerrorpage.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/IsELIgnoredTrueTemplateTextTest.jsp")), "IsELIgnoredTrueTemplateTextTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/IsELIgnoredTrueActionTest.jsp")), "IsELIgnoredTrueActionTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/IsELIgnoredFalseTemplateTextPoundTest.jsp")), "IsELIgnoredFalseTemplateTextPoundTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/IsELIgnoredFalseTemplateTextDollarTest.jsp")), "IsELIgnoredFalseTemplateTextDollarTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/IsELIgnoredFalseActionTest.jsp")), "IsELIgnoredFalseActionTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/implicitImportServlet.jsp")), "implicitImportServlet.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/implicitImportLang.jsp")), "implicitImportLang.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/implicitImportJsp.jsp")), "implicitImportJsp.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/implicitImportHttp.jsp")), "implicitImportHttp.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/implicit.jsp")), "implicit.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/FatalTranslationErrorPage.jsp")), "FatalTranslationErrorPage.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/errorPageExceptionAttributeTestError.jsp")), "errorPageExceptionAttributeTestError.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/errorPageExceptionAttributeTest.jsp")), "errorPageExceptionAttributeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/errorpagedefault.jsp")), "errorpagedefault.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ErrorOnELNotFoundTrueTest.jsp")), "ErrorOnELNotFoundTrueTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ErrorOnELNotFoundFalseTest.jsp")), "ErrorOnELNotFoundFalseTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/duplicateErrorPage.jsp")), "duplicateErrorPage.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/DeferredSyntaxAllowedAsLiteralTrueTemplateTextTest.jsp")), "DeferredSyntaxAllowedAsLiteralTrueTemplateTextTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/DeferredSyntaxAllowedAsLiteralTrueActionTest.jsp")), "DeferredSyntaxAllowedAsLiteralTrueActionTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/DeferredSyntaxAllowedAsLiteralFalseTemplateTextTest.jsp")), "DeferredSyntaxAllowedAsLiteralFalseTemplateTextTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/DeferredSyntaxAllowedAsLiteralFalseActionTest.jsp")), "DeferredSyntaxAllowedAsLiteralFalseActionTest.jsp"); + + return archive; + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: positiveBuffAutoflushTest + * + * @assertion_ids: JSP:SPEC:44; JSP:SPEC:42 + * + * @test_Strategy: Leaving the defaults for autoFlush and buffer, validate + * that the buffer is automatically flushed once the buffer is full. + */ + + @Test + public void positiveBuffAutoflushTest() throws Exception { + String testName = "positiveBuffAutoflush"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(RESPONSE_MATCH, "5999"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + invoke(); + } + + /* + * @testName: negativeBuffAutoflushTest + * + * @assertion_ids: JSP:SPEC:45 + * + * @test_Strategy: set autoFlash to false when buffer=none, resulting in a + * translation error. + */ + + @Test + public void negativeBuffAutoflushTest() throws Exception { + String testName = "negativeBuffAutoflush"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: positiveBuffCreateTest + * + * @assertion_ids: JSP:SPEC:41 + * + * @test_Strategy: Validate that the page can configure a buffer and set the + * autoFlush attribute to false. Write data to the output stream and manually + * flush the content + */ + + @Test + public void positiveBuffCreateTest() throws Exception { + String testName = "positiveBuffCreate"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(RESPONSE_MATCH, "999"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + invoke(); + } + + /* + * @testName: negativeDuplicateBufferFatalTranslationErrorTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare a page directive with two buffer attributes of + * different values. Validate that a fatal translation error occurs. + */ + + @Test + public void negativeDuplicateBufferFatalTranslationErrorTest() throws Exception { + String testName = "negativeDuplicateBufferFatalTranslationError"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateBufferFatalTranslationError2Test + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare two page directives with buffer attributes of + * different values. Validate that a fatal translation error occurs. + */ + + @Test + public void negativeDuplicateBufferFatalTranslationError2Test() throws Exception { + String testName = "negativeDuplicateBufferFatalTranslationError2"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateAutoFlushFatalTranslationErrorTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare a page directive with two autoFlush attributes of + * different values. Validate that a fatal translation error occurs. + */ + + @Test + public void negativeDuplicateAutoFlushFatalTranslationErrorTest() + throws Exception { + String testName = "negativeDuplicateAutoFlushFatalTranslationError"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateAutoFlushFatalTranslationError2Test + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare two page directives with autoflush attributes of + * different values. Validate that a fatal translation error occurs. + */ + + @Test + public void negativeDuplicateAutoFlushFatalTranslationError2Test() + throws Exception { + String testName = "negativeDuplicateAutoFlushFatalTranslationError2"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateIsErrorPageFatalTranslationErrorTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare a page directive with two isErrorPage attributes of + * different values Validate that a fatal translation error occurs. + */ + + @Test + public void negativeDuplicateIsErrorPageFatalTranslationErrorTest() + throws Exception { + String testName = "negativeDuplicateIsErrorPageFatalTranslationError"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateIsErrorPageFatalTranslationError2Test + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare two page directives with isErrorPage attributes of + * different values. Validate that a fatal translation error occurs. + */ + + @Test + public void negativeDuplicateIsErrorPageFatalTranslationError2Test() + throws Exception { + String testName = "negativeDuplicateIsErrorPageFatalTranslationError2"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateIsELIgnoredFatalTranslationErrorTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare a page directive with two isELIgnored attributes of + * different values. Validate that a fatal translation error occurs. + */ + + @Test + public void negativeDuplicateIsELIgnoredFatalTranslationErrorTest() + throws Exception { + String testName = "negativeDuplicateIsELIgnoredFatalTranslationError"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateIsELIgnoredFatalTranslationError2Test + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare two page directives with isELIgnored attributes of + * different values. Validate that a fatal translation error occurs. + */ + + @Test + public void negativeDuplicateIsELIgnoredFatalTranslationError2Test() + throws Exception { + String testName = "negativeDuplicateIsELIgnoredFatalTranslationError2"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeBufferOverflowExceptionTest + * + * @assertion_ids: JSP:SPEC:44 + * + * @test_Strategy: Declare a page directive with autoFlush set to false. + * Overflow the buffer and verify the Exception is caught. + */ + + @Test + public void negativeBufferOverflowExceptionTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/negativeBufferOverflowException.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "negativeBufferOverflowException"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + invoke(); + } + + /* + * @testName: positiveContentTypeTest + * + * @assertion_ids: JSP:SPEC:52 + * + * @test_Strategy: Using the page directive, set the contentType attribute to + * "text/plain;charset=ISO-8859-1". Verify on the client side that the + * Content-Type header was properly set in the response. + */ + @Test + public void positiveContentTypeTest() throws Exception { + String testName = "positiveContenttype"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type:text/plain;charset=ISO-8859-1"); + invoke(); + + } + + /* + * @testName: negativeDuplicateContentFatalTranslationErrorTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare a page directive with contentType attributes + * specified of different values. Validate that a fatal translation error + * occurs. + * + */ + + @Test + public void negativeDuplicateContentFatalTranslationErrorTest() throws Exception { + String testName = "negativeDuplicateContentFatalTranslationError"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateContentFatalTranslationError2Test + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare two page directives with contentType attributes of + * different values. Validate that a fatal translation error occurs. + */ + + @Test + public void negativeDuplicateContentFatalTranslationError2Test() + throws Exception { + String testName = "negativeDuplicateContentFatalTranslationError2"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: positiveDefaultIsErrorPageTest + * + * @assertion_ids: JSP:SPEC:49 + * + * @test_Strategy: Verify that the 'isErrorPage' attribute is false by + * generating an exception in the called page and then have the error page + * attempt to access the implicit exception object. + */ + + @Test + public void positiveDefaultIsErrorPageTest() throws Exception { + String testName = "positiveDefaultIsErrorPage"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + + } + + /* + * @testName: positiveErrorPageTest + * + * @assertion_ids: JSP:SPEC:48 + * + * @test_Strategy: In the initial JSP page, generate a java.lang.Arithmetic + * Exception by dividing an int value by 0. Validate the following: The + * errorPage attributes value must be used instead of the error-page defined + * in web.xml + */ + + @Test + public void positiveErrorPageTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveErrorPage.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveErrorPage"); + TEST_PROPS.setProperty(IGNORE_STATUS_CODE, "true"); + invoke(); + } + + /* + * @testName: negativeFatalTranslationErrorTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Generate an exception from the requested page with the + * errorPage attribute set. The Error page has isErrorPage set to false and + * will attempt to access the exception object. + * + * A fatal translation error shall result if a JSP error page has the + * isErrorPage attribute set to false and an attempt is made to access the + * implicit exception object. JavaServer Pages Specification v1.2, Sec 2.10.1 + */ + @Test + public void negativeFatalTranslationErrorTest() throws Exception { + String testName = "negativeFatalTranslationError"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + + } + + /* + * @testName: negativeDuplicateErrorPageFatalTranslationErrorTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Declare a page directive with two errorPage attributes. + * Validate that a fatal translation error occurs. + * + * Duplicate errorPage attributes/values within a given translation unit shall + * result in a fatal translation error. JavaServer Pages Specification v1.2, + * Sec 2.10.1 + */ + + @Test + public void negativeDuplicateErrorPageFatalTranslationErrorTest() + throws Exception { + String testName = "negativeDuplicateErrorPageFatalTranslationError"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateErrorPageFatalTranslationError2Test + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare two page directives with errorPage attributes of + * different values. Validate that a fatal translation error occurs. + */ + + @Test + public void negativeDuplicateErrorPageFatalTranslationError2Test() + throws Exception { + String testName = "negativeDuplicateErrorPageFatalTranslationError2"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: positiveExtendsTest + * + * @assertion_ids: JSP:SPEC:33 + * + * @test_Strategy: Provide the extends attribute with a fully qualified class. + * The resulting JSP implementation class will use instanceof to validate that + * this page instance is an instance of the class that it extends. + */ + + @Test + public void positiveExtendsTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveExtends.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveExtends"); + invoke(); + } + + /* + * @testName: negativeDuplicateExtendsFatalTranslationErrorTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @assertion: Duplicate extends attributes with distinct values within a + * given translation unit shall result in a fatal translation error. + * JavaServer Pages Specification v1.2, Sec. 2.10.1 + * + * @test_Strategy: Declare a page directive with two extends attributes with + * distinct values. Validate that a fatal translation error occurs. + */ + + @Test + public void negativeDuplicateExtendsFatalTranslationErrorTest() throws Exception { + String testName = "negativeDuplicateExtendsFatalTranslationError"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateExtendsFatalTranslationError2Test + * + * @assertion_ids: JSP:SPEC:21 + * + * @assertion: Duplicate extends attributes with distinct values within a + * given translation unit + * + * @test_Strategy: Declare two page directives with extends attributes with + * distinct values. Validate that a fatal translation error occurs. + */ + + @Test + public void negativeDuplicateExtendsFatalTranslationError2Test() + throws Exception { + String testName = "negativeDuplicateExtendsFatalTranslationError2"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: positiveImportTest + * + * @assertion_ids: JSP:SPEC:34 + * + * @test_Strategy: Use the import attribute to import 'java.util.Properties'. + * Validated that a Properties object can be created and used. + */ + + @Test + public void positiveImportTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveImport.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveImport"); + invoke(); + } + + /* + * @testName: implicitImportLangTest + * + * @assertion_ids: JSP:SPEC:35 + * + * @test_Strategy: Validate that classes from the java.lang package are + * implicitly imported by creating and using a java.lang.Integer object. + * PENDING Merge with exising import tests. + */ + + @Test + public void implicitImportLangTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/implicitImportLang.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "implicitImportLang"); + invoke(); + } + + /* + * @testName: implicitImportJspTest + * + * @assertion_ids: JSP:SPEC:35 + * + * @test_Strategy: Validate that classes from the jakarta.servlet.jsp package + * are implicitly imported by calling JspFactory.getDefaultFactory() method. + */ + + @Test + public void implicitImportJspTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/implicitImportJsp.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "implicitImportJsp"); + invoke(); + } + + /* + * @testName: implicitImportServletTest + * + * @assertion_ids: JSP:SPEC:35 + * + * @test_Strategy: Validate that classes from the jakarta.servlet package are + * implicitly imported by creating and using an instance of RequestDispatcher. + */ + + @Test + public void implicitImportServletTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/implicitImportServlet.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "implicitImportServlet"); + invoke(); + } + + /* + * @testName: implicitImportHttpTest + * + * @assertion_ids: JSP:SPEC:35 + * + * @test_Strategy: Validate that classes from the jakarta.servlet.http package + * are implicitly imported by creating and using an instance of Cookie. + */ + + @Test + public void implicitImportHttpTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/implicitImportHttp.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "implicitImportHttp"); + invoke(); + } + + /* + * @testName: positiveMultipleImportTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare a page directive with two import attributes. + * + */ + + @Test + public void positiveMultipleImportTest() throws Exception { + String testName = "positiveMultipleImport"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + invoke(); + } + + /* + * @testName: negativeMultiplePageEncodingTest + * + * @assertion_ids: JSP:SPEC:229.21 + * + * @test_Strategy: Declare a page directive with two pageEncoding attributes. + * + */ + + @Test + public void negativeMultiplePageEncodingTest() throws Exception { + String testName = "negativeMultiplePageEncoding"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: positiveInfoTest + * + * @assertion_ids: JSP:SPEC:47 + * + * @test_Strategy: Set the info attribute of the page directive. Call + * getServletInfo(). + */ + + @Test + public void positiveInfoTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveInfo.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveInfo"); + invoke(); + } + + /* + * @testName: negativeDuplicateInfoFatalTranslationErrorTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare a page directive with two info attributes of + * different values and Validate that a fatal translation error occurs. + * + */ + + @Test + public void negativeDuplicateInfoFatalTranslationErrorTest() throws Exception { + String testName = "negativeDuplicateInfoFatalTranslationError"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateInfoFatalTranslationError2Test + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare two page directives with info attributes of + * different values and Validate that a fatal translation error occurs. + */ + + @Test + public void negativeDuplicateInfoFatalTranslationError2Test() throws Exception { + String testName = "negativeDuplicateInfoFatalTranslationError2"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: positiveLangTest + * + * @assertion_ids: JSP:SPEC:32 + * + * @test_Strategy: Validate that the language attribute can be set to "java" + * without an error. + */ + + @Test + public void positiveLangTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveLang.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveLang"); + invoke(); + } + + /* + * @testName: negativeDuplicateLanguageFatalTranslationErrorTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare a page directive with two language attributes of + * different values. Validate that a fatal translation error occurs. + */ + + @Test + public void negativeDuplicateLanguageFatalTranslationErrorTest() + throws Exception { + String testName = "negativeDuplicateLanguageFatalTranslationError"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateLanguageFatalTranslationError2Test + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare two page directives with language attributes of + * different values. Validate that a fatal translation error occurs. + */ + + @Test + public void negativeDuplicateLanguageFatalTranslationError2Test() + throws Exception { + String testName = "negativeDuplicateLanguageFatalTranslationError2"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: positiveSessionTest + * + * @assertion_ids: JSP:SPEC:36 + * + * @test_Strategy: Set the session attribute to 'true' and validate that the + * implicit session variable can be accessed and used. + */ + + @Test + public void positiveSessionTest() throws Exception { + String testName = "positiveSession"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + TEST_PROPS.setProperty(RESPONSE_MATCH, "got true"); + invoke(); + } + + /* + * @testName: positiveSessionDefaultTest + * + * @assertion_ids: JSP:SPEC:38 + * + * @test_Strategy: Do not set the session attribute in the page. Validate that + * the implicit session variable can be accessed and used. + */ + + @Test + public void positiveSessionDefaultTest() throws Exception { + String testName = "positiveSessionDefault"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + TEST_PROPS.setProperty(RESPONSE_MATCH, "got true"); + invoke(); + } + + /* + * @testName: negativeSessionFatalTranslationErrorTest + * + * @assertion_ids: JSP:SPEC:37 + * + * @test_Strategy: Validate that setting the session attribute to false will + * result in a fatal translation error if the implicit session variable is + * referenced. + */ + + @Test + public void negativeSessionFatalTranslationErrorTest() throws Exception { + String testName = "negativeSessionFatalTranslationError"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateSessionFatalTranslationErrorTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare a page directive with two session attributes of + * different values. Validate that a fatal translation error occurs. + */ + + @Test + public void negativeDuplicateSessionFatalTranslationErrorTest() throws Exception { + String testName = "negativeDuplicateSessionFatalTranslationError"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateSessionFatalTranslationError2Test + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare two page directives with session attributes of + * different values. Validate that a fatal translation error occurs. + */ + + @Test + public void negativeDuplicateSessionFatalTranslationError2Test() + throws Exception { + String testName = "negativeDuplicateSessionFatalTranslationError2"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: positiveDuplicateBufferTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare a page directive with two identical buffer + * attributes. + */ + + @Test + public void positiveDuplicateBufferTest() throws Exception { + String testName = "positiveDuplicateBuffer"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: positiveDuplicateAutoFlushTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare a page directive with two identical autoFlush + * attributes. + */ + + @Test + public void positiveDuplicateAutoFlushTest() throws Exception { + String testName = "positiveDuplicateAutoFlush"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: positiveDuplicateIsErrorPageTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare a page directive with two identical isErrorPage + * attributes. + */ + + @Test + public void positiveDuplicateIsErrorPageTest() throws Exception { + String testName = "positiveDuplicateIsErrorPage"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: positiveDuplicateIsELIgnoredTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare a page directive with two identical isELIgnored + * attributes. + */ + + @Test + public void positiveDuplicateIsELIgnoredTest() throws Exception { + String testName = "positiveDuplicateIsELIgnored"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: positiveDuplicateContentTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare a page directive with two identical contentType + * attributes specified. + * + */ + + @Test + public void positiveDuplicateContentTest() throws Exception { + String testName = "positiveDuplicateContent"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: positiveDuplicateErrorPageTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare a page directive with two identical errorPage + * attributes. + */ + + @Test + public void positiveDuplicateErrorPageTest() throws Exception { + String testName = "positiveDuplicateErrorPage"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: positiveDuplicateExtendsTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare a page directive with two identical extends + * attributes. + */ + + @Test + public void positiveDuplicateExtendsTest() throws Exception { + String testName = "positiveDuplicateExtends"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: positiveDuplicateInfoTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare a page directive with two identical info + * attributes. + * + */ + + @Test + public void positiveDuplicateInfoTest() throws Exception { + String testName = "positiveDuplicateInfo"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: positiveDuplicateLanguageTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare a page directive with two identical language + * attributes. + */ + + @Test + public void positiveDuplicateLanguageTest() throws Exception { + String testName = "positiveDuplicateLanguage"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: positiveDuplicateSessionTest + * + * @assertion_ids: JSP:SPEC:21 + * + * @test_Strategy: Declare a page directive with two identical session + * attributes. + */ + + @Test + public void positiveDuplicateSessionTest() throws Exception { + String testName = "positiveDuplicateSession"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: negativeBufferSuffixTest + * + * @assertion_ids: JSP:SPEC:40 + * + * @test_Strategy: The suffix kb is mandatory or a translation error must + * occur. + */ + + @Test + public void negativeBufferSuffixTest() throws Exception { + String testName = "negativeBufferSuffix"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + "2.jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: errorPageExceptionAttributeTest + * + * @assertion_ids: JSP:SPEC:50 + * + * @test_Strategy: Throwable object is transferred by the throwing page + * implementation to the error page implementation by saving the object + * reference on the common ServletRequest object using the setAttribute + * method, with a name of jakarta.servlet.jsp.jspException (for + * backwards-compatibility) and also jakarta.servlet.error.exception (for + * compatibility with the servlet specification). + */ + + @Test + public void errorPageExceptionAttributeTest() throws Exception { + String testName = "errorPageExceptionAttributeTest"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(SEARCH_STRING, + "Test PASSED|jakarta.servlet.error.exception and jakarta.servlet.jsp.jspException are the same"); + TEST_PROPS.setProperty(IGNORE_STATUS_CODE, "true"); + invoke(); + } + + /* + * @testName: negativeImportUtilTest + * + * @assertion_ids: JSP:SPEC:267 + * + * @test_Strategy: Verify that a jsp page does not import java.util.* by + * default. + */ + @Test + public void negativeImportUtilTest() throws Exception { + String testName = "negativeImportUtil"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeImportIoTest + * + * @assertion_ids: JSP:SPEC:267 + * + * @test_Strategy: Verify that a jsp page does not import java.io.* by + * default. + */ + @Test + public void negativeImportIoTest() throws Exception { + String testName = "negativeImportIo"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: isELIgnoredTrueTemplateTextTest + * + * @assertion_ids: JSP:SPEC:268 + * + * @test_Strategy: [IsELIgnored] Verify that EL expressions are ignored by the + * container in template text when the IsELIgnored page directive attribute is + * set to true. + */ + @Test + public void isELIgnoredTrueTemplateTextTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/IsELIgnoredTrueTemplateTextTest.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "IsELIgnoredTrueTemplateTextTest"); + invoke(); + } + + /* + * @testName: isELIgnoredFalseTemplateTextDollarTest + * + * @assertion_ids: JSP:SPEC:268 + * + * @test_Strategy: [IsELIgnored] Verify that EL expressions are recognized by + * the container in template text when the IsELIgnored page directive + * attribute is set to false and the '$' character is used. + */ + @Test + public void isELIgnoredFalseTemplateTextDollarTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/IsELIgnoredFalseTemplateTextDollarTest.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "IsELIgnoredFalseTemplateTextDollarTest"); + invoke(); + } + + /* + * @testName: isELIgnoredFalseTemplateTextPoundTest + * + * @assertion_ids: JSP:SPEC:268 + * + * @test_Strategy: [IsELIgnored] Verify that EL expressions are recognized by + * the container in template text when the IsELIgnored page directive + * attribute is set to false and the '#' character is used. Since the use of + * the '#' character is illegal in template text, a translation error is + * expected. + */ + @Test + public void isELIgnoredFalseTemplateTextPoundTest() throws Exception { + String testName = "IsELIgnoredFalseTemplateTextPoundTest"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: isELIgnoredFalseActionTest + * + * @assertion_ids: JSP:SPEC:268 + * + * @test_Strategy: [IsELIgnored] Verify that EL expressions are recognized by + * the container in actions when the IsELIgnored page directive attribute is + * set to false. + */ + @Test + public void isELIgnoredFalseActionTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/IsELIgnoredFalseActionTest.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "IsELIgnoredFalseActionTest"); + invoke(); + } + + /* + * @testName: isELIgnoredTrueActionTest + * + * @assertion_ids: JSP:SPEC:268 + * + * @test_Strategy: [IsELIgnored] Verify that EL expressions are ignored by the + * container in actions when the IsELIgnored page directive attribute is set + * to true. + */ + @Test + public void isELIgnoredTrueActionTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/IsELIgnoredTrueActionTest.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "IsELIgnoredTrueActionTest"); + invoke(); + } + + /* + * @testName: deferredSyntaxAllowedAsLiteralFalseTemplateTextTest + * + * @assertion_ids: JSP:SPEC:269 + * + * @test_Strategy: [DeferredSyntaxAllowedAsLiteralPageDirective] Verify that + * when the DeferredSyntaxAllowedAsLiteral page directive attribute is set to + * false, a translation error occurs when the '{#' character sequence is used + * in template text. + */ + @Test + public void deferredSyntaxAllowedAsLiteralFalseTemplateTextTest() + throws Exception { + String testName = "DeferredSyntaxAllowedAsLiteralFalseTemplateTextTest"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: deferredSyntaxAllowedAsLiteralTrueTemplateTextTest + * + * @assertion_ids: JSP:SPEC:269 + * + * @test_Strategy: [DeferredSyntaxAllowedAsLiteralPageDirective] Verify that + * when the DeferredSyntaxAllowedAsLiteral page directive attribute is set to + * true, the '{#' character sequence is allowed in template text. + */ + @Test + public void deferredSyntaxAllowedAsLiteralTrueTemplateTextTest() + throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/DeferredSyntaxAllowedAsLiteralTrueTemplateTextTest.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, + "DeferredSyntaxAllowedAsLiteralTrueTemplateTextTest"); + invoke(); + } + + /* + * @testName: deferredSyntaxAllowedAsLiteralFalseActionTest + * + * @assertion_ids: JSP:SPEC:269 + * + * @test_Strategy: [DeferredSyntaxAllowedAsLiteralPageDirective] Verify that + * when the DeferredSyntaxAllowedAsLiteral page directive attribute is set to + * false, a translation error occurs when the '{#' character sequence is used + * in an action. + */ + @Test + public void deferredSyntaxAllowedAsLiteralFalseActionTest() throws Exception { + String testName = "DeferredSyntaxAllowedAsLiteralFalseActionTest"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: deferredSyntaxAllowedAsLiteralTrueActionTest + * + * @assertion_ids: JSP:SPEC:269 + * + * @test_Strategy: [DeferredSyntaxAllowedAsLiteralPageDirective] Verify that + * when the DeferredSyntaxAllowedAsLiteral page directive attribute is set to + * true, the '{#' character sequence is allowed in an action. + */ + @Test + public void deferredSyntaxAllowedAsLiteralTrueActionTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/DeferredSyntaxAllowedAsLiteralTrueActionTest.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, + "DeferredSyntaxAllowedAsLiteralTrueActionTest"); + invoke(); + } + + /* + * @testName: errorOnELNotFoundFalseTest + * + * @assertion_ids: JSP:SPEC:319 + * + * @test_Strategy: [ErrorOnELNotFoundPageDirective] Verify that when the + * ErrorOnELNotFound page directive attribute is set to false, a reference + * to an unresolved identifier results in the empty string being used. + */ + @Test + public void errorOnELNotFoundFalseTest() + throws Exception { + String testName = "ErrorOnELNotFoundFalseTest"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + invoke(); + } + + /* + * @testName: errorOnELNotFoundTrueTest + * + * @assertion_ids: JSP:SPEC:319 + * + * @test_Strategy: [ErrorOnELNotFoundPageDirective] Verify that when the + * ErrorOnELNotFound page directive attribute is set to false, a reference + * to an unresolved identifier results in the empty string being used. + */ + @Test + public void errorOnELNotFoundTrueTest() + throws Exception { + String testName = "ErrorOnELNotFoundTrueTest"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_directive_page_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/taglib/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/taglib/URLClientIT.java new file mode 100644 index 00000000..ad0f4ef2 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/directives/taglib/URLClientIT.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.directives.taglib; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.tags.tck.SimpleTag; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public URLClientIT() throws Exception { + + + setContextRoot("/jsp_core_syntx_direct_taglib_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_core_syntx_direct_taglib_web.war"); + archive.addClasses(SimpleTag.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_core_syntx_direct_taglib_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/common.tld", "common.tld"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTagLib.jsp")), "positiveTagLib.jsp"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: positiveTagLibTest + * + * @assertion_ids: JSP:SPEC:59; JSP:SPEC:64 + * + * @test_Strategy: Validate that the taglib directive is recognized by the + * container by declaring a new tag and calling an action against that tag. + */ + + @Test + public void positiveTagLibTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_core_syntx_direct_taglib_web/positiveTagLib.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/URLClientIT.java new file mode 100644 index 00000000..7f318c28 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/URLClientIT.java @@ -0,0 +1,249 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.implicitobjects; + +import java.io.IOException; +import java.io.InputStream; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public static String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + + public URLClientIT() throws Exception { + + + setGeneralURI("/jsp/spec/core_syntax/implicitobjects"); + setContextRoot("/jsp_coresyntx_implicitobjects_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_coresyntx_implicitobjects_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_coresyntx_implicitobjects_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/Errorpage.jsp")), "Errorpage.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/checkSession.jsp")), "checkSession.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/checkResponse.jsp")), "checkResponse.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/checkRequest.jsp")), "checkRequest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/checkPageContext.jsp")), "checkPageContext.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/checkPage.jsp")), "checkPage.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/checkOut.jsp")), "checkOut.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/checkException.jsp")), "checkException.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/checkConfig.jsp")), "checkConfig.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/checkApplication.jsp")), "checkApplication.jsp"); + + return archive; + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: checkSessionTest + * + * @assertion_ids: JSP:SPEC:15 + * + * @test_Strategy: Validate that the object associated with the session + * scripting variable is of type jakarta.servlet.http.HttpSession and that a + * method can be called against it. + */ + + @Test + public void checkSessionTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/checkSession.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "checkSession"); + invoke(); + } + + /* + * @testName: checkConfigTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that the object associated with the config + * scripting variable is of type jakarta.servlet.ServletConfig and that a method + * can be called against it. + */ + + @Test + public void checkConfigTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/checkConfig.gf"); + setGoldenFileStream(gfStream); + String testName = "checkConfig"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(GOLDENFILE, testName + ".gf"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_implicitobjects_web/" + testName + " HTTP/1.0"); + invoke(); + } + + /* + * @testName: checkExceptionTest + * + * @assertion_ids: JSP:SPEC:17 + * + * @test_Strategy: Validate that the object associated with the exception + * scripting variable is of an instance of the exception type thrown (a + * subclass of java.lang.Throwable). + */ + + @Test + public void checkExceptionTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/checkException.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "checkException"); + TEST_PROPS.setProperty(IGNORE_STATUS_CODE, "true"); + invoke(); + } + + /* + * @testName: checkOutTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that the object associated with the out scripting + * variable is of type jakarta.servlet.jsp.JspWriter. + */ + + @Test + public void checkOutTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/checkOut.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "checkOut"); + invoke(); + } + + /* + * @testName: checkPageTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that the object associated with the page scripting + * variable is of type java.lang.Object. + */ + + @Test + public void checkPageTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/checkPage.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "checkPage"); + invoke(); + } + + /* + * @testName: checkPageContextTest + * + * @assertion_ids: JSP:SPEC:14 + * + * @test_Strategy: Validate that the object associated with the pageContext + * scripting variable is of type jakarta.servlet.jsp.PageContext and that a + * method can be called against it. + */ + + @Test + public void checkPageContextTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/checkPageContext.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "checkPageContext"); + invoke(); + } + + /* + * @testName: checkRequestTest + * + * @assertion_ids: JSP:SPEC:12 + * + * @test_Strategy: Validate that the object associated with the request + * scripting variable is of type jakarta.servlet.Request (parent class of + * HttpServletRequest) and that a method can be called against it. + */ + + @Test + public void checkRequestTest() throws Exception { + String testName = "checkRequest"; + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/checkRequest.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(GOLDENFILE, testName + ".gf"); + TEST_PROPS.setProperty(REQUEST, "GET /jsp_coresyntx_implicitobjects_web/" + + testName + ".jsp?Years=2 HTTP/1.0"); + invoke(); + } + + /* + * @testName: checkResponseTest + * + * @assertion_ids: JSP:SPEC:13 + * + * @test_Strategy: Validate that the object associated with the response + * scripting variable is of type jakarta.servlet.Response (parent class of + * HttpServletResponse) and that a method can be called against it. + */ + + @Test + public void checkResponseTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/checkResponse.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "checkResponse"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, "TestHeader:Method call OK"); + invoke(); + } + + /* + * @testName: checkApplicationTest + * + * @assertion_ids: JSP:SPEC:16 + * + * @test_Strategy: Validate that the object associated with the application + * scripting variable is of type jakarta.servlet.ServletContext that a method + * can be called against it. + */ + + @Test + public void checkApplicationTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/checkApplication.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "checkApplication"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/declaration/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/declaration/URLClientIT.java new file mode 100644 index 00000000..76721e37 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/declaration/URLClientIT.java @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.scripting.declaration; + + +import java.io.IOException; +import java.io.InputStream; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public static String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + + public URLClientIT() throws Exception { + + + setGeneralURI("/jsp/spec/core_syntax/scripting/declaration"); + setContextRoot("/jsp_coresyntx_script_declaration_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_coresyntx_script_declaration_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_coresyntx_script_declaration_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDeclaration.jsp")), "positiveDeclaration.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDeclaration.jspx")), "positiveDeclaration.jspx"); + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: positiveDeclarationTest + * + * @assertion_ids: JSP:SPEC:74;PENDING + * + * @test_Strategy: Validate the scripting declarations are properly + * recognized, by declaring and assigning a value to an int variable, and + * displaying the value of the variable (validate in both standard and XML + * syntax. + */ + + @Test + public void positiveDeclarationTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveDeclaration.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveDeclaration"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_declaration_web/positiveDeclaration.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/BaseCheckTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/BaseCheckTag.java new file mode 100644 index 00000000..21f182e6 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/BaseCheckTag.java @@ -0,0 +1,206 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.scripting.el; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.TagSupport; + +/** + * Base class to perform validation of the JSP 2.0 expression language. This + * class provides facilities to set a control object which a test object is + * compared against. It's up to the concrete implementation of this class to + * provided the logic to handle the validation. + */ +public abstract class BaseCheckTag extends TagSupport { + + /** + * The implicit EL object under test + */ + protected Object _object = null; + + /** + * The name of the implicit object under test + */ + protected String _name = null; + + /** + * The object to compare against the implicit object provided by the + * container. + */ + protected Object _control = null; + + /** + * String containing a message about failure cause. + */ + private String _message = null; + + /** + * If true, the tag will display any message currently set. + */ + private boolean _display = false; + + /** + * Returns the current message. + * + * @return the current message or null of there is no failure + */ + public String getMessage() { + return _message; + } + + /** + * Will cause any error message to be displayed. + * + * @param display + */ + public void setDisplay(boolean display) { + _display = display; + } + + /** + * Sets the object under test. + * + * @param o + * - the implicit object under test + */ + public void setObject(Object o) { + _object = o; + } + + /** + * The name of the implicit object under test + * + * @param name + * - the name of the implicit object + */ + public void setName(String name) { + _name = name; + } + + /** + * Sets the control object for the test. + * + * @param o + * - the control object + */ + public void setControl(Object o) { + _control = o; + } + + /** + * Performs the implemented check provided by the base classes. + * + * @return EVAL_BODY_INCLUDE + * @throws JspException + * if an error occurs + */ + public int doStartTag() throws JspException { + performCheck(); + return EVAL_BODY_INCLUDE; + } + + /** + * Implemented by concrete validation tags to perform validation against the + * provided control and test objects. + * + * @throws JspException + * - if an error occurs + */ + protected abstract void performCheck() throws JspException; + + /** + * Displays the status of the current test, or set of nested tests. If a + * particular tag has the display attribute set to true, + * this method will recurse though it's ancestor tags and obtain any failure + * notifications. + * + * If this particular instance doesn't have the display attribute set, then + * the error generated by the check will be stored to be retrieved by another + * action nested further down. + * + * @param message + * - the message to display or store + * @throws JspException + * - if an error occurs + */ + protected void displayTestStatus(String message) throws JspException { + if (_display) { + JspWriter out = pageContext.getOut(); + try { + out.println(); + String[] messages = checkAncestorsForErrors(); + if (messages.length == 0) { + out.println("Test PASSED"); + } else { + for (int i = 0; i < messages.length; i++) { + out.println(messages[i]); + } + } + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + } else { + _message = message; + } + } + + /** + * Recurses through any available ancestor tags and retrieves any error + * messages they may have. If the ancestor returns null for the message, then + * the test succeeded, otherwise take the returned message and add it to a + * list to be displayed by the caller. + * + * @return a String array of failure messages + */ + private String[] checkAncestorsForErrors() { + List list = new ArrayList(); + debug("Checking parent tags for errors..."); + for (BaseCheckTag parent = (BaseCheckTag) this + .getParent(); parent != null; parent = (BaseCheckTag) parent + .getParent()) { + String message = parent.getMessage(); + if (message != null) { + debug("Error: " + message); + list.add(message); + } + debug("Check of parent tag [" + parent + "] completed."); + } + return (String[]) list.toArray(new String[list.size()]); + } + + /** + * Wrapper method for JspTestUtil.debug(String). This wrapper will prepend + * this classes name to the provided message. + * + * @param message + * - the debug message + */ + private static void debug(String message) { + JspTestUtil.debug("[BaseCheckTag] " + message); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/CheckCoercionTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/CheckCoercionTag.java new file mode 100644 index 00000000..58d91ca3 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/CheckCoercionTag.java @@ -0,0 +1,156 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.scripting.el; + +import java.math.BigDecimal; +import java.math.BigInteger; + +import jakarta.servlet.jsp.JspException; + +/** + * Tag implementation to validate type coercions for the JSP 2.0 expression + * language. + */ +public class CheckCoercionTag extends BaseCheckTag { + + /** + * Sets a Byte object. + * + * @param _byte + * a Byte object + */ + public void setByte(Byte _byte) { + _object = _byte; + } + + /** + * Sets a Character object. + * + * @param _char + * a Character object + */ + public void setChar(Character _char) { + _object = _char; + } + + /** + * Sets a Short object. + * + * @param _short + * a Short object + */ + public void setShort(Short _short) { + _object = _short; + } + + /** + * Sets an Integer object. + * + * @param _int + * an Integer object + */ + public void setInt(Integer _int) { + _object = _int; + } + + /** + * Sets a Long object. + * + * @param _long + * a Long object + */ + public void setLong(Long _long) { + _object = _long; + } + + /** + * Sets a Float object. + * + * @param _float + * a Float object + */ + public void setFloat(Float _float) { + _object = _float; + } + + /** + * Sets a Double object. + * + * @param _double + * a Double object + */ + public void setDouble(Double _double) { + _object = _double; + } + + /** + * Sets a String object. + * + * @param _string + * a String object + */ + public void setString(String _string) { + _object = _string; + } + + /** + * Sets a Boolean object. + * + * @param _boolean + * a Boolean object + */ + public void setBoolean(Boolean _boolean) { + _object = _boolean; + } + + public void setBigInteger(BigInteger _bigInteger) { + _object = _bigInteger; + } + + public void setBigDecimal(BigDecimal _bigDecimal) { + _object = _bigDecimal; + } + + public void setTypeBean(TypeBean _bean) { + _object = _bean; + } + + /** + * Validates the to and from various types by taking the String value of the + * expected result and the resulting evaluation and checking for equality. + * + * @throws JspException + * if an error occurs. + */ + protected void performCheck() throws JspException { + String message = null; + if (_control == null) { + if (_object != null) { + message = "Test FAILED(" + _name + ") Expected the EL expression" + + "to evaluate to null. Received: " + _object; + } + } else if (!_control.toString().equals(_object.toString())) { + message = "Test Failed(" + _name + ") Expected: " + _control + + ", received: " + _object; + } + displayTestStatus(message); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/CheckECMATag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/CheckECMATag.java new file mode 100644 index 00000000..3811d679 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/CheckECMATag.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.scripting.el; + +import jakarta.servlet.jsp.JspException; + +/** + * Tag implementation to perform validation of JSP 2.0 expression language + * ECMA-like operators '.' and '[]'. + */ +public class CheckECMATag extends BaseCheckTag { + + /** + * Validates ECMA treatment of the '.' and '[]' operators. + * Validation is performed as follows: + *
        + *
      • If the control object is null, the object under test must be null as + * well or FAIL.
      • + *
      • If the control and test objects are not equal, fail
      • + *
      + * + * @throws JspException + * if an error occurs + */ + protected void performCheck() throws JspException { + String message = null; + + if (_control == null) { + if (_object != null) { + message = "Test FAILED. Expected evaluation of expression to be" + + " null when " + _name + " was null"; + } + } else { + if (!_control.equals(_object)) { + message = "Test FAILED. Expected result of evaluation to be: " + + _control + ", received: " + _object; + } + } + displayTestStatus(message); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/CheckLiteralTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/CheckLiteralTag.java new file mode 100644 index 00000000..ca0a56d3 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/CheckLiteralTag.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.scripting.el; + +import jakarta.servlet.jsp.JspException; + +/** + * Tag implementation to perform validation of JSP 2.0 expression language + * literals. + */ +public class CheckLiteralTag extends BaseCheckTag { + + /** + * Performs validation of expression language literals using the following + * algorithm: + *
        + *
      • If the control object is null, and the expression yields a non null + * object, FAIL
      • + *
      • If the control object is an instance of java.lang.Number, + * convert both the control and test objects to Strings. If they are not + * equal, FAIL.
      • + *
      • Otherwise, if both the control and test objects are not equal, + * FAIL.
      • + *
      + * + * @throws JspException + * if an error occurs + */ + protected void performCheck() throws JspException { + String message = null; + if (_control == null) { + if (_object != null) { + message = "Test FAILED. Test of Null literal failed. Expected" + + " EL evaluation of Null literal to be null. Received: " + + _object; + } + } else { + if (_control instanceof Number) { + if (!_control.toString().equals(_object.toString())) { + message = "Test FAILED. Test of " + _name + " literal failed." + + " Expected: " + _control + ", Received: " + _object; + } + } else if (!_control.equals(_object)) { + message = "Test FAILED. Test of " + _name + " literal failed." + + " Expected: " + _control + ", Received: " + _object; + } + } + displayTestStatus(message); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/CheckObjectTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/CheckObjectTag.java new file mode 100644 index 00000000..0d8aba91 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/CheckObjectTag.java @@ -0,0 +1,229 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.scripting.el; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.StringTokenizer; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.servlet.http.Cookie; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.PageContext; + +/** + * Tag implementation to perform validation of the implicit objects provided by + * the JSP 2.0 expression language. + */ +public class CheckObjectTag extends BaseCheckTag { + + /** + * Validates the following: + *
        + *
      • If the object under test is an instance of PageContext, make sure it's + * the same PageContext as the control object.
      • + *
      • All other implicit objects aside from pageContext must be instances of + * java.util.Map. Validate the keys and values based on the what is contained + * in the control object provided.
      • + *
      + * + * @throws JspException + * - if an error occurs + */ + protected void performCheck() throws JspException { + JspWriter out = pageContext.getOut(); + try { + if (_object instanceof PageContext) { + if (_object == _control) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. The PageContext implicit object," + + "is not the same PageContext as that of the current Page."); + } + } else { + // We're dealing with what should be a Map object + if (_object instanceof Map) { + Map control = getMapFromString((String) _control); + out.println(compareMaps(_name, control, (Map) _object)); + } else { + out.println("The implicit object, '" + _name + "' is not an" + + " instance of Map as required by the specification"); + } + } + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + } + + /** + * Creates a Map object from the provide string. The String can take the + * following forms: + *
        + *
      • key,value,key1,value1
      • + *
      • key,[value1:value2],key2,value2 + *
          + *

          + * In the first case, the string is treated as a comma separated list where + * each odd numbered element represents a key, and the even elements represent + * the value of the key. In the second case, the string is again treated as a + * comma separated list, but if the value is surrounded with '[' and ']' then + * the string contained between the brackets is parsed and an String array is + * created. NOTE: the separator for the array elements is ':'. + * + * @param s + * - the string to create a Map instance from + * @return a map based on the provided String + */ + private static Map getMapFromString(String s) { + Map map = new HashMap(); + for (StringTokenizer st = new StringTokenizer(s, ","); st + .hasMoreTokens();) { + String key = st.nextToken(); + String value = st.nextToken(); + int length = value.length(); + if (value.charAt(0) == '[' && value.charAt(length - 1) == ']') { + debug("Creating String array for values: " + value); + value = value.substring(1, length - 1); + List list = new ArrayList(); + for (StringTokenizer st1 = new StringTokenizer(value, ":"); st1 + .hasMoreTokens();) { + list.add(st1.nextToken()); + } + map.put(key, list.toArray(new String[list.size()])); + } else { + map.put(key, value); + } + } + return map; + } + + /** + * Compares the test mape to the control map. The test map must contain the + * keys and values defined in the control map. + * + * @param name + * - the name of the implicit object currently under test + * @param control + * - the map of keys and values the implicit object must contain + * @param testMap + * - the implicit object provided by the container + * @return a message containing information about the success or failure of + * the comparison. + */ + private static String compareMaps(String name, Map control, Map testMap) { + // Verify all the keys in the control map exist in the + // test map. + + for (Iterator i = control.entrySet().iterator(); i.hasNext();) { + Map.Entry controlEntry = (Map.Entry) i.next(); + String controlKey = (String) controlEntry.getKey(); + Object controlValue = controlEntry.getValue(); + boolean found = false; + + for (Iterator ii = testMap.entrySet().iterator(); ii.hasNext();) { + Map.Entry testEntry = (Map.Entry) ii.next(); + String testKey = (String) testEntry.getKey(); + Object testValue = testEntry.getValue(); + boolean keyFound = false; + // Compare the Keys. If the implicit object under test + // is 'header' or 'headerValues' do a case insensitive + // comparison of the keys. + if (name.equals("header") || name.equals("headerValues")) { + + if (controlKey.equalsIgnoreCase(testKey)) { + keyFound = true; + } + } else { + if (controlKey.equals(testKey)) { + keyFound = true; + } + } + + if (keyFound) { + // found a match on the keys...verify the values + // are equal + if (controlValue instanceof String[]) { + String[] cValueArray = (String[]) controlValue; + String[] tValueArray = (String[]) testValue; + Arrays.sort(tValueArray); + Arrays.sort(cValueArray); + if (!Arrays.equals(cValueArray, tValueArray)) { + return "Test FAILED. Unexpected Value returned" + " for key '" + + controlKey + "' in the " + name + + "implicit object.\nExpected value" + " to be " + + JspTestUtil.getAsString(cValueArray) + " but received " + + JspTestUtil.getAsString(tValueArray); + } else { + found = true; + } + } else if (testValue instanceof Cookie) { + Cookie cookie = (Cookie) testValue; + if (!controlValue.equals(cookie.getValue())) { + return "Test FAILED. Unable to find Cookie in Map" + + " returned by implementation with value of" + " '" + + controlValue + "'. Name/Values contained" + + " in Map returned by container: " + + JspTestUtil.getAsString(testMap); + } else { + found = true; + } + } else { + if (!controlValue.equals(testValue)) { + return "Test FAILED. Unexpected Value returned" + " for key '" + + controlKey + "' in the " + name + + "implicit object.\nExpected value" + " to be " + + controlValue + " but received " + testValue; + } else { + found = true; + } + } + } + } + + if (!found) { + return "Test FAILED. Unable to find matching entry.\nKey: " + + controlKey + ", Value: " + controlValue + "\n" + + "Map received from container: " + + JspTestUtil.getAsString(testMap); + } + } + + return "Test PASSED"; + } + + /** + * Wrapper method for JspTestUtil.debug(String). This wrapper will prepend + * this classes name to the provided message. + * + * @param message + * - the debug message + */ + private static void debug(String message) { + JspTestUtil.debug("[CheckObjectTag] " + message); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/CheckOperatorTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/CheckOperatorTag.java new file mode 100644 index 00000000..5a58224a --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/CheckOperatorTag.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.scripting.el; + +import jakarta.servlet.jsp.JspException; + +/** + * Tag implementation to validate the various operators provided by the JSP 2.0 + * expression language. + */ +public class CheckOperatorTag extends BaseCheckTag { + + /** + * Validate the control and test objects using the following algorithm: + *

            + *
          • If either the control or test objects are null, FAIL.
          • + *
          • If both objects, converted to a String, are not equal, FAIL.
          • + *
          + * + * @throws JspException + * if an error occurs + */ + protected void performCheck() throws JspException { + String message = null; + + if (_control == null || _object == null) { + message = "Test FAILED (" + _name + "). Either the control or" + + " the object under test was null."; + } else { + if (!_control.toString().equals(_object.toString())) { + message = "Test FAILED (" + _name + "). " + " Expected: " + _control + + ", Received: " + _object; + } + } + displayTestStatus(message); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/EchoTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/EchoTag.java new file mode 100644 index 00000000..8b530ac4 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/EchoTag.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.spec.core_syntax.scripting.el; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.BodyContent; +import jakarta.servlet.jsp.tagext.BodyTagSupport; + +public class EchoTag extends BodyTagSupport { + + private String _echo = null; + + private String _static = null; + + public void setEcho(String echo) { + _echo = echo; + } + + public void setStatic(String staticString) { + _static = staticString; + } + + public int doAfterBody() throws JspException { + BodyContent body = this.getBodyContent(); + try { + body.writeOut(body.getEnclosingWriter()); + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + return SKIP_BODY; + } + + public int doEndTag() throws JspException { + if (_echo != null) { + try { + pageContext.getOut().println("Expression from attribute: " + _echo); + pageContext.getOut().println("String from attribute: " + _static); + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } finally { + _echo = null; + } + } + return EVAL_PAGE; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/EcmaBean.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/EcmaBean.java new file mode 100644 index 00000000..86eeedc6 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/EcmaBean.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.scripting.el; + +public class EcmaBean { + + private String _simple = null; + + public String getSimple() { + return _simple; + } + + public void setSimple(String simple) { + _simple = simple; + } + + public String getException() { + throw new RuntimeException(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElFunctions.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElFunctions.java new file mode 100644 index 00000000..362124bb --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElFunctions.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.scripting.el; + +/** + * Simple single 'el functioned' class for EL testing. + */ +public class ElFunctions { + + /** + * EL Function that provides substring functionality + * + * @param startIndex + * - the start index for the substring operation + * @param endIndex + * - the end index for the substring operation + * @param value + * - the String value to perform the operation against + * @return the substringed value + */ + public static final String substring(int startIndex, int endIndex, + String value) { + return value.substring(startIndex, endIndex); + } + + public String toString() { + return super.toString(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/TypeBean.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/TypeBean.java new file mode 100644 index 00000000..35c031f6 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/TypeBean.java @@ -0,0 +1,410 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.scripting.el; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.math.BigInteger; + +/** + * Simple bean to return all primitive and their respective boxed types. + */ +public class TypeBean implements Serializable { + + /** + * Various types to use in testing + */ + private byte b = (byte) 0; + + private char c = '1'; + + private short s = (short) 2; + + private int i = 3; + + private long l = 4L; + + private float f = 5.5f; + + private double d = 6.5d; + + private boolean bool = false; + + private Byte bb = Byte.valueOf((byte) 30); + + private Character cc = Character.valueOf((char) 31); + + private Short ss = Short.valueOf((short) 32); + + private Integer ii = Integer.valueOf(33); + + private Long ll = Long.valueOf(34L); + + private Float ff = Float.valueOf(35.5f); + + private Double dd = Double.valueOf(36.5d); + + private Boolean bbool = Boolean.TRUE; + + private BigDecimal bigDec = BigDecimal.valueOf(100.5d); + + private BigInteger bigInt = BigInteger.valueOf(125); + + /** + * Returns a BigInteger. + * + * @return a BigInteger + */ + public BigInteger getBigInt() { + return bigInt; + } + + /** + * Returns a BigDecimal + * + * @return a BigDecimal + */ + public BigDecimal getBigDec() { + return bigDec; + } + + /** + * Returns a byte primitive. + * + * @return a byte primitive + */ + public byte getBytePrim() { + return b; + } + + /** + * Sets a byte primitive + * + * @param b + * - a byte primitive + */ + public void setBytePrim(byte b) { + this.b = b; + } + + /** + * Returns a char primitive. + * + * @return a char primitive + */ + public char getCharPrim() { + return c; + } + + /** + * Sets a char primitive. + * + * @param c + * - a char primitive + */ + public void setCharPrim(char c) { + this.c = c; + } + + /** + * Returns a short primitive. + * + * @return a short primitive + */ + public short getShortPrim() { + return s; + } + + /** + * Sets a short primitive. + * + * @param s + * - a short primitive + */ + public void setShortPrim(short s) { + this.s = s; + } + + /** + * Returns an int primitive + * + * @return an int primitive + */ + public int getIntPrim() { + return i; + } + + /** + * Sets an int primitive + * + * @param i + * - an int primitive + */ + public void setIntPrim(int i) { + this.i = i; + } + + /** + * Returns a long primitive. + * + * @return a long primitive + */ + public long getLongPrim() { + return l; + } + + /** + * Sets a long primitive. + * + * @param l + * - a long primitive + */ + public void setLongPrim(long l) { + this.l = l; + } + + /** + * Returns a float primitive. + * + * @return a float primtitive + */ + public float getFloatPrim() { + return f; + } + + /** + * Sets a float primitive. + * + * @param f + * - a float primitive + */ + public void setFloatPrim(float f) { + this.f = f; + } + + /** + * Returns a double primitive. + * + * @return a double primitive + */ + public double getDoublePrim() { + return d; + } + + /** + * Sets a double primitive. + * + * @param d + * - a double primitive + */ + public void setDoublePrim(double d) { + this.d = d; + } + + /** + * Sets a boolean primitive. + * + * @param b + * - a boolean primitive + */ + public void setBooleanPrim(boolean b) { + this.bool = b; + } + + /** + * Returns a boolean primitive. + * + * @return a boolean primitive. + */ + public boolean getBooleanPrim() { + return bool; + } + + /** + * Returns a Byte. + * + * @return a Byte + */ + public Byte getBite() { + return bb; + } + + /** + * Sets a Byte. + * + * @param bb + * - a Byte + */ + public void setBite(Byte bb) { + this.bb = bb; + } + + /** + * Returns a Character. + * + * @return a Character + */ + public Character getChr() { + return cc; + } + + /** + * Sets a Character. + * + * @param cc + * - a Character + */ + public void setChr(Character cc) { + this.cc = cc; + } + + /** + * Returns a Short. + * + * @return a Short + */ + public Short getShrt() { + return ss; + } + + /** + * Sets a Short. + * + * @param ss + * - a Short + */ + public void setShrt(Short ss) { + this.ss = ss; + } + + /** + * Returns an Integer. + * + * @return an Integer + */ + public Integer getInti() { + return ii; + } + + /** + * Sets an Integer. + * + * @param ii + * - an Integer + */ + public void setInti(Integer ii) { + this.ii = ii; + } + + /** + * Returns a Long. + * + * @return a Long + */ + public Long getLng() { + return ll; + } + + /** + * Sets a Long. + * + * @param ll + * - a Long + */ + public void setLng(Long ll) { + this.ll = ll; + } + + /** + * Returns a Float. + * + * @return a Float + */ + public Float getFlote() { + return ff; + } + + /** + * Sets a Float. + * + * @param ff + * - a Float + */ + public void setFlote(Float ff) { + this.ff = ff; + } + + /** + * Returns a Double. + * + * @return - a Double + */ + public Double getDble() { + return dd; + } + + /** + * Sets a Double. + * + * @param dd + * - a Double + */ + public void setDble(Double dd) { + this.dd = dd; + } + + /** + * Sets a Boolean. + * + * @param b + * - a Boolean + */ + public void setBooln(Boolean b) { + this.bbool = b; + } + + /** + * Returns a Boolean. + * + * @return a Boolean + */ + public Boolean getBooln() { + return bbool; + } + + /** + * Returns a Boolean (of value true). + * + * @return a true Boolean + */ + public boolean isCallable() { + return true; + } + + /** + * Returns information about this simple bean. + * + * @return a String + */ + public String toString() { + return "TypeBean;v,1.0"; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/TypeBeanChild.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/TypeBeanChild.java new file mode 100644 index 00000000..b9b80910 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/TypeBeanChild.java @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.scripting.el; + +/** + * Simple class to validate assignable types. + */ +public class TypeBeanChild extends TypeBean { + + public TypeBeanChild() { + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/URLClientIT.java new file mode 100644 index 00000000..294e7805 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/URLClientIT.java @@ -0,0 +1,627 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.scripting.el; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public URLClientIT() throws Exception { + + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_coresyntx_script_el_web.war"); + archive.addClasses(JspTestUtil.class); + archive.addPackages(true, Filters.exclude(URLClientIT.class), + URLClientIT.class.getPackageName()); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_coresyntx_script_el_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/el.tld", "el.tld"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/nonstatic.tld", "nonstatic.tld"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElAttributeSearchTest.jsp")), "ElAttributeSearchTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/elBinaryOperatorParenthesesTest.jsp")), "elBinaryOperatorParenthesesTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElBinaryOperators1Test.jsp")), "ElBinaryOperators1Test.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElBinaryOperators2Test.jsp")), "ElBinaryOperators2Test.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElBinaryOperators3Test.jsp")), "ElBinaryOperators3Test.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElBinaryOperators4Test.jsp")), "ElBinaryOperators4Test.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElBooleanCoercionTest.jsp")), "ElBooleanCoercionTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElBooleanLiteralTest.jsp")), "ElBooleanLiteralTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElCharacterCoercionTest.jsp")), "ElCharacterCoercionTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElEcmaBeanAccessTest.jsp")), "ElEcmaBeanAccessTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElEcmaListArrayTest.jsp")), "ElEcmaListArrayTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElEcmaMapTest.jsp")), "ElEcmaMapTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElEcmaNullValuesTest.jsp")), "ElEcmaNullValuesTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElEmptyOperatorTest.jsp")), "ElEmptyOperatorTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElFloatingPointLiteralTest.jsp")), "ElFloatingPointLiteralTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElFunctionInvocationTest.jsp")), "ElFunctionInvocationTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElFunctionNamespaceTest.jsp")), "ElFunctionNamespaceTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElImplicitApplicationScopeTest.jsp")), "ElImplicitApplicationScopeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElImplicitCookieTest.jsp")), "ElImplicitCookieTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElImplicitHeaderTest.jsp")), "ElImplicitHeaderTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElImplicitHeaderValuesTest.jsp")), "ElImplicitHeaderValuesTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElImplicitInitParamTest.jsp")), "ElImplicitInitParamTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElImplicitPageContextTest.jsp")), "ElImplicitPageContextTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElImplicitPageScopeTest.jsp")), "ElImplicitPageScopeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElImplicitParamTest.jsp")), "ElImplicitParamTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElImplicitParamValuesTest.jsp")), "ElImplicitParamValuesTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElImplicitRequestScopeTest.jsp")), "ElImplicitRequestScopeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElImplicitSessionScopeTest.jsp")), "ElImplicitSessionScopeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElIntegerLiteralTest.jsp")), "ElIntegerLiteralTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElInvocationAndUsageTest.jsp")), "ElInvocationAndUsageTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElNonExistingFunctionNameTest.jsp")), "ElNonExistingFunctionNameTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElNonMatchingFunctionSignatureTest.jsp")), "ElNonMatchingFunctionSignatureTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElNonStaticPublicFunctionTest.jsp")), "ElNonStaticPublicFunctionTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElNullLiteralTest.jsp")), "ElNullLiteralTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElNumberCoercionTest.jsp")), "ElNumberCoercionTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElOtherTypeCoercionTest.jsp")), "ElOtherTypeCoercionTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElPrimitiveBoxedTypeConversionTest.jsp")), "ElPrimitiveBoxedTypeConversionTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElRelationalOperators1Test.jsp")), "ElRelationalOperators1Test.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElRelationalOperators2Test.jsp")), "ElRelationalOperators2Test.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElStaticAttributeTest.jsp")), "ElStaticAttributeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElStringCoercionTest.jsp")), "ElStringCoercionTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElStringLiteralTest.jsp")), "ElStringLiteralTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ELTernaryOperatorTest.jsp")), "ELTernaryOperatorTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElUnaryOperators1Test.jsp")), "ElUnaryOperators1Test.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ElUnaryOperators2Test.jsp")), "ElUnaryOperators2Test.jsp"); + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: elInvocationAndUsageTest + * + * @assertion_ids: JSP:SPEC:97;JSP:SPEC:99;JSP:SPEC:100 + * + * @test_Strategy: Validate EL expression will be evaluated by the container + * when provided as attribute values for actions that accept dynamic values, + * as body content when body content type is not tagdependent, as template + * text, and that the expression is only evaluated using the construct + * ${expr}. + */ + @Test + public void elInvocationAndUsageTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElInvocationAndUsageTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "Expression in template text: Evaluated|" + + "These should not be evaluated: {pageScope.eval}, pageScope.eval}, {pageScope.eval|" + + "Expression from attribute: Evaluated|" + + "Expression in body of action: Evaluated|" + + "Expression in body of tagdependent body content tag: ${pageScope.eval}"); + invoke(); + } + + /* + * @testName: elStaticAttributeTest + * + * @assertion_ids: JSP:SPEC:98 + * + * @test_Strategy: Validate EL expressions provided to an action that does not + * accept dynamic attributes will result in a translation error. + */ + @Test + public void elStaticAttributeTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElStaticAttributeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: elAttributeSearchTest + * + * @assertion_ids: JSP:SPEC:118 + * + * @test_Strategy: Validate that if no scope qualifier is provided, attributes + * are located in the PageContext using the semantics of + * PageContext.findAttribute(String). If no attribute can be found, the + * expression evaluation must be null. + */ + @Test + public void elAttributeSearchTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElAttributeSearchTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elBooleanLiteralTest + * + * @assertion_ids: JSP:SPEC:101 + * + * @test_Strategy: Validate that the EL Boolean literal evaluated as expected. + */ + @Test + public void elBooleanLiteralTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElBooleanLiteralTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elNullLiteralTest + * + * @assertion_ids: JSP:SPEC:105 + * + * @test_Strategy: Validate that EL Null literal evaluated as expected. + */ + @Test + public void elNullLiteralTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElNullLiteralTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elIntegerLiteralTest + * + * @assertion_ids: JSP:SPEC:102 + * + * @test_Strategy: Validate that EL Integer literal evaluated as expected. + */ + @Test + public void elIntegerLiteralTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElIntegerLiteralTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elFloatingPointLiteralTest + * + * @assertion_ids: JSP:SPEC:103 + * + * @test_Strategy: Validate that EL Floating Point literal evaluated as + * expected. + */ + @Test + public void elFloatingPointLiteralTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElFloatingPointLiteralTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elStringLiteralTest + * + * @assertion_ids: JSP:SPEC:104 + * + * @test_Strategy: Validate that EL String literal evaluated as expected. + */ + @Test + public void elStringLiteralTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElStringLiteralTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elBinaryOperators1Test + * + * @assertion_ids: JSP:SPEC:107.1;JSP:SPEC:107.2;JSP:SPEC:107.3;JSP:SPEC:107.4 + * + * @test_Strategy: Validate the binary operators, '+', '-', and '*' when using + * Doubles, Floats, and Strings. + */ + @Test + public void elBinaryOperators1Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElBinaryOperators1Test.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elBinaryOperators2Test + * + * @assertion_ids: JSP:SPEC:108.1;JSP:SPEC:108.2;JSP:SPEC:108.3 + * + * @test_Strategy: Validate the binary operators, '/' and 'div' when using + * different types. + */ + @Test + public void elBinaryOperators2Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElBinaryOperators2Test.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elBinaryOperators3Test + * + * @assertion_ids: JSP:SPEC:109.1;JSP:SPEC:109.2;JSP:SPEC:109.3;JSP:SPEC:109.4 + * + * @test_Strategy: Validate the binary operator '%' and 'mod' when using + * different types. + */ + @Test + public void elBinaryOperators3Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElBinaryOperators3Test.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elBinaryOperators4Test + * + * @assertion_ids: JSP:SPEC:113.1 + * + * @test_Strategy: Validate the binary operator '&&', 'and', '||', and "or' + * when using different types. + */ + @Test + public void elBinaryOperators4Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElBinaryOperators4Test.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elUnaryOperators1Test + * + * @assertion_ids: JSP:SPEC:110.1;JSP:SPEC:110.2.1;JSP:SPEC:110.2.2; + * JSP:SPEC:110.2.3;JSP:SPEC:110.3 + * + * @test_Strategy: Validate the unary minus ('-') operator with variaous types + * and validate the evaluation of the expression returns the expected value. + */ + @Test + public void elUnaryOperators1Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElUnaryOperators1Test.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elUnaryOperators2Test + * + * @assertion_ids: JSP:SPEC:114.1 + * + * @test_Strategy: Validate the unary minus ('!' and 'not') returns the + * expected value. + */ + @Test + public void elUnaryOperators2Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElUnaryOperators2Test.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elRelationalOperators1Test + * + * @assertion_ids: JSP:SPEC:111.1;JSP:SPEC:111.2;JSP:SPEC:111.3; + * JSP:SPEC:111.4;JSP:SPEC:111.8;JSP:SPEC:111.5; JSP:SPEC:111.6 + * + * @test_Strategy: Validate the relational operators '<', '>', '<=', '>=', + * 'lt', 'gt', 'le', 'ge' when one value is null, as well as the various types + * (Double, Float, Short, etc). Verify the relational operation behaves as + * expected. + */ + @Test + public void elRelationalOperators1Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElRelationalOperators1Test.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elRelationalOperators2Test + * + * @assertion_ids: JSP:SPEC:112.1;JSP:SPEC:112.2;JSP:SPEC:112.3; + * JSP:SPEC:112.4;JSP:SPEC:112.5;JSP:SPEC:112.6; JSP:SPEC:112.6.2 + * + * @test_Strategy: Validate the relational operators '==', '!=', 'ne', 'eq', + * when one value is null or both values are null, as well as the various + * types (Double, Float, Short, etc). Verify the relational operation behaves + * as expected. + */ + @Test + public void elRelationalOperators2Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElRelationalOperators2Test.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elEmptyOperatorTest + * + * @assertion_ids: JSP:SPEC:115.1;JSP:SPEC:115.2;JSP:SPEC:115.3; + * JSP:SPEC:115.4;JSP:SPEC:115.5;JSP:SPEC:115.6 + * + * @test_Strategy: Validate the behavior of the EL 'empty' operator when used + * to evaluate null, String, array, Map, and Collection values (on the case of + * the array, map, and Collection, provide emtpy and non-empty values) + */ + @Test + public void elEmptyOperatorTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElEmptyOperatorTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elStringCoercionTest + * + * @assertion_ids: JSP:SPEC:135.1;JSP:SPEC:135.2;JSP:SPEC:135.4; + * JSP:SPEC:134.5 + * + * @testStrategy: Validate that various can be successfully corerced to a + * String using the EL string coercion rules. Also validate any error + * conditions that can occur during the coercion. + */ + @Test + public void elStringCoercionTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElStringCoercionTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elNumberCoercionTest + * + * @assertion_ids: JSP:SPEC:136.1;JSP:SPEC:136.2;JSP:SPEC:136.3; + * JSP:SPEC:136.4;JSP:SPEC:136.5;JSP:SPEC:136.6; JSP:SPEC:136.7;JSP:SPEC:136.8 + * + * @testStrategy: Validate the EL is able to convert between the various + * number types successfully based on varying input and target values. Also + * validate any error conditions that can occur during the coercion. + */ + @Test + public void elNumberCoercionTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElNumberCoercionTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elCharacterCoercionTest + * + * @assertion_ids: JSP:SPEC:137.1;JSP:SPEC:137.2;JSP:SPEC:137.3; + * JSP:SPEC:137.4;JSP:SPEC:137.5;JSP:SPEC:137.6 + * + * @testStrategy: Validate that the EL is able to convert various types to a + * Character. Also validate any error conditions that can occur during the + * coercion. + */ + @Test + public void elCharacterCoercionTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElCharacterCoercionTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elBooleanCoercionTest + * + * @assertion_ids: JSP:SPEC:138.1;JSP:SPEC:138.2;JSP:SPEC:138.3; + * JSP:SPEC:138.4;JSP:SPEC:138.5 + * + * @testStrategy: Validate that the EL is able to convert various types to a + * Boolean. Also validate any error conditions that can occur during the + * coercion. + */ + @Test + public void elBooleanCoercionTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElBooleanCoercionTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elOtherTypeCoercionTest + * + * @assertion_ids: JSP:SPEC:139.1;JSP:SPEC:139.2;JSP:SPEC:139.3; + * JSP:SPEC:139.6 + * + * @testStrategy: Validate that the EL is able to convert various types + * including invoking propery editors if target type has PropertyEditory. + * Additionally validate any specified error conditions. + */ + @Test + public void elOtherTypeCoercionTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElOtherTypeCoercionTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: elPrimitiveBoxedTypeConversionTest + * + * @assertion_ids: JSP:SPEC:134.1;JSP:SPEC:134.2;JSP:SPEC:134.4 + * + * @testStrategy: Validate that if the target type is primitive and the + * resulting EL evaluation is a boxed type, the result is 'unboxed' and passed + * to the attribute. If a runtime error doens't occur due to a type problem, + * the test passes. + */ + @Test + public void elPrimitiveBoxedTypeConversionTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElPrimitiveBoxedTypeConversionTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + invoke(); + } + + /* + * @testName: elFunctionInvocationTest + * + * @assertion_ids: JSP:SPEC:122.5;JSP:SPEC:122.6 + * + * @test_Strategy: Validation an EL Function can be successfully invoked. + */ + @Test + public void elFunctionInvocationTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElFunctionInvocationTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: elNonExistingFunctionNameTest + * + * @assertion_ids: JSP:SPEC:122.3 + * + * @test_Strategy: Validate a translation error occurs if the specified + * function name doesn't exist in the imported taglibrary. + */ + @Test + public void elNonExistingFunctionNameTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElNonExistingFunctionNameTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: elNonMatchingFunctionSignatureTest + * + * @assertion_ids: JSP:SPEC:122.4 + * + * @test_Strategy: Validate a translation error occurs if the specified + * function find a matching name, but the signature doesn't match. + */ + @Test + public void elNonMatchingFunctionSignatureTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElNonMatchingFunctionSignatureTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: elNonStaticPublicFunctionTest + * + * @assertion_ids: JSP:SPEC:120 + * + * @test_Strategy: Validate a translation error occurs if the specified + * function is not defined a public static. + */ + @Test + public void elNonStaticPublicFunctionTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ElNonStaticPublicFunctionTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: elTernaryOperatorTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the operation/evaluation of the container when + * presented with ternary operator expressions. + */ + @Test + public void elTernaryOperatorTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/ELTernaryOperatorTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "Test PASSED|Test PASSED|Test PASSED|Test PASSED|Test PASSED"); + invoke(); + } + + /* + * @testName: elBinaryOperatorParenthesesTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the operation/evaluation of the container when + * presented with binary operator expressions with parentheses. + */ + @Test + public void elBinaryOperatorParenthesesTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_coresyntx_script_el_web/elBinaryOperatorParenthesesTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "true|true|true|true|2|1.4"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/escaping/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/escaping/URLClientIT.java new file mode 100644 index 00000000..b7f84946 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/escaping/URLClientIT.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.scripting.escaping; + + +import java.io.IOException; +import java.io.InputStream; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public static String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + + public URLClientIT() throws Exception { + + + setGeneralURI("/jsp/spec/core_syntax/scripting/escaping"); + setContextRoot("/jsp_coresyntx_script_escape_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_coresyntx_script_escape_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_coresyntx_script_escape_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveEscapingTest.jsp")), "positiveEscapingTest.jsp"); + + return archive; + + } + + + /* Run tests */ + + // ============================================ Tests ====== + + /* + * @testName: positiveEscapingTest + * + * @assertion_ids: JSP:SPEC:7 + * + * @testStrategy: Validate handling of escaped entities. + */ + @Test + public void positiveEscapingTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveEscapingTest.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveEscapingTest"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/URLClientIT.java new file mode 100644 index 00000000..8c533163 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/URLClientIT.java @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.scripting.expressions; + + +import java.io.IOException; +import java.io.InputStream; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public static String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + + public URLClientIT() throws Exception { + + + setGeneralURI("/jsp/spec/core_syntax/scripting/expressions"); + setContextRoot("/jsp_coresyntx_script_expressions_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_coresyntx_script_expressions_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_coresyntx_script_expressions_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveExprWhiteSpace.jsp")), "positiveExprWhiteSpace.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveExprComment.jsp")), "positiveExprComment.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveExpr.jsp")), "positiveExpr.jsp"); + + return archive; + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: positiveExprTest + * + * @assertion_ids: JSP:SPEC:77 + * + * @test_Strategy: Validate that the container can correctly support a basic + * expression by validating the output returned. + */ + + @Test + public void positiveExprTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveExpr.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveExpr"); + invoke(); + } + + /* + * @testName: positiveExprCommentTest + * + * @assertion_ids: JSP:SPEC:5 + * + * @test_Strategy: Validate that an HTML stye comment with an embedded + * expression returns the value of the expression within the comment and that + * the HTML comment is treated as template text. + */ + + @Test + public void positiveExprCommentTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveExprComment.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveExprComment"); + invoke(); + } + + /* + * @testName: positiveExprWhiteSpaceTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that the container correctly handles different + * whitespace values with an expression element. + */ + + @Test + public void positiveExprWhiteSpaceTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveExprWhiteSpace.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveExprWhiteSpace"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/scriptlet/Counter.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/scriptlet/Counter.java new file mode 100644 index 00000000..a5d592b4 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/scriptlet/Counter.java @@ -0,0 +1,73 @@ +/* +* +* The Apache Software License, Version 1.1 +* +* Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. +* Copyright (c) 1999-2001 The Apache Software Foundation. All rights +* reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* +* 1. Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* +* 2. Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in +* the documentation and/or other materials provided with the +* distribution. +* +* 3. The end-user documentation included with the redistribution, if +* any, must include the following acknowlegement: +* "This product includes software developed by the +* Apache Software Foundation (http://www.apache.org/)." +* Alternately, this acknowlegement may appear in the software itself, +* if and wherever such third-party acknowlegements normally appear. +* +* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software +* Foundation" must not be used to endorse or promote products derived +* from this software without prior written permission. For written +* permission, please contact apache@apache.org. +* +* 5. Products derived from this software may not be called "Apache" +* nor may "Apache" appear in their names without prior written +* permission of the Apache Group. +* +* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR +* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +* SUCH DAMAGE. +* ==================================================================== +* +* This software consists of voluntary contributions made by many +* individuals on behalf of the Apache Software Foundation. For more +* information on the Apache Software Foundation, please see +* . +* +*/ +package ee.jakarta.tck.pages.spec.core_syntax.scripting.scriptlet; + +public class Counter { + private int counter = 0; + + public void setCounter(int k) { + counter = k; + } + + public int getCounter() { + return ++counter; + } + + public int getCounterValue() { + return counter; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/scriptlet/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/scriptlet/URLClientIT.java new file mode 100644 index 00000000..ebe797a5 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/core_syntax/scripting/scriptlet/URLClientIT.java @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.core_syntax.scripting.scriptlet; + + +import java.io.IOException; +import java.io.InputStream; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public static String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + + public URLClientIT() throws Exception { + + + setGeneralURI("/jsp/spec/core_syntax/scripting/scriptlet"); + setContextRoot("/jsp_coresyntx_script_scriptlet_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_coresyntx_script_scriptlet_web.war"); + archive.addClasses(Counter.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_coresyntx_script_scriptlet_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveScriptlet.jsp")), "positiveScriptlet.jsp"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: positiveScriptletTest + * + * @assertion_ids: JSP:SPEC:76 + * + * @test_Strategy: Correct syntax is used in the scriptlet + * + */ + + @Test + public void positiveScriptletTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/positiveScriptlet.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, "positiveScriptlet"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/AllowedDynamicAttributeValueTypesTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/AllowedDynamicAttributeValueTypesTag.java new file mode 100644 index 00000000..eebe6573 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/AllowedDynamicAttributeValueTypesTag.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.el.jsp; + +import java.io.IOException; + +import jakarta.el.MethodExpression; +import jakarta.el.ValueExpression; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.TagSupport; + +public class AllowedDynamicAttributeValueTypesTag extends TagSupport { + + private String litExpr; + + private String scriptExpr; + + private String dollarExpr; + + private ValueExpression valueExpr; + + private MethodExpression methodExpr; + + private boolean valExprSet; + + public void setLitExpr(String litExpr) { + this.litExpr = litExpr; + } + + public void setScriptExpr(String scriptExpr) { + this.scriptExpr = scriptExpr; + } + + public void setDollarExpr(String dollarExpr) { + this.dollarExpr = dollarExpr; + } + + public void setValueExpr(Object expr) { + if (expr instanceof ValueExpression) { + this.valueExpr = (ValueExpression) expr; + valExprSet = true; + } else { + this.valueExpr = null; + valExprSet = false; + } + } + + public void setMethodExpr(MethodExpression methodExpr) { + this.methodExpr = methodExpr; + } + + public int doStartTag() throws JspException { + try { + pageContext.getOut().println("litExpr is " + litExpr); + pageContext.getOut().println("scriptExpr is " + scriptExpr); + pageContext.getOut().println("dollarExpr is " + dollarExpr); + pageContext.getOut() + .println("valueExpr is " + ((valExprSet) ? valueExpr : "null")); + pageContext.getOut().println("methodExpr is " + methodExpr); + if (valExprSet) + pageContext.getOut().println("Test PASSED."); + } catch (IOException ioe) { + throw new JspException("Unexpected Exception", ioe); + } + return SKIP_BODY; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/DynamicAttributeSetterMethodTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/DynamicAttributeSetterMethodTag.java new file mode 100644 index 00000000..297b67bd --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/DynamicAttributeSetterMethodTag.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.el.jsp; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class DynamicAttributeSetterMethodTag extends SimpleTagSupport { + + public void setNum(int i) { + // do nothing server should error out. + } + + public void doTag() throws JspException, IOException { + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredMethodStringLiteralTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredMethodStringLiteralTag.java new file mode 100644 index 00000000..576506d6 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredMethodStringLiteralTag.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.spec.el.jsp; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.el.ELContext; +import jakarta.el.MethodExpression; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class ELDeferredMethodStringLiteralTag extends SimpleTagSupport { + private static final String NL = System.getProperty("line.separator", "\n"); + + private static final String EXPECTEDSTR = "hello"; + + private static final double EXPECTEDDBL = 3.1415926; + + private final static double EPSILON = 0.00000001; + + private MethodExpression strExpr, dblExpr; + + public void setStrExpr(MethodExpression strExpr) { + this.strExpr = strExpr; + } + + public void setDblExpr(MethodExpression dblExpr) { + this.dblExpr = dblExpr; + } + + public void doTag() throws JspException, IOException { + ELContext elContext = getJspContext().getELContext(); + JspWriter out = getJspContext().getOut(); + boolean pass = true; + + try { + String strResult = (String) strExpr.invoke(elContext, null); + if (!strResult.equals(EXPECTEDSTR)) { + pass = false; + out.println("Test FAILED. Incorrect return value for strResult." + NL + + "Expected value: " + EXPECTEDSTR + NL + "Value returned: " + + strResult); + } + + Object objResult = dblExpr.invoke(elContext, null); + if (!(objResult instanceof Double)) { + pass = false; + out.println("Test FAILED. Return value is not a Double:" + NL + + objResult.getClass() + NL); + } + double dblResult = ((Double) objResult).doubleValue(); + if (!(Math.abs(dblResult - EXPECTEDDBL) < EPSILON)) { + pass = false; + out.println("Test FAILED. Incorrect value for dblResult." + NL + + "Expected value: " + EXPECTEDDBL + NL + "Value returned: " + + dblResult); + } + + if (pass == true) + out.println("Test PASSED."); + + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "ELDeferredMethodStringLiteralTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredMethodValueTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredMethodValueTag.java new file mode 100644 index 00000000..84da93c7 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredMethodValueTag.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.spec.el.jsp; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.el.ELContext; +import jakarta.el.MethodExpression; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class ELDeferredMethodValueTag extends SimpleTagSupport { + + private MethodExpression litExpr; + + private MethodExpression poundExpr; + + public void setLitExpr(MethodExpression litExpr) { + this.litExpr = litExpr; + } + + public void setPoundExpr(MethodExpression poundExpr) { + this.poundExpr = poundExpr; + } + + public void doTag() throws JspException, IOException { + ELContext elContext = getJspContext().getELContext(); + JspWriter out = getJspContext().getOut(); + + try { + litExpr.getMethodInfo(elContext); + out.println("getMethodInfo() called for literal expression"); + poundExpr.getMethodInfo(elContext); + out.println("Test PASSED."); + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "ELDeferredMethodValueTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredValueCoercionTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredValueCoercionTag.java new file mode 100644 index 00000000..033a9fd7 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredValueCoercionTag.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.spec.el.jsp; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.el.ELContext; +import jakarta.el.ValueExpression; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class ELDeferredValueCoercionTag extends SimpleTagSupport { + + private final static int EXPECTEDINTVAL = 8128; + + private final static String EXPECTEDBOOKVAL = "Moby Dick"; + + private ValueExpression intExpr, bookExpr; + + public void setIntExpr(ValueExpression intExpr) { + this.intExpr = intExpr; + } + + public void setBookExpr(ValueExpression bookExpr) { + this.bookExpr = bookExpr; + } + + public void doTag() throws JspException, IOException { + ELContext elContext = getJspContext().getELContext(); + JspWriter out = getJspContext().getOut(); + + try { + Class expectedIntClass = intExpr.getExpectedType(); + if (!expectedIntClass.getName().equals("int")) { + out.println("Test FAILED. Expected type = int"); + out.println("Got type = " + expectedIntClass.getName()); + return; + } + Object intVal = intExpr.getValue(elContext); + int coercedIntVal = ((Integer) intVal).intValue(); + if (coercedIntVal != EXPECTEDINTVAL) { + out.println("Test FAILED. Wrong value for int expression."); + out.println("Expected value: " + EXPECTEDINTVAL); + out.println("Got value: " + coercedIntVal); + return; + } + + Class expectedBookClass = bookExpr.getExpectedType(); + if (!expectedBookClass.getName().equals("java.lang.String")) { + out.println("Test FAILED. Expected type = java.lang.String"); + out.println("Got type = " + expectedBookClass.getName()); + return; + } + Object bookVal = bookExpr.getValue(elContext); + String coercedBookVal = (String) bookVal; + if (!coercedBookVal.equals(EXPECTEDBOOKVAL)) { + out.println("Test FAILED. Wrong value for book expression."); + out.println("Expected value: " + EXPECTEDBOOKVAL); + out.println("Got value: " + coercedBookVal); + return; + } + + out.println("Test PASSED."); + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "ELDeferredValueCoercionTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredValueValueTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredValueValueTag.java new file mode 100644 index 00000000..5e5d1fad --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredValueValueTag.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.spec.el.jsp; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.el.ELContext; +import jakarta.el.ValueExpression; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class ELDeferredValueValueTag extends SimpleTagSupport { + + private final static String LITVAL = "foo"; + + private final static String POUNDVAL = "bar"; + + private ValueExpression litExpr; + + private ValueExpression poundExpr; + + public void setLitExpr(ValueExpression litExpr) { + this.litExpr = litExpr; + } + + public void setPoundExpr(ValueExpression poundExpr) { + this.poundExpr = poundExpr; + } + + public void doTag() throws JspException, IOException { + ELContext elContext = getJspContext().getELContext(); + JspWriter out = getJspContext().getOut(); + + try { + String litVal = (String) litExpr.getValue(elContext); + if (!litVal.equals(LITVAL)) { + out.println("Test FAILED. Wrong value for literal expression."); + out.println("Expected value: " + LITVAL); + out.println("Retrieved value: " + litVal); + return; + } + String poundVal = (String) poundExpr.getValue(elContext); + if (!poundVal.equals(POUNDVAL)) { + out.println("Test FAILED. Wrong value for pound expression."); + out.println("Expected value: " + POUNDVAL); + out.println("Retrieved value: " + poundVal); + return; + } + out.println("Test PASSED."); + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "ELDeferredValueValueTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/URLClientIT.java new file mode 100644 index 00000000..e16584a8 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/jsp/URLClientIT.java @@ -0,0 +1,325 @@ +/* + * Copyright (c) 2007, 2021 Oracle and/or its affiliates and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)URLClient.java 1.2 05/05/03 + */ + +package ee.jakarta.tck.pages.spec.el.jsp; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.common.tags.tck.SetTag; +import com.sun.ts.tests.common.el.spec.Book; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public URLClientIT() throws Exception { + + + setGeneralURI("/jsp/spec/el/jsp/"); + setContextRoot("/jsp_el_jsp_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_el_jsp_web.war"); + archive.addClasses(JspTestUtil.class, + SetTag.class, + Book.class + ); + archive.addPackages(true, Filters.exclude(URLClientIT.class), + URLClientIT.class.getPackageName()); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_el_jsp_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/el_jsp.tld", "el_jsp.tld"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TemplateTextPoundTranslationError.jsp")), "TemplateTextPoundTranslationError.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TagLibraryPoundTranslationError.jsp")), "TagLibraryPoundTranslationError.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveELDeferredValueValue.jsp")), "positiveELDeferredValueValue.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveELDeferredMethodValue.jsp")), "positiveELDeferredMethodValue.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeELDeferredValueValue.jsp")), "negativeELDeferredValueValue.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeELDeferredMethodValue.jsp")), "negativeELDeferredMethodValue.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ImplicitELImport.jsp")), "ImplicitELImport.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ELDeferredValueCoercion.jsp")), "ELDeferredValueCoercion.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ELDeferredMethodStringLiteralError2.jsp")), "ELDeferredMethodStringLiteralError2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ELDeferredMethodStringLiteralError1.jsp")), "ELDeferredMethodStringLiteralError1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ELDeferredMethodStringLiteral.jsp")), "ELDeferredMethodStringLiteral.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/DynamicAttributeSetterMethod.jsp")), "DynamicAttributeSetterMethod.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/AllowedDynamicAttributeValueTypes.jsp")), "AllowedDynamicAttributeValueTypes.jsp"); + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: positiveELDeferredValueValueTest + * + * @assertion_ids: JSP:SPEC:282 + * + * @test_Strategy: [ELDeferredValueValue] In a jsp page, pass a String literal + * expression and an expression using the #{} syntax to a tag handler via a + * deferred-value element in the tld file. Verify that the expressions are + * accepted and that their values are transmitted correctly to the tag + * handler. + */ + @Test + public void positiveELDeferredValueValueTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_jsp_web/positiveELDeferredValueValue.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: negativeELDeferredValueValueTest + * + * @assertion_ids: JSP:SPEC:282 + * + * @test_Strategy: [ELDeferredValueValue] In a jsp page, pass an expression + * using the ${} syntax to a tag handler via a deferred-value element in the + * tld file. Verify that a page translation error occurs. + */ + @Test + public void negativeELDeferredValueValueTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_jsp_web/negativeELDeferredValueValue.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: eLDeferredValueCoercionTest + * + * @assertion_ids: JSP:SPEC:284 + * + * @test_Strategy: [ELDeferredValueCoercion] In a jsp page, pass a String + * literal expression and an expression using the #{} syntax to a tag handler + * via a deferred-value element in the tld file. Verify that the expressions + * are accepted, that their values are coerced to the expected type and + * evaluate as expected. + */ + @Test + public void eLDeferredValueCoercionTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_jsp_web/ELDeferredValueCoercion.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: positiveELDeferredMethodValueTest + * + * @assertion_ids: JSP:SPEC:287 + * + * @test_Strategy: [ELDeferredMethodValue] In a jsp page, pass a String + * literal expression and an expression using the #{} syntax to a tag handler + * via a deferred-method element in the tld file. Verify that the expressions + * are accepted and that their values are transmitted correctly to the tag + * handler. + */ + @Test + public void positiveELDeferredMethodValueTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_jsp_web/positiveELDeferredMethodValue.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: negativeELDeferredMethodValueTest + * + * @assertion_ids: JSP:SPEC:287 + * + * @test_Strategy: [ELDeferredMethodValue] In a jsp page, pass an expression + * using the ${} syntax to a tag handler via a deferred-method element in the + * tld file. Verify that a page translation error occurs. + */ + @Test + public void negativeELDeferredMethodValueTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_jsp_web/negativeELDeferredMethodValue.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: eLDeferredMethodStringLiteralTest + * + * @assertion_ids: JSP:SPEC:288 + * + * @test_Strategy: [ELDeferredMethodStringLiteral] In a jsp page, pass a + * literal expression representing a String and a literal expression + * representing a Double to a tag handler via a deferred-method element in the + * tld file. Verify that the expressions are accepted, that they are coerced + * to the proper type and have the expected values. + */ + @Test + public void eLDeferredMethodStringLiteralTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_jsp_web/ELDeferredMethodStringLiteral.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: eLDeferredMethodStringLiteralErrorTest1 + * + * @assertion_ids: JSP:SPEC:289 + * + * @test_Strategy: [ELDeferredMethodStringLiteralError] In a jsp page, pass a + * string literal to a tag handler via a deferred-method element in the tld + * file where the method signature -element has a return value of void. Verify + * that a page translation error occurs. + */ + @Test + public void eLDeferredMethodStringLiteralErrorTest1() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_jsp_web/ELDeferredMethodStringLiteralError1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: eLDeferredMethodStringLiteralErrorTest2 + * + * @assertion_ids: JSP:SPEC:289 + * + * @test_Strategy: [ELDeferredMethodStringLiteralError] In a jsp page, pass a + * string literal to a tag handler via a deferred-method element in the tld + * file where the string literal cannot be coerced to the return type of the + * method signature. Verify that a page translation error occurs. + */ + @Test + public void eLDeferredMethodStringLiteralErrorTest2() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_jsp_web/ELDeferredMethodStringLiteralError2.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: templateTextPoundTranslationErrorTest + * + * @assertion_ids: JSP:SPEC:272 + * + * @test_Strategy: [TemplateTextPoundTranslationError] Verify that the #{ + * character sequence, when embedded in template text, triggers a translation + * error. + */ + @Test + public void templateTextPoundTranslationErrorTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_jsp_web/TemplateTextPoundTranslationError.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: tagLibraryPoundTranslationErrorTest + * + * @assertion_ids: JSP:SPEC:273 + * + * @test_Strategy: [TagLibraryPoundTranslationError] Verify that the #{ + * character sequence triggers a translation error if used for a tag attribute + * of a tag library where the jsp-version is greater than or equal to 2.1, and + * for which the attribute is not marked as a deferred expression in the TLD. + */ + @Test + public void tagLibraryPoundTranslationErrorTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_jsp_web/TagLibraryPoundTranslationError.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: allowedDynamicAttributeValueTypesTest + * + * @assertion_ids: JSP:SPEC:290 + * + * @test_Strategy: [AllowedDynamicAttributeValueTypes] In a jsp page, pass a + * literal expression, a scriptlet expression, an expression using the ${} + * syntax, and deferred-value and deferred-method expressions using the #{} + * syntax as dynamic attributes to a tag handler. Verify that the expressions + * are accepted. + */ + @Test + public void allowedDynamicAttributeValueTypesTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_jsp_web/AllowedDynamicAttributeValueTypes.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: dynamicAttributeSetterMethodTest + * + * @assertion_ids: JSP:SPEC:291 + * + * @test_Strategy: [DynamicAttributeSetterMethod] Verify that an argument to + * the setter method of a dynamic attribute must be of type java.lang.Object. + * Implement a tag handler with a setter method whose argument is a primitive + * type and see that the container generates an internal server error. + */ + @Test + public void dynamicAttributeSetterMethodTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_jsp_web/DynamicAttributeSetterMethod.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + + /* + * @testName: implicitImportTest + * + * @assertion_ids: JSP:SPEC:35 + * + * @test_Strategy: [ImplicitELImport] Verify that each of the implicit package + * is available to the EL environment. + */ + @Test + public void implicitImportTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_jsp_web/ImplicitELImport.jsp HTTP/1.1"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/el/language/Count.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/language/Count.java new file mode 100644 index 00000000..b3a8a2e0 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/language/Count.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.spec.el.language; + +public class Count { + + private static int num = 0; + + public static final int count() { + return ++num; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/el/language/MethodIntegerLiteralTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/language/MethodIntegerLiteralTag.java new file mode 100644 index 00000000..bb8ca60e --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/language/MethodIntegerLiteralTag.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.spec.el.language; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.el.ELContext; +import jakarta.el.MethodExpression; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class MethodIntegerLiteralTag extends SimpleTagSupport { + + private static final int EXPECTED_VALUE = 496; + + private MethodExpression mexp; + + public void setLiteralMethExpr(MethodExpression mexp) { + this.mexp = mexp; + } + + public void doTag() throws JspException, IOException { + + JspWriter out = getJspContext().getOut(); + ELContext elContext = getJspContext().getELContext(); + + try { + Object result = mexp.invoke(elContext, null); + if (!(result instanceof Integer)) { + out.println("Test FAILED. Return value is not an Integer:\n"); + out.println(result.getClass() + "\n"); + return; + } + int resultInt = ((Integer) result).intValue(); + if (resultInt != EXPECTED_VALUE) { + out.println("Test FAILED. Incorrect return value.\n"); + out.println("Expected value = " + EXPECTED_VALUE + "\n"); + out.println("Value returned = " + resultInt + "\n"); + return; + } + out.println("Test PASSED."); + + } catch (Throwable t) { + out.println("Test FAILED: Exception in tag handler\n"); + JspTestUtil.handleThrowable(t, out, "MethodIntegerLiteralTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/el/language/MethodStringLiteralTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/language/MethodStringLiteralTag.java new file mode 100644 index 00000000..57ce3da8 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/language/MethodStringLiteralTag.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.spec.el.language; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.el.ELContext; +import jakarta.el.MethodExpression; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class MethodStringLiteralTag extends SimpleTagSupport { + + private static final String EXPECTED_VALUE = "literal"; + + private MethodExpression mexp; + + public void setLiteralMethExpr(MethodExpression mexp) { + this.mexp = mexp; + } + + public void doTag() throws JspException, IOException { + + JspWriter out = getJspContext().getOut(); + ELContext elContext = getJspContext().getELContext(); + + try { + Object result = mexp.invoke(elContext, null); + if (!(result instanceof String)) { + out.println("Test FAILED. Return value is not a String:\n"); + out.println(result.getClass() + "\n"); + return; + } + String resultStr = (String) result; + if (!(resultStr.equals(EXPECTED_VALUE))) { + out.println("Test FAILED. Incorrect return value.\n"); + out.println("Expected value = " + EXPECTED_VALUE + "\n"); + out.println("Value returned = " + resultStr + "\n"); + return; + } + out.println("Test PASSED."); + + } catch (Throwable t) { + out.println("Test FAILED: Exception in tag handler\n"); + JspTestUtil.handleThrowable(t, out, "MethodStringLiteralTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/el/language/PoundDollarSameMeaningTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/language/PoundDollarSameMeaningTag.java new file mode 100644 index 00000000..d98f5aee --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/language/PoundDollarSameMeaningTag.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package ee.jakarta.tck.pages.spec.el.language; + +import java.io.IOException; + +import ee.jakarta.tck.pages.common.util.JspTestUtil; + +import jakarta.el.ELContext; +import jakarta.el.ValueExpression; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class PoundDollarSameMeaningTag extends SimpleTagSupport { + + private String dollarValue; + + private ValueExpression poundExpr; + + public void setDollarExpr(String dollarExpr) { + this.dollarValue = dollarExpr; + } + + public void setPoundExpr(ValueExpression poundExpr) { + this.poundExpr = poundExpr; + } + + public void doTag() throws JspException, IOException { + ELContext elContext = getJspContext().getELContext(); + JspWriter out = getJspContext().getOut(); + + try { + String poundValue = (String) poundExpr.getValue(elContext); + if (!poundValue.equals(dollarValue)) { + out.println("Test FAILED. Non-deferred and deferred "); + out.println("values do not match."); + out.println("Non-deferred value = " + dollarValue); + out.println("Deferred value = " + poundValue); + } else { + out.println("Test PASSED."); + } + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "PoundDollarSameMeaningTag"); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/el/language/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/language/URLClientIT.java new file mode 100644 index 00000000..8e4b610b --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/el/language/URLClientIT.java @@ -0,0 +1,288 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)URLClient.java 1.2 05/05/03 + */ + +package ee.jakarta.tck.pages.spec.el.language; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import ee.jakarta.tck.pages.common.tags.tck.SetTag; +import com.sun.ts.tests.common.el.spec.Book; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + + public URLClientIT() throws Exception { + + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_el_language_web.war"); + archive.addClasses(JspTestUtil.class, + SetTag.class, + Book.class + ); + archive.addPackages(true, Filters.exclude(URLClientIT.class), + URLClientIT.class.getPackageName()); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_el_language_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/el_language.tld", "el_language.tld"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/RValueCoercion2.jsp")), "RValueCoercion2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/RValueCoercion1.jsp")), "RValueCoercion1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/PoundDollarSameMeaning.jsp")), "PoundDollarSameMeaning.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ParseOnceEvalMany.jsp")), "ParseOnceEvalMany.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/LiteralExprEval2.jsp")), "LiteralExprEval2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/LiteralExprEval1.jsp")), "LiteralExprEval1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/LiteralExprAsMethodExpr2.jsp")), "LiteralExprAsMethodExpr2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/LiteralExprAsMethodExpr1.jsp")), "LiteralExprAsMethodExpr1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ELSyntaxEscape.jsp")), "ELSyntaxEscape.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/DotAndIndexOperatorsSame.jsp")), "DotAndIndexOperatorsSame.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/CompositeExprEval2.jsp")), "CompositeExprEval2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/CompositeExprEval1.jsp")), "CompositeExprEval1.jsp"); + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: poundDollarSameMeaningTest + * + * @assertion_ids: EL:SPEC:1 + * + * @test_Strategy: [PoundDollarSameMeaning] In a jsp page, set an EL variable, + * then pass it to a tag handler as both ${expr} and #{expr}. Verify that the + * tag handler's evaluation of both forms is identical. + */ + @Test + public void poundDollarSameMeaningTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_language_web/PoundDollarSameMeaning.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: parseOnceEvalManyTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: [ExprParsedEvalMany] In a jsp page, verify that once an + * expression is parsed, it can be evaluated multiple times. + */ + @Test + public void parseOnceEvalManyTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_language_web/ParseOnceEvalMany.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: rValueCoercion1Test + * + * @assertion_ids: EL:SPEC:3 + * + * @test_Strategy: [RValueCoercion] Set the value of a ValueExpression to a + * String type and verify that the value retrieved when the expression is + * evaluated is also a String type. + */ + @Test + public void rValueCoercion1Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_language_web/RValueCoercion1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: rValueCoercion2Test + * + * @assertion_ids: EL:SPEC:3 + * + * @test_Strategy: [RValueCoercion] Set the value of a ValueExpression to a + * complex type and verify that the value retrieved when the expression is + * evaluated is a String type in accordance with the coercion rules. + */ + @Test + public void rValueCoercion2Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_language_web/RValueCoercion2.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: literalExprEval1Test + * + * @assertion_ids: EL:SPEC:6 + * + * @test_Strategy: [LiteralExprEval] Set the value of a ValueExpression to a + * literal String type. Verify that the value retrieved when the expression is + * evaluated is a String equal to the value set. + */ + @Test + public void literalExprEval1Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_language_web/LiteralExprEval1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: literalExprEval2Test + * + * @assertion_ids: EL:SPEC:6 + * + * @test_Strategy: [LiteralExprEval] Coerce a String literal to a Boolean in a + * ValueExpression. Verify that the value retrieved when the expression is + * evaluated is a Boolean of the expected value. + */ + @Test + public void literalExprEval2Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_language_web/LiteralExprEval2.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: eLSyntaxEscapeTest + * + * @assertion_ids: EL:SPEC:8 + * + * @test_Strategy: [ELSyntaxEscape] Verify that the EL special characters '&' + * and '#' are treated as literals when preceded with '\'. + */ + @Test + public void eLSyntaxEscapeTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_language_web/ELSyntaxEscape.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: literalExprAsMethodExpr1Test + * + * @assertion_ids: EL:SPEC:10 + * + * @test_Strategy: [LiteralExprAsMethodExpr] Verify that a literal-expression + * can also be used as a method expression that returns a non-void value. + */ + @Test + public void literalExprAsMethodExpr1Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_language_web/LiteralExprAsMethodExpr1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: literalExprAsMethodExpr2Test + * + * @assertion_ids: EL:SPEC:10 + * + * @test_Strategy: [LiteralExprAsMethodExpr] Verify that a literal-expression + * can also be used as a method expression that returns a non-void value. + * Verify that the standard coercion rules apply if the return type is not + * java.lang.String. + */ + @Test + public void literalExprAsMethodExpr2Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_language_web/LiteralExprAsMethodExpr2.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: compositeExprEval1Test + * + * @assertion_ids: EL:SPEC:11 + * + * @test_Strategy: [CompositeExprEval] Verify that in a composite expression + * eval-expressions are coerced to Strings according to the EL type conversion + * rules and concatenated with any intervening literal-expressions. + */ + @Test + public void compositeExprEval1Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_language_web/CompositeExprEval1.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: compositeExprEval2Test + * + * @assertion_ids: EL:SPEC:11 + * + * @test_Strategy: [CompositeExprEval] Verify that in a composite expression + * eval-expressions are evaluated left to right, coerced to Strings according + * to the EL type conversion rules, and concatenated with any intervening + * literal-expressions. + */ + @Test + public void compositeExprEval2Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_language_web/CompositeExprEval2.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: dotAndIndexOperatorsSameTest + * + * @assertion_ids: EL:SPEC:15 + * + * @test_Strategy: [DotAndIndexOperatorsSame] Verify that the dot and index + * operators are evaluated in the same way. + */ + @Test + public void dotAndIndexOperatorsSameTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_el_language_web/DotAndIndexOperatorsSame.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/i18n/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/i18n/URLClientIT.java new file mode 100644 index 00000000..f3677960 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/i18n/URLClientIT.java @@ -0,0 +1,516 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.36 02/11/04 + */ + +package ee.jakarta.tck.pages.spec.i18n; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + public URLClientIT() throws Exception { + + + setGeneralURI("/jsp/spec/i18n"); + setContextRoot("/jsp_config_encode_web"); + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_i18n_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_i18n_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/BadTagPageEncoding.tag", "tags/BadTagPageEncoding.tag"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/inclusion_utf-16LE.jspx")), "inclusion_utf-16LE.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/inclusion_iso.txt")), "inclusion_iso.txt"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/I18NXmlPrologNonMatchingPropertyGroupTest.jspx")), "I18NXmlPrologNonMatchingPropertyGroupTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/I18NXmlPrologNonMatchingDirectiveTest.jspx")), "I18NXmlPrologNonMatchingDirectiveTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/I18NUnsupportedEncodingTest.jspx")), "I18NUnsupportedEncodingTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/I18NUnsupportedEncodingTest.jsp")), "I18NUnsupportedEncodingTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/I18NPageEncTest.jsp")), "I18NPageEncTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/I18NPageEncContTypeTest.jsp")), "I18NPageEncContTypeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/I18NNoPageEncNoContTypeTest.jsp")), "I18NNoPageEncNoContTypeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/I18NIncludedContentTest.jspx")), "I18NIncludedContentTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/I18NIncludedContentTest.jsp")), "I18NIncludedContentTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/I18NContTypeTest.jsp")), "I18NContTypeTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/I18NBadTagPageEncoding.jsp")), "I18NBadTagPageEncoding.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/prolog/I18NPageEncTest.jspx")), "prolog/I18NPageEncTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/prolog/I18NPageEncContTypeTest.jspx")), "prolog/I18NPageEncContTypeTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/prolog/I18NNoPageEncNoContTypeTest.jspx")), "prolog/I18NNoPageEncNoContTypeTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/prolog/I18NContTypeTest.jspx")), "prolog/I18NContTypeTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/noprolog/I18NPageEncTest.jspx")), "noprolog/I18NPageEncTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/noprolog/I18NPageEncContTypeTest.jspx")), "noprolog/I18NPageEncContTypeTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/noprolog/I18NNoPageEncNoContTypeTest.jspx")), "noprolog/I18NNoPageEncNoContTypeTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/noprolog/I18NContTypeTest.jspx")), "noprolog/I18NContTypeTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/bom/UTF16PageEncodingAttribute.jsp")), "bom/UTF16PageEncodingAttribute.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/bom/UTF16LE.jsp")), "bom/UTF16LE.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/bom/UTF16ConfigElement.jsp")), "bom/UTF16ConfigElement.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/bom/UTF16BE.jsp")), "bom/UTF16BE.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/bom/UTF16BadPageEncodingAttribute.jsp")), "bom/UTF16BadPageEncodingAttribute.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/bom/UTF8ConfigElement.jsp")), "bom/UTF8ConfigElement.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/bom/UTF8.jsp")), "bom/UTF8.jsp"); + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: i18nStandardPageResponseEncodingTest + * + * @assertion_ids: JSP:SPEC:249.4;JSP:SPEC:250.3;JSP:SPEC:250.6.2; + * JSP:SPEC:250.2;JSP:SPEC:249.2;JSP:SPEC:250.6.1; + * JSP:SPEC:249.3;JSP:SPEC:250.1;JSP:SPEC:250.4 + * + * @test_Strategy: Request 1: Using a page encoded in ISO-8859-1, with no page + * directive including verify the page is is properly loaded and the resulting + * output content type is the default of text/html with the charset parameter + * set to ISO-8859-1. Request 2: Using a page encoded in ISO-8859-15, with a + * page directive specifying only the pageEncoding (set to ISO-8859-15), + * validate the page is properly loaded and the resulting output content is + * the default of text/html with a charset of ISO-8859-15. Request 3: Using a + * page encoded in ISO-8859-15, with a page directive specifying only a + * contentType (set to text/plain charset=ISO-8859-15), validate the page is + * properly loaded and the resulting output content is the default of + * text/plain with a charset of ISO-8859-15. + * + * Request 4: Using a page encoded in ISO-8859-15, with a page directive + * specifying both a contentType ( text/plain; charset=ISO-8859-1) and a + * pageEncoding of ISO-8859-15, the page is properly loaded and the resulting + * output content is set to text/plain with a charset of ISO-8859-1. + * + * CHALLENGES: This test has been challenged in the mistaken belief that, in + * the case where the page encoding is ISO-8859-1, the content type need not + * specify a charset parameter. In support of this position, the challenger + * cited JSP 2.0, section 4.2, which states: + * + * "For JSP pages in standard syntax, it is the character encoding specified + * by the pageEncoding attribute of the page directive or by a JSP + * configuration element page-encoding whose URL pattern matches the page. + * Only the character encoding specified for the requested page is used; the + * encodings of files included via the include directive are not taken into + * consideration. If there's no such specification, no initial response + * character encoding is passed to ServletResponse.setContentType() - the + * ServletResponse object's default, ISO-8859-1, is used." + * + * However, this section omits the fact that if the default encoding is used, + * it will be added to the response content type as soon as + * ServletResponse.getWriter() is called. See the javadoc for + * ServletResponse.setContentType() and ServletResponse.getWriter(). + */ + @Test + public void i18nStandardPageResponseEncodingTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/I18NNoPageEncNoContTypeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type:text/html;charset=ISO-8859-1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "${testPassed}"); + invoke(); + + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/I18NPageEncTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type:text/html;charset=ISO-8859-15"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "${testPassed}"); + invoke(); + + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/I18NContTypeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type:text/plain;charset=ISO-8859-15"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "${testPassed}"); + invoke(); + + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/I18NPageEncContTypeTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type:text/plain;charset=ISO-8859-1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "${testPassed}"); + invoke(); + } + + /* + * @testName: i18nXmlPageResponseEncodingTest + * + * @assertion_ids: JSP:SPEC:249.5;JSP:SPEC:249.6;JSP:SPEC:250.5; + * JSP:SPEC:250.3;JSP:SPEC:250.1;JSP:SPEC:250.4 + * + * @test_Strategy: This test will exercise JSP documents with and without a + * prolog with an encoding attribute. This will be performed over several + * requests. This test will also validate that items such as charset + * parameters present in a contentType attribute don't cause problems with the + * encodings. Request 1: Validate that a page encoded in EBCDIC (cp500, or + * IBM500) by a directive) where the resulting output content is set to + * text/xml with a charset of UTF-8. Request 2: Validate that a page encoded + * in cp871 (or IBM871) can properly be loaded when both the prolog and the + * pageEncoding attribute of the page directive specify the same value. The + * resulting output should have a content of text/xml and a charset of UTF-8. + * Request 3: Validate that a page encoded in cp871 (or IBM871) can properly + * be loaded when the encoding is specified by the prolog. The resulting + * content type should be what is specified by the contentType attribute of + * the page directive, which in this case is text/plain with a charset of + * ISO-8859-1 Request 4: Validate that a page encoded in UTF-16 can properly + * be loaded when the encoding is specified by the prolog as well as the + * pageEncoding attribute of the page directive. Since the contentType + * attribute is also present the resulting output should have a content type + * of text/plain with a charset of ISO-8859-1. Request 5: Validate that if the + * JSP document (encoding in UTF-16) has a prolog with no encoding attribute, + * that the container is able to properly load the document using the encoding + * detection semantics specified by the XML 1.0 specification. In this case + * the JSP document has no pageEncoding or contentType attributes and is + * encoded in UTF-16. The container should be able to load and parse the page + * without issue. The response content type should be text/xml with a charset + * of UTF-8. Request 6: Validate that a JSP document (encoding in UTF-16BE) + * has a prolog with no encoding attribute, that the container is able to + * properly load the document using the encoding detection semantics specified + * by the XML 1.0 specification. In this case the JSP document has only a + * pageEncoding attribute defined. The container should be able to load and + * parse the page without issue. The response content type should be text/xml + * with a charset of UTF-8. Request 7: Validate that a JSP document (encoded + * in UTF-16LE) has a prolog with no encoding attribute, that the container is + * able to properly load the document using the encoding detection semantics + * specified by the XML 1.0 specification. In this case the JSP document has + * only a contentType attribute defined. The container should be able to load + * and parse the page without issue. The response content type should be based + * off the contentType attribute: text/plain with a charset of ISO-8859-1. + * Request 8: Validate that a JSP document (encoded in UTF-16) has a prolog + * with no encoding attribute, that the container is able to properly load the + * document using the encoding detection semantics specified by the XML 1.0 + * specification. In this case the JSP document has both contentType and + * pageEncoding attributes defined. The container should be able to load and + * parse the page without issue. The response content type should be based off + * the contentType attribute: text/plain with a charset of ISO-8859-1. + */ + @Test + public void i18nXmlPageResponseEncodingTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/prolog/I18NNoPageEncNoContTypeTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type: text/xml; charset=UTF-8"); + invoke(); + + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/prolog/I18NPageEncTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type: text/xml; charset=UTF-8"); + invoke(); + + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/prolog/I18NContTypeTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type: text/plain; charset=ISO-8859-1"); + invoke(); + + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/prolog/I18NPageEncContTypeTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type: text/plain; charset=ISO-8859-1"); + invoke(); + + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/noprolog/I18NNoPageEncNoContTypeTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type: text/xml; charset=UTF-8"); + invoke(); + + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/noprolog/I18NPageEncTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type: text/xml; charset=UTF-8"); + invoke(); + + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/noprolog/I18NContTypeTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type: text/plain; charset=ISO-8859-1"); + invoke(); + + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/noprolog/I18NPageEncContTypeTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type: text/plain; charset=ISO-8859-1"); + invoke(); + } + + /* + * @testName: i18nEncodingMismatchTest + * + * @assertion_ids: JSP:SPEC:249.7 + * + * @test_Strategy: Validate that if a JSP Document specifies an encoding in + * the XML prolog and a JSP page directive specifies a different encoding, a + * translation error occurs. NOTE: The similiar translation-time + * error with a mismatched encoding between property groups and pages in + * standard syntax are covered in the spec/configuration test area. + */ + @Test + public void i18nEncodingMismatchTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/I18NXmlPrologNonMatchingDirectiveTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/I18NXmlPrologNonMatchingPropertyGroupTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: i18nUnsupportedEncodingTest + * + * @assertion_ids: JSP:SPEC:249.8 + * + * @test_Strategy: Validate a translation error occurs if a standard JSP + * specifies an invalid encoding in the page directive, or if a JSP document + * has an invalid encoding in the prolog. + */ + @Test + public void i18nUnsupportedEncodingTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/I18NUnsupportedEncodingTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/I18NUnsupportedEncodingTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: i18nIncludedContentTest + * + * @assertion_ids: JSP:SPEC:249.5 + * + * @test_Strategy: Validate that units that make up a single translation unit + * all have their file encoding detected individually. In this case a JSP + * Document encoded in UTF-16BE using the include directive includes another + * JSP Document encoded in UTF-16LE. + */ + @Test + public void i18nIncludedContentTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/I18NIncludedContentTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Included Content|Test PASSED"); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/I18NIncludedContentTest.jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Included Content|Test PASSED"); + invoke(); + } + + /* + * @testName: i18nBomByteSequencesUTF8Test + * + * @assertion_ids: JSP:SPEC:299 + * + * @test_Strategy: [BOMCharacterEncodingDescription] Verify that the character + * encoding of pages in standard syntax is determined by a BOM, and that the + * byte sequences reserved to identify a BOM at the beginning of a page do not + * appear in the page's output. + */ + @Test + public void i18nBomByteSequencesUTF8Test() throws Exception { + + String searchStr = "this is a test"; + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type:text/html;charset=UTF-8"); + TEST_PROPS.setProperty(SEARCH_STRING, searchStr); + TEST_PROPS.setProperty(REQUEST, "GET /jsp_i18n_web/bom/UTF8.jsp HTTP/1.1"); + invoke(); + } + + /* + * @testName: i18nBomByteSequencesUTF16BETest + * + * @assertion_ids: JSP:SPEC:299 + * + * @test_Strategy: [BOMCharacterEncodingDescription] Verify that the character + * encoding of pages in standard syntax is determined by a BOM, and that the + * byte sequences reserved to identify a BOM at the beginning of a page do not + * appear in the page's output. + */ + @Test + public void i18nBomByteSequencesUTF16BETest() throws Exception { + + String searchStr = "this is a test"; + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type:text/html;charset=UTF-16BE"); + TEST_PROPS.setProperty(SEARCH_STRING, searchStr); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/bom/UTF16BE.jsp HTTP/1.1"); + invoke(); + } + + /* + * @testName: i18nBomByteSequencesUTF16LETest + * + * @assertion_ids: JSP:SPEC:299 + * + * @test_Strategy: [BOMCharacterEncodingDescription] Verify that the character + * encoding of pages in standard syntax is determined by a BOM, and that the + * byte sequences reserved to identify a BOM at the beginning of a page do not + * appear in the page's output. + */ + @Test + public void i18nBomByteSequencesUTF16LETest() throws Exception { + + String searchStr = "this is a test"; + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type:text/html;charset=UTF-16LE"); + TEST_PROPS.setProperty(SEARCH_STRING, searchStr); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/bom/UTF16LE.jsp HTTP/1.1"); + invoke(); + } + + /* + * @testName: i18nBomLegalCharacterEncodingTest1 + * + * @assertion_ids: JSP:SPEC:300 + * + * @test_Strategy: [BOMLegalCharacterEncoding] Verify that when using a BOM, + * it is legal to describe the character encoding in a JSP page-encoding + * configuration element. + */ + @Test + public void i18nBomLegalCharacterEncodingTest1() throws Exception { + + String searchStr = "this is a test"; + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type:text/html;charset=UTF-16BE"); + TEST_PROPS.setProperty(SEARCH_STRING, searchStr); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/bom/UTF16ConfigElement.jsp HTTP/1.1"); + invoke(); + } + + /* + * @testName: i18nBomLegalCharacterEncodingTest2 + * + * @assertion_ids: JSP:SPEC:300 + * + * @test_Strategy: [BOMLegalCharacterEncoding] Verify that when using a BOM, + * it is legal to describe the character encoding in the pageEncoding + * attribute of a page directive. + */ + @Test + public void i18nBomLegalCharacterEncodingTest2() throws Exception { + + String searchStr = "this is a test"; + TEST_PROPS.setProperty(EXPECTED_HEADERS, + "Content-Type:text/html;charset=UTF-16LE"); + TEST_PROPS.setProperty(SEARCH_STRING, searchStr); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/bom/UTF16PageEncodingAttribute.jsp HTTP/1.1"); + invoke(); + } + + /* + * @testName: i18nBomErrorReportingTest1 + * + * @assertion_ids: JSP:SPEC:318 + * + * @test_Strategy: [BOMErrorReporting] Verify that when using a BOM, an error + * results when the encoding specified by page-encoding configuration element + * whose URL matches the page does not match the encoding indicated by the + * BOM. + */ + @Test + public void i18nBomErrorReportingTest1() throws Exception { + + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/bom/UTF8ConfigElement.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: i18nBomErrorReportingTest2 + * + * @assertion_ids: JSP:SPEC:318 + * + * @test_Strategy: [BOMErrorReporting] Verify that when using a BOM, an error + * results when the encoding specified by the pageEncoding attribute of a page + * directive does not match the encoding indicated by the BOM. + */ + @Test + public void i18nBomErrorReportingTest2() throws Exception { + + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/bom/UTF16BadPageEncodingAttribute.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: i18nBomErrorReportingTest3 + * + * @assertion_ids: JSP:SPEC:318 + * + * @test_Strategy: [BOMErrorReporting] Verify that when using a BOM, an error + * results when the encoding specified by the pageEncoding attribute of a tag + * directive does not match the encoding indicated by the BOM. + */ + @Test + public void i18nBomErrorReportingTest3() throws Exception { + + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_i18n_web/I18NBadTagPageEncoding.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/jspdocument/elements/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/jspdocument/elements/URLClientIT.java new file mode 100644 index 00000000..32dc7d47 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/jspdocument/elements/URLClientIT.java @@ -0,0 +1,205 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.jspdocument.elements; + + +import java.io.IOException; +import java.io.InputStream; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + private static final String CONTEXT_ROOT = "/jsp_jspdocument_elements_web"; + + public URLClientIT() throws Exception { + + + setContextRoot(CONTEXT_ROOT); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_jspdocument_elements_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_jspdocument_elements_web.xml")); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scriptingInJspPage.jsp")), "scriptingInJspPage.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/scripting.jspx")), "scripting.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/notJspDocument.jspx")), "notJspDocument.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeJspRoot.jspx")), "negativeJspRoot.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/jspRootPrefix.jspx")), "jspRootPrefix.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/included.jspx")), "included.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/included.jsp")), "included.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/directivePageInJspPage.jsp")), "directivePageInJspPage.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/directiveIncludeLocation.jspx")), "directiveIncludeLocation.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/directiveIncludeInJspPage.jsp")), "directiveIncludeInJspPage.jsp"); + return archive; + + } + + + /* + * @testName: negativeJspRootTest + * + * @assertion_ids: JSP:SPEC:177; JSP:SPEC:173.1 + * + * @test_Strategy: use jsp:root not as the top element of a jsp document. + * jsp-property-group config overrides other determiniations. + */ + + @Test + public void negativeJspRootTest() throws Exception { + String testName = "negativeJspRoot"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + "notJspDocument.jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: jspRootPrefixTest + * + * @assertion_ids: JSP:SPEC:175 + * + * @test_Strategy: use a different prefix abc + */ + + @Test + public void jspRootPrefixTest() throws Exception { + String testName = "jspRootPrefix"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + invoke(); + } + + /* + * @testName: directiveIncludeLocationTest + * + * @assertion_ids: JSP:SPEC:179.1; JSP:SPEC:179; JSP:SPEC:179.3 + * + * @test_Strategy: use jsp:directive.include anywhere within a jsp document. + */ + + @Test + public void directiveIncludeLocationTest() throws Exception { + String testName = "directiveIncludeLocation"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + TEST_PROPS.setProperty(SEARCH_STRING, "HELLO|ONE|HELLO|TWO"); + invoke(); + } + + /* + * @testName: directiveIncludeInJspPageTest + * + * @assertion_ids: JSP:SPEC:179.5 + * + * @test_Strategy: use jsp:directive.include in a jsp page + */ + + @Test + public void directiveIncludeInJspPageTest() throws Exception { + String testName = "directiveIncludeInJspPage"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + TEST_PROPS.setProperty(SEARCH_STRING, "HELLO|ONE"); + invoke(); + } + + /* + * @testName: directivePageInJspPageTest + * + * @assertion_ids: JSP:SPEC:178.39 + * + * @test_Strategy: use jsp:directive.page in a jsp page + */ + + @Test + public void directivePageInJspPageTest() throws Exception { + String testName = "directivePageInJspPage"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + TEST_PROPS.setProperty(SEARCH_STRING, "listSize2"); + invoke(); + } + + /* + * @testName: scriptingTest + * + * @assertion_ids: JSP:SPEC:180; JSP:SPEC:181; JSP:SPEC:182 + * + * @test_Strategy: use jsp:declaration, jsp:scriptlet, and jsp:expression in a + * jsp document. + */ + + @Test + public void scriptingTest() throws Exception { + String testName = "scripting"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + TEST_PROPS.setProperty(SEARCH_STRING, "JSP637|JSP637|99"); + invoke(); + } + + /* + * @testName: scriptingInJspPageTest + * + * @assertion_ids: JSP:SPEC:180.4; JSP:SPEC:181.2; JSP:SPEC:182.5 + * + * @test_Strategy: use jsp:declaration, jsp:scriptlet, and jsp:expression in a + * jsp page. + */ + + @Test + public void scriptingInJspPageTest() throws Exception { + String testName = "scriptingInJspPage"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + TEST_PROPS.setProperty(SEARCH_STRING, "JSP637|99"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/jspdocument/general/EchoTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/jspdocument/general/EchoTag.java new file mode 100644 index 00000000..bf2d5af4 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/jspdocument/general/EchoTag.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.jspdocument.general; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.tagext.JspFragment; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; + +public class EchoTag extends SimpleTagSupport { + + private String _echo = null; + + private String _static = null; + + public void setEcho(String echo) { + _echo = echo; + } + + public void setStatic(String staticString) { + _static = staticString; + } + + public void doTag() throws JspException { + JspWriter out = null; + JspFragment body = null; + try { + out = getJspContext().getOut(); + body = getJspBody(); + if (body != null) { + body.invoke(null); + } + if (_echo != null) { + out.println("Expression from attribute: " + _echo); + } + if (_static != null) { + out.println("String from attribute: " + _static); + } + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/jspdocument/general/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/jspdocument/general/URLClientIT.java new file mode 100644 index 00000000..0f7b2fc4 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/jspdocument/general/URLClientIT.java @@ -0,0 +1,209 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.jspdocument.general; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + private static final String CONTEXT_ROOT = "/jsp_jspdocument_general_web"; + + public URLClientIT() throws Exception { + + + setContextRoot(CONTEXT_ROOT); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_jspdocument_general_web.war"); + archive.addClasses(EchoTag.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_jspdocument_general_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tagdep.tld", "tagdep.tld"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/tagDependentTest.jspx")), "tagDependentTest.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeWellFormedness.jspx")), "negativeWellFormedness.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDTDValidation.jspx")), "negativeDTDValidation.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/invalidPlainURI.jsp")), "invalidPlainURI.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/identifyByJspRoot.jsp")), "identifyByJspRoot.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/identifyByExtension.jspx")), "identifyByExtension.jspx"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/identifyByConfig.jsp")), "identifyByConfig.jsp"); + + return archive; + + } + + + /* + * @testName: negativeWellFormednessTest + * + * @assertion_ids: JSP:SPEC:173.4 + * + * @test_Strategy: access a jsp document that is not well-formed. + */ + + @Test + public void negativeWellFormednessTest() throws Exception { + String testName = "negativeWellFormedness"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: identifyByJspRootTest + * + * @assertion_ids: JSP:SPEC:173; JSP:SPEC:173.3 + * + * @test_Strategy: access a jsp page that has a jsp:root as top element + */ + + @Test + public void identifyByJspRootTest() throws Exception { + String testName = "identifyByJspRoot"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + invoke(); + } + + /* + * @testName: identifyByExtensionTest + * + * @assertion_ids: JSP:SPEC:173; JSP:SPEC:173.2; JSP:SPEC:176 + * + * @test_Strategy: identify a jsp document by .jspx extension a jsp document + * does not need to have jsp:root + */ + + @Test + public void identifyByExtensionTest() throws Exception { + String testName = "identifyByExtension"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + invoke(); + } + + /* + * @testName: identifyByConfigTest + * + * @assertion_ids: JSP:SPEC:173; JSP:SPEC:173.1; JSP:SPEC:176 + * + * @test_Strategy: identify a jsp document by jsp-property-group via is-xml a + * jsp document does not need to have jsp:root + */ + + @Test + public void identifyByConfigTest() throws Exception { + String testName = "identifyByConfig"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + invoke(); + } + + /* + * @testName: negativeDTDValidationTest + * + * @assertion_ids: JSP:SPEC:260 + * + * @test_Strategy: access an invalid jsp document and expect translation + * error. + */ + + @Test + public void negativeDTDValidationTest() throws Exception { + String testName = "negativeDTDValidation"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jspx HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: invalidPlainURITest + * + * @assertion_ids: PENDING + * + * @test_Strategy: a translation error must not be generated if the given + * plain uri is not found in the taglib map. + */ + + @Test + public void invalidPlainURITest() throws Exception { + String testName = "invalidPlainURI"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, OK); + invoke(); + } + + /* + * @testName: tagDependentTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: validate that tagdependent body should be passed verbatim, + * tag handles inside body must not be invoked. + */ + + @Test + public void tagDependentTest() throws Exception { + String testName = "tagDependentTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jspx HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "START ${pageScope.eval}|" + + "jsp:scriptlet|out.println(\"scriptlet\");|jsp:scriptlet|" + + "jsp:useBean|java.util.Date|" + "jsp:getProperty|property|" + + + "use jsp:body|" + + + "START ${pageScope.eval}|" + + "jsp:scriptlet|out.println(\"scriptlet\");|jsp:scriptlet|" + + "jsp:useBean|java.util.Date|" + "jsp:getProperty|property|" + + "Expression from attribute: 18|" + + + "END 72"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "evaluated"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/misc/precompilation/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/misc/precompilation/URLClientIT.java new file mode 100644 index 00000000..5e843139 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/misc/precompilation/URLClientIT.java @@ -0,0 +1,144 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.misc.precompilation; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + public URLClientIT() throws Exception { + + + setGeneralURI("/jsp/spec/misc/precompilation"); + setContextRoot("/jsp_misc_precompilation_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_misc_precompilation_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_misc_precompilation_web.xml")); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/precompile.jsp")), "precompile.jsp"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: precompileNoValueTest + * + * @assertion_ids: JSP:SPEC:244.1.4 + * + * @test_Strategy: Validate that no response body is returned when + * jsp_precompile has no value. + */ + + @Test + public void precompileNoValueTest() throws Exception { + String testName = "precompileNoValue"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_misc_precompilation_web/precompile.jsp?jsp_precompile HTTP/1.0"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Got the Request"); + invoke(); + } + + /* + * @testName: precompileFalseTest + * + * @assertion_ids: JSP:SPEC:244.1.2 + * + * @test_Strategy: Validate that no response body is returned when + * jsp_precompile is set to false. + */ + + @Test + public void precompileFalseTest() throws Exception { + String testName = "precompileFalse"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_misc_precompilation_web/precompile.jsp?jsp_precompile=false HTTP/1.0"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Got the Request"); + invoke(); + } + + /* + * @testName: precompileTrueTest + * + * @assertion_ids: JSP:SPEC:244.1.1 + * + * @test_Strategy: Validate that no response body is returned when + * jsp_precompile is set to true. + */ + + @Test + public void precompileTrueTest() throws Exception { + String testName = "precompileTrue"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_misc_precompilation_web/precompile.jsp?jsp_precompile=true HTTP/1.0"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Got the Request"); + invoke(); + } + + /* + * @testName: precompileNegativeTest + * + * @assertion_ids: JSP:SPEC:244.1.5 + * + * @test_Strategy: Set the jsp_precompile request paramter to a non valid + * value and validate that a 500 error occurs. + */ + + @Test + public void precompileNegativeTest() throws Exception { + String testName = "precompileNegative"; + TEST_PROPS.setProperty(TEST_NAME, testName + "Test"); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_misc_precompilation_web/precompile.jsp?jsp_precompile=any_invalid_value HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/URLClientIT.java new file mode 100644 index 00000000..f79821a7 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/URLClientIT.java @@ -0,0 +1,411 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)URLClient.java 1.1 03/09/16 + */ + +package ee.jakarta.tck.pages.spec.tagfiles.directives.attribute20; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + private static final String CONTEXT_ROOT = "/jsp_tagfile_directives_attribute20_web"; + + public URLClientIT() throws Exception { + + + setContextRoot(CONTEXT_ROOT); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_tagfile_directives_attribute20_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_tagfile_directives_attribute20_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeType.tag", "tags/negativeType.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeName3Include.tagf", "tags/negativeName3Include.tagf"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeName3Include.tag", "tags/negativeName3Include.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeName3.tag", "tags/negativeName3.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeName2Include.tagf", "tags/negativeName2Include.tagf"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeName2Include.tag", "tags/negativeName2Include.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeName2.tag", "tags/negativeName2.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeName1Include.tagf", "tags/negativeName1Include.tagf"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeName1Include.tag", "tags/negativeName1Include.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeName1.tag", "tags/negativeName1.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeFragmentType.tag", "tags/negativeFragmentType.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeFragmentRtexprvalue.tag", "tags/negativeFragmentRtexprvalue.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/deferredValueTypeMinimumJspVersion.tag", "tags/deferredValueTypeMinimumJspVersion.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/deferredValueMinimumJspVersion.tag", "tags/deferredValueMinimumJspVersion.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/deferredMethodSignatureMinimumJspVersion.tag", "tags/deferredMethodSignatureMinimumJspVersion.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/deferredMethodMinimumJspVersion.tag", "tags/deferredMethodMinimumJspVersion.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/defaultType.tag", "tags/defaultType.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/defaultRtexprvalue.tag", "tags/defaultRtexprvalue.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/defaultRequired.tag", "tags/defaultRequired.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/defaultFragment.tag", "tags/defaultFragment.tag"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeType.jsp")), "negativeType.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeName3Include.jsp")), "negativeName3Include.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeName3.jsp")), "negativeName3.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeName2Include.jsp")), "negativeName2Include.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeName2.jsp")), "negativeName2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeName1Include.jsp")), "negativeName1Include.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeName1.jsp")), "negativeName1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeFragmentType.jsp")), "negativeFragmentType.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeFragmentRtexprvalue.jsp")), "negativeFragmentRtexprvalue.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/deferredValueTypeMinimumJspVersion.jsp")), "deferredValueTypeMinimumJspVersion.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/deferredValueMinimumJspVersion.jsp")), "deferredValueMinimumJspVersion.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/deferredMethodSignatureMinimumJspVersion.jsp")), "deferredMethodSignatureMinimumJspVersion.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/deferredMethodMinimumJspVersion.jsp")), "deferredMethodMinimumJspVersion.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/defaultType.jsp")), "defaultType.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/defaultRtexprvalue.jsp")), "defaultRtexprvalue.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/defaultRequired.jsp")), "defaultRequired.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/defaultFragment.jsp")), "defaultFragment.jsp"); + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: negativeName1Test + * + * @assertion_ids: JSP:SPEC:230.2 + * + * @test_Strategy: A translation error must result if more than one attribute + * directive appears in the same translation unit with the same name + */ + + @Test + public void negativeName1Test() throws Exception { + String testName = "negativeName1"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeName1IncludeTest + * + * @assertion_ids: JSP:SPEC:230.2 + * + * @test_Strategy: A translation error must result if more than one attribute + * directive appears in the same translation unit with the same name + */ + + @Test + public void negativeName1IncludeTest() throws Exception { + String testName = "negativeName1Include"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeName2Test + * + * @assertion_ids: JSP:SPEC:230.1.2 + * + * @test_Strategy: A translation error must result if the attribute name + * equals to the name-given of a variable. + */ + + @Test + public void negativeName2Test() throws Exception { + String testName = "negativeName2"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeName2IncludeTest + * + * @assertion_ids: JSP:SPEC:230.1.2 + * + * @test_Strategy: A translation error must result if the attribute name + * equals to the name-given of a variable. + */ + + @Test + public void negativeName2IncludeTest() throws Exception { + String testName = "negativeName2Include"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeName3Test + * + * @assertion_ids: JSP:SPEC:230.1.2 + * + * @test_Strategy: A translation error must result if the attribute name + * equals to dynamic-attributes of a tag directive. + */ + + @Test + public void negativeName3Test() throws Exception { + String testName = "negativeName3"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeName3IncludeTest + * + * @assertion_ids: JSP:SPEC:230.1.2 + * + * @test_Strategy: A translation error must result if the attribute name + * equals to dynamic-attributes of a tag directive. + */ + + @Test + public void negativeName3IncludeTest() throws Exception { + String testName = "negativeName3Include"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: defaultRequiredTest + * + * @assertion_ids: JSP:SPEC:230.3.3 + * + * @test_Strategy: required default is false + */ + + @Test + public void defaultRequiredTest() throws Exception { + String testName = "defaultRequired"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: defaultTypeTest + * + * @assertion_ids: JSP:SPEC:230.6.1 + * + * @test_Strategy: type defaults to java.lang.String, and also verify an Float + * type attribute. + */ + + @Test + public void defaultTypeTest() throws Exception { + String testName = "defaultType"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED|Test PASSED"); + invoke(); + } + + /* + * @testName: negativeTypeTest + * + * @assertion_ids: JSP:SPEC:230.6.2 + * + * @test_Strategy: A translation error must result if the type is a primitive + */ + + @Test + public void negativeTypeTest() throws Exception { + String testName = "negativeType"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeFragmentTypeTest + * + * @assertion_ids: JSP:SPEC:230.4.5 + * + * @test_Strategy: A translation error must result if fragment is true and + * type is specified + */ + + @Test + public void negativeFragmentTypeTest() throws Exception { + String testName = "negativeFragmentType"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeFragmentRtexprvalueTest + * + * @assertion_ids: JSP:SPEC:230.4.2.1 + * + * @test_Strategy: A translation error must result if fragment is true and + * rtexprvalue is specified + */ + + @Test + public void negativeFragmentRtexprvalueTest() throws Exception { + String testName = "negativeFragmentRtexprvalue"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: defaultFragmentTest + * + * @assertion_ids: JSP:SPEC:230 + * + * @test_Strategy: fragment defaults to false. Also verifies the default attr + * type is String. + */ + + @Test + public void defaultFragmentTest() throws Exception { + String testName = "defaultFragment"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: defaultRtexprvalueTest + * + * @assertion_ids: JSP:SPEC:230 + * + * @test_Strategy: rtexprvalue defaults to true. + */ + + @Test + public void defaultRtexprvalueTest() throws Exception { + String testName = "defaultRtexprvalue"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: deferredValueMinimumJspVersionTest + * + * @assertion_ids: JSP:SPEC:230.8.3 + * + * @test_Strategy: [deferredValueMinimumJspVersion] The deferredValue + * attribute causes a translation error if specified in a tag file with a JSP + * version less than 2.1. + */ + + @Test + public void deferredValueMinimumJspVersionTest() throws Exception { + String testName = "deferredValueMinimumJspVersion"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: deferredValueTypeMinimumJspVersionTest + * + * @assertion_ids: JSP:SPEC:230.9.4 + * + * @test_Strategy: [deferredValueTypeMinimumJspVersion] The deferredValueType + * attribute causes a translation error if specified in a tag file with a JSP + * version less than 2.1. + */ + + @Test + public void deferredValueTypeMinimumJspVersionTest() throws Exception { + String testName = "deferredValueTypeMinimumJspVersion"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: deferredMethodMinimumJspVersionTest + * + * @assertion_ids: JSP:SPEC:230.10.2 + * + * @test_Strategy: [deferredMethodMinimumJspVersion] The deferredMethod + * attribute causes a translation error if specified in a tag file with a JSP + * version less than 2.1. + */ + + @Test + public void deferredMethodMinimumJspVersionTest() throws Exception { + String testName = "deferredMethodMinimumJspVersion"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: deferredMethodSignatureMinimumJspVersionTest + * + * @assertion_ids: JSP:SPEC:230.11.3 + * + * @test_Strategy: [deferredMethodSignatureMinimumJspVersion] The + * deferredMethodSignature attribute causes a translation error if specified + * in a tag file with a JSP version less than 2.1. + */ + + @Test + public void deferredMethodSignatureMinimumJspVersionTest() throws Exception { + String testName = "deferredMethodSignatureMinimumJspVersion"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/URLClientIT.java new file mode 100644 index 00000000..5a3123a2 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/URLClientIT.java @@ -0,0 +1,253 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.tagfiles.directives.attribute21; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + private static final String CONTEXT_ROOT = "/jsp_tagfile_directives_attribute21_web"; + + public URLClientIT() throws Exception { + + + setContextRoot(CONTEXT_ROOT); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_tagfile_directives_attribute21_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_tagfile_directives_attribute21_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/onlyOneOfDeferredValueOrDeferredMethod.tag", "tags/onlyOneOfDeferredValueOrDeferredMethod.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/implicit.tld", "tags/implicit.tld"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/deferredValueTypeNotSpecified.tag", "tags/deferredValueTypeNotSpecified.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/defaultDeferredValue2.tag", "tags/defaultDeferredValue2.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/defaultDeferredValue1.tag", "tags/defaultDeferredValue1.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/defaultDeferredMethodSignature.tag", "tags/defaultDeferredMethodSignature.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/defaultDeferredMethod2.tag", "tags/defaultDeferredMethod2.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/defaultDeferredMethod1.tag", "tags/defaultDeferredMethod1.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/bothDeferredValueTypeAndDeferredValue.tag", "tags/bothDeferredValueTypeAndDeferredValue.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/bothDeferredMethodAndSignature.tag", "tags/bothDeferredMethodAndSignature.tag"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/onlyOneOfDeferredValueOrDeferredMethod.jsp")), "onlyOneOfDeferredValueOrDeferredMethod.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/deferredValueTypeNotSpecified.jsp")), "deferredValueTypeNotSpecified.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/defaultDeferredValue2.jsp")), "defaultDeferredValue2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/defaultDeferredValue1.jsp")), "defaultDeferredValue1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/defaultDeferredMethodSignature.jsp")), "defaultDeferredMethodSignature.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/defaultDeferredMethod2.jsp")), "defaultDeferredMethod2.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/defaultDeferredMethod1.jsp")), "defaultDeferredMethod1.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/bothDeferredValueTypeAndDeferredValue.jsp")), "bothDeferredValueTypeAndDeferredValue.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/bothDeferredMethodAndSignature.jsp")), "bothDeferredMethodAndSignature.jsp"); + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: onlyOneOfDeferredValueOrDeferredMethodTest + * + * @assertion_ids: JSP:SPEC:230.8.1 + * + * @test_Strategy: [OnlyOneOfDeferredValueOrMethod] A translation error must + * result when both deferredValue and deferredMethod appear in the same tag. + */ + + @Test + public void onlyOneOfDeferredValueOrDeferredMethodTest() throws Exception { + String testName = "onlyOneOfDeferredValueOrDeferredMethod"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: defaultDeferredValue1Test + * + * @assertion_ids: JSP:SPEC:230.8.2 + * + * @test_Strategy: [DefaultDeferredValue] Specify an attribute tag with no + * deferredValue attribute and a deferredValueType attribute. Verify that the + * attribute's value represents a deferred value expression. + */ + @Test + public void defaultDeferredValue1Test() throws Exception { + String testName = "defaultDeferredValue1"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: defaultDeferredValue2Test + * + * @assertion_ids: JSP:SPEC:230.8.2 + * + * @test_Strategy: [DefaultDeferredValue] Specify an attribute tag with no + * deferredValue attribute and no deferredValueType attribute. Verify that the + * attribute's value does not represent a deferred value expression by + * generating a translation error when '#{' is used. + */ + @Test + public void defaultDeferredValue2Test() throws Exception { + String testName = "defaultDeferredValue2"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: deferredValueTypeNotSpecifiedTest + * + * @assertion_ids: JSP:SPEC:230.9.1 + * + * @test_Strategy: [DeferredValueTypeNotSpecified] Specify an attribute tag + * with a deferredValue attribute and no deferredValueType attribute. Verify + * that the type resulting from the evaluation of the attribute's value + * expression is java.lang.Object. + */ + @Test + public void deferredValueTypeNotSpecifiedTest() throws Exception { + String testName = "deferredValueTypeNotSpecified"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: bothDeferredValueTypeAndDeferredValueTest + * + * @assertion_ids: JSP:SPEC:230.9.2 + * + * @test_Strategy: [BothDeferredValueTypeAndDeferredValue] A translation error + * must result when both deferredValueType and and deferredValue appear in the + * same tag where deferredValue is set to false. + */ + @Test + public void bothDeferredValueTypeAndDeferredValueTest() throws Exception { + String testName = "bothDeferredValueTypeAndDeferredValue"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: defaultDeferredMethod1Test + * + * @assertion_ids: JSP:SPEC:230.10.1 + * + * @test_Strategy: [DefaultDeferredMethod] Specify an attribute tag with no + * deferredMethod attribute and a deferredMethodSignature attribute. Verify + * that the attribute's value represents a deferred method expression. + */ + @Test + public void defaultDeferredMethod1Test() throws Exception { + String testName = "defaultDeferredMethod1"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: defaultDeferredMethod2Test + * + * @assertion_ids: JSP:SPEC:230.10.1 + * + * @test_Strategy: [DefaultDeferredMethod] Specify an attribute tag with no + * deferredMethod attribute and no deferredMethodSignature attribute. Verify + * that the attribute's value does not represent a deferred method expression + * by generating a translation error when '#{' is used. + */ + @Test + public void defaultDeferredMethod2Test() throws Exception { + String testName = "defaultDeferredMethod2"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: bothDeferredMethodAndSignatureTest + * + * @assertion_ids: JSP:SPEC:230.11.1 + * + * @test_Strategy: [BothDeferredMethodAndSignature] A translation error must + * result when both deferredMethodSignature and and deferredMethod appear in + * the same tag where deferredMethod is set to false. + */ + @Test + public void bothDeferredMethodAndSignatureTest() throws Exception { + String testName = "bothDeferredMethodAndSignature"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: defaultDeferredMethodSignatureTest + * + * @assertion_ids: JSP:SPEC:230.11.2 + * + * @test_Strategy: [DefaultDeferredMethodSignature] Specify an attribute tag + * with a deferredMethod attribute set to true and no + * deferredMethodMethodSignature attribute. Verify that the method signature + * defaults to void methodname(). + */ + @Test + public void defaultDeferredMethodSignatureTest() throws Exception { + String testName = "defaultDeferredMethodSignature"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/directives/general/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/directives/general/URLClientIT.java new file mode 100644 index 00000000..13ec0f08 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/directives/general/URLClientIT.java @@ -0,0 +1,268 @@ +/* + * Copyright (c) 2007, 2021 Oracle and/or its affiliates and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.tagfiles.directives.general; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + private static final String CONTEXT_ROOT = "/jsp_tagfile_directives_general_web"; + + public URLClientIT() throws Exception { + + + setContextRoot(CONTEXT_ROOT); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_tagfile_directives_general_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_tagfile_directives_general_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/positiveTaglib.tag", "tags/positiveTaglib.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/positiveIncludePageRelative.tag", "tags/positiveIncludePageRelative.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/positiveIncludeContextRelative.tag", "tags/positiveIncludeContextRelative.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativePageDirective.tag", "tags/negativePageDirective.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeInclude.tag", "tags/negativeInclude.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/ErrorOnELNotFoundTrue.tag", "tags/ErrorOnELNotFoundTrue.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/ErrorOnELNotFoundFalse.tag", "tags/ErrorOnELNotFoundFalse.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/include/negativeInclude.tagf", "tags/include/negativeInclude.tagf"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/include/positiveIncludePageRelative.tagf", "tags/include/positiveIncludePageRelative.tagf"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/invoke/positiveTaglibInvokee.tag", "tags/invoke/positiveTaglibInvokee.tag"); + + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveTaglib.jsp")), "positiveTaglib.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveIncludePageRelative.jsp")), "positiveIncludePageRelative.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveIncludeContextRelative.jsp")), "positiveIncludeContextRelative.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeVariableDirective.jsp")), "negativeVariableDirective.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeTagDirective.jsp")), "negativeTagDirective.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativePageDirective.jsp")), "negativePageDirective.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeInclude.jsp")), "negativeInclude.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeAttributeDirective.jsp")), "negativeAttributeDirective.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ErrorOnELNotFoundTrue.jsp")), "ErrorOnELNotFoundTrue.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ErrorOnELNotFoundFalse.jsp")), "ErrorOnELNotFoundFalse.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/include/positiveIncludeContextRelative.tagf")), "include/positiveIncludeContextRelative.tagf"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: negativePageDirectiveTest + * + * @assertion_ids: JSP:SPEC:223 + * + * @test_Strategy: If a page directive is used in a tag file, a translation + * error must result. + */ + + @Test + public void negativePageDirectiveTest() throws Exception { + String testName = "negativePageDirective"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeTagDirectiveTest + * + * @assertion_ids: JSP:SPEC:226 + * + * @test_Strategy: If a tag directive is used in a jsp page, a translation + * error must result. + */ + + @Test + public void negativeTagDirectiveTest() throws Exception { + String testName = "negativeTagDirective"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeAttributeDirectiveTest + * + * @assertion_ids: JSP:SPEC:227 + * + * @test_Strategy: If a attribute directive is used in a jsp page, a + * translation error must result. + */ + + @Test + public void negativeAttributeDirectiveTest() throws Exception { + String testName = "negativeAttributeDirective"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeVariableDirectiveTest + * + * @assertion_ids: JSP:SPEC:228 + * + * @test_Strategy: If a variable directive is used in a jsp page, a + * translation error must result. + */ + + @Test + public void negativeVariableDirectiveTest() throws Exception { + String testName = "negativeVariableDirective"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: positiveIncludeContextRelativeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: use tag include directive with a context relative path. + */ + + @Test + public void positiveIncludeContextRelativeTest() throws Exception { + String testName = "positiveIncludeContextRelative"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: positiveIncludePageRelativeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: use tag include directive with a page relative path. + */ + + @Test + public void positiveIncludePageRelativeTest() throws Exception { + String testName = "positiveIncludePageRelative"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: negativeIncludeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: use tag include directive to include unsuitable content + */ + + @Test + public void negativeIncludeTest() throws Exception { + String testName = "negativeInclude"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: positiveTaglibTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: invoke a tag file from within a tag file. + */ + + @Test + public void positiveTaglibTest() throws Exception { + String testName = "positiveTaglib"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED|from invokee"); + invoke(); + } + + /* + * @testName: errorOnELNotFoundFalseTest + * + * @assertion_ids: JSP:SPEC:320 + * + * @test_Strategy: [ErrorOnELNotFoundTagDirective] Verify that when the + * ErrorOnELNotFound tag directive attribute is set to false, a reference + * to an unresolved identifier results in the empty string being used. + */ + @Test + public void errorOnELNotFoundFalseTest() + throws Exception { + String testName = "ErrorOnELNotFoundFalse"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.0"); + invoke(); + } + + /* + * @testName: errorOnELNotFoundTrueTest + * + * @assertion_ids: JSP:SPEC:320 + * + * @test_Strategy: [ErrorOnELNotFoundTagDirective] Verify that when the + * ErrorOnELNotFound tag directive attribute is set to false, a reference + * to an unresolved identifier results in the empty string being used. + */ + @Test + public void errorOnELNotFoundTrueTest() + throws Exception { + String testName = "ErrorOnELNotFoundTrue"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/URLClientIT.java new file mode 100644 index 00000000..f3b2ba6d --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/URLClientIT.java @@ -0,0 +1,518 @@ +/* + * Copyright (c) 2007, 2021 Oracle and/or its affiliates and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.tagfiles.directives.tag20; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + private static String CONTEXT_ROOT = "/jsp_tagfile_directives_tag20_web"; + + public URLClientIT() throws Exception { + + + setGeneralURI("/jsp/spec/tagfiles/directives/tag20"); + setContextRoot("/jsp_tagfile_directives_tag20_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_tagfile_directives_tag20_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_tagfile_directives_tag20_web.xml")); + + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/deferredValueMinimumJspVersion.tag", "tags/deferredValueMinimumJspVersion.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/dynamicAttributesNoUri.tag", "tags/dynamicAttributesNoUri.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/implicitImportHttp.tag", "tags/implicitImportHttp.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/implicitImportJsp.tag", "tags/implicitImportJsp.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/implicitImportLang.tag", "tags/implicitImportLang.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/implicitImportServlet.tag", "tags/implicitImportServlet.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeBodyContent.tag", "tags/negativeBodyContent.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeDuplicateBodyContent.tag", "tags/negativeDuplicateBodyContent.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeDuplicateDescription.tag", "tags/negativeDuplicateDescription.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeDuplicateDisplayName.tag", "tags/negativeDuplicateDisplayName.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeDuplicateDynamicAttributes.tag", "tags/negativeDuplicateDynamicAttributes.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeDuplicateExample.tag", "tags/negativeDuplicateExample.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeDuplicateIsELIgnoredFatalTranslationError.tag", "tags/negativeDuplicateIsELIgnoredFatalTranslationError.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeDuplicateLanguageFatalTranslationError.tag", "tags/negativeDuplicateLanguageFatalTranslationError.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeDuplicateLargeIcon.tag", "tags/negativeDuplicateLargeIcon.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeDuplicateSmallIcon.tag", "tags/negativeDuplicateSmallIcon.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeMultiplePageEncoding.tag", "tags/negativeMultiplePageEncoding.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeUnrecognizedAttribute.tag", "tags/negativeUnrecognizedAttribute.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/positiveDuplicateAttributes.tag", "tags/positiveDuplicateAttributes.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/positiveDuplicateAttributes.tagf", "tags/positiveDuplicateAttributes.tagf"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/positiveImport.tag", "tags/positiveImport.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/positiveLang.tag", "tags/positiveLang.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/positiveMultipleImport.tag", "tags/positiveMultipleImport.tag"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/images/16/icon.jpg")), "images/16/icon.jpg"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/images/32/icon.jpg")), "images/32/icon.jpg"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/deferredValueMinimumJspVersion.jsp")), "deferredValueMinimumJspVersion.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/dynamicAttributesNoUri.jsp")), "dynamicAttributesNoUri.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/implicitImportHttp.jsp")), "implicitImportHttp.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/implicitImportJsp.jsp")), "implicitImportJsp.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/implicitImportLang.jsp")), "implicitImportLang.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/implicitImportServlet.jsp")), "implicitImportServlet.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeBodyContent.jsp")), "negativeBodyContent.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateBodyContent.jsp")), "negativeDuplicateBodyContent.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateDescription.jsp")), "negativeDuplicateDescription.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateDisplayName.jsp")), "negativeDuplicateDisplayName.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateDynamicAttributes.jsp")), "negativeDuplicateDynamicAttributes.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateExample.jsp")), "negativeDuplicateExample.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateIsELIgnoredFatalTranslationError.jsp")), "negativeDuplicateIsELIgnoredFatalTranslationError.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateLanguageFatalTranslationError.jsp")), "negativeDuplicateLanguageFatalTranslationError.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateLargeIcon.jsp")), "negativeDuplicateLargeIcon.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeDuplicateSmallIcon.jsp")), "negativeDuplicateSmallIcon.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeMultiplePageEncoding.jsp")), "negativeMultiplePageEncoding.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeUnrecognizedAttribute.jsp")), "negativeUnrecognizedAttribute.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDuplicateAttributes.jsp")), "positiveDuplicateAttributes.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveImport.jsp")), "positiveImport.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveLang.jsp")), "positiveLang.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveMultipleImport.jsp")), "positiveMultipleImport.jsp"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: negativeDuplicateIsELIgnoredFatalTranslationErrorTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Declare a tag directive with two isELIgnored attributes. + */ + + @Test + public void negativeDuplicateIsELIgnoredFatalTranslationErrorTest() + throws Exception { + String testName = "negativeDuplicateIsELIgnoredFatalTranslationError"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: positiveImportTest + * + * @assertion_ids: JSP:SPEC:229.19 + * + * @test_Strategy: Use the import attribute to import 'java.util.ArrayList'. + * Validated that a ArrayList object can be created and used. + */ + + @Test + public void positiveImportTest() throws Exception { + String testName = "positiveImport"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: implicitImportLangTest + * + * @assertion_ids: JSP:SPEC:229.19.1 + * + * @test_Strategy: Validate that classes from the java.lang package are + * implicitly imported by creating and using a java.lang.Integer object. + */ + + @Test + public void implicitImportLangTest() throws Exception { + String testName = "implicitImportLang"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: implicitImportJspTest + * + * @assertion_ids: JSP:SPEC:229.19.1 + * + * @test_Strategy: Validate that classes from the jakarta.servlet.jsp package + * are implicitly imported by calling JspFactory.getDefaultFactory() method. + */ + + @Test + public void implicitImportJspTest() throws Exception { + String testName = "implicitImportJsp"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: implicitImportServletTest + * + * @assertion_ids: JSP:SPEC:229.19.1 + * + * @test_Strategy: Validate that classes from the jakarta.servlet package are + * implicitly imported by creating and using an instance of RequestDispatcher. + */ + + @Test + public void implicitImportServletTest() throws Exception { + String testName = "implicitImportServlet"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: implicitImportHttpTest + * + * @assertion_ids: JSP:SPEC:229.19.1 + * + * @test_Strategy: Validate that classes from the jakarta.servlet.http package + * are implicitly imported by creating and using an instance of Cookie. + */ + + @Test + public void implicitImportHttpTest() throws Exception { + String testName = "implicitImportHttp"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: positiveMultipleImportTest + * + * @assertion_ids: JSP:SPEC:229.19.2 + * + * @test_Strategy: Declare a tag directive with two import attributes. + * + */ + + @Test + public void positiveMultipleImportTest() throws Exception { + String testName = "positiveMultipleImport"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: negativeMultiplePageEncodingTest + * + * @assertion_ids: JSP:SPEC:232.1.21 + * + * @test_Strategy: Declare a tag directive with two pageEncoding attributes. + * + */ + + @Test + public void negativeMultiplePageEncodingTest() throws Exception { + String testName = "negativeMultiplePageEncoding"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: positiveLangTest + * + * @assertion_ids: JSP:SPEC:229.17 + * + * @test_Strategy: Validate that the language attribute can be set to "java" + * without an error. + */ + + @Test + public void positiveLangTest() throws Exception { + String testName = "positiveLang"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: negativeDuplicateLanguageFatalTranslationErrorTest + * + * @assertion_ids: JSP:SPEC:229.18 + * + * @test_Strategy: Declare a tag directive with two language attributes. of + * different values. Validate that a fatal translation error occurs. + */ + + @Test + public void negativeDuplicateLanguageFatalTranslationErrorTest() + throws Exception { + String testName = "negativeDuplicateLanguageFatalTranslationError"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeBodyContentTest + * + * @assertion_ids: JSP:SPEC:232.1.5.5 + * + * @test_Strategy: A translation error will result if JSP is used as tag + * directive body-content + */ + + @Test + public void negativeBodyContentTest() throws Exception { + String testName = "negativeBodyContent"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: positiveDuplicateAttributesTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: There shall be only one occurrence of any attribute /value + * defined in a given translation unit, unless the values for the duplicate + * attributes are identical for all occurences. + */ + + @Test + public void positiveDuplicateAttributesTest() throws Exception { + String testName = "positiveDuplicateAttributes"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "tag invoked|Test PASSED"); + invoke(); + } + + /* + * @testName: negativeUnrecognizedAttributeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Unrecognized attributes or values result in fatal + * translation error. + */ + + @Test + public void negativeUnrecognizedAttributeTest() throws Exception { + String testName = "negativeUnrecognizedAttribute"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateDisplayNameTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: other such multiple attribute/value (re) definitions result + * in a fatal translation error if the value do not match. + */ + + @Test + public void negativeDuplicateDisplayNameTest() throws Exception { + String testName = "negativeDuplicateDisplayName"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateBodyContentTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: other such multiple attribute/value (re) definitions result + * in a fatal translation error if the value do not match. + */ + + @Test + public void negativeDuplicateBodyContentTest() throws Exception { + String testName = "negativeDuplicateBodyContent"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateDynamicAttributesTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: other such multiple attribute/value (re) definitions result + * in a fatal translation error if the value do not match. + */ + + @Test + public void negativeDuplicateDynamicAttributesTest() throws Exception { + String testName = "negativeDuplicateDynamicAttributes"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateDescriptionTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: other such multiple attribute/value (re) definitions result + * in a fatal translation error if the value do not match. + */ + + @Test + public void negativeDuplicateDescriptionTest() throws Exception { + String testName = "negativeDuplicateDescription"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateExampleTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: other such multiple attribute/value (re) definitions result + * in a fatal translation error if the value do not match. + */ + + @Test + public void negativeDuplicateExampleTest() throws Exception { + String testName = "negativeDuplicateExample"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateSmallIconTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: other such multiple attribute/value (re) definitions result + * in a fatal translation error if the value do not match. + */ + + @Test + public void negativeDuplicateSmallIconTest() throws Exception { + String testName = "negativeDuplicateSmallIcon"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeDuplicateLargeIconTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: other such multiple attribute/value (re) definitions result + * in a fatal translation error if the value do not match. + */ + + @Test + public void negativeDuplicateLargeIconTest() throws Exception { + String testName = "negativeDuplicateLargeIcon"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: dynamicAttributesNoUriTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Only dynamic attributes with no uri are to be present in + * the Map; all other are ignored. + */ + + @Test + public void dynamicAttributesNoUriTest() throws Exception { + String testName = "dynamicAttributesNoUri"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: deferredValueMinimumJspVersionTest + * + * @assertion_ids: JSP:SPEC:230.8.3 + * + * @test_Strategy: [deferredValueMinimumJspVersion] Show that the use of the + * deferredValue attribute for the tag directive causes a translation error if + * specified in a tag file with a JSP version less than 2.1. + */ + + @Test + public void deferredValueMinimumJspVersionTest() throws Exception { + String testName = "deferredValueMinimumJspVersion"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/URLClientIT.java new file mode 100644 index 00000000..7636d9d1 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/URLClientIT.java @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.tagfiles.directives.tag21; + + +import java.io.IOException; +import java.io.InputStream; + +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + private static String CONTEXT_ROOT = "/jsp_tagfile_directives_tag21_web"; + + public static String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + + public URLClientIT() throws Exception { + + + setGeneralURI("/jsp/spec/tagfiles/directives/tag21"); + setContextRoot("/jsp_tagfile_directives_tag21_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_tagfile_directives_tag21_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_tagfile_directives_tag21_web.xml")); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/implicit.tld", "tags/implicit.tld"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DeferredSyntaxAsLiteral.tag", "tags/DeferredSyntaxAsLiteral.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DeferredSyntaxAllowedAsLiteralTrueTemplateText.tag", "tags/DeferredSyntaxAllowedAsLiteralTrueTemplateText.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DeferredSyntaxAllowedAsLiteralTrueAction.tag", "tags/DeferredSyntaxAllowedAsLiteralTrueAction.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DeferredSyntaxAllowedAsLiteralFalseTemplateText.tag", "tags/DeferredSyntaxAllowedAsLiteralFalseTemplateText.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DeferredSyntaxAllowedAsLiteralFalseAction.tag", "tags/DeferredSyntaxAllowedAsLiteralFalseAction.tag"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/DeferredSyntaxAllowedAsLiteralTrueTemplateText.jsp")), "DeferredSyntaxAllowedAsLiteralTrueTemplateText.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/DeferredSyntaxAllowedAsLiteralTrueAction.jsp")), "DeferredSyntaxAllowedAsLiteralTrueAction.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/DeferredSyntaxAllowedAsLiteralFalseTemplateText.jsp")), "DeferredSyntaxAllowedAsLiteralFalseTemplateText.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/DeferredSyntaxAllowedAsLiteralFalseAction.jsp")), "DeferredSyntaxAllowedAsLiteralFalseAction.jsp"); + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + /* + * @testName: deferredSyntaxAllowedAsLiteralFalseTemplateTextTest + * + * @assertion_ids: JSP:SPEC:229.26 + * + * @test_Strategy: [DeferredSyntaxAllowedAsLiteralTagDirectiveAttribute] + * Verify that when the DeferredSyntaxAllowedAsLiteral tag directive attribute + * is set to false, a translation error occurs when the '{#' character + * sequence is used in template text and the jsp version is 2.1 or greater. + */ + @Test + public void deferredSyntaxAllowedAsLiteralFalseTemplateTextTest() + throws Exception { + String testName = "DeferredSyntaxAllowedAsLiteralFalseTemplateText"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: deferredSyntaxAllowedAsLiteralTrueTemplateTextTest + * + * @assertion_ids: JSP:SPEC:229.26 + * + * @test_Strategy: [DeferredSyntaxAllowedAsLiteralTagDirectiveAttribute] + * Verify that when the DeferredSyntaxAllowedAsLiteral tag directive attribute + * is set to true, the '{#' character sequence is allowed in template text + * when the jsp version is 2.1 or greater. + */ + @Test + public void deferredSyntaxAllowedAsLiteralTrueTemplateTextTest() + throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/DeferredSyntaxAllowedAsLiteralTrueTemplateText.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, + "DeferredSyntaxAllowedAsLiteralTrueTemplateText"); + invoke(); + } + + /* + * @testName: deferredSyntaxAllowedAsLiteralFalseActionTest + * + * @assertion_ids: JSP:SPEC:229.26 + * + * @test_Strategy: [DeferredSyntaxAllowedAsLiteralTagDirectiveAttribute] + * Verify that when the DeferredSyntaxAllowedAsLiteral tag directive attribute + * is set to false, a translation error occurs when the '{#' character + * sequence is used in actions and the jsp version is 2.1 or greater. + */ + @Test + public void deferredSyntaxAllowedAsLiteralFalseActionTest() throws Exception { + String testName = "DeferredSyntaxAllowedAsLiteralFalseAction"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: deferredSyntaxAllowedAsLiteralTrueActionTest + * + * @assertion_ids: JSP:SPEC:229.26 + * + * @test_Strategy: [DeferredSyntaxAllowedAsLiteralTagDirectiveAttribute] + * Verify that when the DeferredSyntaxAllowedAsLiteral tag directive attribute + * is set to true, the '{#' character sequence is allowed in actions when the + * jsp version is 2.1 or greater. + */ + @Test + public void deferredSyntaxAllowedAsLiteralTrueActionTest() throws Exception { + InputStream gfStream = URLClientIT.class.getClassLoader().getResourceAsStream(packagePath+"/DeferredSyntaxAllowedAsLiteralTrueAction.gf"); + setGoldenFileStream(gfStream); + TEST_PROPS.setProperty(STANDARD, + "DeferredSyntaxAllowedAsLiteralTrueAction"); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/URLClientIT.java new file mode 100644 index 00000000..a6228ef2 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/URLClientIT.java @@ -0,0 +1,579 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.tagfiles.directives.variable; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + private static final String CONTEXT_ROOT = "/jsp_tagfiles_directives_variable_web"; + + public URLClientIT() throws Exception { + + + setContextRoot(CONTEXT_ROOT); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_tagfiles_directives_variable_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_tagfiles_directives_variable_web.xml")); + + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/falseDeclare.tag", "tags/falseDeclare.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/falseDeclare2.tag", "tags/falseDeclare2.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeAliasAttributeSame.tag", "tags/negativeAliasAttributeSame.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeAliasAttributeSameInclude.tag", "tags/negativeAliasAttributeSameInclude.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeAliasAttributeSameInclude.tagf", "tags/negativeAliasAttributeSameInclude.tagf"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeAliasNameGiven.tag", "tags/negativeAliasNameGiven.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeNameFromAttributeNoAttribute.tag", "tags/negativeNameFromAttributeNoAttribute.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeNameFromAttributeNotRequired.tag", "tags/negativeNameFromAttributeNotRequired.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeNameFromAttributeNotString.tag", "tags/negativeNameFromAttributeNotString.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeNameFromAttributeRtexpr.tag", "tags/negativeNameFromAttributeRtexpr.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeNameFromAttributeSame.tag", "tags/negativeNameFromAttributeSame.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeNameFromAttributeSameInclude.tag", "tags/negativeNameFromAttributeSameInclude.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeNameFromAttributeSameInclude.tagf", "tags/negativeNameFromAttributeSameInclude.tagf"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeNameGivenBoth.tag", "tags/negativeNameGivenBoth.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeNameGivenDynamic.tag", "tags/negativeNameGivenDynamic.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeNameGivenDynamicInclude.tag", "tags/negativeNameGivenDynamicInclude.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeNameGivenDynamicInclude.tagf", "tags/negativeNameGivenDynamicInclude.tagf"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeNameGivenNeither.tag", "tags/negativeNameGivenNeither.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeNameGivenSame.tag", "tags/negativeNameGivenSame.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeNameGivenSameInclude.tag", "tags/negativeNameGivenSameInclude.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/negativeNameGivenSameInclude.tagf", "tags/negativeNameGivenSameInclude.tagf"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/positiveDeclare.tag", "tags/positiveDeclare.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/positiveDeclare2.tag", "tags/positiveDeclare2.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/positiveVariableClass.tag", "tags/positiveVariableClass.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/syncAtBegin.tag", "tags/syncAtBegin.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/syncAtBeginNameFromAttribute.tag", "tags/syncAtBeginNameFromAttribute.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/syncAtEnd.tag", "tags/syncAtEnd.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/syncNested.tag", "tags/syncNested.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/syncRemoveAtBegin.tag", "tags/syncRemoveAtBegin.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/syncRemoveAtEnd.tag", "tags/syncRemoveAtEnd.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/syncRemoveNested.tag", "tags/syncRemoveNested.tag"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/falseDeclareTest.jsp")), "falseDeclareTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeAliasAttributeSame.jsp")), "negativeAliasAttributeSame.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeAliasAttributeSameInclude.jsp")), "negativeAliasAttributeSameInclude.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeAliasNameGiven.jsp")), "negativeAliasNameGiven.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeNameFromAttributeNoAttribute.jsp")), "negativeNameFromAttributeNoAttribute.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeNameFromAttributeNotRequired.jsp")), "negativeNameFromAttributeNotRequired.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeNameFromAttributeNotString.jsp")), "negativeNameFromAttributeNotString.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeNameFromAttributeRtexpr.jsp")), "negativeNameFromAttributeRtexpr.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeNameFromAttributeSame.jsp")), "negativeNameFromAttributeSame.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeNameFromAttributeSameInclude.jsp")), "negativeNameFromAttributeSameInclude.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeNameGivenBoth.jsp")), "negativeNameGivenBoth.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeNameGivenDynamic.jsp")), "negativeNameGivenDynamic.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeNameGivenDynamicInclude.jsp")), "negativeNameGivenDynamicInclude.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeNameGivenNeither.jsp")), "negativeNameGivenNeither.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeNameGivenSame.jsp")), "negativeNameGivenSame.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeNameGivenSameInclude.jsp")), "negativeNameGivenSameInclude.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveDeclare.jsp")), "positiveDeclare.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/positiveVariableClass.jsp")), "positiveVariableClass.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/syncAtBegin.jsp")), "syncAtBegin.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/syncAtBeginNameFromAttribute.jsp")), "syncAtBeginNameFromAttribute.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/syncAtEnd.jsp")), "syncAtEnd.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/syncNested.jsp")), "syncNested.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/syncRemoveAtBegin.jsp")), "syncRemoveAtBegin.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/syncRemoveAtEnd.jsp")), "syncRemoveAtEnd.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/syncRemoveNested.jsp")), "syncRemoveNested.jsp"); + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: negativeNameGivenBothTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Either the name-given attribute or the name- from-attribute + * must be specified. Specifying neither or both will result in a translation + * error. + */ + + @Test + public void negativeNameGivenBothTest() throws Exception { + String testName = "negativeNameGivenBoth"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeNameGivenNeitherTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Either the name-given attribute or the name- from-attribute + * must be specified. Specifying neither or both will result in a translation + * error. + */ + + @Test + public void negativeNameGivenNeitherTest() throws Exception { + String testName = "negativeNameGivenNeither"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeNameGivenSameTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: a translation error will result if two variable directives + * have the same name-given. + */ + + @Test + public void negativeNameGivenSameTest() throws Exception { + String testName = "negativeNameGivenSame"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeNameGivenSameIncludeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: a translation error will result if two variable directives + * have the same name-given in the same translation unit. + */ + + @Test + public void negativeNameGivenSameIncludeTest() throws Exception { + String testName = "negativeNameGivenSameInclude"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeNameGivenDynamicTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: a translation error will result if a variable name-given is + * the same as a dynamic-attributes of a tag directive. + */ + + @Test + public void negativeNameGivenDynamicTest() throws Exception { + String testName = "negativeNameGivenDynamic"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeNameGivenDynamicIncludeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: a translation error will result if a variable name-given is + * the same as a dynamic-attributes of a tag directive in the same translation + * unit. + */ + + @Test + public void negativeNameGivenDynamicIncludeTest() throws Exception { + String testName = "negativeNameGivenDynamicInclude"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeNameFromAttributeSameTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: a translation error will result if two variable directives + * have the same name-from-attribute. + */ + + @Test + public void negativeNameFromAttributeSameTest() throws Exception { + String testName = "negativeNameFromAttributeSame"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeNameFromAttributeSameIncludeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: a translation error will result if two variable directives + * have the same name-from-attribute. + */ + + @Test + public void negativeNameFromAttributeSameIncludeTest() throws Exception { + String testName = "negativeNameFromAttributeSameInclude"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeNameFromAttributeNoAttributeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: a translation error will result the attribute referred to + * by name-from-attribute does not exist. + */ + + @Test + public void negativeNameFromAttributeNoAttributeTest() throws Exception { + String testName = "negativeNameFromAttributeNoAttribute"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeNameFromAttributeNotStringTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: a translation error will result if the attribute referred + * to by name-from-attribute is not of type java.lang.String + */ + + @Test + public void negativeNameFromAttributeNotStringTest() throws Exception { + String testName = "negativeNameFromAttributeNotString"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeNameFromAttributeNotRequiredTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: a translation error will result if the attribute referred + * to by name-from-attribute is not required. + */ + + @Test + public void negativeNameFromAttributeNotRequiredTest() throws Exception { + String testName = "negativeNameFromAttributeNotRequired"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeNameFromAttributeRtexprTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: a translation error will result if the attribute referred + * to by name-from-attribute is rtexprvalue + */ + + @Test + public void negativeNameFromAttributeRtexprTest() throws Exception { + String testName = "negativeNameFromAttributeRtexpr"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeAliasNameGivenTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: a translation error will result if alias is used without + * name-from-attribute + */ + + @Test + public void negativeAliasNameGivenTest() throws Exception { + String testName = "negativeAliasNameGiven"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeAliasAttributeSameTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: a translation error will result if alias is the same as the + * name of an attribute directive in the same translation unit. + */ + + @Test + public void negativeAliasAttributeSameTest() throws Exception { + String testName = "negativeAliasAttributeSame"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: negativeAliasAttributeSameIncludeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: a translation error will result if alias is the same as the + * name of an attribute directive in the same translation unit. + */ + + @Test + public void negativeAliasAttributeSameIncludeTest() throws Exception { + String testName = "negativeAliasAttributeSameInclude"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: positiveVariableClassTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: variable-class specifies the name of the class of the + * variable + */ + + @Test + public void positiveVariableClassTest() throws Exception { + String testName = "positiveVariableClass"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: syncAtBeginTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: variable synchronization + */ + + @Test + public void syncAtBeginTest() throws Exception { + String testName = "syncAtBegin"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "1|2|2|4"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: syncAtBeginNameFromAttributeTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: variable synchronization + */ + + @Test + public void syncAtBeginNameFromAttributeTest() throws Exception { + String testName = "syncAtBeginNameFromAttribute"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "tagFileResult|callingPageResult|ignoredInCallingPage|tagFileResult|4|callingPageResult"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: syncNestedTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: variable synchronization + */ + + @Test + public void syncNestedTest() throws Exception { + String testName = "syncNested"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "1|2|2|1"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: syncAtEndTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: variable synchronization + */ + + @Test + public void syncAtEndTest() throws Exception { + String testName = "syncAtEnd"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "1|1|2|4"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: syncRemoveNestedTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: variable synchronization + */ + + @Test + public void syncRemoveNestedTest() throws Exception { + String testName = "syncRemoveNested"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "2|'1'|''|2"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: syncRemoveAtEndTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: variable synchronization + */ + + @Test + public void syncRemoveAtEndTest() throws Exception { + String testName = "syncRemoveAtEnd"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "2|'2'|'2'|''"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: syncRemoveAtBeginTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: variable synchronization + */ + + @Test + public void syncRemoveAtBeginTest() throws Exception { + String testName = "syncRemoveAtBegin"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "2|'1'|''|''"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: positiveDeclareTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: if true (default), a corresponding scripting variable is + * declared in the calling page or tag file. + */ + + @Test + public void positiveDeclareTest() throws Exception { + String testName = "positiveDeclare"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "declared2:declared2|Test PASSED"); + invoke(); + } + + /* + * @testName: falseDeclareTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: if false, a corresponding scripting variable is not + * declared in the calling page or tag file. + */ + + @Test + public void falseDeclareTest() throws Exception { + String testName = "falseDeclareTest"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "was declared2|was declared"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/URLClientIT.java new file mode 100644 index 00000000..eb53b7c7 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/URLClientIT.java @@ -0,0 +1,217 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.tagfiles.implicitobjects; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + private static final String CONTEXT_ROOT = "/jsp_tagfiles_implicitobjects_web"; + + public URLClientIT() throws Exception { + + + setContextRoot(CONTEXT_ROOT); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_tagfiles_implicitobjects_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_tagfiles_implicitobjects_web.xml")); + + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/checkSession.tag", "tags/checkSession.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/checkRequest.tag", "tags/checkRequest.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/checkResponse.tag", "tags/checkResponse.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/checkOut.tag", "tags/checkOut.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/checkJspContext.tag", "tags/checkJspContext.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/checkConfig.tag", "tags/checkConfig.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/checkApplication.tag", "tags/checkApplication.tag"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/checkSession.jsp")), "checkSession.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/checkResponse.jsp")), "checkResponse.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/checkRequest.jsp")), "checkRequest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/checkOut.jsp")), "checkOut.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/checkJspContext.jsp")), "checkJspContext.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/checkConfig.jsp")), "checkConfig.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/checkApplication.jsp")), "checkApplication.jsp"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: checkSessionTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that the object associated with the session + * scripting variable is of type jakarta.servlet.http.HttpSession and that a + * method can be called against it. + */ + + @Test + public void checkSessionTest() throws Exception { + String testName = "checkSession"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "true|checkSession"); + invoke(); + } + + /* + * @testName: checkConfigTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that the object associated with the config + * scripting variable is of type jakarta.servlet.ServletConfig and that a method + * can be called against it. + */ + + @Test + public void checkConfigTest() throws Exception { + String testName = "checkConfig"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/checkConfig" + " HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "true|param1 is:|hobbit|param2 is:|gollum"); + invoke(); + } + + /* + * @testName: checkOutTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that the object associated with the out scripting + * variable is of type jakarta.servlet.jsp.JspWriter. + */ + + @Test + public void checkOutTest() throws Exception { + String testName = "checkOut"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "true"); + invoke(); + } + + /* + * @testName: checkJspContextTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that the object associated with the jspContext + * scripting variable is of type jakarta.servlet.jsp.JspContext and that a + * method can be called against it. + */ + + @Test + public void checkJspContextTest() throws Exception { + String testName = "checkJspContext"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagfiles_implicitobjects_web/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "true|true"); + invoke(); + } + + /* + * @testName: checkRequestTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that the object associated with the request + * scripting variable is of type jakarta.servlet.Request (parent class of + * HttpServletRequest) and that a method can be called against it. + */ + + @Test + public void checkRequestTest() throws Exception { + String testName = "checkRequest"; + TEST_PROPS.setProperty(REQUEST, "GET /jsp_tagfiles_implicitobjects_web/" + + testName + ".jsp?Years=2 HTTP/1.0"); + TEST_PROPS.setProperty(SEARCH_STRING, "true|HTTP|1.0|2"); + invoke(); + } + + /* + * @testName: checkResponseTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that the object associated with the response + * scripting variable is of type jakarta.servlet.Response (parent class of + * HttpServletResponse) and that a method can be called against it. + */ + + @Test + public void checkResponseTest() throws Exception { + String testName = "checkResponse"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "true"); + TEST_PROPS.setProperty(EXPECTED_HEADERS, "TestHeader:Method call OK"); + invoke(); + } + + /* + * @testName: checkApplicationTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that the object associated with the application + * scripting variable is of type jakarta.servlet.ServletContext that a method + * can be called against it. + */ + @Test + public void checkApplicationTest() throws Exception { + String testName = "checkApplication"; + TEST_PROPS.setProperty(REQUEST, + "GET " + CONTEXT_ROOT + "/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "true|param1|bilbo"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/packaging/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/packaging/URLClientIT.java new file mode 100644 index 00000000..f76ebf8c --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/packaging/URLClientIT.java @@ -0,0 +1,281 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.1 12/09/02 + */ + +package ee.jakarta.tck.pages.spec.tagfiles.packaging; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + public URLClientIT() throws Exception { + + + setContextRoot("/jsp_tagfile_pkg_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_tagfile_pkg_web.war"); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_tagfile_pkg_web.xml")); + + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tag.tld", "tag.tld"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/WebTag1.tag", "tags/WebTag1.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/badtldversion/WebTag1.tag", "tags/badtldversion/WebTag1.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/badtldversion/implicit.tld", "tags/badtldversion/implicit.tld"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/defaultjspversion/WebTag1.tag", "tags/defaultjspversion/WebTag1.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/dir/WebTag1.tag", "tags/dir/WebTag1.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/reservedname20/DeferredSyntaxAsLiteral.tag", "tags/reservedname20/DeferredSyntaxAsLiteral.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/reservedname20/ImplicitTld20.tag", "tags/reservedname20/ImplicitTld20.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/reservedname20/implicit.tld", "tags/reservedname20/implicit.tld"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/reservedname21/DeferredSyntaxAsLiteral.tag", "tags/reservedname21/DeferredSyntaxAsLiteral.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/reservedname21/ImplicitTld21.tag", "tags/reservedname21/ImplicitTld21.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/reservedname21/implicit.tld", "tags/reservedname21/implicit.tld"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/toomanytldelements/WebTag1.tag", "tags/toomanytldelements/WebTag1.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/toomanytldelements/implicit.tld", "tags/toomanytldelements/implicit.tld"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/versionnotmatch/WebTag1.tag", "tags/versionnotmatch/WebTag1.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/versionnotmatch/implicit.tld", "tags/versionnotmatch/implicit.tld"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/IgnoreTag.tag")), "IgnoreTag.tag"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/Tag1.tag")), "Tag1.tag"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ImplicitTldAdditionalElements.jsp")), "ImplicitTldAdditionalElements.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ImplicitTldDefaultJspVersion.jsp")), "ImplicitTldDefaultJspVersion.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ImplicitTldMinimumJspVersion.jsp")), "ImplicitTldMinimumJspVersion.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ImplicitTldReservedName20.jsp")), "ImplicitTldReservedName20.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/ImplicitTldReservedName21.jsp")), "ImplicitTldReservedName21.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspTagFilePackagedJarIgnoredTagTest.jsp")), "JspTagFilePackagedJarIgnoredTagTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspTagFilePackagedJarTest.jsp")), "JspTagFilePackagedJarTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspTagFilePackagedWarTest.jsp")), "JspTagFilePackagedWarTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspTagFilePackagedWarTldTest.jsp")), "JspTagFilePackagedWarTldTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TldImplicitTldJspVersionNotMatch.jsp")), "TldImplicitTldJspVersionNotMatch.jsp"); + + JavaArchive tagfileJar = ShrinkWrap.create(JavaArchive.class, "tagfile.jar"); + tagfileJar.addAsResource(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/jartagfile.tld")), "META-INF/jartagfile.tld"); + tagfileJar.addAsResource(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/IgnoreTag.tag")), "META-INF/tags/IgnoreTag.tag"); + tagfileJar.addAsResource(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/Tag1.tag")), "META-INF/tags/Tag1.tag"); + + archive.addAsLibrary(tagfileJar); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: jspTagFilePackagedJarTest + * + * @assertion_ids: JSP:SPEC:220.1 + * + * @test_Strategy: Validate that tag files packaged in a JAR file and + * referenced in a TLD, can be recognized by the container and invoked within + * a Page. + */ + @Test + public void jspTagFilePackagedJarTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagfile_pkg_web/JspTagFilePackagedJarTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: jspTagFilePackagedJarIgnoredTagTest + * + * @assertion_ids: JSP:SPEC:220.2 + * + * @test_Strategy: Validate that if a Tag file is packaged in a JAR but not + * referenced by a TLD, the container ignores the tag file. Since the Page + * will refer to the ignored tag, a translation error should occur by its use. + */ + @Test + public void jspTagFilePackagedJarIgnoredTagTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagfile_pkg_web/JspTagFilePackagedJarIgnoredTagTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: jspTagFilePackagedWarTest + * + * @assertion_ids: JSP:SPEC:221 + * + * @test_Strategy: Validate that tag files can be properly detected by the + * container and that they can be used in a Page. + */ + @Test + public void jspTagFilePackagedWarTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagfile_pkg_web/JspTagFilePackagedWarTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED1|Test PASSED2"); + invoke(); + } + + /* + * @testName: jspTagFilePackagedWarTldTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate tag files packaged in a web application can be + * explicity referenced in a TLD to be used by a a Page. + */ + @Test + public void jspTagFilePackagedWarTldTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagfile_pkg_web/JspTagFilePackagedWarTldTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED1"); + invoke(); + } + + /* + * @testName: implicitTldMinimumJspVersionTest + * + * @assertion_ids: JSP:SPEC:311 + * + * @test_Strategy: [ImplicitTldMinimumJspVersion] Show that if the JSP version + * specified in an implicit.tld file is less than 2.0 a translation error will + * result. + */ + @Test + public void implicitTldMinimumJspVersionTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagfile_pkg_web/ImplicitTldMinimumJspVersion.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: implicitTldAdditionalElementsTest + * + * @assertion_ids: JSP:SPEC:310 + * + * @test_Strategy: [ImplicitTldAdditionalElements] Show that if the JSP + * version specified in an implicit.tld file is less than 2.0 a translation + * error will result. + */ + @Test + public void implicitTldAdditionalElementsTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagfile_pkg_web/ImplicitTldAdditionalElements.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: tldImplicitTldJspVersionNotMatchTest + * + * @assertion_ids: JSP:SPEC:313 + * + * @test_Strategy: [TldImplicitTldJspVersionNotMatch] Show that if a tag file + * is referenced by both a TLD and an implicit TLD, the JSP versions of the + * TLD and implicit TLD do not need to match. + */ + @Test + public void tldImplicitTldJspVersionNotMatchTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagfile_pkg_web/TldImplicitTldJspVersionNotMatch.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: implicitTldReservedName20Test + * + * @assertion_ids: JSP:SPEC:308 + * + * @test_Strategy: [ImplicitTldReservedName] The JSP version of an implicit + * tag library may be configured by placing a TLD with the reserved name + * "implicit.tld" in the same directory as the implicit tag library's + * constituent tag files. Verify this for version 2.0 by embedding '{#' in an + * action without generating a translation error. + */ + @Test + public void implicitTldReservedName20Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagfile_pkg_web/ImplicitTldReservedName20.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: implicitTldReservedName21Test + * + * @assertion_ids: JSP:SPEC:308 + * + * @test_Strategy: [ImplicitTldReservedName] The JSP version of an implicit + * tag library may be configured by placing a TLD with the reserved name + * "implicit.tld" in the same directory as the implicit tag library's + * constituent tag files. Verify this for version 2.1 by embedding '{#' in an + * action to cause a translation error. + */ + @Test + public void implicitTldReservedName21Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagfile_pkg_web/ImplicitTldReservedName21.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: implicitTldDefaultJspVersionTest + * + * @assertion_ids: JSP:SPEC:307 + * + * @test_Strategy: [ImplicitTldDefaultJspVersion] Show that the jsp version of + * an implicit tag library defaults to 2.0 by embedding an unescaped '#{" + * character sequence in template text. + */ + @Test + public void implicitTldDefaultJspVersionTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagfile_pkg_web/ImplicitTldDefaultJspVersion.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/packaging/jartagfile.tld b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/packaging/jartagfile.tld new file mode 100644 index 00000000..04614a55 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/packaging/jartagfile.tld @@ -0,0 +1,32 @@ + + + + + jartagfile + 1.0 + jartag + http://java.sun.com/tck/jsp/jartag + + tag1 + /META-INF/tags/Tag1.tag + + diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/packaging/jarversioninheritance20.tld b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/packaging/jarversioninheritance20.tld new file mode 100644 index 00000000..f413e580 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/packaging/jarversioninheritance20.tld @@ -0,0 +1,32 @@ + + + + + jarversioninherit21 + 1.0 + jar21 + http://java.sun.com/tck/jsp/jartag + + tag21 + /META-INF/tags/Tag21.tag + + diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/packaging/javaversioninheritance21.tld b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/packaging/javaversioninheritance21.tld new file mode 100644 index 00000000..cc57cde6 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/packaging/javaversioninheritance21.tld @@ -0,0 +1,32 @@ + + + + + jarversioninherit20 + 1.0 + jar20 + http://java.sun.com/tck/jsp/jartag + + tag20 + /META-INF/tags/Tag20.tag + + diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/semantics/MyClassicTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/semantics/MyClassicTag.java new file mode 100644 index 00000000..61c196e6 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/semantics/MyClassicTag.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.tagfiles.semantics; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.TagSupport; + +public class MyClassicTag extends TagSupport { + + public int doStartTag() throws JspException { + try { + pageContext.getOut().println("MyClassicTag:Test PASSED."); + } catch (IOException ioe) { + throw new JspException("Unexpected Exception", ioe); + } + return SKIP_BODY; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/semantics/MySimpleTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/semantics/MySimpleTag.java new file mode 100644 index 00000000..eedf07fb --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/semantics/MySimpleTag.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.tagfiles.semantics; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.JspWriter; +import jakarta.servlet.jsp.SkipPageException; +import jakarta.servlet.jsp.tagext.SimpleTagSupport; +import jakarta.servlet.jsp.tagext.TryCatchFinally; + +public class MySimpleTag extends SimpleTagSupport implements TryCatchFinally { + + public void doTag() throws JspException { + try { + JspWriter out = getJspContext().getOut(); + out.println("Test PASSED. MySimpleTag.doTag"); + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + throw new SkipPageException("from MySimpleTag.doTag."); + } + + public void doCatch(Throwable t) throws Throwable { + try { + JspWriter out = getJspContext().getOut(); + out.println("MySimpleTag.doCatch"); + } catch (IOException ioe) { + throw new JspException("Unexpected IOException!", ioe); + } + + } + + public void doFinally() { + + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/semantics/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/semantics/URLClientIT.java new file mode 100644 index 00000000..8393e3de --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tagfiles/semantics/URLClientIT.java @@ -0,0 +1,242 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.tagfiles.semantics; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; +import ee.jakarta.tck.pages.common.util.JspTestUtil; +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + public URLClientIT() throws Exception { + + + setContextRoot("/jsp_tagfile_semantics_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_tagfile_semantics_web.war"); + archive.addClasses(JspTestUtil.class); + archive.addPackages(true, Filters.exclude(URLClientIT.class), + URLClientIT.class.getPackageName()); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_tagfile_semantics_web.xml")); + + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/AttributeNotSpecifiedTag.tag", "tags/AttributeNotSpecifiedTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DeclaredAttributesTag.tag", "tags/DeclaredAttributesTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/DynamicAttributesTag.tag", "tags/DynamicAttributesTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspContextWrapperScopesTag.tag", "tags/JspContextWrapperScopesTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/JspContextWrapperTag.tag", "tags/JspContextWrapperTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/semanticsInvokeClassicTag.tag", "tags/semanticsInvokeClassicTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/semanticsInvokeSimpleTag.tag", "tags/semanticsInvokeSimpleTag.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tags/semanticsJspForward.tag", "tags/semanticsJspForward.tag"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/mytags.tld", "mytags.tld"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspTagSemanticsAttributeNotSpecifiedTest.jsp")), "JspTagSemanticsAttributeNotSpecifiedTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspTagSemanticsDeclaredAttributesTest.jsp")), "JspTagSemanticsDeclaredAttributesTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspTagSemanticsDynamicAttributesTest.jsp")), "JspTagSemanticsDynamicAttributesTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspTagSemanticsJspContextWrapperTest.jsp")), "JspTagSemanticsJspContextWrapperTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/JspTagSemanticsScopesTest.jsp")), "JspTagSemanticsScopesTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/semanticsInvokeClassicTag.jsp")), "semanticsInvokeClassicTag.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/semanticsInvokeSimpleTag.jsp")), "semanticsInvokeSimpleTag.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/semanticsJspForward.jsp")), "semanticsJspForward.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/semanticsJspForwardTarget.jsp")), "semanticsJspForwardTarget.jsp"); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: jspTagSemanticsJspContextWrapperTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that the container properly creates a JSP Context + * wrapper, an instance of PageContext, for the tag file. Validate that this + * wrapper is not the same JspContext as that of the invoking page (this + * includes validate of the jspContext scripting variable). + */ + @Test + public void jspTagSemanticsJspContextWrapperTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagfile_semantics_web/JspTagSemanticsJspContextWrapperTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: jspTagSemanticsJspContextWrapperScopesTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the following: - the container presents the Tag + * file with a clean page context. - the container provides the Tag file + * access with to the same request, session, and application scope as that of + * the invoking context. - Any changes to the page scope in the wrapper + * context are not reflected in the invoking context. - Any changes to the + * request, session, or application scopes of the wrapping context are + * synchronized with the invoking context. + */ + @Test + public void jspTagSemanticsJspContextWrapperScopesTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagfile_semantics_web/JspTagSemanticsScopesTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "Wrapper Test PASSED|Test PASSED|Wrapper Test PASSED|Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: jspTagSemanticsDeclaredAttributesTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that a page scoped variable is created for each + * declared and specified attribute defined by the tag. The variable name must + * be the same as the attribute name and the variable value must be the same + * as provided at invocation time. + */ + @Test + public void jspTagSemanticsDeclaredAttributesTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagfile_semantics_web/JspTagSemanticsDeclaredAttributesTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: jspTagSemanticsAttributeNotSpecifiedTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that if an attribute is declared as optional, and + * that attribute is not specified at invocation time, no page scoped variable + * is created. + */ + @Test + public void jspTagSemanticsAttributeNotSpecifiedTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagfile_semantics_web/JspTagSemanticsAttributeNotSpecifiedTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: jspTagSemanticsDynamicAttributesTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate dynamic attributes. + */ + @Test + public void jspTagSemanticsDynamicAttributesTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tagfile_semantics_web/JspTagSemanticsDynamicAttributesTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: semanticsJspForwardTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Upon return from the RequestDispather.forward method, the + * generated tag handler must stop processing of the tag file and throw + * java.servlet.jsp.SkipPageException. + */ + + @Test + public void semanticsJspForwardTest() throws Exception { + String testName = "semanticsJspForward"; + TEST_PROPS.setProperty(REQUEST, + "GET " + "/jsp_tagfile_semantics_web/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: semanticsInvokeSimpleTagTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: invokes a simple tag handler which throws SkipPageException + * in the doTag method, the generated tag handler must terminate and + * SkipPageException must be thrown. + */ + + @Test + public void semanticsInvokeSimpleTagTest() throws Exception { + String testName = "semanticsInvokeSimpleTag"; + TEST_PROPS.setProperty(REQUEST, + "GET " + "/jsp_tagfile_semantics_web/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "Test FAILED"); + invoke(); + } + + /* + * @testName: semanticsInvokeClassicTagTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: must allow such an invocation to occur. + */ + + @Test + public void semanticsInvokeClassicTagTest() throws Exception { + String testName = "semanticsInvokeClassicTag"; + TEST_PROPS.setProperty(REQUEST, + "GET " + "/jsp_tagfile_semantics_web/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "MyClassicTag:Test PASSED|endOfTagFile|endOfCallingPage"); + invoke(); + } + +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/HSListenerMetaInf.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/HSListenerMetaInf.java new file mode 100644 index 00000000..88e404de --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/HSListenerMetaInf.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.tldres; + +import jakarta.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSessionEvent; +import jakarta.servlet.http.HttpSessionListener; + +public final class HSListenerMetaInf implements HttpSessionListener { + public void sessionCreated(HttpSessionEvent event) { + HttpSession session = event.getSession(); + session.setAttribute("session.created.meta.inf", + "session created meta inf."); + } + + public void sessionDestroyed(HttpSessionEvent event) { + HttpSession session = event.getSession(); + session.setAttribute("session.destroyed.meta.inf", + "session about to be destroyed meta inf."); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/HSListenerMetaInfSub.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/HSListenerMetaInfSub.java new file mode 100644 index 00000000..5d1425e0 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/HSListenerMetaInfSub.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.tldres; + +import jakarta.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSessionEvent; +import jakarta.servlet.http.HttpSessionListener; + +public final class HSListenerMetaInfSub implements HttpSessionListener { + public void sessionCreated(HttpSessionEvent event) { + HttpSession session = event.getSession(); + session.setAttribute("session.created.meta.inf.sub", + "session created meta inf sub."); + } + + public void sessionDestroyed(HttpSessionEvent event) { + HttpSession session = event.getSession(); + session.setAttribute("session.destroyed.meta.inf.sub", + "session about to be destroyed meta inf sub."); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/HSListenerWebInf.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/HSListenerWebInf.java new file mode 100644 index 00000000..39439839 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/HSListenerWebInf.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.tldres; + +import jakarta.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSessionEvent; +import jakarta.servlet.http.HttpSessionListener; + +public final class HSListenerWebInf implements HttpSessionListener { + public void sessionCreated(HttpSessionEvent event) { + HttpSession session = event.getSession(); + session.setAttribute("session.created.web.inf", "session created web inf."); + } + + public void sessionDestroyed(HttpSessionEvent event) { + HttpSession session = event.getSession(); + session.setAttribute("session.destroyed.web.inf", + "session about to be destroyed web inf."); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/HSListenerWebInfSub.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/HSListenerWebInfSub.java new file mode 100644 index 00000000..926c5d0c --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/HSListenerWebInfSub.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.tldres; + +import jakarta.servlet.http.HttpSession; +import jakarta.servlet.http.HttpSessionEvent; +import jakarta.servlet.http.HttpSessionListener; + +public final class HSListenerWebInfSub implements HttpSessionListener { + public void sessionCreated(HttpSessionEvent event) { + HttpSession session = event.getSession(); + session.setAttribute("session.created.web.inf.sub", + "session created web inf sub."); + } + + public void sessionDestroyed(HttpSessionEvent event) { + HttpSession session = event.getSession(); + session.setAttribute("session.destroyed.web.inf.sub", + "session about to be destroyed web inf sub."); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/Multi1Tag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/Multi1Tag.java new file mode 100644 index 00000000..404a9730 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/Multi1Tag.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.tldres; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.TagSupport; + +public class Multi1Tag extends TagSupport { + + public int doStartTag() throws JspException { + try { + pageContext.getOut().println("Multi1Tag: Test PASSED"); + } catch (IOException ioe) { + throw new JspException("Unexpected Exception", ioe); + } + return SKIP_BODY; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/Multi2Tag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/Multi2Tag.java new file mode 100644 index 00000000..3394f94d --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/Multi2Tag.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.tldres; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.TagSupport; + +public class Multi2Tag extends TagSupport { + + public int doStartTag() throws JspException { + try { + pageContext.getOut().println("Multi2Tag: Test PASSED"); + } catch (IOException ioe) { + throw new JspException("Unexpected Exception", ioe); + } + return SKIP_BODY; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/Tld11Tag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/Tld11Tag.java new file mode 100644 index 00000000..6de27907 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/Tld11Tag.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.tldres; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.TagSupport; + +public class Tld11Tag extends TagSupport { + + public int doStartTag() throws JspException { + try { + pageContext.getOut().println("Tld11Tag: Test PASSED"); + } catch (IOException ioe) { + throw new JspException("Unexpected Exception", ioe); + } + return SKIP_BODY; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/URLClientIT.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/URLClientIT.java new file mode 100644 index 00000000..57932231 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/URLClientIT.java @@ -0,0 +1,316 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)URLClient.java 1.36 02/11/04 + */ + +package ee.jakarta.tck.pages.spec.tldres; + + +import java.io.IOException; +import ee.jakarta.tck.pages.common.client.AbstractUrlClient; + +import org.jboss.arquillian.container.test.api.Deployment; +import org.jboss.arquillian.junit5.ArquillianExtension; +import org.jboss.shrinkwrap.api.Filters; +import org.jboss.shrinkwrap.api.ShrinkWrap; +import org.jboss.shrinkwrap.api.spec.JavaArchive; +import org.jboss.shrinkwrap.api.spec.WebArchive; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; +import org.jboss.shrinkwrap.api.asset.UrlAsset; + + +@ExtendWith(ArquillianExtension.class) +public class URLClientIT extends AbstractUrlClient { + + + public URLClientIT() throws Exception { + + + setContextRoot("/jsp_tldres_web"); + + } + + @Deployment(testable = false) + public static WebArchive createDeployment() throws IOException { + + String packagePath = URLClientIT.class.getPackageName().replace(".", "/"); + WebArchive archive = ShrinkWrap.create(WebArchive.class, "jsp_tldres_web.war"); + archive.addClasses(HSListenerWebInf.class, HSListenerWebInfSub.class, + UriTag.class, WebXmlTag.class); + archive.setWebXML(URLClientIT.class.getClassLoader().getResource(packagePath+"/jsp_tldres_web.xml")); + + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/sub/webinfsub.tld", "sub/webinfsub.tld"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/tlds/uri.tld", "tlds/uri.tld"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/webinfpres.tld", "webinfpres.tld"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/webxml.tld", "webxml.tld"); + archive.addAsWebInfResource(URLClientIT.class.getPackage(), "WEB-INF/a12.tld", "a12.tld"); + + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/listenerTldTest.jsp")), "listenerTldTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeJSPPrefix.jsp")), "negativeJSPPrefix.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/negativeTaglibAfterActionTest.jsp")), "negativeTaglibAfterActionTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/path/TldResPathRelativeUriTest.jsp")), "path/TldResPathRelativeUriTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/tld12DefaultBodyContent.jsp")), "tld12DefaultBodyContent.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TldExplicitWebXmlPrecedenceTest.jsp")), "TldExplicitWebXmlPrecedenceTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TldResPath11Test.jsp")), "TldResPath11Test.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TldResPathAbsUriNotFoundTest.jsp")), "TldResPathAbsUriNotFoundTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TldResPathDirectTldReferenceTest.jsp")), "TldResPathDirectTldReferenceTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TldResPathExplicitWebXmlTest.jsp")), "TldResPathExplicitWebXmlTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TldResPathMultiTldTest.jsp")), "TldResPathMultiTldTest.jsp"); + archive.add(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/TldResPathWebInfUriTest.jsp")), "TldResPathWebInfUriTest.jsp"); + + JavaArchive jsp11taglibJar = ShrinkWrap.create(JavaArchive.class, "jsp11taglib.jar"); + jsp11taglibJar.addAsResource(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/taglib.tld")), "META-INF/taglib.tld"); + jsp11taglibJar.addClass(Tld11Tag.class); + + archive.addAsLibrary(jsp11taglibJar); + + JavaArchive multitaglibJar = ShrinkWrap.create(JavaArchive.class, "multitaglib.jar"); + multitaglibJar.addAsResource(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/multi1.tld")), "META-INF/multi1.tld"); + multitaglibJar.addAsResource(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/jartagpres.tld")), "META-INF/jartagpres.tld"); + multitaglibJar.addAsResource(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/metainfsub.tld")), "META-INF/sub/metainfsub.tld"); + multitaglibJar.addAsResource(new UrlAsset(URLClientIT.class.getClassLoader().getResource(packagePath+"/multi2.tld")), "META-INF/tlds/multi2.tld"); + + multitaglibJar.addClasses(HSListenerMetaInf.class, HSListenerMetaInfSub.class, Multi1Tag.class, Multi2Tag.class); + + archive.addAsLibrary(multitaglibJar); + + return archive; + + } + + /* + * @class.setup_props: webServerHost; webServerPort; ts_home; + * + */ + + /* Run test */ + + /* + * @testName: tldResourcePathJsp11Test + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that a taglibrary packaged as specified by the JSP + * 1.1 specification will be properly added to the containers taglib map and + * that the defined tag within can be used. + */ + @Test + public void tldResourcePathJsp11Test() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tldres_web/TldResPath11Test.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Tld11Tag: Test PASSED"); + invoke(); + } + + /* + * @testName: tldResourcePathMultiTldJarTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the container can properly process a JAR + * containing multiple TLDs and adds the TLDs that are found containing a + * element to the taglib map. + */ + @Test + public void tldResourcePathMultiTldJarTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tldres_web/TldResPathMultiTldTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "Multi1Tag: Test PASSED|Multi2Tag: Test PASSED"); + invoke(); + } + + /* + * @testName: tldResourcePathWebInfUriTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that if a TLD exists in the WEB-INF directory or + * some subdirectory thereof, and that TLD contains a element, the + * container will add that taglibrary to the taglibrary map. + */ + @Test + public void tldResourcePathWebInfUriTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tldres_web/TldResPathWebInfUriTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "UriTag: Test PASSED"); + invoke(); + } + + /* + * @testName: tldResourcePathWebXmlTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Valdiate that the container adds any explicit taglibrary + * entries found in the deployment descriptor to the taglib map and that the + * tag or tags within can be properly used. + */ + @Test + public void tldResourcePathWebXmlTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tldres_web/TldResPathExplicitWebXmlTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "WebXmlTag: Test PASSED"); + invoke(); + } + + /* + * @testName: tldResourcePathDirectTldReference + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate the TLD can be directly referenced in the taglib + * directive and that the tag(s) declared in this TLD can be properly used. + */ + @Test + public void tldResourcePathDirectTldReference() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tldres_web/TldResPathDirectTldReferenceTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "WebXmlTag: Test PASSED"); + invoke(); + } + + /* + * @testName: tldExplicitWebXmlPrecedenceTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that tag library entries explicity defined in the + * web deployment descriptor (web.xml) have precedence over other tag + * libraries defined with the same URI. + */ + @Test + public void tldExplicitWebXmlPrecedenceTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tldres_web/TldExplicitWebXmlPrecedenceTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "WebXmlTag: Test PASSED"); + invoke(); + } + + /* + * @testName: tldResPathRelativeUriTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate a tag library can be resolved when referenced + * though a relative path (no leading '/'). No translation error should occur + * and the tag should be usable within the translation unit. + */ + @Test + public void tldResPathRelativeUriTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tldres_web/path/TldResPathRelativeUriTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "WebXmlTag: Test PASSED"); + invoke(); + } + + /* + * @testName: tldResPathAbsUriNotFoundTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: Validate that if the uri attribute of the taglib directive + * is an absolute URI that is not present in the container's tag library map, + * that a translation time error is raised. + */ + @Test + public void tldResPathAbsUriNotFoundTest() throws Exception { + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tldres_web/TldResPathAbsUriNotFoundTest.jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: tld12DefaultBodyContentTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: omit body-content in a 1.2 style tld and a container is + * required to apply default JSP. + */ + + @Test + public void tld12DefaultBodyContentTest() throws Exception { + String testName = "tld12DefaultBodyContent"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tldres_web/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, "Test PASSED"); + invoke(); + } + + /* + * @testName: negativeJSPPrefixTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: use jsp prefix for an element that is not a standard action + * and expect a translation error. + */ + + @Test + public void negativeJSPPrefixTest() throws Exception { + String testName = "negativeJSPPrefix"; + TEST_PROPS.setProperty(TEST_NAME, testName); + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tldres_web/" + testName + ".jsp HTTP/1.0"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } + + /* + * @testName: listenerTldTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: A container is required to read listener element in all TLD + * files and treat them as extension to web.xml. + */ + + @Test + public void listenerTldTest() throws Exception { + String testName = "listenerTldTest"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tldres_web/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(SEARCH_STRING, + "session created meta inf.|session created meta inf sub.|session created web inf.|session created web inf sub."); + invoke(); + } + + /* + * @testName: negativeTaglibAfterActionTest + * + * @assertion_ids: PENDING + * + * @test_Strategy: It is a fatal translation error for the taglib directive to + * appear after actions or functions using the prefix. + */ + @Test + public void negativeTaglibAfterActionTest() throws Exception { + String testName = "negativeTaglibAfterActionTest"; + TEST_PROPS.setProperty(REQUEST, + "GET /jsp_tldres_web/" + testName + ".jsp HTTP/1.1"); + TEST_PROPS.setProperty(STATUS_CODE, INTERNAL_SERVER_ERROR); + invoke(); + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/UriTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/UriTag.java new file mode 100644 index 00000000..f44e2f95 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/UriTag.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.tldres; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.TagSupport; + +public class UriTag extends TagSupport { + + public int doStartTag() throws JspException { + try { + pageContext.getOut().println("UriTag: Test PASSED"); + } catch (IOException ioe) { + throw new JspException("Unexpected Exception", ioe); + } + return SKIP_BODY; + } +} diff --git a/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/WebXmlTag.java b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/WebXmlTag.java new file mode 100644 index 00000000..673b01a8 --- /dev/null +++ b/tck/src/main/java/ee/jakarta/tck/pages/spec/tldres/WebXmlTag.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package ee.jakarta.tck.pages.spec.tldres; + +import java.io.IOException; + +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.TagSupport; + +public class WebXmlTag extends TagSupport { + + public int doStartTag() throws JspException { + try { + pageContext.getOut().println("WebXmlTag: Test PASSED"); + } catch (IOException ioe) { + throw new JspException("Unexpected Exception", ioe); + } + return SKIP_BODY; + } +} diff --git a/tck/src/main/resources/.DS_Store b/tck/src/main/resources/.DS_Store new file mode 100644 index 00000000..49a97e4e Binary files /dev/null and b/tck/src/main/resources/.DS_Store differ diff --git a/tck/src/main/resources/LICENSE_EFTL.md b/tck/src/main/resources/LICENSE_EFTL.md new file mode 100644 index 00000000..a2106828 --- /dev/null +++ b/tck/src/main/resources/LICENSE_EFTL.md @@ -0,0 +1,83 @@ +# Eclipse Foundation Technology Compatibility Kit License - v 1.0 + +Copyright (c) 2018, Eclipse Foundation, Inc. and its licensors. + +Redistribution and use in binary form is permitted provided that the +following conditions are met: + +1. Use of the Technology Compatibility Kit accompanying this license + (the "TCK") and its documentation is permitted solely for the + purpose of testing compatibility of an implementation (the + "Product") of a specification (the "Specification") made available + by the Eclipse Foundation, Inc. ("Eclipse"). + +2. Only those modifications expressly permitted by the TCK and its + documentation are permitted. Except in these limited circumstances, + no modifications to the TCK are permitted under this license. + +3. A Product will be deemed to be "compatible" with the Specification + if it fully and completely meets and satisfies all requirements of + the TCK. + +4. Before any claim of compatibility (or any similar claim suggesting + compatibility) is made based on the TCK, the testing party must: + + a. use the TCK to demonstrate that the Product fully and + completely meets and satisfies all requirements of the TCK; + + b. make TCK test results showing full and complete satisfaction of + all requirements of the TCK publicly available on the testing + party's website and send a link to such test results to Eclipse + at [tck@eclipse.org](mailto:tck@eclipse.org); and + + c. comply with any requirements stated in the Specification with + regard to subsetting, supersetting, modifying or extending the + Specification in any Product claimed to be compatible with the + Specification. + +5. The test results must be continuously available and the link must + be live for at least as long as the Product is available in the + marketplace. + +6. The TCK may not be used as a basis for any statements of partial + compatibility. The TCK may only be used as a basis for true, + factual statements of full compatibility of Products that fully + meet and satisfy all requirements of the TCK. + +7. A determination that a Product is compatible with the TCK does not, + in itself, give rise to the right to use any name, mark, logo + associated with the TCK, Eclipse, or Eclipse's contributors or + licensors. + +8. Upon the request of Eclipse, a tester will retract any statements + of compatibility (or any similar claim suggesting compatibility) + which Eclipse reasonably determines to be false or misleading or in + violation of the terms of this license. + +9. Redistribution of the TCK must be under this Eclipse Foundation + Technology Compatibility Kit License and must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +10. Neither the name, trademarks or logos of Eclipse, nor the names, + trademarks or logos of its contributors or licensors may be used to + endorse or promote products tested with this software without + specific prior written permission. + +11. The source code for the TCK accompanying this license is available + from Eclipse. + +TO THE EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED ON +AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER +EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR +CONDITIONS OF TITLE, NON- INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR +A PARTICULAR PURPOSE. TO THE EXTENT PERMITTED BY APPLICABLE LAW, +NEITHER THE COPYRIGHT OWNER OR ANY CONTRIBUTORS SHALL HAVE ANY +LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE +EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. diff --git a/tck/src/main/resources/LICENSE_EPL.md b/tck/src/main/resources/LICENSE_EPL.md new file mode 100644 index 00000000..1d428eda --- /dev/null +++ b/tck/src/main/resources/LICENSE_EPL.md @@ -0,0 +1,637 @@ +# Eclipse Public License - v 2.0 + + THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE + PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION + OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + + 1. DEFINITIONS + + "Contribution" means: + + a) in the case of the initial Contributor, the initial content + Distributed under this Agreement, and + + b) in the case of each subsequent Contributor: + i) changes to the Program, and + ii) additions to the Program; + where such changes and/or additions to the Program originate from + and are Distributed by that particular Contributor. A Contribution + "originates" from a Contributor if it was added to the Program by + such Contributor itself or anyone acting on such Contributor's behalf. + Contributions do not include changes or additions to the Program that + are not Modified Works. + + "Contributor" means any person or entity that Distributes the Program. + + "Licensed Patents" mean patent claims licensable by a Contributor which + are necessarily infringed by the use or sale of its Contribution alone + or when combined with the Program. + + "Program" means the Contributions Distributed in accordance with this + Agreement. + + "Recipient" means anyone who receives the Program under this Agreement + or any Secondary License (as applicable), including Contributors. + + "Derivative Works" shall mean any work, whether in Source Code or other + form, that is based on (or derived from) the Program and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. + + "Modified Works" shall mean any work in Source Code or other form that + results from an addition to, deletion from, or modification of the + contents of the Program, including, for purposes of clarity any new file + in Source Code form that contains any contents of the Program. Modified + Works shall not include works that contain only declarations, + interfaces, types, classes, structures, or files of the Program solely + in each case in order to link to, bind by name, or subclass the Program + or Modified Works thereof. + + "Distribute" means the acts of a) distributing or b) making available + in any manner that enables the transfer of a copy. + + "Source Code" means the form of a Program preferred for making + modifications, including but not limited to software source code, + documentation source, and configuration files. + + "Secondary License" means either the GNU General Public License, + Version 2.0, or any later versions of that license, including any + exceptions or additional permissions as identified by the initial + Contributor. + + 2. GRANT OF RIGHTS + + a) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free copyright + license to reproduce, prepare Derivative Works of, publicly display, + publicly perform, Distribute and sublicense the Contribution of such + Contributor, if any, and such Derivative Works. + + b) Subject to the terms of this Agreement, each Contributor hereby + grants Recipient a non-exclusive, worldwide, royalty-free patent + license under Licensed Patents to make, use, sell, offer to sell, + import and otherwise transfer the Contribution of such Contributor, + if any, in Source Code or other form. This patent license shall + apply to the combination of the Contribution and the Program if, at + the time the Contribution is added by the Contributor, such addition + of the Contribution causes such combination to be covered by the + Licensed Patents. The patent license shall not apply to any other + combinations which include the Contribution. No hardware per se is + licensed hereunder. + + c) Recipient understands that although each Contributor grants the + licenses to its Contributions set forth herein, no assurances are + provided by any Contributor that the Program does not infringe the + patent or other intellectual property rights of any other entity. + Each Contributor disclaims any liability to Recipient for claims + brought by any other entity based on infringement of intellectual + property rights or otherwise. As a condition to exercising the + rights and licenses granted hereunder, each Recipient hereby + assumes sole responsibility to secure any other intellectual + property rights needed, if any. For example, if a third party + patent license is required to allow Recipient to Distribute the + Program, it is Recipient's responsibility to acquire that license + before distributing the Program. + + d) Each Contributor represents that to its knowledge it has + sufficient copyright rights in its Contribution, if any, to grant + the copyright license set forth in this Agreement. + + e) Notwithstanding the terms of any Secondary License, no + Contributor makes additional grants to any Recipient (other than + those set forth in this Agreement) as a result of such Recipient's + receipt of the Program under the terms of a Secondary License + (if permitted under the terms of Section 3). + + 3. REQUIREMENTS + + 3.1 If a Contributor Distributes the Program in any form, then: + + a) the Program must also be made available as Source Code, in + accordance with section 3.2, and the Contributor must accompany + the Program with a statement that the Source Code for the Program + is available under this Agreement, and informs Recipients how to + obtain it in a reasonable manner on or through a medium customarily + used for software exchange; and + + b) the Contributor may Distribute the Program under a license + different than this Agreement, provided that such license: + i) effectively disclaims on behalf of all other Contributors all + warranties and conditions, express and implied, including + warranties or conditions of title and non-infringement, and + implied warranties or conditions of merchantability and fitness + for a particular purpose; + + ii) effectively excludes on behalf of all other Contributors all + liability for damages, including direct, indirect, special, + incidental and consequential damages, such as lost profits; + + iii) does not attempt to limit or alter the recipients' rights + in the Source Code under section 3.2; and + + iv) requires any subsequent distribution of the Program by any + party to be under a license that satisfies the requirements + of this section 3. + + 3.2 When the Program is Distributed as Source Code: + + a) it must be made available under this Agreement, or if the + Program (i) is combined with other material in a separate file or + files made available under a Secondary License, and (ii) the initial + Contributor attached to the Source Code the notice described in + Exhibit A of this Agreement, then the Program may be made available + under the terms of such Secondary Licenses, and + + b) a copy of this Agreement must be included with each copy of + the Program. + + 3.3 Contributors may not remove or alter any copyright, patent, + trademark, attribution notices, disclaimers of warranty, or limitations + of liability ("notices") contained within the Program from any copy of + the Program which they Distribute, provided that Contributors may add + their own appropriate notices. + + 4. COMMERCIAL DISTRIBUTION + + Commercial distributors of software may accept certain responsibilities + with respect to end users, business partners and the like. While this + license is intended to facilitate the commercial use of the Program, + the Contributor who includes the Program in a commercial product + offering should do so in a manner which does not create potential + liability for other Contributors. Therefore, if a Contributor includes + the Program in a commercial product offering, such Contributor + ("Commercial Contributor") hereby agrees to defend and indemnify every + other Contributor ("Indemnified Contributor") against any losses, + damages and costs (collectively "Losses") arising from claims, lawsuits + and other legal actions brought by a third party against the Indemnified + Contributor to the extent caused by the acts or omissions of such + Commercial Contributor in connection with its distribution of the Program + in a commercial product offering. The obligations in this section do not + apply to any claims or Losses relating to any actual or alleged + intellectual property infringement. In order to qualify, an Indemnified + Contributor must: a) promptly notify the Commercial Contributor in + writing of such claim, and b) allow the Commercial Contributor to control, + and cooperate with the Commercial Contributor in, the defense and any + related settlement negotiations. The Indemnified Contributor may + participate in any such claim at its own expense. + + For example, a Contributor might include the Program in a commercial + product offering, Product X. That Contributor is then a Commercial + Contributor. If that Commercial Contributor then makes performance + claims, or offers warranties related to Product X, those performance + claims and warranties are such Commercial Contributor's responsibility + alone. Under this section, the Commercial Contributor would have to + defend claims against the other Contributors related to those performance + claims and warranties, and if a court requires any other Contributor to + pay any damages as a result, the Commercial Contributor must pay + those damages. + + 5. NO WARRANTY + + EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT + PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" + BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR + IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF + TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR + PURPOSE. Each Recipient is solely responsible for determining the + appropriateness of using and distributing the Program and assumes all + risks associated with its exercise of rights under this Agreement, + including but not limited to the risks and costs of program errors, + compliance with applicable laws, damage to or loss of data, programs + or equipment, and unavailability or interruption of operations. + + 6. DISCLAIMER OF LIABILITY + + EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT + PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS + SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST + PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE + EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGES. + + 7. GENERAL + + If any provision of this Agreement is invalid or unenforceable under + applicable law, it shall not affect the validity or enforceability of + the remainder of the terms of this Agreement, and without further + action by the parties hereto, such provision shall be reformed to the + minimum extent necessary to make such provision valid and enforceable. + + If Recipient institutes patent litigation against any entity + (including a cross-claim or counterclaim in a lawsuit) alleging that the + Program itself (excluding combinations of the Program with other software + or hardware) infringes such Recipient's patent(s), then such Recipient's + rights granted under Section 2(b) shall terminate as of the date such + litigation is filed. + + All Recipient's rights under this Agreement shall terminate if it + fails to comply with any of the material terms or conditions of this + Agreement and does not cure such failure in a reasonable period of + time after becoming aware of such noncompliance. If all Recipient's + rights under this Agreement terminate, Recipient agrees to cease use + and distribution of the Program as soon as reasonably practicable. + However, Recipient's obligations under this Agreement and any licenses + granted by Recipient relating to the Program shall continue and survive. + + Everyone is permitted to copy and distribute copies of this Agreement, + but in order to avoid inconsistency the Agreement is copyrighted and + may only be modified in the following manner. The Agreement Steward + reserves the right to publish new versions (including revisions) of + this Agreement from time to time. No one other than the Agreement + Steward has the right to modify this Agreement. The Eclipse Foundation + is the initial Agreement Steward. The Eclipse Foundation may assign the + responsibility to serve as the Agreement Steward to a suitable separate + entity. Each new version of the Agreement will be given a distinguishing + version number. The Program (including Contributions) may always be + Distributed subject to the version of the Agreement under which it was + received. In addition, after a new version of the Agreement is published, + Contributor may elect to Distribute the Program (including its + Contributions) under the new version. + + Except as expressly stated in Sections 2(a) and 2(b) above, Recipient + receives no rights or licenses to the intellectual property of any + Contributor under this Agreement, whether expressly, by implication, + estoppel or otherwise. All rights in the Program not expressly granted + under this Agreement are reserved. Nothing in this Agreement is intended + to be enforceable by any entity that is not a Contributor or Recipient. + No third-party beneficiary rights are created under this Agreement. + + Exhibit A - Form of Secondary Licenses Notice + + "This Source Code may also be made available under the following + Secondary Licenses when the conditions for such availability set forth + in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), + version(s), and exceptions or additional permissions here}." + + Simply including a copy of this Agreement, including this Exhibit A + is not sufficient to license the Source Code under Secondary Licenses. + + If it is not possible or desirable to put the notice in a particular + file, then You may include the notice in a location (such as a LICENSE + file in a relevant directory) where a recipient would be likely to + look for such a notice. + + You may add additional accurate notices of copyright ownership. + +--- + +## The GNU General Public License (GPL) Version 2, June 1991 + + Copyright (C) 1989, 2022 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor + Boston, MA 02110-1335 + USA + + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your freedom to + share and change it. By contrast, the GNU General Public License is + intended to guarantee your freedom to share and change free software--to + make sure the software is free for all its users. This General Public + License applies to most of the Free Software Foundation's software and + to any other program whose authors commit to using it. (Some other Free + Software Foundation software is covered by the GNU Library General + Public License instead.) You can apply it to your programs, too. + + When we speak of free software, we are referring to freedom, not price. + Our General Public Licenses are designed to make sure that you have the + freedom to distribute copies of free software (and charge for this + service if you wish), that you receive source code or can get it if you + want it, that you can change the software or use pieces of it in new + free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid anyone + to deny you these rights or to ask you to surrender the rights. These + restrictions translate to certain responsibilities for you if you + distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether gratis + or for a fee, you must give the recipients all the rights that you have. + You must make sure that they, too, receive or can get the source code. + And you must show them these terms so they know their rights. + + We protect your rights with two steps: (1) copyright the software, and + (2) offer you this license which gives you legal permission to copy, + distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain + that everyone understands that there is no warranty for this free + software. If the software is modified by someone else and passed on, we + want its recipients to know that what they have is not the original, so + that any problems introduced by others will not reflect on the original + authors' reputations. + + Finally, any free program is threatened constantly by software patents. + We wish to avoid the danger that redistributors of a free program will + individually obtain patent licenses, in effect making the program + proprietary. To prevent this, we have made it clear that any patent must + be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and + modification follow. + + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains a + notice placed by the copyright holder saying it may be distributed under + the terms of this General Public License. The "Program", below, refers + to any such program or work, and a "work based on the Program" means + either the Program or any derivative work under copyright law: that is + to say, a work containing the Program or a portion of it, either + verbatim or with modifications and/or translated into another language. + (Hereinafter, translation is included without limitation in the term + "modification".) Each licensee is addressed as "you". + + Activities other than copying, distribution and modification are not + covered by this License; they are outside its scope. The act of running + the Program is not restricted, and the output from the Program is + covered only if its contents constitute a work based on the Program + (independent of having been made by running the Program). Whether that + is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's source + code as you receive it, in any medium, provided that you conspicuously + and appropriately publish on each copy an appropriate copyright notice + and disclaimer of warranty; keep intact all the notices that refer to + this License and to the absence of any warranty; and give any other + recipients of the Program a copy of this License along with the Program. + + You may charge a fee for the physical act of transferring a copy, and + you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion of + it, thus forming a work based on the Program, and copy and distribute + such modifications or work under the terms of Section 1 above, provided + that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any part + thereof, to be licensed as a whole at no charge to all third parties + under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a notice + that there is no warranty (or else, saying that you provide a + warranty) and that users may redistribute the program under these + conditions, and telling the user how to view a copy of this License. + (Exception: if the Program itself is interactive but does not + normally print such an announcement, your work based on the Program + is not required to print an announcement.) + + These requirements apply to the modified work as a whole. If + identifiable sections of that work are not derived from the Program, and + can be reasonably considered independent and separate works in + themselves, then this License, and its terms, do not apply to those + sections when you distribute them as separate works. But when you + distribute the same sections as part of a whole which is a work based on + the Program, the distribution of the whole must be on the terms of this + License, whose permissions for other licensees extend to the entire + whole, and thus to each and every part regardless of who wrote it. + + Thus, it is not the intent of this section to claim rights or contest + your rights to work written entirely by you; rather, the intent is to + exercise the right to control the distribution of derivative or + collective works based on the Program. + + In addition, mere aggregation of another work not based on the Program + with the Program (or with a work based on the Program) on a volume of a + storage or distribution medium does not bring the other work under the + scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, + under Section 2) in object code or executable form under the terms of + Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your cost + of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed + only for noncommercial distribution and only if you received the + program in object code or executable form with such an offer, in + accord with Subsection b above.) + + The source code for a work means the preferred form of the work for + making modifications to it. For an executable work, complete source code + means all the source code for all modules it contains, plus any + associated interface definition files, plus the scripts used to control + compilation and installation of the executable. However, as a special + exception, the source code distributed need not include anything that is + normally distributed (in either source or binary form) with the major + components (compiler, kernel, and so on) of the operating system on + which the executable runs, unless that component itself accompanies the + executable. + + If distribution of executable or object code is made by offering access + to copy from a designated place, then offering equivalent access to copy + the source code from the same place counts as distribution of the source + code, even though third parties are not compelled to copy the source + along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program + except as expressly provided under this License. Any attempt otherwise + to copy, modify, sublicense or distribute the Program is void, and will + automatically terminate your rights under this License. However, parties + who have received copies, or rights, from you under this License will + not have their licenses terminated so long as such parties remain in + full compliance. + + 5. You are not required to accept this License, since you have not + signed it. However, nothing else grants you permission to modify or + distribute the Program or its derivative works. These actions are + prohibited by law if you do not accept this License. Therefore, by + modifying or distributing the Program (or any work based on the + Program), you indicate your acceptance of this License to do so, and all + its terms and conditions for copying, distributing or modifying the + Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the + Program), the recipient automatically receives a license from the + original licensor to copy, distribute or modify the Program subject to + these terms and conditions. You may not impose any further restrictions + on the recipients' exercise of the rights granted herein. You are not + responsible for enforcing compliance by third parties to this License. + + 7. If, as a consequence of a court judgment or allegation of patent + infringement or for any other reason (not limited to patent issues), + conditions are imposed on you (whether by court order, agreement or + otherwise) that contradict the conditions of this License, they do not + excuse you from the conditions of this License. If you cannot distribute + so as to satisfy simultaneously your obligations under this License and + any other pertinent obligations, then as a consequence you may not + distribute the Program at all. For example, if a patent license would + not permit royalty-free redistribution of the Program by all those who + receive copies directly or indirectly through you, then the only way you + could satisfy both it and this License would be to refrain entirely from + distribution of the Program. + + If any portion of this section is held invalid or unenforceable under + any particular circumstance, the balance of the section is intended to + apply and the section as a whole is intended to apply in other + circumstances. + + It is not the purpose of this section to induce you to infringe any + patents or other property right claims or to contest validity of any + such claims; this section has the sole purpose of protecting the + integrity of the free software distribution system, which is implemented + by public license practices. Many people have made generous + contributions to the wide range of software distributed through that + system in reliance on consistent application of that system; it is up to + the author/donor to decide if he or she is willing to distribute + software through any other system and a licensee cannot impose that choice. + + This section is intended to make thoroughly clear what is believed to be + a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in + certain countries either by patents or by copyrighted interfaces, the + original copyright holder who places the Program under this License may + add an explicit geographical distribution limitation excluding those + countries, so that distribution is permitted only in or among countries + not thus excluded. In such case, this License incorporates the + limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new + versions of the General Public License from time to time. Such new + versions will be similar in spirit to the present version, but may + differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the Program + specifies a version number of this License which applies to it and "any + later version", you have the option of following the terms and + conditions either of that version or of any later version published by + the Free Software Foundation. If the Program does not specify a version + number of this License, you may choose any version ever published by the + Free Software Foundation. + + 10. If you wish to incorporate parts of the Program into other free + programs whose distribution conditions are different, write to the + author to ask for permission. For software which is copyrighted by the + Free Software Foundation, write to the Free Software Foundation; we + sometimes make exceptions for this. Our decision will be guided by the + two goals of preserving the free status of all derivatives of our free + software and of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO + WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. + EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR + OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, + EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE + ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH + YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL + NECESSARY SERVICING, REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN + WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY + AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR + DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL + DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM + (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED + INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF + THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR + OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest + possible use to the public, the best way to achieve this is to make it + free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest to + attach them to the start of each source file to most effectively convey + the exclusion of warranty; and each file should have at least the + "copyright" line and a pointer to where the full notice is found. + + One line to give the program's name and a brief idea of what it does. + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA + + Also add information on how to contact you by electronic and paper mail. + + If the program is interactive, make it output a short notice like this + when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type + `show w'. This is free software, and you are welcome to redistribute + it under certain conditions; type `show c' for details. + + The hypothetical commands `show w' and `show c' should show the + appropriate parts of the General Public License. Of course, the commands + you use may be called something other than `show w' and `show c'; they + could even be mouse-clicks or menu items--whatever suits your program. + + You should also get your employer (if you work as a programmer) or your + school, if any, to sign a "copyright disclaimer" for the program, if + necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + program `Gnomovision' (which makes passes at compilers) written by + James Hacker. + + signature of Ty Coon, 1 April 1989 + Ty Coon, President of Vice + + This General Public License does not permit incorporating your program + into proprietary programs. If your program is a subroutine library, you + may consider it more useful to permit linking proprietary applications + with the library. If this is what you want to do, use the GNU Library + General Public License instead of this License. + +--- + +## CLASSPATH EXCEPTION + + Linking this library statically or dynamically with other modules is + making a combined work based on this library. Thus, the terms and + conditions of the GNU General Public License version 2 cover the whole + combination. + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent + modules, and to copy and distribute the resulting executable under + terms of your choice, provided that you also meet, for each linked + independent module, the terms and conditions of the license of that + module. An independent module is a module which is not derived from or + based on this library. If you modify this library, you may extend this + exception to your version of the library, but you are not obligated to + do so. If you do not wish to do so, delete this exception statement + from your version. diff --git a/tck/src/main/resources/ee/.DS_Store b/tck/src/main/resources/ee/.DS_Store new file mode 100644 index 00000000..d54fc2d9 Binary files /dev/null and b/tck/src/main/resources/ee/.DS_Store differ diff --git a/tck/src/main/resources/ee/jakarta/.DS_Store b/tck/src/main/resources/ee/jakarta/.DS_Store new file mode 100644 index 00000000..50f0ea20 Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/.DS_Store differ diff --git a/tck/src/main/resources/ee/jakarta/tck/.DS_Store b/tck/src/main/resources/ee/jakarta/tck/.DS_Store new file mode 100644 index 00000000..4aae2c69 Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/.DS_Store differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/.DS_Store b/tck/src/main/resources/ee/jakarta/tck/pages/.DS_Store new file mode 100644 index 00000000..f9538889 Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/pages/.DS_Store differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/.DS_Store b/tck/src/main/resources/ee/jakarta/tck/pages/api/.DS_Store new file mode 100644 index 00000000..0cced635 Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/pages/api/.DS_Store differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/.DS_Store b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/.DS_Store new file mode 100644 index 00000000..a6bbfbff Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/.DS_Store differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/arrayelresolver/ArrayELResolverTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/arrayelresolver/ArrayELResolverTest.jsp new file mode 100644 index 00000000..496d20aa --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/arrayelresolver/ArrayELResolverTest.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/arrayelresolver.tld" %> + +begin + +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/arrayelresolver/WEB-INF/arrayelresolver.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/arrayelresolver/WEB-INF/arrayelresolver.tld new file mode 100644 index 00000000..5e45cd41 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/arrayelresolver/WEB-INF/arrayelresolver.tld @@ -0,0 +1,33 @@ + + + + + + 1.0 + ArrayELResolver + + ArrayELResolver API tests + ArrayELResolverTag + ee.jakarta.tck.pages.api.jakarta_el.arrayelresolver.ArrayELResolverTag + empty + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/arrayelresolver/jsp_arrayelresolver_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/arrayelresolver/jsp_arrayelresolver_web.xml new file mode 100644 index 00000000..c84e4ac5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/arrayelresolver/jsp_arrayelresolver_web.xml @@ -0,0 +1,25 @@ + + + + + ArrayELResolver + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/beanelresolver/BeanELResolverTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/beanelresolver/BeanELResolverTest.jsp new file mode 100644 index 00000000..85ba0b64 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/beanelresolver/BeanELResolverTest.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/beanelresolver.tld" %> + +begin + +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/beanelresolver/WEB-INF/beanelresolver.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/beanelresolver/WEB-INF/beanelresolver.tld new file mode 100644 index 00000000..3a4c718d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/beanelresolver/WEB-INF/beanelresolver.tld @@ -0,0 +1,33 @@ + + + + + + 1.0 + BeanELResolver + + BeanELResolver API tests + BeanELResolverTag + ee.jakarta.tck.pages.api.jakarta_el.beanelresolver.BeanELResolverTag + empty + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/beanelresolver/jsp_beanelresolver_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/beanelresolver/jsp_beanelresolver_web.xml new file mode 100644 index 00000000..3369c1cf --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/beanelresolver/jsp_beanelresolver_web.xml @@ -0,0 +1,25 @@ + + + + + BeanELResolver + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/compelresolver/CompositeELResolverTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/compelresolver/CompositeELResolverTest.jsp new file mode 100644 index 00000000..427660b5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/compelresolver/CompositeELResolverTest.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/compelresolver.tld" %> + +begin + +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/compelresolver/WEB-INF/compelresolver.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/compelresolver/WEB-INF/compelresolver.tld new file mode 100644 index 00000000..ed882b72 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/compelresolver/WEB-INF/compelresolver.tld @@ -0,0 +1,33 @@ + + + + + + 1.0 + CompositeELResolver + + CompositeELResolver API tests + CompositeELResolverTag + ee.jakarta.tck.pages.api.jakarta_el.compelresolver.CompositeELResolverTag + empty + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/compelresolver/jsp_compelresolver_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/compelresolver/jsp_compelresolver_web.xml new file mode 100644 index 00000000..0a32022a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/compelresolver/jsp_compelresolver_web.xml @@ -0,0 +1,28 @@ + + + + + CompositeELResolver + + 5 + + + ee.jakarta.tck.pages.common.util.InstallCompositeELResolverListener + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/createmethexpr/CreateMethodExpressionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/createmethexpr/CreateMethodExpressionTest.jsp new file mode 100644 index 00000000..125c4d2a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/createmethexpr/CreateMethodExpressionTest.jsp @@ -0,0 +1,65 @@ +<%-- + + Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + jakarta.el.MethodExpression, + jakarta.el.MethodInfo, + jakarta.el.ELContext"%> +<%@ page contentType="text/plain" %> + +<%! +private static final String METHOD_EXPR = "string-literal"; +%> + +<% + if (pageContext != null) { + ELContext elContext = pageContext.getELContext(); + + if (elContext != null) { + JspApplicationContext jaContext = + JspFactory.getDefaultFactory().getJspApplicationContext( + pageContext.getServletContext()); + if (jaContext != null) { + + try { + MethodExpression mexp = + jaContext.getExpressionFactory().createMethodExpression( + elContext, METHOD_EXPR, java.lang.String.class, + new Class[] { }); + + if (mexp != null) { + + MethodInfo minfo = mexp.getMethodInfo(elContext); + String name = (String) minfo.getName(); + out.println("Test PASSED"); + } + else + out.println("Test FAILED. Null value returned for expression."); + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "CreateMethodExpressionTest"); + } + } + else + out.println("Test FAILED. Unable to obtain JspApplicationContext"); + } + else + out.println("Test FAILED. Unable to obtain ELContext"); + } + else + out.println("Test FAILED. Unable to obtain PageContext."); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/createmethexpr/jsp_createmethexpr_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/createmethexpr/jsp_createmethexpr_web.xml new file mode 100644 index 00000000..db2702f1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/createmethexpr/jsp_createmethexpr_web.xml @@ -0,0 +1,25 @@ + + + + + CreateMethodExpression + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/createvalexpr/CreateValueExpressionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/createvalexpr/CreateValueExpressionTest.jsp new file mode 100644 index 00000000..2f648588 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/createvalexpr/CreateValueExpressionTest.jsp @@ -0,0 +1,70 @@ +<%-- + + Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + jakarta.el.ValueExpression, + jakarta.el.ELContext"%> +<%@ page contentType="text/plain" %> + +<%! +private static final String VARIABLE_EXPR = "${foo}"; +private static final String EXPECTED_VALUE = "bar"; +%> + +<% + if (pageContext != null) { + ELContext elContext = pageContext.getELContext(); + + if (elContext != null) { + JspApplicationContext jaContext = + JspFactory.getDefaultFactory().getJspApplicationContext( + pageContext.getServletContext()); + if (jaContext != null) { + + try { + ValueExpression vexp = + jaContext.getExpressionFactory().createValueExpression( + elContext, VARIABLE_EXPR, VARIABLE_EXPR.getClass()); + + if (vexp != null) { + + vexp.setValue(elContext, EXPECTED_VALUE); + String name = (String) vexp.getValue(elContext); + + if (name.equals(EXPECTED_VALUE)) + out.println("Test PASSED"); + else { + out.println("Test FAILED. Expected value = " + EXPECTED_VALUE); + out.println("Computed value = " + name); + } + } + else + out.println("Test FAILED. Null value returned for expression."); + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "CreateValueExpressionTest"); + } + } + else + out.println("Test FAILED. Unable to obtain JspApplicationContext"); + } + else + out.println("Test FAILED. Unable to obtain ELContext"); + } + else + out.println("Test FAILED. Unable to obtain PageContext."); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/createvalexpr/jsp_createvalexpr_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/createvalexpr/jsp_createvalexpr_web.xml new file mode 100644 index 00000000..db2702f1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/createvalexpr/jsp_createvalexpr_web.xml @@ -0,0 +1,25 @@ + + + + + CreateMethodExpression + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/elresolver/ELResolverTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/elresolver/ELResolverTest.jsp new file mode 100644 index 00000000..c88c4eec --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/elresolver/ELResolverTest.jsp @@ -0,0 +1,47 @@ +<%-- + + Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + com.sun.ts.tests.common.el.api.resolver.ResolverTest, + jakarta.el.ELResolver, + jakarta.el.ELContext"%> +<%@ page contentType="text/plain" %> + +<% + if (pageContext != null) { + ELContext elContext = pageContext.getELContext(); + StringBuffer buf = new StringBuffer(); + + if (elContext != null) { + try { + ELResolver resolver = elContext.getELResolver(); + boolean pass = ResolverTest.testELResolver( + elContext, resolver, null, "Color", "blue", buf, false); + out.println(buf.toString()); + if (pass) out.println("Test PASSED."); + } catch (Throwable t) { + out.println(buf.toString()); + JspTestUtil.handleThrowable(t, out, "ElResolverTest"); + } + } + else + out.println("Test FAILED. Unable to obtain ELContext"); + } + else + out.println("Test FAILED. Unable to obtain PageContext."); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/elresolver/jsp_elresolver_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/elresolver/jsp_elresolver_web.xml new file mode 100644 index 00000000..2ca5e09a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/elresolver/jsp_elresolver_web.xml @@ -0,0 +1,25 @@ + + + + + ELResolver + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/listelresolver/ListELResolverTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/listelresolver/ListELResolverTest.jsp new file mode 100644 index 00000000..8f10cb1a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/listelresolver/ListELResolverTest.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/listelresolver.tld" %> + +begin + +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/listelresolver/WEB-INF/listelresolver.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/listelresolver/WEB-INF/listelresolver.tld new file mode 100644 index 00000000..ac274a94 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/listelresolver/WEB-INF/listelresolver.tld @@ -0,0 +1,33 @@ + + + + + + 1.0 + ListELResolver + + ListELResolver API tests + ListELResolverTag + ee.jakarta.tck.pages.api.jakarta_el.listelresolver.ListELResolverTag + empty + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/listelresolver/jsp_listelresolver_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/listelresolver/jsp_listelresolver_web.xml new file mode 100644 index 00000000..a438118f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/listelresolver/jsp_listelresolver_web.xml @@ -0,0 +1,25 @@ + + + + + ListELResolver + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/mapelresolver/MapELResolverTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/mapelresolver/MapELResolverTest.jsp new file mode 100644 index 00000000..9732619a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/mapelresolver/MapELResolverTest.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/mapelresolver.tld" %> + +begin + +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/mapelresolver/WEB-INF/mapelresolver.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/mapelresolver/WEB-INF/mapelresolver.tld new file mode 100644 index 00000000..303b302d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/mapelresolver/WEB-INF/mapelresolver.tld @@ -0,0 +1,33 @@ + + + + + + 1.0 + MapELResolver + + MapELResolver API tests + MapELResolverTag + ee.jakarta.tck.pages.api.jakarta_el.mapelresolver.MapELResolverTag + empty + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/mapelresolver/jsp_mapelresolver_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/mapelresolver/jsp_mapelresolver_web.xml new file mode 100644 index 00000000..06e9bcc0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/mapelresolver/jsp_mapelresolver_web.xml @@ -0,0 +1,25 @@ + + + + + MapELResolver + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/methodinfo/MethodInfoTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/methodinfo/MethodInfoTest.jsp new file mode 100644 index 00000000..b97fb74e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/methodinfo/MethodInfoTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/methodinfo.tld" %> + + +begin + + vect is ${vect} + + result is ${result} +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/methodinfo/WEB-INF/methodinfo.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/methodinfo/WEB-INF/methodinfo.tld new file mode 100644 index 00000000..2762b83c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/methodinfo/WEB-INF/methodinfo.tld @@ -0,0 +1,55 @@ + + + + + + 1.0 + MethodInfo + + MethodInfo API tests + MethodInfoTag + ee.jakarta.tck.pages.api.jakarta_el.methodinfo.MethodInfoTag + empty + + methExpr + true + + boolean add(Object) + + + + + Substitute tag for jstl c:set + set + ee.jakarta.tck.pages.common.tags.tck.SetTag + empty + + var + true + + + value + true + true + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/methodinfo/jsp_methodinfo_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/methodinfo/jsp_methodinfo_web.xml new file mode 100644 index 00000000..328a7cda --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/methodinfo/jsp_methodinfo_web.xml @@ -0,0 +1,25 @@ + + + + + MethodInfo + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/resourcebundleelresolver/ResourceBundleELResolverTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/resourcebundleelresolver/ResourceBundleELResolverTest.jsp new file mode 100644 index 00000000..e2b3b6fd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/resourcebundleelresolver/ResourceBundleELResolverTest.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/resourcebundleelresolver.tld" %> + +begin + +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/resourcebundleelresolver/WEB-INF/resourcebundleelresolver.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/resourcebundleelresolver/WEB-INF/resourcebundleelresolver.tld new file mode 100644 index 00000000..ce64c605 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/resourcebundleelresolver/WEB-INF/resourcebundleelresolver.tld @@ -0,0 +1,33 @@ + + + + + + 1.0 + ResourceBundleELResolver + + ResourceBundleELResolver API tests + ResourceBundleELResolverTag + ee.jakarta.tck.pages.api.jakarta_el.resourcebundleelresolver.ResourceBundleELResolverTag + empty + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/resourcebundleelresolver/jsp_resourcebundleelresolver_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/resourcebundleelresolver/jsp_resourcebundleelresolver_web.xml new file mode 100644 index 00000000..13783e1d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/resourcebundleelresolver/jsp_resourcebundleelresolver_web.xml @@ -0,0 +1,25 @@ + + + + + ResourceBundleELResolver + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/valexpression/ValueExpressionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/valexpression/ValueExpressionTest.jsp new file mode 100644 index 00000000..43654b99 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/valexpression/ValueExpressionTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/valexpression.tld" %> + + +begin
          + +end
          diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/valexpression/WEB-INF/valexpression.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/valexpression/WEB-INF/valexpression.tld new file mode 100644 index 00000000..890f9358 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/valexpression/WEB-INF/valexpression.tld @@ -0,0 +1,54 @@ + + + + + + 1.0 + ValueExpression + + ValueExpression API tests + ValueExpressionTag + ee.jakarta.tck.pages.api.jakarta_el.valexpression.ValueExpressionTag + empty + + valExpr + true + + java.lang.String + + + + + Substitute tag for jstl c:set + set + ee.jakarta.tck.pages.common.tags.tck.SetTag + empty + + var + true + + + value + true + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/valexpression/jsp_valexpr_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/valexpression/jsp_valexpr_web.xml new file mode 100644 index 00000000..e89706cd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_el/valexpression/jsp_valexpr_web.xml @@ -0,0 +1,25 @@ + + + + + ValueExpression + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/implicitobjelresolver/ImplicitObjELResolverTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/implicitobjelresolver/ImplicitObjELResolverTest.jsp new file mode 100644 index 00000000..b677e5f7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/implicitobjelresolver/ImplicitObjELResolverTest.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/implicitobjelresolver.tld" %> + +begin + +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/implicitobjelresolver/WEB-INF/implicitobjelresolver.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/implicitobjelresolver/WEB-INF/implicitobjelresolver.tld new file mode 100644 index 00000000..5036c3fc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/implicitobjelresolver/WEB-INF/implicitobjelresolver.tld @@ -0,0 +1,33 @@ + + + + + + 1.0 + ImplicitObjELResolver + + ImplicitObjELResolver API tests + ImplicitObjELResolverTag + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.el.implicitobjelresolver.ImplicitObjELResolverTag + empty + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/implicitobjelresolver/jsp_implicitobjelresolver_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/implicitobjelresolver/jsp_implicitobjelresolver_web.xml new file mode 100644 index 00000000..fe04af06 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/implicitobjelresolver/jsp_implicitobjelresolver_web.xml @@ -0,0 +1,25 @@ + + + + + ImplicitObjectELResolver + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/scopedattrelresolver/ScopedAttrELResolverTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/scopedattrelresolver/ScopedAttrELResolverTest.jsp new file mode 100644 index 00000000..47b2d383 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/scopedattrelresolver/ScopedAttrELResolverTest.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/scopedattrelresolver.tld" %> + +begin + +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/scopedattrelresolver/WEB-INF/scopedattrelresolver.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/scopedattrelresolver/WEB-INF/scopedattrelresolver.tld new file mode 100644 index 00000000..700833dc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/scopedattrelresolver/WEB-INF/scopedattrelresolver.tld @@ -0,0 +1,33 @@ + + + + + + 1.0 + ScopedAttrELResolver + + ScopedAttrELResolver API tests + ScopedAttrELResolverTag + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.el.scopedattrelresolver.ScopedAttrELResolverTag + empty + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/scopedattrelresolver/jsp_scopedattrelresolver_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/scopedattrelresolver/jsp_scopedattrelresolver_web.xml new file mode 100644 index 00000000..1d58e45f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/el/scopedattrelresolver/jsp_scopedattrelresolver_web.xml @@ -0,0 +1,25 @@ + + + + + ScopedAttrELResolver + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/errordata/ErrorDataTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/errordata/ErrorDataTest.jsp new file mode 100644 index 00000000..efd0cff3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/errordata/ErrorDataTest.jsp @@ -0,0 +1,154 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + java.io.IOException" %> +<%@ page contentType="text/plain" %> + +<%-- Begin test definitions --%> + +<%! + private static final ErrorData getErrorDataInstance() { + return new ErrorData(new RuntimeException("runtime"), 501, "/uri", "TestServlet"); + } +%> + +<%! + public void errorDataConstructorTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + ErrorData data = getErrorDataInstance(); + if (data != null) { + out.print("Test PASSED"); + } else { + out.print("Test FAILED. Constructor of new ErrorData object failed."); + } + } +%> + +<%! + public void errorDataGetThrowableTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + ErrorData data = getErrorDataInstance(); + Throwable t = null; + + if (data != null) { + t = data.getThrowable(); + } else { + out.println("Test FAILED. ErrorData instance was null."); + return; + } + + if (t != null) { + String message = t.getMessage(); + if (message != null && message.equals("runtime")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected throwable message of 'runtime'"); + out.println("Message returned: " + message); + } + } else { + out.println("Test FAILED. ErrorData.getThrowable() returned null."); + } + } +%> + +<%! + public void errorDataGetStatusCodeTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + ErrorData data = getErrorDataInstance(); + int code = 0; + + if (data != null) { + code = data.getStatusCode(); + } else { + out.println("Test FAILED. ErrorData instance was null."); + return; + } + + if (code == 501) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected a status code of 501."); + out.println("Status code recieved: " + code); + } + } +%> + +<%! + public void errorDataGetRequestURITest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + ErrorData data = getErrorDataInstance(); + String uri = null; + + if (data != null) { + uri = data.getRequestURI(); + } else { + out.println("Test FAILED. ErrorData instance was null."); + return; + } + + if (uri != null) { + if (uri.equals("/uri")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected a value of '/uri'."); + out.println("Received: " + uri); + } + } else { + out.println("Test FAILED. ErrorData.getRequestURI() returned null."); + } + } +%> + +<%! + public void errorDataGetServletNameTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + ErrorData data = getErrorDataInstance(); + String name = null; + + if (data != null) { + name = data.getServletName(); + } else { + out.println("Test FAILED. ErrorData instance was null."); + return; + } + + if (name != null) { + if (name.equals("TestServlet")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected a value of 'TestServlet'"); + out.println("Received: " + name); + } + } else { + out.println("Test FAILED. ErrorData.getServletName() returned null."); + } + } +%> + +<% JspTestUtil.invokeTest(this, request, response, out); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/errordata/jsp_errordata_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/errordata/jsp_errordata_web.xml new file mode 100644 index 00000000..efda9187 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/errordata/jsp_errordata_web.xml @@ -0,0 +1,25 @@ + + + + + JspErrorData + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspapplicationcontext/AddELResolverTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspapplicationcontext/AddELResolverTest.jsp new file mode 100644 index 00000000..640aa784 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspapplicationcontext/AddELResolverTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +begin +${Foo} +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspapplicationcontext/IllegalStateExceptionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspapplicationcontext/IllegalStateExceptionTest.jsp new file mode 100644 index 00000000..81f3d8dc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspapplicationcontext/IllegalStateExceptionTest.jsp @@ -0,0 +1,52 @@ +<%-- + + Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.jspapplicationcontext.FooELResolver, + jakarta.el.ELContext, + jakarta.el.ELResolver"%> +<%@ page contentType="text/plain" %> + +<% + if (pageContext != null) { + ELContext elContext = pageContext.getELContext(); + + if (elContext != null) { + JspApplicationContext jaContext = + JspFactory.getDefaultFactory().getJspApplicationContext( + pageContext.getServletContext()); + if (jaContext != null) { + + try { + jaContext.addELResolver(new FooELResolver()); + out.println("addELResolver call succeeded. Test FAILED."); + } catch (IllegalStateException ise) { + out.println("Test PASSED."); + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "IllegalStateExceptionTest"); + } + } + else + out.println("Test FAILED. Unable to obtain JspApplicationContext"); + } + else + out.println("Test FAILED. Unable to obtain ELContext"); + } + else + out.println("Test FAILED. Unable to obtain PageContext."); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspapplicationcontext/jsp_jspapplicationcontext_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspapplicationcontext/jsp_jspapplicationcontext_web.xml new file mode 100644 index 00000000..7e0d6a6c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspapplicationcontext/jsp_jspapplicationcontext_web.xml @@ -0,0 +1,28 @@ + + + + + JspApplicationContext + + 5 + + + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.jspapplicationcontext.InstallFooListener + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspengineinfo/JspEngineInfoTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspengineinfo/JspEngineInfoTest.jsp new file mode 100644 index 00000000..0031c146 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspengineinfo/JspEngineInfoTest.jsp @@ -0,0 +1,58 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + java.io.IOException" %> +<%@ page contentType="text/plain" %> + +<%-- Begin test definitions --%> + +<%! + public void jspEngineInfoGetSpecificationVersionTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + JspFactory factory = JspFactory.getDefaultFactory(); + if (factory != null) { + JspEngineInfo info = factory.getEngineInfo(); + if (info != null) { + String engineInfo = info.getSpecificationVersion(); + if (engineInfo == null) { + out.println("Test PASSED"); + } else { + byte[] ei = engineInfo.getBytes(); + if (Character.isDigit((char) ei[0])) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. String returned by" + + "JspEngineInfo.getSpecificationVersion does not" + + "with a number."); + } + } + } else { + out.println("Test FAILED. JspFactory.getEngineInfo() returned null."); + } + } else { + out.println("Test FAILED. JspFactory.getDefaultFactory() returned null."); + } + } +%> + +<%-- Test invocation --%> + +<% JspTestUtil.invokeTest(this, request, response, out); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspengineinfo/jsp_jspengineinfo_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspengineinfo/jsp_jspengineinfo_web.xml new file mode 100644 index 00000000..91767cd9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspengineinfo/jsp_jspengineinfo_web.xml @@ -0,0 +1,25 @@ + + + + + JspEngineInfo + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspexception/JspExceptionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspexception/JspExceptionTest.jsp new file mode 100644 index 00000000..60de3d2d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspexception/JspExceptionTest.jsp @@ -0,0 +1,142 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + java.io.IOException" %> +<%@ page contentType="text/plain" %> + +<%-- Begin test definitions --%> + +<%! + public void jspExceptionDefaultCtorTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + JspException je = new JspException(); + if (je != null) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. No Exception created."); + } + } +%> + +<%! + public void jspExceptionMessageCtorTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + JspException je = new JspException("Exception Message"); + if (je != null) { + String message = je.getMessage(); + if (message != null && message.equals("Exception Message")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected a message of 'Exception Message'"); + out.println("Received: " + message); + } + } else { + out.println("Test FAILED. No Exception created."); + } + } +%> + +<%! + public void jspExceptionCauseCtorTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + JspException je = new JspException(new NullPointerException()); + if (je != null) { + Throwable t = je.getCause(); + if (t != null && t instanceof NullPointerException) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected a Throwable of type NullPointerException"); + out.println("Received: " + t); + } + } else { + out.println("Test FAILED. No Exception created."); + } + } +%> + +<%! + public void jspExceptionCauseMessageCtorTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + JspException je = new JspException("Exception Message", + new ServletException()); + if (je != null) { + String message = je.getMessage(); + if (message != null && message.equals("Exception Message")) { + Throwable t = je.getCause(); + if (t != null && t instanceof ServletException) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected a Throwable of type ServletException"); + out.println("Received: " + t); + } + } else { + out.println("Test FAILED. Expected a message of 'Exception Message'"); + out.println("Received: " + message); + } + } else { + out.println("Test FAILED. No Exception created."); + } + } +%> + +<%! + public void jspExceptionGetRootCauseTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + JspException je = new JspException(new ServletException()); + JspException je1 = new JspException("exception", new NullPointerException()); + + Throwable t = je.getCause(); + Throwable t1 = je1.getCause(); + if (t != null) { + if (t instanceof ServletException) { + if (t1 != null) { + if (t1 instanceof NullPointerException) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. JspException.getCause returned unexpected" + + " exception: " + t.getClass().getName()); + out.println("Expected: NullPointerException"); + } + } else { + out.println("Test FAILED. JspException.getCause returned null."); + } + } else { + out.println("Test FAILED. JspException.getCause returned unexpected" + + " exception: " + t.getClass().getName()); + out.println("Expected: ServletException"); + } + } else { + out.println("Test FAILED. JspException.getCause returned null."); + } + } +%> + +<%-- Test invocation --%> + +<% JspTestUtil.invokeTest(this, request, response, out); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspexception/jsp_jspexc_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspexception/jsp_jspexc_web.xml new file mode 100644 index 00000000..7a572913 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspexception/jsp_jspexc_web.xml @@ -0,0 +1,25 @@ + + + + + JspException + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspfactory/JspFactoryTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspfactory/JspFactoryTest.jsp new file mode 100644 index 00000000..b4edc6f7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspfactory/JspFactoryTest.jsp @@ -0,0 +1,86 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + java.io.IOException, + ee.jakarta.tck.pages.common.util.SimpleContext" %> +<%@ page contentType="text/plain" %> + +<%-- Begin test definitions --%> + +<%! + public void jspFactoryGetDefaultFactoryTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + JspFactory factory = JspFactory.getDefaultFactory(); + if (factory != null) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. JspFactory.getDefaultFactory() " + + "returned null."); + } + } +%> + +<%! + public void jspFactoryGetPageContextTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + JspFactory factory = JspFactory.getDefaultFactory(); + if (factory != null) { + PageContext pc = factory.getPageContext(this, req, res, "", + true, 2048, true); + if (pc != null) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. JspFactory.getPageContext() returned" + + " null."); + } + } else { + out.println("Test FAILED. JspFactory.getDefaultFactory() " + + "returned null."); + } + } +%> + +<%! + public void jspFactoryGetEngineInfoTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + JspFactory factory = JspFactory.getDefaultFactory(); + if (factory != null) { + JspEngineInfo info = factory.getEngineInfo(); + if (info != null) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. JspFactory.getEngineInfo() " + + "returned null."); + } + } else { + out.println("Test FAILED. JspFactory.getDefaultFactory() " + + "returned null."); + } + } +%> + +<%-- Test invocation --%> + +<% JspTestUtil.invokeTest(this, request, response, out); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspfactory/jsp_jspfactory_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspfactory/jsp_jspfactory_web.xml new file mode 100644 index 00000000..f3ef569f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspfactory/jsp_jspfactory_web.xml @@ -0,0 +1,25 @@ + + + + + JspFactory + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jsptagexception/JspTagExceptionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jsptagexception/JspTagExceptionTest.jsp new file mode 100644 index 00000000..ecc5693d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jsptagexception/JspTagExceptionTest.jsp @@ -0,0 +1,108 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + java.io.IOException" %> +<%@ page contentType="text/plain" %> + +<%-- Begin test definitions --%> + +<%! + public void jspTagExceptionDefaultCtorTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + JspTagException jte = new JspTagException(); + if (jte != null) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. No Exception created."); + } + } +%> + +<%! + public void jspTagExceptionMessageCtorTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + JspTagException jte = new JspTagException("Exception Message"); + if (jte != null) { + String message = jte.getMessage(); + if (message != null && message.equals("Exception Message")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected a message of 'Exception Message'"); + out.println("Received: " + message); + } + } else { + out.println("Test FAILED. No Exception created."); + } + } +%> + +<%! + public void jspTagExceptionCauseCtorTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + JspTagException jte = new JspTagException(new NullPointerException()); + if (jte != null) { + Throwable t = jte.getCause(); + if (t != null && t instanceof NullPointerException) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected a Throwable of type NullPointerException"); + out.println("Received: " + t); + } + } else { + out.println("Test FAILED. No Exception created."); + } + } +%> + +<%! + public void jspTagExceptionCauseMessageCtorTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + JspTagException jte = new JspTagException("Exception Message", + new ServletException()); + if (jte != null) { + String message = jte.getMessage(); + if (message != null && message.equals("Exception Message")) { + Throwable t = jte.getCause(); + if (t != null && t instanceof ServletException) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected a Throwable of type ServletException"); + out.println("Received: " + t); + } + } else { + out.println("Test FAILED. Expected a message of 'Exception Message'"); + out.println("Received: " + message); + } + } else { + out.println("Test FAILED. No Exception created."); + } + } +%> + +<%-- Test invocation --%> + +<% JspTestUtil.invokeTest(this, request, response, out); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jsptagexception/jsp_jsptagexc_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jsptagexception/jsp_jsptagexc_web.xml new file mode 100644 index 00000000..6439c693 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jsptagexception/jsp_jsptagexc_web.xml @@ -0,0 +1,25 @@ + + + + + JspTagException + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspwriter/CloseValidator.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspwriter/CloseValidator.jsp new file mode 100644 index 00000000..e60554a5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspwriter/CloseValidator.jsp @@ -0,0 +1,46 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + java.io.IOException" %> + +<%@ page contentType="text/plain" %> + +<% + if (application.getAttribute("flush.exception") != null || + out.getBufferSize() == 0) { + if (application.getAttribute("write.exception") != null) { + if (application.getAttribute("close.exception") == null) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Subsequent call to JspWriter.close() " + + "illegally threw another IOException."); + } + } else { + out.println("Test FAILED. Stream was closed and a call to JspWriter." + + "print() didn't cause an IOException."); + } + } else { + out.println("Test FAILED. Stream was closed and a call to JspWriter." + + "flush() didn't cause an IOException."); + } + + application.removeAttribute("flush.exception"); + application.removeAttribute("write.exception"); + application.removeAttribute("close.exception"); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspwriter/JspWriterTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspwriter/JspWriterTest.jsp new file mode 100644 index 00000000..e6256dcb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspwriter/JspWriterTest.jsp @@ -0,0 +1,477 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + java.io.IOException" %> + + +<%@ page contentType="text/plain" %> + +<%! + private static final String APPLICATIONCTX_ATTR = + "ee.jakarta.tck.pages.api.applicationContext"; +%> + +<%-- Begin test definitions --%> + +<%! + public void jspWriterNewLineTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + out.print("new line"); + out.newLine(); + } +%> + +<%! + public void jspWriterPrintBooleanTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + out.print(true); + out.print(false); + } +%> + +<%! + public void jspWriterPrintCharTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + out.print('c'); + out.print('b'); + } +%> + +<%! + public void jspWriterPrintIntTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + out.print(Integer.MIN_VALUE); + out.print(Integer.MAX_VALUE); + } +%> + +<%! + public void jspWriterPrintLongTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + out.print(Long.MIN_VALUE); + out.print(Long.MAX_VALUE); + } +%> + +<%! + public void jspWriterPrintFloatTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + out.print(Float.MIN_VALUE); + out.print(Float.MAX_VALUE); + } +%> + +<%! + public void jspWriterPrintDoubleTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + out.print(Double.MIN_VALUE); + out.print(Double.MAX_VALUE); + } +%> + +<%! + public void jspWriterPrintCharArrayTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + char[] c = new char[89]; + for (short i = 33, idx = 0; i < 90; i++, idx++) { + c[idx] = (char) i; + } + out.print(c); + out.print(c); + } +%> + +<%! + public void jspWriterPrintStringTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + out.print("Test "); + out.print("Passed"); + } +%> + +<%! + public void jspWriterPrintNullStringTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + String nullString = null; + out.print(nullString); + } +%> + +<%! + public void jspWriterPrintObjectTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + Object o1 = new String("Test "); + Object o2 = new String("Passed"); + out.print(o1); + out.print(o2); + } +%> + +<%! + public void jspWriterPrintlnTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + out.print("Test Passed"); + out.println(); + } +%> + +<%! + public void jspWriterPrintlnBooleanTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + out.println(true); + out.println(false); + } +%> + +<%! + public void jspWriterPrintlnCharTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + out.println('a'); + out.println('B'); + } +%> + +<%! + public void jspWriterPrintlnIntTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + out.println(Integer.MIN_VALUE); + out.println(Integer.MAX_VALUE); + } +%> + +<%! + public void jspWriterPrintlnLongTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + out.println(Long.MIN_VALUE); + out.println(Long.MAX_VALUE); + } +%> + +<%! + public void jspWriterPrintlnFloatTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + out.println(Float.MIN_VALUE); + out.println(Float.MAX_VALUE); + } +%> + +<%! + public void jspWriterPrintlnDoubleTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + out.println(Double.MIN_VALUE); + out.println(Double.MAX_VALUE); + } +%> + +<%! + public void jspWriterPrintlnCharArrayTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + char[] c = new char[89]; + for (short i = 33, idx = 0; i < 90; i++, idx++) { + c[idx] = (char) i; + } + out.println(c); + out.println(c); + } +%> + +<%! + public void jspWriterPrintlnStringTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + out.println("Test "); + out.println("Passed"); + } +%> + +<%! + public void jspWriterPrintlnNullStringTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + String nullString = null; + out.println(nullString); + } +%> + +<%! + public void jspWriterPrintlnObjectTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + Object o1 = new String("Test "); + Object o2 = new String("Passed"); + out.println(o1); + out.println(o2); + } +%> + +<%! + public void jspWriterClearTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + if (out.getBufferSize() > 0) { + out.println("Test FAILED. JspWriter not cleared."); + out.clear(); + out.println("Test PASSED"); + } else { + out.println("Test PASSED"); + } + } +%> + +<%! + public void jspWriterClearIOExceptionTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + if (out.getBufferSize() > 0) { + out.println("Arbitrary text"); + out.flush(); + try { + out.clear(); + } catch (Throwable t) { + if (t instanceof IOException) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. JspWriter.clear() did throw" + + "an Exception, but was not an IOException as expected."); + out.println("Received:" + t.toString()); + } + } + } else { + out.println("Test PASSED"); + } + } +%> + +<%! + public void jspWriterClearBufferTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + if (out.getBufferSize() > 0) { + out.println("Arbitrary text"); + out.flush(); + out.println("Test FAILED. JspWriter not cleared."); + try { + out.clearBuffer(); + } catch (Throwable t) { + if (t instanceof IOException) { + out.println("Test FAILED. IOException shouldn't have been" + + "thrown by clearBuffer when called after committing the response."); + return; + } else { + out.println("Test FAILED. Unexpeced Exception."); + out.println(t.toString()); + } + } + out.println("Test PASSED"); + } else { + out.println("Test PASSED"); + } + } +%> + +<%! + // XXX consider alternate implementation + public void jspWriterFlushTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + if (out.getBufferSize() > 0) { + out.println("Arbitrary test"); + out.flush(); + try { + out.clear(); + } catch (Throwable t) { + if (t instanceof IOException) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Flush of the stream failed."); + } + } + } else { + out.println("Test PASSED"); + } + } +%> + +<%! + public void jspWriterCloseTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + ServletContext ctx = (ServletContext) req.getAttribute(APPLICATIONCTX_ATTR); + if (ctx != null) { + out.close(); + try { + out.flush(); + } catch (Throwable t) { + if (t instanceof IOException) { + ctx.setAttribute("flush.exception", t); + } + } + + try { + out.println(); + } catch (Throwable t) { + if (t instanceof IOException) { + ctx.setAttribute("write.exception", t); + } + } + + try { + out.close(); + } catch (Throwable t) { + ctx.setAttribute("close.exception", t); + } + } else { + out.println("Test FAILED. Unable to access ServletContext."); + } + } +%> + +<%! + public void jspWriterGetBufferSizeTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + int size = out.getBufferSize(); + if (size > 0) { + if (size >= 8192) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Buffer allocated is not of the expected size."); + out.println("Expected a buffer size greater than or equal to 8192KB"); + out.println("Actual size:" + size); + } + } else { + out.println("Test PASSED"); + } + } +%> + +<%! + public void jspWriterGetRemainingTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + String message = "Arbitrary text"; + int messLength = message.length(); + int size = out.getBufferSize(); + + if (size > 0) { + out.clear(); + int gr1 = out.getRemaining(); + if (size == gr1) { + out.print("Arbitrary text"); + int gr2 = out.getRemaining(); + if (gr2 == (size - messLength)) { + out.clear(); + int gr3 = out.getRemaining(); + if (size == gr3) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. (l3) Unexpected result from JspWriter.getRemaining()."); + out.println("Expected: " + size); + out.println("Received: " + gr3); + } + } else { + out.println("Test FAILED. (l2) Unexpected result from JspWriter.getRemaining()."); + out.println("Expected: " + (size - messLength)); + out.println("Received: " + gr2); + } + } else { + out.println("Test FAILED. (l1) Unexpteced result from JspWriter.getRemaining()."); + out.println("Expected: " + size); + out.println("Received: " + gr1); + } + } else { + out.println("Test PASSED"); + } + } +%> + +<%! + public void jspWriterIsAutoFlushTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + if (out.isAutoFlush() == true) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected JspWriter.isAutoFlush() to return true not false."); + } + } +%> + +<%-- Test invocation --%> + +<% + request.setAttribute(APPLICATIONCTX_ATTR, application); + + if (System.getProperty("line.separator").equals("\n")) { + response.setHeader("Server-EOL", "UNIX"); + } else if (System.getProperty("line.separator").equals("\r\n")) { + response.setHeader("Server-EOL", "WIN32"); + } + + JspTestUtil.invokeTest(this, request, response, out); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspwriter/jsp_jspwriter_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspwriter/jsp_jspwriter_web.xml new file mode 100644 index 00000000..f5b5d829 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/jspwriter/jsp_jspwriter_web.xml @@ -0,0 +1,25 @@ + + + + + JspWriter + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/pagecontext/ErrorPage.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/pagecontext/ErrorPage.jsp new file mode 100644 index 00000000..88c64816 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/pagecontext/ErrorPage.jsp @@ -0,0 +1,47 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" isErrorPage="true"%> + +<% + if (request.getAttribute("ee.jakarta.tck.pages.api.checkException") != null) { + Exception e = pageContext.getException(); + if (e != null) { + if (e == exception) { + out.println("Test PASSED (getException)"); + } else { + out.println("Test FAILED. The Exception as returned by " + + "PageContext.getException is not the same as the " + + "exception scripting variable."); + } + } else { + out.println("Test FAILED. PageContext.getException() returned null."); + } + } else { + out.println("Test PASSED. Error page invoked."); + out.println(exception.getClass().getName()); + out.println(exception.getMessage()); + if (request.getAttribute("ee.jakarta.tck.pages.api.checkErrorData") != null) { + ErrorData data = pageContext.getErrorData(); + if (data != null) { + out.println("ErrorData object obtained."); + } + } + } +%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/pagecontext/PageContextTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/pagecontext/PageContextTest.jsp new file mode 100644 index 00000000..cfe236eb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/pagecontext/PageContextTest.jsp @@ -0,0 +1,1334 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + java.io.IOException, + jakarta.servlet.jsp.tagext.BodyContent, + java.util.Enumeration" %> +<%@ page contentType="text/plain" errorPage="ErrorPage.jsp"%> + +<%! + private static final String PAGECONTEXT_ATTR = + "ee.jakarta.tck.pages.api.pagecontext"; + private static final String SESSION_ATTR = + "ee.jakarta.tck.pages.api.session"; + private static final String PAGE_ATTR = + "ee.jakarta.tck.pages.api.page"; + private static final String CONFIG_ATTR = + "ee.jakarta.tck.pages.api.config"; + private static final String CONTEXT_ATTR = + "ee.jakarta.tck.pages.api.context"; +%> + +<%-- Utility methods --%> +<%! + public static void cleanup(PageContext pc) { + pc.removeAttribute("pageScope", PageContext.PAGE_SCOPE); + pc.removeAttribute("requestScope", PageContext.REQUEST_SCOPE); + pc.removeAttribute("sessionScope", PageContext.SESSION_SCOPE); + pc.removeAttribute("applicationScope", PageContext.APPLICATION_SCOPE); + } +%> + +<%! + public static void fillAllScopes(PageContext pc) { + pc.setAttribute("pageScope", "pageScope"); + pc.setAttribute("requestScope", "requestScope", + PageContext.REQUEST_SCOPE); + pc.setAttribute("sessionScope", "sessionScope", + PageContext.SESSION_SCOPE); + pc.setAttribute("applicationScope", "applicationScope", + PageContext.APPLICATION_SCOPE); + } +%> + +<%! + public static boolean checkValue(Enumeration e, String name, JspWriter out) + throws IOException { + out.println("Checking for attribute '" + name + "'"); + while (e.hasMoreElements()) { + String ele = (String) e.nextElement(); + out.println("Element returned: " + ele); + if (ele.equals(name)) { + out.println("Match found!\n"); + return true; + } + } + out.println("No match found.\n"); + return false; + } +%> + +<%-- Begin test definitions --%> + +<%! + public void pageContextGetSessionTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + HttpSession sess = pc.getSession(); + if (sess != null) { + if (sess == req.getAttribute(SESSION_ATTR)) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Session returned from " + + "PageContext.getSession() is not the same as that " + + "associated with the session scripting variable."); + } + } else { + out.println("Test FAILED. PageContext.getSession() returned null."); + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextGetPageTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + Object o = pc.getPage(); + if (o != null) { + if (o == req.getAttribute(PAGE_ATTR)) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Page object returned from " + + "PageContext.getPage() is not the same as that " + + "associated with the page scripting variable."); + } + } else { + out.println("Test FAILED. PageContext.getPage() returned null."); + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextGetRequestTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + ServletRequest request = pc.getRequest(); + if (request != null) { + if (request == req) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Request object returned from " + + "PageContext.getRequest() is not the same as that " + + "associated with the request scripting variable."); + } + } else { + out.println("Test FAILED. PageContext.getRequest() returned null."); + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextGetResponseTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + ServletResponse response = pc.getResponse(); + if (response != null) { + if (response == res) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Response object returned from " + + "PageContext.getResponse() is not the same as that " + + "associated with the response scripting variable."); + } + } else { + out.println("Test FAILED. PageContext.getRequest() returned null."); + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextGetServletConfigTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + ServletConfig config = pc.getServletConfig(); + if (config != null) { + if (config == req.getAttribute(CONFIG_ATTR)) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. ServletConfig object returned from " + + "PageContext.getServletConfig() is not the same as that " + + "associated with the config scripting variable."); + } + } else { + out.println("Test FAILED. PageContext.getServletConfig() returned null."); + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextGetServletContextTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + ServletContext context = pc.getServletContext(); + if (context != null) { + if (context == req.getAttribute(CONTEXT_ATTR)) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. ServletContext object returned from " + + "PageContext.getServletContext() is not the same as that " + + "associated with the application scripting variable."); + } + } else { + out.println("Test FAILED. PageContext.getServletContext() returned null."); + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextGetExceptionTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + req.setAttribute("ee.jakarta.tck.pages.api.checkException", + new Boolean(true)); + throw new RuntimeException("PageContext.getException() test"); + } +%> + +<%! + public void pageContextForwardContextPathTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + pc.forward("/Resource.jsp"); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextForwardPagePathTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + pc.forward("Resource.jsp"); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextForwardServletExceptionTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + pc.forward("/Resource.jsp?exception=servletexception"); + } catch (Throwable t) { + if (t instanceof ServletException) { + out.println("Test PASSED"); + return; + } else { + out.println("Test FAILED. Exception thrown by forwarded" + + "resource, but was not an instance of ServletException"); + out.println("Type thrown: " + t.getClass().getName()); + return; + } + } + out.println("Test FAILED. No Exception thrown!"); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextForwardIOExceptionTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + pc.forward("/Resource.jsp?exception=ioexception"); + } catch (Throwable t) { + if (t instanceof IOException) { + out.println("Test PASSED"); + return; + } else { + out.println("Test FAILED. Exception thrown by forwarded" + + "resource, but was not an instance of IOException"); + out.println("Type thrown: " + t.getClass().getName()); + return; + } + } + out.println("Test FAILED. No Exception thrown!"); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextForwardIllegalStateExceptionTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + out.println("Arbitrary text..."); + out.flush(); + pc.forward("/Resource.jsp"); + } catch (IllegalStateException ise) { + out.println("Test PASSED"); + return; + } + out.println("Test FAILED. IllegalStateException not thrown."); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextIncludeContextPathTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + pc.include("/Resource.jsp"); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextIncludePagePathTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + pc.include("Resource.jsp"); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextIncludeFlushTrueTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + pc.include("Resource.jsp", true); + res.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, + "Test FAILED. Response not flushed by inclusion."); + } catch (Throwable t) { + if (t instanceof IllegalStateException) { + out.println("Stream was properly flushed."); + } else { + out.println("Stream was not flushed."); + } + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextIncludeFlushFalseTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + if (out.getBufferSize() > 0) { + try { + pc.include("/Resource.jsp", false); + out.clear(); + out.println("Test PASSED"); + } catch (IllegalStateException ise) { + out.println("Test FAILED. Steam was flushed after" + + " inclusion when flush argument was false."); + } + } else { + out.println("Test PASSED. Buffering is not available."); + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextHandlePageExceptionExcTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + pc.handlePageException(new RuntimeException()); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextHandlePageExceptionThrTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + pc.handlePageException(new Throwable()); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextHandlePageExceptionExcNPETest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + Exception e = null; + pc.handlePageException(e); + } catch (Throwable t) { + if (t instanceof NullPointerException) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Exception thrown when passing" + + " null to handlePageException, but was not an instance\n" + + "of NullPointerException."); + out.println("Received: " + t.getClass().getName()); + } + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextHandlePageExceptionThrNPETest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + Throwable th = null; + pc.handlePageException(th); + } catch (Throwable t) { + if (t instanceof NullPointerException) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Exception thrown when passing" + + " null to handlePageException, but was not an instance\n" + + "of NullPointerException."); + out.println("Received: " + t.getClass().getName()); + } + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextPushPopBodyTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + Object origOutRef = out; + BodyContent content = pc.pushBody(); + Object newOutRef = pc.getOut(); + Object newOutRef2 = pc.getAttribute(PageContext.OUT); + if (content != null) { + if (origOutRef != newOutRef) { + if (origOutRef != newOutRef2) { + pc.popBody(); + newOutRef = pc.getOut(); + newOutRef2 = pc.getAttribute(PageContext.OUT); + if (origOutRef == newOutRef) { + if (origOutRef == newOutRef2) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. PageContext.OUT not restored with " + + "the original 'out' object after PageContext.popBody() " + + "was called."); + } + } else { + out.println("Test FAILED. Original 'out' object" + + " was not restored after PageContext.popBody() " + + "was called."); + } + } else { + out.println("Test FAILED. PageContext.OUT not updated with a new" + + " reference after calling PageContext.pushBody()."); + } + } else { + out.println("Test FAILED. 'out' object after PageContext" + + ".pushBody() was called did not change."); + } + } else { + out.println("Test FAILED. PageContext.pushBody() returned " + + "a null BodyContent object."); + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextGetErrorDataTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + req.setAttribute("ee.jakarta.tck.pages.api.checkErrorData", + new Boolean(true)); + throw new RuntimeException(); + } +%> + +<%! + public void pageContextIncludeIOExceptionTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + pc.include("/Resource.jsp?exception=ioexception"); + } catch (Throwable t) { + if (t instanceof IOException) { + out.println("Test PASSED"); + return; + } else { + out.println("Test FAILED. Exception thrown by included" + + "resource, but was not an instance of IOException"); + out.println("Type thrown: " + t.getClass().getName()); + return; + } + } + out.println("Test FAILED. No Exception thrown!"); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextIncludeFlushIOExceptionTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + pc.include("/Resource.jsp?exception=ioexception", true); + } catch (Throwable t) { + if (t instanceof IOException) { + out.println("Test PASSED"); + return; + } else { + out.println("Test FAILED. Exception thrown by included" + + "resource, but was not an instance of IOException"); + out.println("Type thrown: " + t.getClass().getName()); + return; + } + } + out.println("Test FAILED. No Exception thrown!"); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextIncludeServletExceptionTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + pc.include("/Resource.jsp?exception=servletexception"); + } catch (Throwable t) { + if (t instanceof ServletException) { + out.println("Test PASSED"); + return; + } else { + out.println("Test FAILED. Exception thrown by included" + + "resource, but was not an instance of ServletException"); + out.println("Type thrown: " + t.getClass().getName()); + return; + } + } + out.println("Test FAILED. No Exception thrown!"); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextIncludeFlushServletExceptionTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + pc.include("/Resource.jsp?exception=servletexception", true); + } catch (Throwable t) { + if (t instanceof ServletException) { + out.println("Test PASSED"); + return; + } else { + out.println("Test FAILED. Exception thrown by included" + + "resource, but was not an instance of ServletException"); + out.println("Type thrown: " + t.getClass().getName()); + return; + } + } + out.println("Test FAILED. No Exception thrown!"); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextGetSetAttributeTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + final String attrName = "testObject"; + final String value = "string"; + pc.setAttribute(attrName, value); + String s = (String) pc.getAttribute(attrName); + if (s != null) { + if (s.equals(value)) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Incorrect object returned by " + + "PageContext.getAttribute()"); + } + } else { + out.println("Test FAILED. PageContext.getAttribute() " + + "incorrectly returned null."); + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextSetAttributeNPETest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + pc.setAttribute(null, new String("")); + } catch (NullPointerException npe) { + try { + pc.setAttribute("testObject", null); + out.println("Test PASSED"); + return; + } catch (NullPointerException nnpe) { + out.println("Test FAILED. NPE thrown when a null value " + + "is provided to PageContext.setAttribute()"); + return; + } + } + out.println("Test FAILED. NPE not thrown when a null name is " + + "provided to PageContext.setAttribute()"); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextGetSetAttributeInScopeTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + pc.setAttribute("pageScope", "pageScope", PageContext.PAGE_SCOPE); + pc.setAttribute("requestScope", "requestScope", + PageContext.REQUEST_SCOPE); + pc.setAttribute("sessionScope", "sessionScope", + PageContext.SESSION_SCOPE); + pc.setAttribute("applicationScope", "applicationScope", + PageContext.APPLICATION_SCOPE); + + String s1 = (String) pc.getAttribute("pageScope", + PageContext.PAGE_SCOPE); + String s2 = (String) pc.getAttribute("requestScope", + PageContext.REQUEST_SCOPE); + String s3 = (String) pc.getAttribute("sessionScope", + PageContext.SESSION_SCOPE); + String s4 = (String) pc.getAttribute("applicationScope", + PageContext.APPLICATION_SCOPE); + if (s1 != null) { + if (s1.equals("pageScope")) { + if (s2 != null) { + if (s2.equals("requestScope")) { + if (s3 != null) { + if (s3.equals("sessionScope")) { + if (s4 != null) { + if (s4.equals("applicationScope")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Wrong" + + "application scoped object returned."); + } + } else { + out.println("Test FAILED. " + + "PageContext.getAttribute() returned null."); + } + } else { + out.println("Test FAILED. Wrong" + + "session scoped object returned."); + } + } else { + out.println("Test FAILED. " + + "PageContext.getAttribute() returned null."); + } + } else { + out.println("Test FAILED. Wrong" + + "request scoped object returned."); + } + } else { + out.println("Test FAILED. " + + "PageContext.getAttribute() returned null."); + } + } else { + out.println("Test FAILED. Wrong" + + "page scoped object returned."); + } + } else { + out.println("Test FAILED. " + + "PageContext.getAttribute() returned null."); + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + cleanup(pc); + } +%> + +<%! + public void pageContextSetAttributeInScopeNPETest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + pc.setAttribute(null, new String(""), PageContext.PAGE_SCOPE); + } catch (NullPointerException npe) { + try { + pc.setAttribute("testObject", null, + PageContext.APPLICATION_SCOPE); + out.println("Test PASSED"); + return; + } catch (NullPointerException nnpe) { + out.println("Test FAILED. NPE thrown when a null value " + + "is provided to PageContext.setAttribute()"); + return; + } + } + out.println("Test FAILED. NPE not thrown when a null name is " + + "provided to PageContext.setAttribute()"); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextSetAttributeInScopeIllegalArgumentExcTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + pc.setAttribute("pageScope", "pageScope", Integer.MIN_VALUE); + } catch (Throwable t) { + if (t instanceof IllegalArgumentException) { + out.println("Test PASSED"); + return; + } else { + out.println("Test FAILED. Exception thrown, but not an" + + "instance of IllegalArgumentException"); + return; + } + } + out.println("Test FAILED. IllegalArgumentException not thrown " + + "when PageContext.setAttribute() was provided an invalid scope"); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextGetAttributeNPETest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + pc.getAttribute(null); + } catch (Throwable t) { + if (t instanceof NullPointerException) { + out.println("Test PASSED"); + return; + } else { + out.println("Test FAILED. Exception thrown, but not an" + + "instance of NullPointerException"); + return; + } + } + out.println("Test FAILED. NPE not thrown when " + + "PageContext.getAttribute() is provided a null value."); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextGetAttributeInScopeIllegalArgumentExceptionTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + pc.getAttribute("pageContext", Integer.MIN_VALUE); + } catch (Throwable t) { + if (t instanceof IllegalArgumentException) { + out.println("Test PASSED"); + return; + } else { + out.println("Test FAILED. Exception thrown, but not an" + + "instance of IllegalArgumentException"); + return; + } + } + out.println("Test FAILED. No Exception thrown when an illegal" + + " scope was provided to PageContext.getAttribute()"); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextFindAttributeTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + fillAllScopes(pc); + String s1 = (String) pc.findAttribute("pageScope"); + String s2 = (String) pc.findAttribute("sessionScope"); + Object nullObj = pc.findAttribute("nonAttribute"); + if (s1 != null) { + if (s1.equals("pageScope")) { + if (s2 != null) { + if (s2.equals("sessionScope")) { + if (nullObj == null) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Null reference" + + " not returned from PageContext.findAttribute()" + + " when provided a non existent value"); + } + } else { + out.println("Test FAILED. Wrong" + + "session scoped object returned."); + } + } else { + out.println("Test FAILED. " + + "PageContext.getAttribute() returned null."); + } + } else { + out.println("Test FAILED. Wrong" + + "page scoped object returned."); + } + } else { + out.println("Test FAILED. " + + "PageContext.getAttribute() returned null."); + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + cleanup(pc); + } +%> + +<%! + public void pageContextRemoveAttributeTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + fillAllScopes(pc); + pc.removeAttribute("pageScope"); + pc.removeAttribute("requestScope"); + pc.removeAttribute("sessionScope"); + pc.removeAttribute("applicationScope"); + Object o1 = pc.findAttribute("pageScope"); + Object o2 = pc.findAttribute("requestScope"); + Object o3 = pc.findAttribute("sessionScope"); + Object o4 = pc.findAttribute("applicationScope"); + if (o1 == null) { + if (o2 == null) { + if (o3 == null) { + if (o4 == null) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Application scoped object" + + " not removed by PageContext.removeAttribute()."); + } + } else { + out.println("Test FAILED. Session scoped object" + + " not removed by PageContext.removeAttribute()."); + } + } else { + out.println("Test FAILED. Request scoped object" + + " not removed by PageContext.removeAttribute()."); + } + } else { + out.println("Test FAILED. Page scoped object" + + " not removed by PageContext.removeAttribute()."); + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextRemoveAttributeFromScopeTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + fillAllScopes(pc); + pc.removeAttribute("pageScope", PageContext.PAGE_SCOPE); + pc.removeAttribute("requestScope", PageContext.REQUEST_SCOPE); + pc.removeAttribute("sessionScope", PageContext.SESSION_SCOPE); + pc.removeAttribute("applicationScope", PageContext.APPLICATION_SCOPE); + Object o1 = pc.findAttribute("pageScope"); + Object o2 = pc.findAttribute("requestScope"); + Object o3 = pc.findAttribute("sessionScope"); + Object o4 = pc.findAttribute("applicationScope"); + if (o1 == null) { + if (o2 == null) { + if (o3 == null) { + if (o4 == null) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Application scoped object" + + " not removed by PageContext.removeAttribute()."); + } + } else { + out.println("Test FAILED. Session scoped object" + + " not removed by PageContext.removeAttribute()."); + } + } else { + out.println("Test FAILED. Request scoped object" + + " not removed by PageContext.removeAttribute()."); + } + } else { + out.println("Test FAILED. Page scoped object" + + " not removed by PageContext.removeAttribute()."); + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextRemoveAttributeFromScopeIllegalScopeTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + pc.removeAttribute("nonAttribute", Integer.MIN_VALUE); + } catch (Throwable t) { + if (t instanceof IllegalArgumentException) { + out.println("Test PASSED"); + return; + } else { + out.println("Test FAILED. Exception thrown when providing an illegal scope" + + " but was not an instance of IllegalArgumentException."); + out.println("Received: " + t); + return; + } + } + out.println("Test FAILED. No Exception thrown when an illegal scope was provided."); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextGetAttributeScopeTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + fillAllScopes(pc); + if (pc.getAttributesScope("pageScope") == PageContext.PAGE_SCOPE) { + if (pc.getAttributesScope("requestScope") == PageContext.REQUEST_SCOPE) { + if (pc.getAttributesScope("sessionScope") == PageContext.SESSION_SCOPE) { + if (pc.getAttributesScope("applicationScope") == PageContext.APPLICATION_SCOPE) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. PageContext.getAttributes" + + "Scope returned unexpected value for object in APPLICATION_SCOPE"); + } + } else { + out.println("Test FAILED. PageContext.getAttributes" + + "Scope returned unexpected value for object in SESSION_SCOPE"); + } + } else { + out.println("Test FAILED. PageContext.getAttributes" + + "Scope returned unexpected value for object in REQUEST_SCOPE"); + } + } else { + out.println("Test FAILED. PageContext.getAttributes" + + "Scope returned unexpected value for object in PAGE_SCOPE"); + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + cleanup(pc); + } +%> + +<%! + public void pageContextGetAttributeNamesInScopeTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + fillAllScopes(pc); + Enumeration page = pc.getAttributeNamesInScope(PageContext.PAGE_SCOPE); + Enumeration request = pc.getAttributeNamesInScope(PageContext.REQUEST_SCOPE); + Enumeration session = pc.getAttributeNamesInScope(PageContext.SESSION_SCOPE); + Enumeration app = pc.getAttributeNamesInScope(PageContext.APPLICATION_SCOPE); + + if (page != null) { + if (checkValue(page, "pageScope", out)) { + if (request != null) { + if (checkValue(request, "requestScope", out)) { + if (session != null) { + if (checkValue(session, "sessionScope", out)) { + if (app != null) { + if (checkValue(app, "applicationScope", out)) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Enumeration" + + " did not contain expected value."); + } + } else { + out.println("Test FAILED. Null Enumeration returned"); + } + } else { + out.println("Test FAILED. Enumeration" + + " did not contain expected value."); + } + } else { + out.println("Test FAILED. Null Enumeration returned"); + } + } else { + out.println("Test FAILED. Enumeration" + + " did not contain expected value."); + } + } else { + out.println("Test FAILED. Null Enumeration returned"); + } + } else { + out.println("Test FAILED. Enumeration" + + " did not contain expected value."); + } + } else { + out.println("Test FAILED. Null Enumeration returned"); + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + cleanup(pc); + } +%> + +<%! + public void pageContextGetAttributeNamesInScopeIllegalScopeTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + pc.getAttributeNamesInScope(Integer.MAX_VALUE); + } catch (Throwable t) { + if (t instanceof IllegalArgumentException) { + out.println("Test PASSED"); + return; + } else { + out.println("Test FAILED. Exception thrown when providing an illegal scope" + + " but was not an instance of IllegalArgumentException."); + out.println("Received: " + t); + return; + } + } + out.println("Test FAILED. No Exception thrown when an illegal scope was provided."); + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextGetOutTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + if (pc.getOut() == out) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Object reference returned by " + + "PageContext.getOut() not the same as the reference " + + "associated with the 'out' scripting variable."); + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + + +<%! + public void pageContextFindAttributeNullNameTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + pc.findAttribute(null); + out.println("Test FAILED. No Exception thrown when null" + + " argument passed to findAttribute(String)."); + } catch (Throwable t) { + if (t instanceof NullPointerException) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected a NullPointerException to" + + " be thrown if findAttribute(String) is passed a null value.\n" + + "Actual exception thrown: " + t.getClass().getName()); + } + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextGetAttributesScopeNullNameTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + pc.getAttributesScope(null); + out.println("Test FAILED. No Exception thrown when null" + + " argument passed to getAttributesScope(String)."); + } catch (Throwable t) { + if (t instanceof NullPointerException) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected a NullPointerException to" + + " be thrown if getAttributesScope(String) is passed a null value.\n" + + "Actual exception thrown: " + t.getClass().getName()); + } + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextRemoveAttributeNullNameTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + if (pc != null) { + try { + pc.removeAttribute(null); + out.println("Test FAILED. No Exception thrown when null" + + " argument passed to removeAttribute(String)."); + } catch (Throwable t) { + if (t instanceof NullPointerException) { + try { + pc.removeAttribute(null, PageContext.PAGE_SCOPE); + out.println("Test FAILED. No Exception thrown when null" + + " argument passed to removeAttribute(String, int)"); + } catch (Throwable t1) { + if (t instanceof NullPointerException) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected a NullPointerException to" + + " be thrown if removeAttribute(String, int) is passed a null value.\n" + + "Actual exception thrown: " + t.getClass().getName()); + } + } + } else { + out.println("Test FAILED. Expected a NullPointerException to" + + " be thrown if removeAttribute(String) is passed a null value.\n" + + "Actual exception thrown: " + t.getClass().getName()); + } + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%! + public void pageContextSetAttributeNullValueTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + PageContext pc = (PageContext) req.getAttribute(PAGECONTEXT_ATTR); + pc.setAttribute("simple", "value"); + if (pc != null) { + pc.setAttribute("simple", null); + if (pc.getAttribute("simple") == null) { + pc.setAttribute("simple2", "value"); + pc.setAttribute("simple2", null, PageContext.PAGE_SCOPE); + if (pc.getAttribute("simple2") == null) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Attribute not removed from PageContext " + + "when null value was passed to setAttribute(String, Object, int)" + + " and the attribute name specified exists in the PageContext"); + } + } else { + out.println("Test FAILED. Attribute not removed from PageContext " + + "when null value was passed to setAttribute(String, Object)" + + " and the attribute name specified exists in the PageContext"); + } + } else { + out.println("Test FAILED. No PageContext object available."); + } + } +%> + +<%-- Test invocation --%> + +<% + request.setAttribute(PAGECONTEXT_ATTR, pageContext); + request.setAttribute(SESSION_ATTR, session); + request.setAttribute(PAGE_ATTR, page); + request.setAttribute(CONFIG_ATTR, config); + request.setAttribute(CONTEXT_ATTR, application); + + JspTestUtil.invokeTest(this, request, response, out); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/pagecontext/Resource.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/pagecontext/Resource.jsp new file mode 100644 index 00000000..58fc2514 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/pagecontext/Resource.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="java.io.IOException" contentType="text/plain"%> + +<% + String param = request.getParameter("exception"); + if (param != null) { + if (param.equals("ioexception")) { + throw new IOException(); + } + + if (param.equals("servletexception")) { + throw new ServletException(); + } + } else { + out.println("Test PASSED."); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/pagecontext/jsp_pagecontext_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/pagecontext/jsp_pagecontext_web.xml new file mode 100644 index 00000000..9302aa31 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/pagecontext/jsp_pagecontext_web.xml @@ -0,0 +1,25 @@ + + + + + JspPageContext + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/skippageexception/SkipPageExceptionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/skippageexception/SkipPageExceptionTest.jsp new file mode 100644 index 00000000..12d977a8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/skippageexception/SkipPageExceptionTest.jsp @@ -0,0 +1,108 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + java.io.IOException" %> +<%@ page contentType="text/plain" %> + +<%-- Begin test definitions --%> + +<%! + public void skipPageExceptionDefaultCtorTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + SkipPageException spe = new SkipPageException(); + if (spe != null) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. No Exception created."); + } + } +%> + +<%! + public void skipPageExceptionMessageCtorTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + SkipPageException spe = new SkipPageException("Exception Message"); + if (spe != null) { + String message = spe.getMessage(); + if (message != null && message.equals("Exception Message")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected a message of 'Exception Message'"); + out.println("Received: " + message); + } + } else { + out.println("Test FAILED. No Exception created."); + } + } +%> + +<%! + public void skipPageExceptionCauseCtorTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + SkipPageException spe = new SkipPageException(new NullPointerException()); + if (spe != null) { + Throwable t = spe.getCause(); + if (t != null && t instanceof NullPointerException) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected a Throwable of type NullPointerException"); + out.println("Received: " + t); + } + } else { + out.println("Test FAILED. No Exception created."); + } + } +%> + +<%! + public void skipPageExceptionCauseMessageCtorTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + SkipPageException spe = new SkipPageException("Exception Message", + new ServletException()); + if (spe != null) { + String message = spe.getMessage(); + if (message != null && message.equals("Exception Message")) { + Throwable t = spe.getCause(); + if (t != null && t instanceof ServletException) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected a Throwable of type ServletException"); + out.println("Received: " + t); + } + } else { + out.println("Test FAILED. Expected a message of 'Exception Message'"); + out.println("Received: " + message); + } + } else { + out.println("Test FAILED. No Exception created."); + } + } +%> + +<%-- Test invocation --%> + +<% JspTestUtil.invokeTest(this, request, response, out); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/skippageexception/jsp_skippageexc_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/skippageexception/jsp_skippageexc_web.xml new file mode 100644 index 00000000..46b0e874 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/skippageexception/jsp_skippageexc_web.xml @@ -0,0 +1,25 @@ + + + + + JspSkipPageException + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentClearBodyTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentClearBodyTest.jsp new file mode 100644 index 00000000..932dab34 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentClearBodyTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/bodycontent" prefix="content" %> + + + Test FAILED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentFlushTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentFlushTest.jsp new file mode 100644 index 00000000..f60a99cf --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentFlushTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/bodycontent" prefix="content" %> + + + Body Content + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentGetStringTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentGetStringTest.jsp new file mode 100644 index 00000000..0e15153a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentGetStringTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/bodycontent" prefix="content" %> + + + <%= "body content" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentReadWriteTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentReadWriteTest.jsp new file mode 100644 index 00000000..c541dc94 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentReadWriteTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/bodycontent" prefix="content" %> + + + Test PASSED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentWriteOutTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentWriteOutTest.jsp new file mode 100644 index 00000000..dfff5cba --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/BodyContentWriteOutTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/bodycontent" prefix="content" %> +<% pageContext.setAttribute("passed", "PASSED"); %> + + Test ${pageScope.passed} + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/WEB-INF/bodycontent.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/WEB-INF/bodycontent.tld new file mode 100644 index 00000000..1152a2fe --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/WEB-INF/bodycontent.tld @@ -0,0 +1,53 @@ + + + + + Tags for BodyContent tests + BodyContent + 1.0 + bodycontent + + flush + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodycontent.BodyContentFlushTag + JSP + + + clear + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodycontent.BodyContentClearBodyTag + JSP + + + readwrite + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodycontent.BodyContentReadWriteTag + JSP + + + writeout + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodycontent.BodyContentWriteOutTag + JSP + + + string + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodycontent.BodyContentGetStringTag + JSP + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/jsp_bodycontent_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/jsp_bodycontent_web.xml new file mode 100644 index 00000000..4e58f63f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodycontent/jsp_bodycontent_web.xml @@ -0,0 +1,34 @@ + + + + + BodyContent + + 5 + + + + http://java.sun.com/tck/jsp/bodycontent + /WEB-INF/bodycontent.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyTagEmptyTagTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyTagEmptyTagTest.jsp new file mode 100644 index 00000000..01bf7e2b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyTagEmptyTagTest.jsp @@ -0,0 +1,55 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/bodytagsupport" prefix="tag" %> + + + + + + + + + + + + + + + +Empty Tag1: ${validate.result} + + + + + +Empty Tag2: ${validate.result} + + + + + +Non-Empty Tag3: ${validate.result} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyTagEvalBodyBufferedTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyTagEvalBodyBufferedTest.jsp new file mode 100644 index 00000000..42104b89 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyTagEvalBodyBufferedTest.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/bodytagsupport" prefix="tag" %> + + + BodyContent + + + + + + + + +${validate.result} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyTagEvalBodyIncludeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyTagEvalBodyIncludeTest.jsp new file mode 100644 index 00000000..985f615d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyTagEvalBodyIncludeTest.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/bodytagsupport" prefix="tag" %> + + + Body Content + + + + + + + + +${validate.result} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyTagSkipBodyTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyTagSkipBodyTest.jsp new file mode 100644 index 00000000..eda3dad6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyTagSkipBodyTest.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/bodytagsupport" prefix="tag" %> + + + Body Content + + + + + + + + +${validate.result} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyTagSupportApiTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyTagSupportApiTest.jsp new file mode 100644 index 00000000..a97694f9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyTagSupportApiTest.jsp @@ -0,0 +1,109 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + java.io.IOException, + jakarta.servlet.jsp.tagext.BodyTagSupport, + jakarta.servlet.jsp.tagext.Tag, + jakarta.servlet.jsp.tagext.BodyTag" %> +<%@ page contentType="text/plain" %> + + + +<%-- Begin test definitions --%> + +<%! + public void bodyTagSupportCtorTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + BodyTagSupport support = new BodyTagSupport(); + if (support != null) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Unable to create new BodyTagSupport instance."); + } + } +%> + +<%! + public void bodyTagSupportDoStartTagTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + BodyTagSupport support = new BodyTagSupport(); + try { + int ret = support.doStartTag(); + if (ret == BodyTag.EVAL_BODY_BUFFERED) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. The default return value for BodyTagSupport" + + ".doStartTag() was not EVAL_BODY_BUFFERED. Received: " + + JspTestUtil.getTagStatusAsString("doStartTag", "BodyTag", ret)); + } + } catch (JspException je) { + JspTestUtil.handleThrowable(je, out, "bodyTagSupportDoStartTagTest"); + } + } +%> + +<%! + public void bodyTagSupportDoEndTagTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + BodyTagSupport support = new BodyTagSupport(); + try { + int ret = support.doEndTag(); + if (ret == Tag.EVAL_PAGE) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. The default return value for BodyTagSupport" + + ".doEndTag() was not EVAL_PAGE. Received: " + + JspTestUtil.getTagStatusAsString("doEndTag", "BodyTag", ret)); + } + } catch (JspException je) { + JspTestUtil.handleThrowable(je, out, "bodyTagSupportDoEndTagTest"); + } + } +%> + +<%! + public void bodyTagSupportDoAfterBodyTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + BodyTagSupport support = new BodyTagSupport(); + try { + int ret = support.doAfterBody(); + if (ret == Tag.SKIP_BODY) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. The default return value for BodyTagSupport" + + ".doAfterBody() was not SKIP_BODY. Received: " + + JspTestUtil.getTagStatusAsString("doAfterBody", "BodyTag", ret)); + } + } catch (JspException je) { + JspTestUtil.handleThrowable(je, out, "bodyTagSupportDoAfterBodyTest"); + } + } +%> + +<%-- Test invocation --%> + +<% JspTestUtil.invokeTest(this, request, response, out); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyTagSupportSynchronizationTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyTagSupportSynchronizationTest.jsp new file mode 100644 index 00000000..24b65d48 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/BodyTagSupportSynchronizationTest.jsp @@ -0,0 +1,224 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/bodytagsupport" prefix="tag" %> + +<%-- + Validate synchronization when doStartTag returns EVAL_BODY_BUFFERED. + Sychronization should occur after doInitBody(), doAfterBody() for NESTED, + doInitBody(), doAfterBody(), doEndTag() for AT_BEGIN, and doEndTag() for + AT_END +--%> + +BodyTag Synchronization (EVAL_BODY_BUFFERED) +------------------------------------------------------ +<%! int counter = 2; %> + + <% + int beg = (begin != null) ? begin.intValue() : 0; + int nes = (nested != null) ? nested.intValue() : 0; + if (counter == 2) { + // doInitBody() has been called. First pass into body should + // be 1 for AT_BEGIN and NESTED variables. + if (beg < 2) { + out.println("Test FAILED. Variable 'begin' not synchronized after" + + " doInitBody(). Expected a value of '2'. Received: " + beg); + } + if (beg > 2) { + out.println("Test FAILED. Variable 'begin' seems to have been" + + " synchronized too many times after doInitBody(). Expected " + + "a value of '2'. Received: " + beg); + } + if (nes < 2) { + out.println("Test FAILED. Variable 'nested' not synchronized after" + + " doInitBody(). Expected a value of '2'. Received: " + nes); + } + if (nes > 2) { + out.println("Test FAILED. Variable 'nested' seems to have been" + + " synchronized too many times after doInitBody(). Expected " + + "a value of '2'. Received: " + nes); + } + } else { + // first invocation of doAfterBody() returns EVAL_BODY_AGAIN, + // so second pass through here should be incremented by the + // doAfterBody() call + if (beg < 3) { + out.println("Test FAILED. Variable 'begin' not synchronized after" + + " doAfterBody(). Expected a value of '3'. Received: " + beg); + } + if (beg > 3) { + out.println("Test FAILED. Variable 'begin' seems to have been" + + " synchronized too many times after doAfterBody(). Expected " + + "a value of '3'. Received: " + beg); + } + if (nes < 3) { + out.println("Test FAILED. Variable 'nested' not synchronized after" + + " doAfterBody(). Expected a value of '3'. Received: " + nes); + } + if (nes > 3) { + out.println("Test FAILED. Variable 'nested' seems to have been" + + " synchronized too many times after doAfterBody(). Expected " + + "a value of '3'. Received: " + nes); + } + } + counter--; + %> + +<% + // final doAfterBody() call and doEndTag(). Value should be incremented + // by two. + int beg = (begin != null) ? begin.intValue() : 0; + int eend = (end != null) ? end.intValue() : 0; + if (beg < 5) { + out.println("Test FAILED. Variable 'begin' not synchronized after" + + " doEndTag(). Expected a value of '5'. Received: " + beg); + } + if (beg > 5) { + out.println("Test FAILED. Variable 'begin' seems to have been" + + " synchronized too many times after doEndTag(). Expected " + + "a value of '5'. Received: " + beg); + } + if (eend < 5) { + out.println("Test FAILED. Variable 'end' not synchronized after " + + " doEndTag(). Expected a value of '5'. Received: " + eend); + } + if (eend > 5) { + out.println("Test FAILED. Variable 'end' seems to have been" + + " synchronized too many times after doEndTag(). Expected " + + "a value of '5'. Received: " + eend); + } +%> + +<%-- Validate synchronization when doStartTag returns EVAL_BODY_INCLUDE --%> +BodyTag Synchronization (EVAL_BODY_INCLUDE) +------------------------------------------------------ +<% + counter = 2; +%> + + <% + beg = (begin != null) ? begin.intValue() : 0; + int nes = (nested != null) ? nested.intValue() : 0; + if (counter == 2) { + // synchronization should occur since doStartTag() returns + // EVAL_BODY_INCLUDE. So beg, should be incremented from + // the synchronization provided by the previous action. + if (beg < 6) { + out.println("Test FAILED. Variable 'begin' not synchronized after" + + " doStartTag(). Expected a value of '6'. Received: " + beg); + } + if (beg > 6) { + out.println("Test FAILED. Variable 'begin' seems to have been" + + " synchronized too many times after doStartTag(). Expected " + + "a value of '6'. Received: " + beg); + } + // sync done for doStartTag() so first body eval, + // this should be 1. + if (nes < 1) { + out.println("Test FAILED. Variable 'nested' not synchronized after" + + " doStartTag(). Expected a value of '1'. Received: " + nes); + } + if (nes > 1) { + out.println("Test FAILED. Variable 'nested' seems to have been" + + " synchronized too many times after doStartTag(). Expected " + + "a value of '1'. Received: " + nes); + } + } else { + // increment value by 1 for first doStartTag(), plus another for the + // call to doAfterBody(). + if (beg < 7) { + out.println("Test FAILED. Variable 'begin' not synchronized after" + + " doAfterBody(). Expected a value of '7'. Received: " + beg); + } + if (beg > 7) { + out.println("Test FAILED. Variable 'begin' seems to have been" + + " synchronized too many times after doAfterBody(). Expected " + + "a value of '7'. Received: " + beg); + } + if (nes != 2) { + out.println("Test FAILED. Variable 'nested' not synchronized after" + + " doAfterBody(). Expected a value of '2'. Received: " + nes); + } + if (nes > 2) { + out.println("Test FAILED. Variable 'nested' seems to have been" + + " synchronized too many times after doAfterBody(). Expected " + + "a value of '2'. Received: " + nes); + } + } + counter--; + %> + +<% + // doAfterBody() has been called with SKIP_BODY, then doEndTag(), value + // incremented by 2. + beg = (begin != null) ? begin.intValue() : 0; + eend = (end != null) ? end.intValue() : 0; + if (beg < 9) { + out.println("Test FAILED. Variable 'begin' not synchronized after" + + " doEndTag(). Expected a value of '9'. Received: " + beg); + } + if (beg > 9) { + out.println("Test FAILED. Variable 'begin' seems to have been" + + " synchronized too many times after doEndTag(). Expected " + + "a value of '9'. Received: " + beg); + } + // doAfterBody() has been called with SKIP_BODY, then doEndTag(), value + // incremented by 2. + if (eend < 4) { + out.println("Test FAILED. Variable 'end' not synchronized after " + + " doEndTag(). Expected a value of '4'. Received: " + eend); + } + if (eend > 4) { + out.println("Test FAILED. Variable 'end' seems to have been" + + " synchronized too many times after doEndTag(). Expected " + + "a value of '4'. Received: " + eend); + } + pageContext.removeAttribute("begin"); + pageContext.removeAttribute("end"); +%> + +<%-- Validate synchronization when doStartTag() returns SKIP_BODY --%> +BodyTag Synchronization (SKIP_BODY) +-------------------------------------------- + +<% + // doStartTag() and doEndTag() have each been called once. + beg = (begin != null) ? begin.intValue() : 0; + eend = (end != null) ? end.intValue() : 0; + if (beg < 2) { + out.println("Test FAILED. Variable 'begin' not synchronized after" + + " doStartTag() and/or doEndTag(). Expected a value of '2'. Received: " + beg); + } + if (beg > 2) { + out.println("Test FAILED. Variable 'begin' seems to have been" + + " synchronized too many times after doStartTag() and/ordoEndTag(). Expected " + + "a value of '2'. Received: " + beg); + } + if (eend < 2) { + out.println("Test FAILED. Variable 'end' not synchronized after " + + " doStartTag() and/or doEndTag(). Expected a value of '2'. Received: " + eend); + } + if (eend > 2) { + out.println("Test FAILED. Variable 'end' seems to have been" + + " synchronized too many times after doStartTag() and/or doEndTag(). Expected " + + "a value of '2'. Received: " + eend); + } + pageContext.removeAttribute("begin"); + pageContext.removeAttribute("end"); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/GetBodyContentTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/GetBodyContentTest.jsp new file mode 100644 index 00000000..cf576a8e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/GetBodyContentTest.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/bodytagsupport" prefix="support" %> + + body content + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/GetPreviousOutTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/GetPreviousOutTest.jsp new file mode 100644 index 00000000..ce380e2b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/GetPreviousOutTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/bodytagsupport" prefix="support" %> +Test FAILED. + + body content + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/WEB-INF/bodytagsupport.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/WEB-INF/bodytagsupport.tld new file mode 100644 index 00000000..e63e984a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/WEB-INF/bodytagsupport.tld @@ -0,0 +1,81 @@ + + + + + BodyTagSupport Test Support Tags + BodyTagSupport + 1.0 + bodytagsupport + + prevout + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodytagsupport.GetPreviousOutTestTag + JSP + + + bodycontent + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodytagsupport.GetBodyContentTestTag + JSP + + + interaction + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodytagsupport.BodyContainerInteractionTag + JSP + + doStartTag + true + + + doEndTag + true + + + doAfterBody + true + + + result + true + + + + sync + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodytagsupport.BodySynchronizationTag + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.bodytagsupport.SyncTEI + JSP + + doStartTag + true + + + doEndTag + true + + + doAfterBody + false + + + bodyCount + false + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/jsp_bodytagsupp_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/jsp_bodytagsupp_web.xml new file mode 100644 index 00000000..8c5ab7b5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/bodytagsupport/jsp_bodytagsupp_web.xml @@ -0,0 +1,34 @@ + + + + + BodyTagSupport + + 5 + + + + http://java.sun.com/tck/jsp/bodytagsupport + /WEB-INF/bodytagsupport.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/DynamicAttributesExceptionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/DynamicAttributesExceptionTest.jsp new file mode 100644 index 00000000..94de322b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/DynamicAttributesExceptionTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/dynamicattributes" prefix="tag" %> + +<% try { %> + +<% } catch (Throwable t) { + out.println("Classic - Test PASSED"); +} %> + +<% try { %> + +<% } catch (Throwable t) { + out.println("Simple - Test PASSED"); +} +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/SetDynamicAttributesTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/SetDynamicAttributesTest.jsp new file mode 100644 index 00000000..90b4d470 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/SetDynamicAttributesTest.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/dynamicattributes" prefix="tag" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/WEB-INF/dynamicattributes.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/WEB-INF/dynamicattributes.tld new file mode 100644 index 00000000..a6ba91c4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/WEB-INF/dynamicattributes.tld @@ -0,0 +1,43 @@ + + + + + 1.0 + dynamicattributes + + dynamic + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.dynamicattributes.DynamicAttributesTag + JSP + + throwException + false + false + + true + + + sdynamic + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.dynamicattributes.SimpleExcTag + scriptless + true + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/jsp_dynattrib_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/jsp_dynattrib_web.xml new file mode 100644 index 00000000..862084bb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/dynamicattributes/jsp_dynattrib_web.xml @@ -0,0 +1,34 @@ + + + + + DynamicAttributes + + 5 + + + + http://java.sun.com/tck/jsp/dynamicattributes + /WEB-INF/dynamicattributes.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/GetFunctionClassTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/GetFunctionClassTest.jsp new file mode 100644 index 00000000..6dd8a1fd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/GetFunctionClassTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/functioninfo" prefix="funcinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/GetFunctionSignatureTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/GetFunctionSignatureTest.jsp new file mode 100644 index 00000000..6479bf6a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/GetFunctionSignatureTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/functioninfo" prefix="funcinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/GetNameTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/GetNameTest.jsp new file mode 100644 index 00000000..e0713e7b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/GetNameTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/functioninfo" prefix="funcinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/WEB-INF/functioninfo.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/WEB-INF/functioninfo.tld new file mode 100644 index 00000000..9cbf0cb3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/WEB-INF/functioninfo.tld @@ -0,0 +1,43 @@ + + + + + FunctionInfo Validation + 1.0 + functioninfo + + test + ee.jakarta.tck.pages.common.tags.tck.SimpleTag + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.functioninfo.FunctionInfoTEI + JSP + + test + true + + + + upperCase + upperCase + ee.jakarta.tck.pages.common.util.JspFunctions + java.lang.String upperCase(java.lang.String) + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/jsp_functioninfo_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/jsp_functioninfo_web.xml new file mode 100644 index 00000000..d3e896b6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/functioninfo/jsp_functioninfo_web.xml @@ -0,0 +1,34 @@ + + + + + FunctionInfo + + 5 + + + + http://java.sun.com/tck/jsp/functioninfo + /WEB-INF/functioninfo.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/MultipleJspIdTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/MultipleJspIdTest.jsp new file mode 100644 index 00000000..6e57a8e3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/MultipleJspIdTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/jspidconsumer.tld" %> + +begin + + + +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/SameJspIdTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/SameJspIdTest.jsp new file mode 100644 index 00000000..1b16eb8f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/SameJspIdTest.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/jspidconsumer.tld" %> + +begin + +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/SetJspIdTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/SetJspIdTest.jsp new file mode 100644 index 00000000..58b211e7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/SetJspIdTest.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/jspidconsumer.tld" %> + +begin + +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/WEB-INF/jspidconsumer.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/WEB-INF/jspidconsumer.tld new file mode 100644 index 00000000..1d74b5c0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/WEB-INF/jspidconsumer.tld @@ -0,0 +1,57 @@ + + + + + + 1.0 + JspIdConsumer + + JspIdConsumer.setJspId() API test + SetJspIdTag + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.jspidconsumer.SetJspIdTag + empty + + + JspIdConsumer.setJspId() multiple tag test + MultiOneTag + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.jspidconsumer.MultiOneTag + empty + + + JspIdConsumer.setJspId() multiple tag test + MultiTwoTag + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.jspidconsumer.MultiTwoTag + empty + + + JspIdConsumer.setJspId() multiple tag test + MultiThreeTag + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.jspidconsumer.MultiThreeTag + empty + + + JspIdConsumer.setJspId() re-entrant tag test + SameJspIdTag + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.jspidconsumer.SameJspIdTag + empty + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/jsp_jspidconsumer_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/jsp_jspidconsumer_web.xml new file mode 100644 index 00000000..3146e462 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/jspidconsumer/jsp_jspidconsumer_web.xml @@ -0,0 +1,25 @@ + + + + + JspIdConsumer + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/PageDataTagFileTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/PageDataTagFileTest.jsp new file mode 100644 index 00000000..94119806 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/PageDataTagFileTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/PageDataTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/PageDataTest.jsp new file mode 100644 index 00000000..8613a671 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/PageDataTest.jsp @@ -0,0 +1,38 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" + import="ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.pagedata.PageDataValidator" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/pagedata" prefix="pagedata" %> +<%! + public boolean validatorWasCalled() { + boolean result = PageDataValidator.wasCalled(); + PageDataValidator.reset(); + return result; + } +%> + +<% + if (validatorWasCalled()) { + out.println("Validator Called."); + } else { + out.println("Test FAILED. Validator wasn't called."); + } +%> +<%= "Expression Text" %> +<%@ include file="template.txt" %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/WEB-INF/pagedata.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/WEB-INF/pagedata.tld new file mode 100644 index 00000000..c9b878af --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/WEB-INF/pagedata.tld @@ -0,0 +1,47 @@ + + + + + Tag Library for TagLibraryValidator Tests + TagLibraryValidator Test Tag Library + 1.0 + pagedata + + Validator to verify API/container interoperation. + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.pagedata.PageDataValidator + + + test + ee.jakarta.tck.pages.common.tags.tck.SimpleTag + JSP + + test + true + + + dynAttribute + false + true + java.lang.String + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/WEB-INF/pagedatatagfile.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/WEB-INF/pagedatatagfile.tld new file mode 100644 index 00000000..4e45c156 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/WEB-INF/pagedatatagfile.tld @@ -0,0 +1,47 @@ + + + + + Tag Library for TagLibraryValidator Tests for Tag File + TagLibraryValidator Test Tag Library for Tag File + 1.0 + pagedatatagfile + + Validator to verify API/container interoperation. + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.pagedata.TagFilePageDataValidator + + + test + ee.jakarta.tck.pages.common.tags.tck.SimpleTag + JSP + + test + true + + + dynAttribute + false + true + java.lang.String + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/WEB-INF/tags/pageDataTagFileTest.tag b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/WEB-INF/tags/pageDataTagFileTest.tag new file mode 100644 index 00000000..1affb1fc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/WEB-INF/tags/pageDataTagFileTest.tag @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag import="ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.pagedata.TagFilePageDataValidator" %> +<%@ attribute name="att1" %> +<%@ variable name-given="var1" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/pagedatatagfile" prefix="pagedatatagfile" %> +<%! + public boolean validatorWasCalled() { + boolean result = TagFilePageDataValidator.wasCalled(); + TagFilePageDataValidator.reset(); + return result; + } +%> + +<% + if (validatorWasCalled()) { + out.println("Validator Called."); + } else { + out.println("Test FAILED. Validator wasn't called."); + } +%> +<%= "Expression Text in tag file" %> +<%@ include file="template.txt" %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/WEB-INF/tags/template.txt b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/WEB-INF/tags/template.txt new file mode 100644 index 00000000..77484820 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/WEB-INF/tags/template.txt @@ -0,0 +1 @@ +Included template text in tag file. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/jsp_pagedata_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/jsp_pagedata_web.xml new file mode 100644 index 00000000..c906b1cc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/jsp_pagedata_web.xml @@ -0,0 +1,38 @@ + + + + + PageData + + 5 + + + + http://java.sun.com/tck/jsp/pagedata + /WEB-INF/pagedata.tld + + + http://java.sun.com/tck/jsp/pagedatatagfile + /WEB-INF/pagedatatagfile.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/template.txt b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/template.txt new file mode 100644 index 00000000..eafc06dd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/pagedata/template.txt @@ -0,0 +1 @@ +Included template text. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportDoTagDefault.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportDoTagDefault.jsp new file mode 100644 index 00000000..ff832e69 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportDoTagDefault.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/simpletagsupport" prefix="simtag" %> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportFindAncestorTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportFindAncestorTest.jsp new file mode 100644 index 00000000..4e5515d8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportFindAncestorTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/simpletagsupport" prefix="simtag" %> + + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportJspBodyTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportJspBodyTest.jsp new file mode 100644 index 00000000..cc066c9f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportJspBodyTest.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/simpletagsupport" prefix="simtag" %> + +body diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportJspContextTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportJspContextTest.jsp new file mode 100644 index 00000000..4d227e55 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportJspContextTest.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/simpletagsupport" prefix="simtag" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportParentTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportParentTest.jsp new file mode 100644 index 00000000..59784384 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportParentTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/simpletagsupport" prefix="simtag" %> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportSkipPageClassicTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportSkipPageClassicTest.jsp new file mode 100644 index 00000000..2e529445 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportSkipPageClassicTest.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags/simpletagsupport" prefix="simtag" %> + + +Test FAILED diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportSkipPageSimpleTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportSkipPageSimpleTest.jsp new file mode 100644 index 00000000..68cf75db --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportSkipPageSimpleTest.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags/simpletagsupport" prefix="simtag" %> + + +Test FAILED diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportVariableSynchronizationTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportVariableSynchronizationTest.jsp new file mode 100644 index 00000000..62871d7d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/SimpleTagSupportVariableSynchronizationTest.jsp @@ -0,0 +1,87 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="java.io.PrintWriter, + ee.jakarta.tck.pages.common.util.JspTestUtil"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/simpletagsupport" prefix="simtag" %> +<%@ taglib tagdir="/WEB-INF/tags/simpletagsupport" prefix="tagfile" %> + +<%-- + Sync variables declared by TEI. + SimpleTag instance will set page context attributes + begin to 1 and end to 2. This should be synchronized + to scripting variables begin and end respectively. +--%> + +<% + if (begin.intValue() != 1) { + out.println("Test FAILED. Expected begin to be '1' after tag " + + "completion. Actual value: " + begin); + } + if (end.intValue() != 2) { + out.println("Test FAILED. Expected end to be '2' after tag " + + "completion. Actual value: " + end); + } +%> + +<%-- + Sync variables declared by variable elements in TLD + SimpleTag instance will set page context attributes + begin to 2 and end to 3. This should be synchronized + to scripting variables begin and end respectively. +--%> + +<% + if (begin.intValue() != 2) { + out.println("Test FAILED. Expected begin to be '2' after tag " + + "completion. Actual value: " + begin); + } + if (end.intValue() != 3) { + out.println("Test FAILED. Expected end to be '3' after tag " + + "completion. Actual value: " + end); + } +%> + +<%-- Sync variables declared in Tag file --%> +<% + // If a page scoped attribute has the same name + // as a declared NESTED variable in the tag, then + // the calling page scoped attribute needs to be restored + // after the invocation of the tag. No synchronization + // should occur. + Integer nested = new Integer(5); + pageContext.setAttribute("nested", nested); +%> + +<% + if (begin.intValue() != 3) { + out.println("Test FAILED. Expected begin to be '3' after tag " + + "completion. Actual value: " + begin); + } + if (end.intValue() != 1) { + out.println("Test FAILED. Expected end to be '1' after tag " + + "completion. Actual value: " + end); + } + if (nested.intValue() != 5) { + out.println("Test FAILED. Variable synchronization incorrectly occured" + + "for a nested variable declared by the Tag file. The original value" + + "of '5' should have been restored after doTag() returned."); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/WEB-INF/simpletagsupport.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/WEB-INF/simpletagsupport.tld new file mode 100644 index 00000000..0f6ef053 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/WEB-INF/simpletagsupport.tld @@ -0,0 +1,135 @@ + + + + + SimpleTagSupport Validation + 1.0 + simpletagsupport + + checkinstance + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport.CheckInstanceSimpleTag + scriptless + + + cskippage + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport.ClassicSkipPage + JSP + + + sskippage + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport.SimpleSkipPage + scriptless + + + simpledefault + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport.DefaultSimpleTag + scriptless + + + fail + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport.FailingTag + JSP + + + jspcontext + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport.SimpleGetSetJspContext + scriptless + + + jspbody + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport.SimpleGetSetJspBody + scriptless + + + parent + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport.SimpleGetSetParent + scriptless + + + simpleemptybody + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport.SimpleEmptyBody + empty + + + noparent + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport.SimpleNoParent + scriptless + + + jspFragmentGetJspContextSimple + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport.SimpleJspFragmentGetJspContext + scriptless + + + jspFragmentGetJspContextClassic + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport.ClassicJspFragmentGetJspContext + JSP + + fragment + true + + + + cparent + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport.ClassicParent + JSP + + level + false + + + + ancestor + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport.SimpleAncestor + scriptless + + + sparent + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport.SimpleParentTag + scriptless + + level + false + + + + sync + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport.SimpleSyncTag + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport.SyncTEI + scriptless + + + sync1 + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.simpletagsupport.SimpleSyncTag + scriptless + + begin + java.lang.Integer + AT_BEGIN + + + end + java.lang.Integer + AT_END + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/WEB-INF/tags/simpletagsupport/ClassicSkipPageTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/WEB-INF/tags/simpletagsupport/ClassicSkipPageTag.tag new file mode 100644 index 00000000..d3e7cdf1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/WEB-INF/tags/simpletagsupport/ClassicSkipPageTag.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib uri="http://java.sun.com/tck/jsp/simpletagsupport" prefix="simtag" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/WEB-INF/tags/simpletagsupport/SimpleSkipPageTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/WEB-INF/tags/simpletagsupport/SimpleSkipPageTag.tag new file mode 100644 index 00000000..479ff411 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/WEB-INF/tags/simpletagsupport/SimpleSkipPageTag.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib uri="http://java.sun.com/tck/jsp/simpletagsupport" prefix="simtag" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/WEB-INF/tags/simpletagsupport/Sync.tag b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/WEB-INF/tags/simpletagsupport/Sync.tag new file mode 100644 index 00000000..0a145bfe --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/WEB-INF/tags/simpletagsupport/Sync.tag @@ -0,0 +1,56 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag import="ee.jakarta.tck.pages.common.util.JspTestUtil" %> +<%@ variable name-given="begin" variable-class="java.lang.Integer" scope="AT_BEGIN" %> +<%@ variable name-given="end" variable-class="java.lang.Integer" scope="AT_END" %> +<%@ variable name-given="nested" variable-class="java.lang.Integer" scope="NESTED" %> + +<% + Integer b = (Integer) jspContext.getAttribute("begin"); + Integer n = (Integer) jspContext.getAttribute("nested"); + Integer e = (Integer) jspContext.getAttribute("end"); + + if (b == null) { + jspContext.setAttribute("begin", new Integer(3)); + } else { + // error + jspContext.getOut().println("Test FAILED. Attribute 'begin' was " + + " presentin the Tag's PageContext.\n Available attributes: " + + JspTestUtil.getAsString(jspContext.getAttributeNamesInScope( + PageContext.PAGE_SCOPE))); + return; + } + + if (n == null) { + jspContext.setAttribute("nested", new Integer(9)); + } else { + jspContext.getOut().println("Test FAILED. Attribute 'nested' was " + + "present in the Tag's PageContext."); + return; + } + + if (e == null) { + jspContext.setAttribute("end", new Integer(1)); + } else { + jspContext.getOut().println("Test FAILED. Attribute 'end' was " + + "present in the Tag's PageContext."); + return; + } + +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/emptySetJspBodyTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/emptySetJspBodyTest.jsp new file mode 100644 index 00000000..c348c4f4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/emptySetJspBodyTest.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/simpletagsupport" prefix="simtag" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/jspFragmentGetJspContextTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/jspFragmentGetJspContextTest.jsp new file mode 100644 index 00000000..6d5739fc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/jspFragmentGetJspContextTest.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/simpletagsupport" prefix="simtag" %> + + + ${1} + + + + jspfragment body + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/jsp_simtagsupport_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/jsp_simtagsupport_web.xml new file mode 100644 index 00000000..81e39ea3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/jsp_simtagsupport_web.xml @@ -0,0 +1,34 @@ + + + + + SimpleTagSupport + + 5 + + + + http://java.sun.com/tck/jsp/simpletagsupport + /WEB-INF/simpletagsupport.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/noParentTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/noParentTest.jsp new file mode 100644 index 00000000..b2c19fc6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/noParentTest.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/simpletagsupport" prefix="simtag" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/tagHandlerCacheTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/tagHandlerCacheTest.jsp new file mode 100644 index 00000000..f99feff0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/simpletagsupport/tagHandlerCacheTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/simpletagsupport" prefix="simtag" %> + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/TagAdapterTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/TagAdapterTest.jsp new file mode 100644 index 00000000..9b59f67f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/TagAdapterTest.jsp @@ -0,0 +1,213 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + java.io.IOException, + jakarta.servlet.jsp.tagext.TagAdapter, + jakarta.servlet.jsp.tagext.Tag, + jakarta.servlet.jsp.tagext.SimpleTag, + jakarta.servlet.jsp.tagext.JspTag, + jakarta.servlet.jsp.tagext.SimpleTagSupport" %> +<%@ page contentType="text/plain" %> + +<%! + private static TagAdapter getTagAdapter() { + return new TagAdapter(new SimpleTagSupport()); + } +%> + +<%-- Begin test definitions --%> + +<%! + public void tagAdapterCtorTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + TagAdapter adapter = getTagAdapter(); + if (adapter != null) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Unable to create new TagAdapter instanced via " + + "the public constuctor."); + } + } +%> + +<%! + public void tagAdapterSetPageContextTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + TagAdapter adapter = getTagAdapter(); + if (adapter != null) { + try { + adapter.setPageContext(null); + } catch (Throwable t) { + if (t instanceof UnsupportedOperationException) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Exception thrown when TagAdapter" + + ".setPageContext() was called, but was not an instance" + + " of UnsupportedOperationException. Received: " + + t.getClass().getName()); + } + } + } else { + out.println("Test FAILED. TagAdapter was null."); + } + } +%> + +<%! + public void tagAdapterSetParentTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + TagAdapter adapter = getTagAdapter(); + if (adapter != null) { + try { + adapter.setParent(null); + } catch (Throwable t) { + if (t instanceof UnsupportedOperationException) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Exception thrown when TagAdapter" + + ".setParent() was called, but was not an instance" + + " of UnsupportedOperationException. Received: " + + t.getClass().getName()); + } + } + } else { + out.println("Test FAILED. TagAdapter was null."); + } + } +%> + +<%! + public void tagAdapterGetParentTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + TagAdapter adapter = getTagAdapter(); + if (adapter != null) { + boolean pass = false; + JspTag adaptee = adapter.getAdaptee(); + if(adaptee == null) { + out.println("Test FAILED. adpatee is null."); + } else if(adaptee instanceof SimpleTag) { + Tag p1 = adapter.getParent(); + SimpleTag stg = (SimpleTag) adaptee; + JspTag p2 = stg.getParent(); + if(p1 == p2) { + out.println("Test PASSED. getParent() returns the same value as getAdaptee().getParent()"); + } else { + out.println("Test FAILED. getParent() does not return the same value as getAdaptee().getParent()"); + } + } else { + out.println("Test PASSED. adaptee is not a SimpleTag and need to update tests."); + } + } else { + out.println("Test FAILED. TagAdapter was null."); + } + } +%> + +<%! + public void tagAdapterDoStartTagTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + TagAdapter adapter = getTagAdapter(); + if (adapter != null) { + try { + adapter.doStartTag(); + } catch (Throwable t) { + if (t instanceof UnsupportedOperationException) { + out.println("Test PASSED"); + } else if (t instanceof JspException) { + out.println("Test FAILED. JspException was incorrectly" + + " thrown when calling doStartTag() on the TagAdapter."); + } else { + out.println("Test FAILED. Exception thrown when TagAdapter" + + ".doStartTag() was called, but was not an instance" + + " of UnsupportedOperationException. Received: " + + t.getClass().getName()); + } + } + } else { + out.println("Test FAILED. TagAdapter was null."); + } + } +%> + +<%! + public void tagAdapterDoEndTagTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + TagAdapter adapter = getTagAdapter(); + if (adapter != null) { + try { + adapter.doEndTag(); + } catch (Throwable t) { + if (t instanceof UnsupportedOperationException) { + out.println("Test PASSED"); + } else if (t instanceof JspException) { + out.println("Test FAILED. JspException was incorrectly" + + " thrown when calling doEndTag() on the TagAdapter."); + } else { + out.println("Test FAILED. Exception thrown when TagAdapter" + + ".doEndTag() was called, but was not an instance" + + " of UnsupportedOperationException. Received: " + + t.getClass().getName()); + } + } + } else { + out.println("Test FAILED. TagAdapter was null."); + } + } +%> + +<%! + public void tagAdapterReleaseTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + TagAdapter adapter = getTagAdapter(); + if (adapter != null) { + try { + adapter.release(); + } catch (Throwable t) { + if (t instanceof UnsupportedOperationException) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Exception thrown when TagAdapter" + + ".release() was called, but was not an instance" + + " of UnsupportedOperationException. Received: " + + t.getClass().getName()); + } + } + } else { + out.println("Test FAILED. TagAdapter was null."); + } + } +%> + +<%-- Test invocation --%> + +<% JspTestUtil.invokeTest(this, request, response, out); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/TagAdapterValidationTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/TagAdapterValidationTest.jsp new file mode 100644 index 00000000..bb51239d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/TagAdapterValidationTest.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib uri="http://java.sun.com/tck/jsp/tagadapter" prefix="tatest" %> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/WEB-INF/tagadapter.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/WEB-INF/tagadapter.tld new file mode 100644 index 00000000..5bd10448 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/WEB-INF/tagadapter.tld @@ -0,0 +1,37 @@ + + + + + TagAdapter Validation + 1.0 + tagadapter + + simpleparent + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagadapter.TASimpleTag + scriptless + + + classicchild + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagadapter.TagAdapterVerifierTag + JSP + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/jsp_tagadapter_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/jsp_tagadapter_web.xml new file mode 100644 index 00000000..8d23de17 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagadapter/jsp_tagadapter_web.xml @@ -0,0 +1,34 @@ + + + + + TagAdapter + + 5 + + + + http://java.sun.com/tck/jsp/tagadapter + /WEB-INF/tagadapter.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/CanBeRequestTimeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/CanBeRequestTimeTest.jsp new file mode 100644 index 00000000..c4054901 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/CanBeRequestTimeTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagattrinfo" prefix="tagattrinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/GetIdAttribute.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/GetIdAttribute.jsp new file mode 100644 index 00000000..4cf02420 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/GetIdAttribute.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagattrinfo" prefix="tagattrinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/GetNameTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/GetNameTest.jsp new file mode 100644 index 00000000..6ba5e739 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/GetNameTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagattrinfo" prefix="tagattrinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/GetTypeNameTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/GetTypeNameTest.jsp new file mode 100644 index 00000000..84b6cd3e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/GetTypeNameTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagattrinfo" prefix="tagattrinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/IsFragmentTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/IsFragmentTest.jsp new file mode 100644 index 00000000..223211a6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/IsFragmentTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagattrinfo" prefix="tagattrinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/IsRequiredTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/IsRequiredTest.jsp new file mode 100644 index 00000000..a308b928 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/IsRequiredTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagattrinfo" prefix="tagattrinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/ToStringTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/ToStringTest.jsp new file mode 100644 index 00000000..838a7a93 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/ToStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagattrinfo" prefix="tagattrinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/WEB-INF/tagattributeinfo.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/WEB-INF/tagattributeinfo.tld new file mode 100644 index 00000000..c8e5d1c0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/WEB-INF/tagattributeinfo.tld @@ -0,0 +1,47 @@ + + + + + TagLibraryInfo Validation + 1.0 + tagattributeinfo + + test + ee.jakarta.tck.pages.common.tags.tck.SimpleTag + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagattributeinfo.TagAttributeInfoTEI + JSP + + test + true + + + dynAttribute + false + true + java.lang.Integer + + + fragAttribute + true + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/jsp_tagattrinfo_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/jsp_tagattrinfo_web.xml new file mode 100644 index 00000000..837bdcc9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagattributeinfo/jsp_tagattrinfo_web.xml @@ -0,0 +1,34 @@ + + + + + TagAttributeInfo + + 5 + + + + http://java.sun.com/tck/jsp/tagattrinfo + /WEB-INF/tagattributeinfo.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/ConstructorTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/ConstructorTest.jsp new file mode 100644 index 00000000..535295e0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/ConstructorTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagdata" prefix="tagdata" %> + + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/GetAttributeStringTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/GetAttributeStringTest.jsp new file mode 100644 index 00000000..6cf36590 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/GetAttributeStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagdata" prefix="tagdata" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/GetAttributeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/GetAttributeTest.jsp new file mode 100644 index 00000000..b3b4a9c6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/GetAttributeTest.jsp @@ -0,0 +1,38 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagdata" prefix="tagdata" %> + + + ${'EL Expression'} + + + static + + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/GetAttributesTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/GetAttributesTest.jsp new file mode 100644 index 00000000..23a95a76 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/GetAttributesTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagdata" prefix="tagdata" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/SetAttributeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/SetAttributeTest.jsp new file mode 100644 index 00000000..13021919 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/SetAttributeTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagdata" prefix="tagdata" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/WEB-INF/tagdata.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/WEB-INF/tagdata.tld new file mode 100644 index 00000000..3a3f9abd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/WEB-INF/tagdata.tld @@ -0,0 +1,57 @@ + + + + + TagLibraryInfo Validation + 1.0 + tagdata + + test + ee.jakarta.tck.pages.common.tags.tck.SimpleTag + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagdata.TagDataTEI + JSP + + test + true + + + dynAttribute + false + true + + + dynAttribute2 + false + true + + + dynAttribute3 + false + true + + + dynAttribute4 + false + true + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/jsp_tagdata_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/jsp_tagdata_web.xml new file mode 100644 index 00000000..319864f3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagdata/jsp_tagdata_web.xml @@ -0,0 +1,34 @@ + + + + + TagData + + 5 + + + + http://java.sun.com/tck/jsp/tagdata + /WEB-INF/tagdata.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/TagExtraInfoDefaultImplTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/TagExtraInfoDefaultImplTest.jsp new file mode 100644 index 00000000..f20c2773 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/TagExtraInfoDefaultImplTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagextrainfo.TagExtraInfoTEI"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagextrainfo" prefix="tagextrainfo" %> + +<% + if (TagExtraInfoTEI.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + TagExtraInfoTEI.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/TagExtraInfoEmptyReturnTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/TagExtraInfoEmptyReturnTest.jsp new file mode 100644 index 00000000..51e52eea --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/TagExtraInfoEmptyReturnTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagextrainfo.TagExtraInfoTEI"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagextrainfo" prefix="tagextrainfo" %> + +<% + if (TagExtraInfoTEI.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + TagExtraInfoTEI.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/TagExtraInfoNonEmptyReturnTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/TagExtraInfoNonEmptyReturnTest.jsp new file mode 100644 index 00000000..210161a7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/TagExtraInfoNonEmptyReturnTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagextrainfo.TagExtraInfoTEI"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagextrainfo" prefix="tagextrainfo" %> + +<% + if (TagExtraInfoTEI.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + TagExtraInfoTEI.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/TagExtraInfoNullReturnTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/TagExtraInfoNullReturnTest.jsp new file mode 100644 index 00000000..83ee917a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/TagExtraInfoNullReturnTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagextrainfo.TagExtraInfoTEI"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagextrainfo" prefix="tagextrainfo" %> + +<% + if (TagExtraInfoTEI.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + TagExtraInfoTEI.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/WEB-INF/tagextrainfo.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/WEB-INF/tagextrainfo.tld new file mode 100644 index 00000000..121f27fa --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/WEB-INF/tagextrainfo.tld @@ -0,0 +1,37 @@ + + + + + TagLibraryInfo Validation + 1.0 + tagextrainfo + + test + ee.jakarta.tck.pages.common.tags.tck.SimpleTag + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagextrainfo.TagExtraInfoTEI + JSP + + test + true + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/jsp_tagextrainfo_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/jsp_tagextrainfo_web.xml new file mode 100644 index 00000000..35d5397c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagextrainfo/jsp_tagextrainfo_web.xml @@ -0,0 +1,34 @@ + + + + + TagExtraInfo + + 5 + + + + http://java.sun.com/tck/jsp/tagextrainfo + /WEB-INF/tagextrainfo.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/GetNameTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/GetNameTest.jsp new file mode 100644 index 00000000..fd249248 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/GetNameTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagfileinfo" prefix="taginfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/GetPathTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/GetPathTest.jsp new file mode 100644 index 00000000..cc3abf31 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/GetPathTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagfileinfo" prefix="taginfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/GetTagInfoTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/GetTagInfoTest.jsp new file mode 100644 index 00000000..4ec45e6f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/GetTagInfoTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagfileinfo" prefix="taginfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/WEB-INF/tagfileinfo.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/WEB-INF/tagfileinfo.tld new file mode 100644 index 00000000..7d7b12af --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/WEB-INF/tagfileinfo.tld @@ -0,0 +1,41 @@ + + + + + TagFileInfo Validation + 1.0 + tagfileinfo + + test + ee.jakarta.tck.pages.common.tags.tck.SimpleTag + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagfileinfo.TagFileInfoTEI + JSP + + test + true + + + + TagFile1 + /WEB-INF/tags/tagfileinfo/TagFile1.tag + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/WEB-INF/tags/tagfileinfo/TagFile1.tag b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/WEB-INF/tags/tagfileinfo/TagFile1.tag new file mode 100644 index 00000000..6a1bb665 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/WEB-INF/tags/tagfileinfo/TagFile1.tag @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag display-name="TagFile1" + dynamic-attributes="true" + small-icon="/16/icon.jpg" + large-icon="/32/icon.jpg" + description="Simple Tag File" +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/jsp_tagfileinfo_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/jsp_tagfileinfo_web.xml new file mode 100644 index 00000000..3102bcd7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagfileinfo/jsp_tagfileinfo_web.xml @@ -0,0 +1,34 @@ + + + + + TagFileInfo + + 5 + + + + http://java.sun.com/tck/jsp/tagfileinfo + /WEB-INF/tagfileinfo.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetAttributesTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetAttributesTest.jsp new file mode 100644 index 00000000..d99144b3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetAttributesTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taginfo" prefix="taginfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetBodyContentTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetBodyContentTest.jsp new file mode 100644 index 00000000..3238a74e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetBodyContentTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taginfo" prefix="taginfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetDisplayNameTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetDisplayNameTest.jsp new file mode 100644 index 00000000..7042b406 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetDisplayNameTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taginfo" prefix="taginfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetInfoStringTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetInfoStringTest.jsp new file mode 100644 index 00000000..14de41c7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetInfoStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taginfo" prefix="taginfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetLargeIconTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetLargeIconTest.jsp new file mode 100644 index 00000000..f6cde869 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetLargeIconTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taginfo" prefix="taginfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetSmallIconTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetSmallIconTest.jsp new file mode 100644 index 00000000..2cee5b14 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetSmallIconTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taginfo" prefix="taginfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetTagClassNameTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetTagClassNameTest.jsp new file mode 100644 index 00000000..2b153da9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetTagClassNameTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taginfo" prefix="taginfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetTagExtraInfoTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetTagExtraInfoTest.jsp new file mode 100644 index 00000000..418659f2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetTagExtraInfoTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taginfo" prefix="taginfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetTagLibraryTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetTagLibraryTest.jsp new file mode 100644 index 00000000..246a9d3f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetTagLibraryTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taginfo" prefix="taginfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetTagNameTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetTagNameTest.jsp new file mode 100644 index 00000000..adf6f6dd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetTagNameTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taginfo" prefix="taginfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetTagVariableInfosTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetTagVariableInfosTest.jsp new file mode 100644 index 00000000..6f0180a9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/GetTagVariableInfosTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taginfo" prefix="taginfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/HasDynamicAttributesTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/HasDynamicAttributesTest.jsp new file mode 100644 index 00000000..69697e98 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/HasDynamicAttributesTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taginfo" prefix="taginfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/SetTagExtraInfoTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/SetTagExtraInfoTest.jsp new file mode 100644 index 00000000..1dd8f101 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/SetTagExtraInfoTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taginfo" prefix="taginfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/SetTagLibraryTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/SetTagLibraryTest.jsp new file mode 100644 index 00000000..ed0e95c3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/SetTagLibraryTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taginfo" prefix="taginfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/WEB-INF/taginfo.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/WEB-INF/taginfo.tld new file mode 100644 index 00000000..eff508e8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/WEB-INF/taginfo.tld @@ -0,0 +1,56 @@ + + + + + TagInfo Validation + 1.0 + taginfo + + simple test tag + test tag + + /16/icon.jpg + /32/icon.jpg + + test + ee.jakarta.tck.pages.common.tags.tck.SimpleTag + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.taginfo.TagInfoTEI + JSP + + test + true + + true + + + simple test tag + test2 + ee.jakarta.tck.pages.common.tags.tck.SimpleTag + tagdependent + + var1 + + + var2 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/jsp_taginfo_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/jsp_taginfo_web.xml new file mode 100644 index 00000000..32b9fbb2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taginfo/jsp_taginfo_web.xml @@ -0,0 +1,34 @@ + + + + + TagInfo + + 5 + + + + http://java.sun.com/tck/jsp/taginfo + /WEB-INF/taginfo.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetFunctionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetFunctionTest.jsp new file mode 100644 index 00000000..f9942009 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetFunctionTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taglibinfo" prefix="taglibinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetFunctionsTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetFunctionsTest.jsp new file mode 100644 index 00000000..f1bd1545 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetFunctionsTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taglibinfo" prefix="taglibinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetInfoStringTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetInfoStringTest.jsp new file mode 100644 index 00000000..713da1ad --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetInfoStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taglibinfo" prefix="taglibinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetPrefixStringTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetPrefixStringTest.jsp new file mode 100644 index 00000000..c1558a61 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetPrefixStringTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taglibinfo" prefix="taglibinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetReliableURNTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetReliableURNTest.jsp new file mode 100644 index 00000000..39d0bd18 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetReliableURNTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taglibinfo" prefix="taglibinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetRequiredVersionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetRequiredVersionTest.jsp new file mode 100644 index 00000000..a04308e6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetRequiredVersionTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taglibinfo" prefix="taglibinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetShortNameTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetShortNameTest.jsp new file mode 100644 index 00000000..4a45f995 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetShortNameTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taglibinfo" prefix="taglibinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetTagFileTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetTagFileTest.jsp new file mode 100644 index 00000000..e13ae2da --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetTagFileTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taglibinfo" prefix="taglibinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetTagFilesTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetTagFilesTest.jsp new file mode 100644 index 00000000..6babc5ce --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetTagFilesTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taglibinfo" prefix="taglibinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetTagLibraryInfosTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetTagLibraryInfosTest.jsp new file mode 100644 index 00000000..ca0cbd43 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetTagLibraryInfosTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taglibinfo" prefix="taglibinfo" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taglibinfo2" prefix="taglibinfo2" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetTagTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetTagTest.jsp new file mode 100644 index 00000000..1a25b317 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetTagTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taglibinfo" prefix="taglibinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetTagsTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetTagsTest.jsp new file mode 100644 index 00000000..ae452a73 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetTagsTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taglibinfo" prefix="taglibinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetURITest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetURITest.jsp new file mode 100644 index 00000000..f4a9b274 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/GetURITest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/taglibinfo" prefix="taglibinfo" %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/WEB-INF/taglibinfo.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/WEB-INF/taglibinfo.tld new file mode 100644 index 00000000..49b120a6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/WEB-INF/taglibinfo.tld @@ -0,0 +1,67 @@ + + + + + TagLibraryInfo Validation + 1.0 + taglibinfo + http://java.sun.com/tck/jsp/taglibinfo + + tag1 + ee.jakarta.tck.pages.common.tags.tck.SimpleTag + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.taglibraryinfo.TagLibraryInfoTEI + JSP + + test + true + + + + tag2 + ee.jakarta.tck.pages.common.tags.tck.SimpleTag + JSP + + test + false + + + + TagFile1 + /WEB-INF/tags/taglibinfo/TagFile1.tag + + + TagFile2 + /WEB-INF/tags/taglibinfo/TagFile2.tag + + + upperCase + upperCase + ee.jakarta.tck.pages.common.util.JspFunctions + java.lang.String upperCase(java.lang.String) + + + lowerCase + lowerCase + ee.jakarta.tck.pages.common.util.JspFunctions + java.lang.String lowerCase(java.lang.String) + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/WEB-INF/taglibinfo2.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/WEB-INF/taglibinfo2.tld new file mode 100644 index 00000000..e0d61dd7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/WEB-INF/taglibinfo2.tld @@ -0,0 +1,67 @@ + + + + + TagLibraryInfo Validation + 1.0 + taglibinfo2 + http://java.sun.com/tck/jsp/taglibinfo2 + + tag1 + ee.jakarta.tck.pages.common.tags.tck.SimpleTag + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.taglibraryinfo.TagLibraryInfoTEI + JSP + + test + true + + + + tag2 + ee.jakarta.tck.pages.common.tags.tck.SimpleTag + JSP + + test + false + + + + TagFile1 + /WEB-INF/tags/taglibinfo/TagFile1.tag + + + TagFile2 + /WEB-INF/tags/taglibinfo/TagFile2.tag + + + upperCase + upperCase + ee.jakarta.tck.pages.common.util.JspFunctions + java.lang.String upperCase(java.lang.String) + + + lowerCase + lowerCase + ee.jakarta.tck.pages.common.util.JspFunctions + java.lang.String lowerCase(java.lang.String) + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/WEB-INF/tags/taglibinfo/TagFile1.tag b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/WEB-INF/tags/taglibinfo/TagFile1.tag new file mode 100644 index 00000000..5bc6b7fa --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/WEB-INF/tags/taglibinfo/TagFile1.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%-- Tag on a log... --%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/WEB-INF/tags/taglibinfo/TagFile2.tag b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/WEB-INF/tags/taglibinfo/TagFile2.tag new file mode 100644 index 00000000..f0b73201 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/WEB-INF/tags/taglibinfo/TagFile2.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%-- Another Tag on a log... --%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/jsp_taglibinfo_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/jsp_taglibinfo_web.xml new file mode 100644 index 00000000..b4440287 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryinfo/jsp_taglibinfo_web.xml @@ -0,0 +1,31 @@ + + + + + TagLibraryInfo + + 5 + + + + http://java.sun.com/tck/jsp/taglibinfo + /WEB-INF/taglibinfo.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/TLVTranslationErrorTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/TLVTranslationErrorTest.jsp new file mode 100644 index 00000000..ccf4b987 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/TLVTranslationErrorTest.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tlvfail" prefix="fail" %> + +Test FAILED. A translation error should have occurred. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/TagLibraryValidatorTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/TagLibraryValidatorTest.jsp new file mode 100644 index 00000000..42792c40 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/TagLibraryValidatorTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.taglibraryvalidator.APIValidator"%> +<%@ page contentType="text/plain" %> + +<%@ taglib uri="http://java.sun.com/tck/jsp/tlv" prefix="tlv1" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tlv" prefix="tlv2" %> + +<% + int count = APIValidator.callCount; + if (count != 1) { + response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, + "Test FAILED. The TagLibraryValidator was called " + count + + " time(s) for the URI 'http://java.sun.com/tck/jsp/tlv', expected a count of 1"); + } +%> +Test PASSED. Validator call count was 1. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/WEB-INF/taglibvalfail.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/WEB-INF/taglibvalfail.tld new file mode 100644 index 00000000..8894cf1f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/WEB-INF/taglibvalfail.tld @@ -0,0 +1,32 @@ + + + + + Tag Library for TagLibraryValidator Tests + TagLibraryValidator Test Tag Library + 1.0 + taglibvalfail + + Validator to verify API/container interoperation. + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.taglibraryvalidator.FailingValidator + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/WEB-INF/taglibvalidator.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/WEB-INF/taglibvalidator.tld new file mode 100644 index 00000000..7e2e1be2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/WEB-INF/taglibvalidator.tld @@ -0,0 +1,36 @@ + + + + + Tag Library for TagLibraryValidator Tests + TagLibraryValidator Test Tag Library + 1.0 + taglibvalidator + + Validator to verify API/container interoperation. + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.taglibraryvalidator.APIValidator + + initParam + paramValue + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/jsp_taglibvalidator_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/jsp_taglibvalidator_web.xml new file mode 100644 index 00000000..c6c99f8d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/taglibraryvalidator/jsp_taglibvalidator_web.xml @@ -0,0 +1,38 @@ + + + + + TagLibraryValidator + + 5 + + + + http://java.sun.com/tck/jsp/tlv + /WEB-INF/taglibvalidator.tld + + + http://java.sun.com/tck/jsp/tlvfail + /WEB-INF/taglibvalfail.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/DoAfterBodyEvalBodyAgainTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/DoAfterBodyEvalBodyAgainTest.jsp new file mode 100644 index 00000000..7ba326f7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/DoAfterBodyEvalBodyAgainTest.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagsupport" prefix="tag" %> + +<%! int i = 0; %> + + Body Evaluated<%= ++i %> + + + + + + + + +${validate.result} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/DoAfterBodySkipBodyTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/DoAfterBodySkipBodyTest.jsp new file mode 100644 index 00000000..c91aad03 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/DoAfterBodySkipBodyTest.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagsupport" prefix="tag" %> + +<%! int i = 0; %> + + Body Evaluated<%= ++i %> + + + + + + + + +${validate.result} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/DoEndTagEvalPageTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/DoEndTagEvalPageTest.jsp new file mode 100644 index 00000000..f15f9aa6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/DoEndTagEvalPageTest.jsp @@ -0,0 +1,44 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagsupport" prefix="tag" %> + + + + Test FAILED. + + + + + + + + + + + + + + + +${validate.result} +${validate1.result}1 diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/DoEndTagSkipPageTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/DoEndTagSkipPageTest.jsp new file mode 100644 index 00000000..0d88b870 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/DoEndTagSkipPageTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagsupport" prefix="tag" %> + + + + Test FAILED. + + +Test FAILED diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/DoStartEvalBodyIncludeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/DoStartEvalBodyIncludeTest.jsp new file mode 100644 index 00000000..29bce624 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/DoStartEvalBodyIncludeTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagsupport" prefix="tag" %> + + + Test FAILED + +<% + // body evaluation should have used the out for the page. + // Flush the current out. + out.clearBuffer(); +%> + + + + + + + +${validate.result} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/DoStartSkipBodyTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/DoStartSkipBodyTest.jsp new file mode 100644 index 00000000..2e35c24e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/DoStartSkipBodyTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagsupport" prefix="tag" %> + + + Test FAILED. + + + + + + + + +${validate.result} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/FindAncestorTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/FindAncestorTest.jsp new file mode 100644 index 00000000..cad4f75d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/FindAncestorTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagsupport" prefix="tag" %> + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/MethodValidation.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/MethodValidation.jsp new file mode 100644 index 00000000..e91d02ff --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/MethodValidation.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + + + + + + + +${validate.result} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/TagInitializationTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/TagInitializationTest.jsp new file mode 100644 index 00000000..e631dc83 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/TagInitializationTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagsupport" prefix="tag" %> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/TagSupportApiTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/TagSupportApiTest.jsp new file mode 100644 index 00000000..2159adf1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/TagSupportApiTest.jsp @@ -0,0 +1,164 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="java.io.IOException, + jakarta.servlet.jsp.tagext.TagSupport, + jakarta.servlet.jsp.tagext.Tag, + ee.jakarta.tck.pages.common.util.JspTestUtil, + java.util.Enumeration"%> +<%@ page contentType="text/plain" %> + +<%-- Begin test definitions --%> + +<%! + public void doStartTagTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + TagSupport support = new TagSupport(); + int retValue = 0; + try { + retValue = support.doStartTag(); + } catch (JspException je) { + throw new ServletException("Unexpected Exception!", je); + } + if (retValue == Tag.SKIP_BODY) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected the default return value" + + " of TagSupport.doStartTag() to be Tag.SKIP_BODY. Received:" + + " " + JspTestUtil.getTagStatusAsString("doStartTag", "Tag", + retValue)); + } + } +%> + +<%! + public void doEndTagTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + TagSupport support = new TagSupport(); + int retValue = 0; + try { + retValue = support.doEndTag(); + } catch (JspException je) { + throw new ServletException("Unexpected Exception!", je); + } + if (retValue == Tag.EVAL_PAGE) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected the default return value" + + " of TagSupport.doEndTag() to be Tag.EVAL_PAGE. Received:" + + " " + JspTestUtil.getTagStatusAsString("doEndTag", "Tag", + retValue)); + } + } +%> + +<%! + public void doAfterBodyTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + TagSupport support = new TagSupport(); + int retValue = 0; + try { + retValue = support.doAfterBody(); + } catch (JspException je) { + throw new ServletException("Unexpected Exception!", je); + } + if (retValue == Tag.SKIP_BODY) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected the default return value" + + " of TagSupport.doAfterBody() to be Tag.SKIP_BODY. Received:" + + " " + JspTestUtil.getTagStatusAsString("doAfterBody", "IterationTag", + retValue)); + } + } +%> + +<%! + public void setGetValue(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + TagSupport support = new TagSupport(); + support.setValue("key1", "value1"); + String retValue = (String) support.getValue("key1"); + if (retValue.equals("value1")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected TagSupport.getValue() to return" + + "'value1' for key 'key1'. The actual value received was: " + + retValue); + } + } +%> + +<%! + public void getValues(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + TagSupport support = new TagSupport(); + support.setValue("key1", "value1"); + support.setValue("key3", "value3"); + support.setValue("key2", "value2"); + Enumeration e = support.getValues(); + if (JspTestUtil.checkEnumeration(e, + new String[] { "key1", "key2", "key3" })) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected the following values to be found" + + " in the Enumeration returned by getValues(): [ key1, key2, key3 ]" + + ". Values in the Enumeration: " + + JspTestUtil.getAsString(support.getValues())); + } + } +%> + +<%! + public void removeValue(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + TagSupport support = new TagSupport(); + support.setValue("key1", "value1"); + support.setValue("key2", "value2"); + support.removeValue("key1"); + if (support.getValue("key1") == null) { + if (support.getValue("key2") != null) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Passed 'key1' to TagSupport.remove" + + "Value(), but 'key2' was removed as well."); + } + } else { + out.println("Test FAILED. Passed 'key1' to TagSupport.remove" + + "Value(), but 'key1' was not removed."); + } + } +%> + +<%-- Test invocation --%> + +<% + JspTestUtil.invokeTest(this, request, response, out); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/TagSupportSynchronizationTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/TagSupportSynchronizationTest.jsp new file mode 100644 index 00000000..951bc291 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/TagSupportSynchronizationTest.jsp @@ -0,0 +1,129 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagsupport" prefix="tag" %> + +<%-- Validate synchronization when iterating over body --%> +Iteration synchronization +-------------------------------------------- +<%! int counter = 2; %> + + <% + int beg = (begin != null) ? begin.intValue() : 0; + int nes = (nested != null) ? nested.intValue() : 0; + if (counter == 2) { + // doStartTag() called initial value of 1 + if (beg < 1) { + out.println("Test FAILED. Variable 'begin' not synchronized after" + + " doStartTag(). Expected a value of '1'. Received: " + beg); + } + if (beg > 1) { + out.println("Test FAILED. Variable 'begin' seems to have been" + + " synchronized too many times after doStartTag(). Expected " + + "a value of '1'. Received: " + beg); + } + if (nes < 1) { + out.println("Test FAILED. Variable 'nested' not synchronized after" + + " doStartTag(). Expected a value of '1'. Received: " + nes); + } + if (nes > 1) { + out.println("Test FAILED. Variable 'nested' seems to have been" + + " synchronized too many times after doStartTag(). Expected " + + "a value of '1'. Received: " + nes); + } + } else { + // doAfterBody() called with EVAL_BODY_AGAIN new value of 2 + if (beg < 2) { + out.println("Test FAILED. Variable 'begin' not synchronized after" + + " doAfterBody(). Expected a value of '2'. Received: " + beg); + } + if (beg > 2) { + out.println("Test FAILED. Variable 'begin' seems to have been" + + " synchronized too many times after doAfterBody(). Expected " + + "a value of '2'. Received: " + beg); + } + if (nes != 2) { + out.println("Test FAILED. Variable 'nested' not synchronized after" + + " doAfterBody(). Expected a value of '2'. Received: " + nes); + } + if (nes > 2) { + out.println("Test FAILED. Variable 'nested' seems to have been" + + " synchronized too many times after doAfterBody(). Expected " + + "a value of '2'. Received: " + nes); + } + } + counter--; + %> + +<% + // doAfterBody() has been called with SKIP_BODY, then doEndTag() value + // incremented by 2. + int beg = (begin != null) ? begin.intValue() : 0; + int eend = (end != null) ? end.intValue() : 0; + if (beg < 4) { + out.println("Test FAILED. Variable 'begin' not synchronized after" + + " doEndTag(). Expected a value of '4'. Received: " + beg); + } + if (beg > 4) { + out.println("Test FAILED. Variable 'begin' seems to have been" + + " synchronized too many times after doEndTag(). Expected " + + "a value of '4'. Received: " + beg); + } + if (eend < 4) { + out.println("Test FAILED. Variable 'end' not synchronized after " + + " doEndTag(). Expected a value of '4'. Received: " + eend); + } + if (eend > 4) { + out.println("Test FAILED. Variable 'end' seems to have been" + + " synchronized too many times after doEndTag(). Expected " + + "a value of '4'. Received: " + eend); + } + pageContext.removeAttribute("begin"); + pageContext.removeAttribute("end"); +%> + +<%-- Validate synchronization when doStartTag() returns SKIP_BODY --%> +Tag Synchronization +-------------------------------------------- + +<% + // doStartTag() and doEndTag() have each been called once. + beg = (begin != null) ? begin.intValue() : 0; + eend = (end != null) ? end.intValue() : 0; + if (beg < 2) { + out.println("Test FAILED. Variable 'begin' not synchronized after" + + " doStartTag() and/or doEndTag(). Expected a value of '2'. Received: " + beg); + } + if (beg > 2) { + out.println("Test FAILED. Variable 'begin' seems to have been" + + " synchronized too many times after doStartTag() and/ordoEndTag(). Expected " + + "a value of '2'. Received: " + beg); + } + if (eend < 2) { + out.println("Test FAILED. Variable 'end' not synchronized after " + + " doStartTag() and/or doEndTag(). Expected a value of '2'. Received: " + eend); + } + if (eend > 2) { + out.println("Test FAILED. Variable 'end' seems to have been" + + " synchronized too many times after doStartTag() and/or doEndTag(). Expected " + + "a value of '2'. Received: " + eend); + } + pageContext.removeAttribute("begin"); + pageContext.removeAttribute("end"); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/WEB-INF/tagsupport.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/WEB-INF/tagsupport.tld new file mode 100644 index 00000000..01c750ed --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/WEB-INF/tagsupport.tld @@ -0,0 +1,129 @@ + + + + + Tags for Tag/Container behavior tests + Tag + 1.0 + tagsupport + + parent + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagsupport.ParentTag + JSP + + result + false + + + + init + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagsupport.InitializationTag + JSP + + attribute1 + true + + + attribute2 + true + + + attribute3 + true + + + + interaction + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagsupport.ContainerInteractionTag + JSP + + doStartTag + true + java.lang.String + + + doEndTag + true + java.lang.String + + + doAfterBody + false + java.lang.String + + + bodyCount + java.lang.Integer + + + result + true + + + + ancestor + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagsupport.FindAncestorTag + JSP + + + sync + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagsupport.SynchronizationTag + JSP + + begin + java.lang.Integer + yes + AT_BEGIN + + + nested + java.lang.Integer + yes + NESTED + + + end + java.lang.Integer + yes + AT_END + + + doStartTag + true + java.lang.String + + + doEndTag + true + java.lang.String + + + doAfterBody + false + java.lang.String + + + bodyCount + java.lang.Integer + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/jsp_tagsupport_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/jsp_tagsupport_web.xml new file mode 100644 index 00000000..8c173765 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagsupport/jsp_tagsupport_web.xml @@ -0,0 +1,34 @@ + + + + + TagSupport + + 5 + + + + http://java.sun.com/tck/jsp/tagsupport + /WEB-INF/tagsupport.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/GetClassNameTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/GetClassNameTest.jsp new file mode 100644 index 00000000..bfc13efa --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/GetClassNameTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagvarinfo" prefix="tagvarinfo" %> +<% String var2 = null; %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/GetDeclareTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/GetDeclareTest.jsp new file mode 100644 index 00000000..dd67d110 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/GetDeclareTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagvarinfo" prefix="tagvarinfo" %> +<% String var2 = null; %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/GetNameFromAttributeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/GetNameFromAttributeTest.jsp new file mode 100644 index 00000000..f72e3a52 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/GetNameFromAttributeTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagvarinfo" prefix="tagvarinfo" %> +<% String var2 = null; %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/GetNameGivenTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/GetNameGivenTest.jsp new file mode 100644 index 00000000..f852862a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/GetNameGivenTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagvarinfo" prefix="tagvarinfo" %> +<% String var2 = null; %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/GetScopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/GetScopeTest.jsp new file mode 100644 index 00000000..5f79c4a8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/GetScopeTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.BaseTCKExtraInfo"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/tagvarinfo" prefix="tagvarinfo" %> +<% String var2 = null; %> + +<% + if (BaseTCKExtraInfo.teiWasCalled()) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Configured TEI was not called by container."); + } + BaseTCKExtraInfo.reset(); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/WEB-INF/tagvarinfo.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/WEB-INF/tagvarinfo.tld new file mode 100644 index 00000000..ca44fa9b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/WEB-INF/tagvarinfo.tld @@ -0,0 +1,59 @@ + + + + + Tag Library for TagVariableInfo Tests + TagVariableInfo Test Tag Library + 1.0 + tagvarinfo + + Simple Test Tag + Simple Test Tag + test + ee.jakarta.tck.pages.common.tags.tck.SimpleTag + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.tagvariableinfo.TagVarInfoTEI + JSP + + var1 + java.lang.Integer + true + + + test + AT_BEGIN + + + var2 + false + AT_END + + + var3 + NESTED + + + test + true + java.lang.String + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/jsp_tagvarinfo_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/jsp_tagvarinfo_web.xml new file mode 100644 index 00000000..bfcd0124 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/tagvariableinfo/jsp_tagvarinfo_web.xml @@ -0,0 +1,34 @@ + + + + + TagVariableInfo + + 5 + + + + http://java.sun.com/tck/jsp/tagvarinfo + /WEB-INF/tagvarinfo.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/TryCatchFinallyTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/TryCatchFinallyTest.jsp new file mode 100644 index 00000000..5abfefe4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/TryCatchFinallyTest.jsp @@ -0,0 +1,47 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/trycatchfinally" prefix="try" %> + +<% try { %> + + +<% } catch (Throwable t) { } %> + + + + + + + + + + + + + + + + + + + + +${verifier.result} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/WEB-INF/trycatchfinally.tld b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/WEB-INF/trycatchfinally.tld new file mode 100644 index 00000000..7887f8db --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/WEB-INF/trycatchfinally.tld @@ -0,0 +1,42 @@ + + + + + Test Tag(s) for TryCatchFinally + trycatchfinally + 1.0 + trycatchfinally + + tcf + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.trycatchfinally.TCFTestTag + JSP + + location + true + + + + throwit + ee.jakarta.tck.pages.api.jakarta_servlet.jsp.tagext.trycatchfinally.ThrowTag + JSP + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/jsp_tcfinally_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/jsp_tcfinally_web.xml new file mode 100644 index 00000000..09ec1a70 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/trycatchfinally/jsp_tcfinally_web.xml @@ -0,0 +1,31 @@ + + + + + TryCatchFinally + + 5 + + + + http://java.sun.com/tck/jsp/trycatchfinally + /WEB-INF/trycatchfinally.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/variableinfo/VariableInfoTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/variableinfo/VariableInfoTest.jsp new file mode 100644 index 00000000..04a03bb5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/variableinfo/VariableInfoTest.jsp @@ -0,0 +1,150 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + java.io.IOException, + jakarta.servlet.jsp.tagext.VariableInfo" %> +<%@ page contentType="text/plain" %> + +<%-- Begin test definitions --%> + +<%! + public void variableInfoCtorTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + VariableInfo infoBegin = new VariableInfo("beginVar", + "ee.jakarta.tck.pages.api.MyVar", true, VariableInfo.AT_BEGIN); + VariableInfo infoNested = new VariableInfo("nestedVar", + "ee.jakarta.tck.pages.api.MyVar", false, VariableInfo.NESTED); + VariableInfo infoEnd = new VariableInfo("endVar", + "ee.jakarta.tck.pages.api.MyVar", true, VariableInfo.AT_END); + if (infoBegin != null) { + if (infoNested != null) { + if (infoEnd != null) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Unable to create instance of VariableInfo."); + } + } else { + out.println("Test FAILED. Unable to create instance of VariableInfo."); + } + } else { + out.println("Test FAILED. Unable to create instance of VariableInfo."); + } + } +%> + +<%! + public void variableInfoGetVarNameTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + VariableInfo info = new VariableInfo("myVar", + "ee.jakarta.tck.pages.api.MyVar", true, VariableInfo.NESTED); + if (info != null) { + String varName = info.getVarName(); + if (varName != null) { + if (varName.equals("myVar")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected 'myVar' to be returned" + + " from VariableInfo.getVarName()."); + out.println("Received: " + varName); + } + } else { + out.println("Test FAILED. VariableInfo.getVarName() returned null."); + } + } else { + out.println("Test FAILED. Unable to create instance of VariableInfo."); + } + } +%> + +<%! + public void variableInfoGetClassNameTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + VariableInfo info = new VariableInfo("myVar", + "ee.jakarta.tck.pages.api.MyVar", true, VariableInfo.AT_END); + if (info != null) { + String className = info.getClassName(); + if (className != null) { + if (className.equals("ee.jakarta.tck.pages.api.MyVar")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected 'ee.jakarta.tck.pages.api.MyVar'" + + " to be retuned from VariableInfo.getClassName()"); + out.println("Received: " + className); + } + } else { + out.println("Test FAILED. VariableInfo.getClassName() returned null."); + } + } else { + out.println("Test FAILED. Unable to create instance of VariableInfo."); + } + } +%> + +<%! + public void variableInfoGetDeclareTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + VariableInfo info = new VariableInfo("myVar", + "ee.jakarta.tck.pages.api.MyVar", true, VariableInfo.AT_END); + if (info != null) { + boolean declare = info.getDeclare(); + if (declare == true) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected 'true'" + + " to be retuned from VariableInfo.getDeclare()"); + out.println("Received: false"); + } + } else { + out.println("Test FAILED. Unable to create instance of VariableInfo."); + } + } +%> + +<%! + public void variableInfoGetScopeTest(HttpServletRequest req, + HttpServletResponse res, + JspWriter out) + throws ServletException, IOException { + VariableInfo info = new VariableInfo("myVar", + "ee.jakarta.tck.pages.api.MyVar", false, VariableInfo.NESTED); + if (info != null) { + int scope = info.getScope(); + if (scope == VariableInfo.NESTED) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. VariableInto.getScope() did not return" + + "the expected value, VariableInto.NESTED."); + } + } else { + out.println("Test FAILED. Unable to create instance of VariableInfo."); + } + } +%> + +<%-- Test invocation --%> + +<% JspTestUtil.invokeTest(this, request, response, out); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/variableinfo/jsp_varinfo_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/variableinfo/jsp_varinfo_web.xml new file mode 100644 index 00000000..f9a0c0bd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/api/jakarta_servlet/jsp/tagext/variableinfo/jsp_varinfo_web.xml @@ -0,0 +1,25 @@ + + + + + VariableInfo + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/signaturetest/jsp/jakarta.servlet.jsp.sig_3.1 b/tck/src/main/resources/ee/jakarta/tck/pages/signaturetest/jsp/jakarta.servlet.jsp.sig_3.1 new file mode 100644 index 00000000..f11597b6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/signaturetest/jsp/jakarta.servlet.jsp.sig_3.1 @@ -0,0 +1,663 @@ +#Signature file v4.1 +#Version 3.1 + +CLSS public abstract jakarta.el.ELResolver +cons public init() +fld public final static java.lang.String RESOLVABLE_AT_DESIGN_TIME = "resolvableAtDesignTime" +fld public final static java.lang.String TYPE = "type" +meth public <%0 extends java.lang.Object> {%%0} convertToType(jakarta.el.ELContext,java.lang.Object,java.lang.Class<{%%0}>) +meth public abstract boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public abstract java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public abstract java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public abstract java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public abstract void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +meth public java.lang.Object invoke(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Class[],java.lang.Object[]) +meth public java.util.Iterator getFeatureDescriptors(jakarta.el.ELContext,java.lang.Object) + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="5.0") +supr java.lang.Object + +CLSS public abstract interface jakarta.servlet.Servlet +meth public abstract jakarta.servlet.ServletConfig getServletConfig() +meth public abstract java.lang.String getServletInfo() +meth public abstract void destroy() +meth public abstract void init(jakarta.servlet.ServletConfig) throws jakarta.servlet.ServletException +meth public abstract void service(jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse) throws jakarta.servlet.ServletException,java.io.IOException + +CLSS public final jakarta.servlet.jsp.ErrorData +cons public init(java.lang.Throwable,int,java.lang.String,java.lang.String) +meth public int getStatusCode() +meth public java.lang.String getRequestURI() +meth public java.lang.String getServletName() +meth public java.lang.Throwable getThrowable() +supr java.lang.Object +hfds servletName,statusCode,throwable,uri + +CLSS public abstract interface jakarta.servlet.jsp.HttpJspPage +intf jakarta.servlet.jsp.JspPage +meth public abstract void _jspService(jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse) throws jakarta.servlet.ServletException,java.io.IOException + +CLSS public abstract interface jakarta.servlet.jsp.JspApplicationContext +meth public abstract jakarta.el.ExpressionFactory getExpressionFactory() +meth public abstract void addELContextListener(jakarta.el.ELContextListener) +meth public abstract void addELResolver(jakarta.el.ELResolver) + +CLSS public abstract jakarta.servlet.jsp.JspContext +cons public init() +meth public abstract int getAttributesScope(java.lang.String) +meth public abstract jakarta.el.ELContext getELContext() +meth public abstract jakarta.servlet.jsp.JspWriter getOut() +meth public abstract jakarta.servlet.jsp.el.ExpressionEvaluator getExpressionEvaluator() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +meth public abstract jakarta.servlet.jsp.el.VariableResolver getVariableResolver() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +meth public abstract java.lang.Object findAttribute(java.lang.String) +meth public abstract java.lang.Object getAttribute(java.lang.String) +meth public abstract java.lang.Object getAttribute(java.lang.String,int) +meth public abstract java.util.Enumeration getAttributeNamesInScope(int) +meth public abstract void removeAttribute(java.lang.String) +meth public abstract void removeAttribute(java.lang.String,int) +meth public abstract void setAttribute(java.lang.String,java.lang.Object) +meth public abstract void setAttribute(java.lang.String,java.lang.Object,int) +meth public jakarta.servlet.jsp.JspWriter popBody() +meth public jakarta.servlet.jsp.JspWriter pushBody(java.io.Writer) +supr java.lang.Object + +CLSS public abstract jakarta.servlet.jsp.JspEngineInfo +cons public init() +meth public abstract java.lang.String getSpecificationVersion() +supr java.lang.Object + +CLSS public jakarta.servlet.jsp.JspException +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +meth public java.lang.Throwable getRootCause() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +supr java.lang.Exception +hfds serialVersionUID + +CLSS public abstract jakarta.servlet.jsp.JspFactory +cons public init() +meth public abstract jakarta.servlet.jsp.JspApplicationContext getJspApplicationContext(jakarta.servlet.ServletContext) +meth public abstract jakarta.servlet.jsp.JspEngineInfo getEngineInfo() +meth public abstract jakarta.servlet.jsp.PageContext getPageContext(jakarta.servlet.Servlet,jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse,java.lang.String,boolean,int,boolean) +meth public abstract void releasePageContext(jakarta.servlet.jsp.PageContext) +meth public static jakarta.servlet.jsp.JspFactory getDefaultFactory() +meth public static void setDefaultFactory(jakarta.servlet.jsp.JspFactory) +supr java.lang.Object +hfds deflt + +CLSS public abstract interface jakarta.servlet.jsp.JspPage +intf jakarta.servlet.Servlet +meth public abstract void jspDestroy() +meth public abstract void jspInit() + +CLSS public jakarta.servlet.jsp.JspTagException +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +supr jakarta.servlet.jsp.JspException +hfds serialVersionUID + +CLSS public abstract jakarta.servlet.jsp.JspWriter +cons protected init(int,boolean) +fld protected boolean autoFlush +fld protected int bufferSize +fld public final static int DEFAULT_BUFFER = -1 +fld public final static int NO_BUFFER = 0 +fld public final static int UNBOUNDED_BUFFER = -2 +meth public abstract int getRemaining() +meth public abstract void clear() throws java.io.IOException +meth public abstract void clearBuffer() throws java.io.IOException +meth public abstract void close() throws java.io.IOException +meth public abstract void flush() throws java.io.IOException +meth public abstract void newLine() throws java.io.IOException +meth public abstract void print(boolean) throws java.io.IOException +meth public abstract void print(char) throws java.io.IOException +meth public abstract void print(char[]) throws java.io.IOException +meth public abstract void print(double) throws java.io.IOException +meth public abstract void print(float) throws java.io.IOException +meth public abstract void print(int) throws java.io.IOException +meth public abstract void print(java.lang.Object) throws java.io.IOException +meth public abstract void print(java.lang.String) throws java.io.IOException +meth public abstract void print(long) throws java.io.IOException +meth public abstract void println() throws java.io.IOException +meth public abstract void println(boolean) throws java.io.IOException +meth public abstract void println(char) throws java.io.IOException +meth public abstract void println(char[]) throws java.io.IOException +meth public abstract void println(double) throws java.io.IOException +meth public abstract void println(float) throws java.io.IOException +meth public abstract void println(int) throws java.io.IOException +meth public abstract void println(java.lang.Object) throws java.io.IOException +meth public abstract void println(java.lang.String) throws java.io.IOException +meth public abstract void println(long) throws java.io.IOException +meth public boolean isAutoFlush() +meth public int getBufferSize() +supr java.io.Writer + +CLSS public abstract jakarta.servlet.jsp.PageContext +cons public init() +fld public final static int APPLICATION_SCOPE = 4 +fld public final static int PAGE_SCOPE = 1 +fld public final static int REQUEST_SCOPE = 2 +fld public final static int SESSION_SCOPE = 3 +fld public final static java.lang.String APPLICATION = "jakarta.servlet.jsp.jspApplication" +fld public final static java.lang.String CONFIG = "jakarta.servlet.jsp.jspConfig" +fld public final static java.lang.String EXCEPTION = "jakarta.servlet.jsp.jspException" +fld public final static java.lang.String OUT = "jakarta.servlet.jsp.jspOut" +fld public final static java.lang.String PAGE = "jakarta.servlet.jsp.jspPage" +fld public final static java.lang.String PAGECONTEXT = "jakarta.servlet.jsp.jspPageContext" +fld public final static java.lang.String REQUEST = "jakarta.servlet.jsp.jspRequest" +fld public final static java.lang.String RESPONSE = "jakarta.servlet.jsp.jspResponse" +fld public final static java.lang.String SESSION = "jakarta.servlet.jsp.jspSession" +meth public abstract jakarta.servlet.ServletConfig getServletConfig() +meth public abstract jakarta.servlet.ServletContext getServletContext() +meth public abstract jakarta.servlet.ServletRequest getRequest() +meth public abstract jakarta.servlet.ServletResponse getResponse() +meth public abstract jakarta.servlet.http.HttpSession getSession() +meth public abstract java.lang.Exception getException() +meth public abstract java.lang.Object getPage() +meth public abstract void forward(java.lang.String) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void handlePageException(java.lang.Exception) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void handlePageException(java.lang.Throwable) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void include(java.lang.String) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void include(java.lang.String,boolean) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void initialize(jakarta.servlet.Servlet,jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse,java.lang.String,boolean,int,boolean) throws java.io.IOException +meth public abstract void release() +meth public jakarta.servlet.jsp.ErrorData getErrorData() +meth public jakarta.servlet.jsp.tagext.BodyContent pushBody() +supr jakarta.servlet.jsp.JspContext + +CLSS public jakarta.servlet.jsp.SkipPageException +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +supr jakarta.servlet.jsp.JspException +hfds serialVersionUID + +CLSS public jakarta.servlet.jsp.el.ELException + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +meth public java.lang.Throwable getRootCause() +supr java.lang.Exception +hfds mRootCause,serialVersionUID + +CLSS public jakarta.servlet.jsp.el.ELParseException + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +cons public init() +cons public init(java.lang.String) +supr jakarta.servlet.jsp.el.ELException +hfds serialVersionUID + +CLSS public abstract jakarta.servlet.jsp.el.Expression + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +cons public init() +meth public abstract java.lang.Object evaluate(jakarta.servlet.jsp.el.VariableResolver) throws jakarta.servlet.jsp.el.ELException +supr java.lang.Object + +CLSS public abstract jakarta.servlet.jsp.el.ExpressionEvaluator + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +cons public init() +meth public abstract jakarta.servlet.jsp.el.Expression parseExpression(java.lang.String,java.lang.Class,jakarta.servlet.jsp.el.FunctionMapper) throws jakarta.servlet.jsp.el.ELException +meth public abstract java.lang.Object evaluate(java.lang.String,java.lang.Class,jakarta.servlet.jsp.el.VariableResolver,jakarta.servlet.jsp.el.FunctionMapper) throws jakarta.servlet.jsp.el.ELException +supr java.lang.Object + +CLSS public abstract interface jakarta.servlet.jsp.el.FunctionMapper + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +meth public abstract java.lang.reflect.Method resolveFunction(java.lang.String,java.lang.String) + +CLSS public jakarta.servlet.jsp.el.ImplicitObjectELResolver +cons public init() +meth public boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.util.Iterator getFeatureDescriptors(jakarta.el.ELContext,java.lang.Object) + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="JSP 3.1") +meth public void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +supr jakarta.el.ELResolver +hcls EnumeratedMap,ImplicitObjects + +CLSS public jakarta.servlet.jsp.el.ImportELResolver +cons public init() +meth public boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +supr jakarta.el.ELResolver + +CLSS public jakarta.servlet.jsp.el.NotFoundELResolver +cons public init() +meth public boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +supr jakarta.el.ELResolver +hfds LSTRING_FILE,lStrings + +CLSS public jakarta.servlet.jsp.el.ScopedAttributeELResolver +cons public init() +meth public boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.util.Iterator getFeatureDescriptors(jakarta.el.ELContext,java.lang.Object) + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="JSP 3.1") +meth public void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +supr jakarta.el.ELResolver + +CLSS public abstract interface jakarta.servlet.jsp.el.VariableResolver + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +meth public abstract java.lang.Object resolveVariable(java.lang.String) throws jakarta.servlet.jsp.el.ELException + +CLSS public abstract jakarta.servlet.jsp.tagext.BodyContent +cons protected init(jakarta.servlet.jsp.JspWriter) +meth public abstract java.io.Reader getReader() +meth public abstract java.lang.String getString() +meth public abstract void writeOut(java.io.Writer) throws java.io.IOException +meth public jakarta.servlet.jsp.JspWriter getEnclosingWriter() +meth public void clearBody() +meth public void flush() throws java.io.IOException +supr jakarta.servlet.jsp.JspWriter +hfds enclosingWriter + +CLSS public abstract interface jakarta.servlet.jsp.tagext.BodyTag +fld public final static int EVAL_BODY_BUFFERED = 2 +fld public final static int EVAL_BODY_TAG = 2 + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +intf jakarta.servlet.jsp.tagext.IterationTag +meth public abstract void doInitBody() throws jakarta.servlet.jsp.JspException +meth public abstract void setBodyContent(jakarta.servlet.jsp.tagext.BodyContent) + +CLSS public jakarta.servlet.jsp.tagext.BodyTagSupport +cons public init() +fld protected jakarta.servlet.jsp.tagext.BodyContent bodyContent +intf jakarta.servlet.jsp.tagext.BodyTag +meth public int doAfterBody() throws jakarta.servlet.jsp.JspException +meth public int doEndTag() throws jakarta.servlet.jsp.JspException +meth public int doStartTag() throws jakarta.servlet.jsp.JspException +meth public jakarta.servlet.jsp.JspWriter getPreviousOut() +meth public jakarta.servlet.jsp.tagext.BodyContent getBodyContent() +meth public void doInitBody() throws jakarta.servlet.jsp.JspException +meth public void release() +meth public void setBodyContent(jakarta.servlet.jsp.tagext.BodyContent) +supr jakarta.servlet.jsp.tagext.TagSupport +hfds serialVersionUID + +CLSS public abstract interface jakarta.servlet.jsp.tagext.DynamicAttributes +meth public abstract void setDynamicAttribute(java.lang.String,java.lang.String,java.lang.Object) throws jakarta.servlet.jsp.JspException + +CLSS public jakarta.servlet.jsp.tagext.FunctionInfo +cons public init(java.lang.String,java.lang.String,java.lang.String) +meth public java.lang.String getFunctionClass() +meth public java.lang.String getFunctionSignature() +meth public java.lang.String getName() +supr java.lang.Object +hfds functionClass,functionSignature,name + +CLSS public abstract interface jakarta.servlet.jsp.tagext.IterationTag +fld public final static int EVAL_BODY_AGAIN = 2 +intf jakarta.servlet.jsp.tagext.Tag +meth public abstract int doAfterBody() throws jakarta.servlet.jsp.JspException + +CLSS public abstract jakarta.servlet.jsp.tagext.JspFragment +cons public init() +meth public abstract jakarta.servlet.jsp.JspContext getJspContext() +meth public abstract void invoke(java.io.Writer) throws jakarta.servlet.jsp.JspException,java.io.IOException +supr java.lang.Object + +CLSS public abstract interface jakarta.servlet.jsp.tagext.JspIdConsumer +meth public abstract void setJspId(java.lang.String) + +CLSS public abstract interface jakarta.servlet.jsp.tagext.JspTag + +CLSS public abstract jakarta.servlet.jsp.tagext.PageData +cons public init() +meth public abstract java.io.InputStream getInputStream() +supr java.lang.Object + +CLSS public abstract interface jakarta.servlet.jsp.tagext.SimpleTag +intf jakarta.servlet.jsp.tagext.JspTag +meth public abstract jakarta.servlet.jsp.tagext.JspTag getParent() +meth public abstract void doTag() throws jakarta.servlet.jsp.JspException,java.io.IOException +meth public abstract void setJspBody(jakarta.servlet.jsp.tagext.JspFragment) +meth public abstract void setJspContext(jakarta.servlet.jsp.JspContext) +meth public abstract void setParent(jakarta.servlet.jsp.tagext.JspTag) + +CLSS public jakarta.servlet.jsp.tagext.SimpleTagSupport +cons public init() +intf jakarta.servlet.jsp.tagext.SimpleTag +meth protected jakarta.servlet.jsp.JspContext getJspContext() +meth protected jakarta.servlet.jsp.tagext.JspFragment getJspBody() +meth public final static jakarta.servlet.jsp.tagext.JspTag findAncestorWithClass(jakarta.servlet.jsp.tagext.JspTag,java.lang.Class) +meth public jakarta.servlet.jsp.tagext.JspTag getParent() +meth public void doTag() throws jakarta.servlet.jsp.JspException,java.io.IOException +meth public void setJspBody(jakarta.servlet.jsp.tagext.JspFragment) +meth public void setJspContext(jakarta.servlet.jsp.JspContext) +meth public void setParent(jakarta.servlet.jsp.tagext.JspTag) +supr java.lang.Object +hfds jspBody,jspContext,parentTag + +CLSS public abstract interface jakarta.servlet.jsp.tagext.Tag +fld public final static int EVAL_BODY_INCLUDE = 1 +fld public final static int EVAL_PAGE = 6 +fld public final static int SKIP_BODY = 0 +fld public final static int SKIP_PAGE = 5 +intf jakarta.servlet.jsp.tagext.JspTag +meth public abstract int doEndTag() throws jakarta.servlet.jsp.JspException +meth public abstract int doStartTag() throws jakarta.servlet.jsp.JspException +meth public abstract jakarta.servlet.jsp.tagext.Tag getParent() +meth public abstract void release() +meth public abstract void setPageContext(jakarta.servlet.jsp.PageContext) +meth public abstract void setParent(jakarta.servlet.jsp.tagext.Tag) + +CLSS public jakarta.servlet.jsp.tagext.TagAdapter +cons public init(jakarta.servlet.jsp.tagext.SimpleTag) +intf jakarta.servlet.jsp.tagext.Tag +meth public int doEndTag() throws jakarta.servlet.jsp.JspException +meth public int doStartTag() throws jakarta.servlet.jsp.JspException +meth public jakarta.servlet.jsp.tagext.JspTag getAdaptee() +meth public jakarta.servlet.jsp.tagext.Tag getParent() +meth public void release() +meth public void setPageContext(jakarta.servlet.jsp.PageContext) +meth public void setParent(jakarta.servlet.jsp.tagext.Tag) +supr java.lang.Object +hfds parent,parentDetermined,simpleTagAdaptee + +CLSS public jakarta.servlet.jsp.tagext.TagAttributeInfo +cons public init(java.lang.String,boolean,java.lang.String,boolean) +cons public init(java.lang.String,boolean,java.lang.String,boolean,boolean) +cons public init(java.lang.String,boolean,java.lang.String,boolean,boolean,java.lang.String,boolean,boolean,java.lang.String,java.lang.String) +fld public final static java.lang.String ID = "id" +meth public boolean canBeRequestTime() +meth public boolean isDeferredMethod() +meth public boolean isDeferredValue() +meth public boolean isFragment() +meth public boolean isRequired() +meth public java.lang.String getDescription() +meth public java.lang.String getExpectedTypeName() +meth public java.lang.String getMethodSignature() +meth public java.lang.String getName() +meth public java.lang.String getTypeName() +meth public java.lang.String toString() +meth public static jakarta.servlet.jsp.tagext.TagAttributeInfo getIdAttribute(jakarta.servlet.jsp.tagext.TagAttributeInfo[]) +supr java.lang.Object +hfds deferredMethod,deferredValue,description,expectedTypeName,fragment,methodSignature,name,reqTime,required,type + +CLSS public jakarta.servlet.jsp.tagext.TagData +cons public init(java.lang.Object[][]) +cons public init(java.util.Hashtable) +fld public final static java.lang.Object REQUEST_TIME_VALUE +intf java.lang.Cloneable +meth public java.lang.Object getAttribute(java.lang.String) +meth public java.lang.String getAttributeString(java.lang.String) +meth public java.lang.String getId() +meth public java.util.Enumeration getAttributes() +meth public void setAttribute(java.lang.String,java.lang.Object) +supr java.lang.Object +hfds attributes + +CLSS public abstract jakarta.servlet.jsp.tagext.TagExtraInfo +cons public init() +meth public boolean isValid(jakarta.servlet.jsp.tagext.TagData) +meth public final jakarta.servlet.jsp.tagext.TagInfo getTagInfo() +meth public final void setTagInfo(jakarta.servlet.jsp.tagext.TagInfo) +meth public jakarta.servlet.jsp.tagext.ValidationMessage[] validate(jakarta.servlet.jsp.tagext.TagData) +meth public jakarta.servlet.jsp.tagext.VariableInfo[] getVariableInfo(jakarta.servlet.jsp.tagext.TagData) +supr java.lang.Object +hfds ZERO_VARIABLE_INFO,tagInfo + +CLSS public jakarta.servlet.jsp.tagext.TagFileInfo +cons public init(java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagInfo) +meth public jakarta.servlet.jsp.tagext.TagInfo getTagInfo() +meth public java.lang.String getName() +meth public java.lang.String getPath() +supr java.lang.Object +hfds name,path,tagInfo + +CLSS public jakarta.servlet.jsp.tagext.TagInfo +cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagLibraryInfo,jakarta.servlet.jsp.tagext.TagExtraInfo,jakarta.servlet.jsp.tagext.TagAttributeInfo[]) +cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagLibraryInfo,jakarta.servlet.jsp.tagext.TagExtraInfo,jakarta.servlet.jsp.tagext.TagAttributeInfo[],java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagVariableInfo[]) +cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagLibraryInfo,jakarta.servlet.jsp.tagext.TagExtraInfo,jakarta.servlet.jsp.tagext.TagAttributeInfo[],java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagVariableInfo[],boolean) +fld public final static java.lang.String BODY_CONTENT_EMPTY = "empty" +fld public final static java.lang.String BODY_CONTENT_JSP = "JSP" +fld public final static java.lang.String BODY_CONTENT_SCRIPTLESS = "scriptless" +fld public final static java.lang.String BODY_CONTENT_TAG_DEPENDENT = "tagdependent" +meth public boolean hasDynamicAttributes() +meth public boolean isValid(jakarta.servlet.jsp.tagext.TagData) +meth public jakarta.servlet.jsp.tagext.TagAttributeInfo[] getAttributes() +meth public jakarta.servlet.jsp.tagext.TagExtraInfo getTagExtraInfo() +meth public jakarta.servlet.jsp.tagext.TagLibraryInfo getTagLibrary() +meth public jakarta.servlet.jsp.tagext.TagVariableInfo[] getTagVariableInfos() +meth public jakarta.servlet.jsp.tagext.ValidationMessage[] validate(jakarta.servlet.jsp.tagext.TagData) +meth public jakarta.servlet.jsp.tagext.VariableInfo[] getVariableInfo(jakarta.servlet.jsp.tagext.TagData) +meth public java.lang.String getBodyContent() +meth public java.lang.String getDisplayName() +meth public java.lang.String getInfoString() +meth public java.lang.String getLargeIcon() +meth public java.lang.String getSmallIcon() +meth public java.lang.String getTagClassName() +meth public java.lang.String getTagName() +meth public void setTagExtraInfo(jakarta.servlet.jsp.tagext.TagExtraInfo) +meth public void setTagLibrary(jakarta.servlet.jsp.tagext.TagLibraryInfo) +supr java.lang.Object +hfds attributeInfo,bodyContent,displayName,dynamicAttributes,infoString,largeIcon,smallIcon,tagClassName,tagExtraInfo,tagLibrary,tagName,tagVariableInfo + +CLSS public abstract jakarta.servlet.jsp.tagext.TagLibraryInfo +cons protected init(java.lang.String,java.lang.String) +fld protected jakarta.servlet.jsp.tagext.FunctionInfo[] functions +fld protected jakarta.servlet.jsp.tagext.TagFileInfo[] tagFiles +fld protected jakarta.servlet.jsp.tagext.TagInfo[] tags +fld protected java.lang.String info +fld protected java.lang.String jspversion +fld protected java.lang.String prefix +fld protected java.lang.String shortname +fld protected java.lang.String tlibversion +fld protected java.lang.String uri +fld protected java.lang.String urn +meth public abstract jakarta.servlet.jsp.tagext.TagLibraryInfo[] getTagLibraryInfos() +meth public jakarta.servlet.jsp.tagext.FunctionInfo getFunction(java.lang.String) +meth public jakarta.servlet.jsp.tagext.FunctionInfo[] getFunctions() +meth public jakarta.servlet.jsp.tagext.TagFileInfo getTagFile(java.lang.String) +meth public jakarta.servlet.jsp.tagext.TagFileInfo[] getTagFiles() +meth public jakarta.servlet.jsp.tagext.TagInfo getTag(java.lang.String) +meth public jakarta.servlet.jsp.tagext.TagInfo[] getTags() +meth public java.lang.String getInfoString() +meth public java.lang.String getPrefixString() +meth public java.lang.String getReliableURN() +meth public java.lang.String getRequiredVersion() +meth public java.lang.String getShortName() +meth public java.lang.String getURI() +supr java.lang.Object + +CLSS public abstract jakarta.servlet.jsp.tagext.TagLibraryValidator +cons public init() +meth public jakarta.servlet.jsp.tagext.ValidationMessage[] validate(java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.PageData) +meth public java.util.Map getInitParameters() +meth public void release() +meth public void setInitParameters(java.util.Map) +supr java.lang.Object +hfds initParameters + +CLSS public jakarta.servlet.jsp.tagext.TagSupport +cons public init() +fld protected jakarta.servlet.jsp.PageContext pageContext +fld protected java.lang.String id +intf jakarta.servlet.jsp.tagext.IterationTag +intf java.io.Serializable +meth public final static jakarta.servlet.jsp.tagext.Tag findAncestorWithClass(jakarta.servlet.jsp.tagext.Tag,java.lang.Class) +meth public int doAfterBody() throws jakarta.servlet.jsp.JspException +meth public int doEndTag() throws jakarta.servlet.jsp.JspException +meth public int doStartTag() throws jakarta.servlet.jsp.JspException +meth public jakarta.servlet.jsp.tagext.Tag getParent() +meth public java.lang.Object getValue(java.lang.String) +meth public java.lang.String getId() +meth public java.util.Enumeration getValues() +meth public void release() +meth public void removeValue(java.lang.String) +meth public void setId(java.lang.String) +meth public void setPageContext(jakarta.servlet.jsp.PageContext) +meth public void setParent(jakarta.servlet.jsp.tagext.Tag) +meth public void setValue(java.lang.String,java.lang.Object) +supr java.lang.Object +hfds parent,serialVersionUID,values + +CLSS public jakarta.servlet.jsp.tagext.TagVariableInfo +cons public init(java.lang.String,java.lang.String,java.lang.String,boolean,int) +meth public boolean getDeclare() +meth public int getScope() +meth public java.lang.String getClassName() +meth public java.lang.String getNameFromAttribute() +meth public java.lang.String getNameGiven() +supr java.lang.Object +hfds className,declare,nameFromAttribute,nameGiven,scope + +CLSS public abstract interface jakarta.servlet.jsp.tagext.TryCatchFinally +meth public abstract void doCatch(java.lang.Throwable) throws java.lang.Throwable +meth public abstract void doFinally() + +CLSS public jakarta.servlet.jsp.tagext.ValidationMessage +cons public init(java.lang.String,java.lang.String) +meth public java.lang.String getId() +meth public java.lang.String getMessage() +supr java.lang.Object +hfds id,message + +CLSS public jakarta.servlet.jsp.tagext.VariableInfo +cons public init(java.lang.String,java.lang.String,boolean,int) +fld public final static int AT_BEGIN = 1 +fld public final static int AT_END = 2 +fld public final static int NESTED = 0 +meth public boolean getDeclare() +meth public int getScope() +meth public java.lang.String getClassName() +meth public java.lang.String getVarName() +supr java.lang.Object +hfds className,declare,scope,varName + +CLSS public abstract interface java.io.Closeable +intf java.lang.AutoCloseable +meth public abstract void close() throws java.io.IOException + +CLSS public abstract interface java.io.Flushable +meth public abstract void flush() throws java.io.IOException + +CLSS public abstract interface java.io.Serializable + +CLSS public abstract java.io.Writer +cons protected init() +cons protected init(java.lang.Object) +fld protected java.lang.Object lock +intf java.io.Closeable +intf java.io.Flushable +intf java.lang.Appendable +meth public abstract void close() throws java.io.IOException +meth public abstract void flush() throws java.io.IOException +meth public abstract void write(char[],int,int) throws java.io.IOException +meth public java.io.Writer append(char) throws java.io.IOException +meth public java.io.Writer append(java.lang.CharSequence) throws java.io.IOException +meth public java.io.Writer append(java.lang.CharSequence,int,int) throws java.io.IOException +meth public static java.io.Writer nullWriter() +meth public void write(char[]) throws java.io.IOException +meth public void write(int) throws java.io.IOException +meth public void write(java.lang.String) throws java.io.IOException +meth public void write(java.lang.String,int,int) throws java.io.IOException +supr java.lang.Object + +CLSS public abstract interface java.lang.Appendable +meth public abstract java.lang.Appendable append(char) throws java.io.IOException +meth public abstract java.lang.Appendable append(java.lang.CharSequence) throws java.io.IOException +meth public abstract java.lang.Appendable append(java.lang.CharSequence,int,int) throws java.io.IOException + +CLSS public abstract interface java.lang.AutoCloseable +meth public abstract void close() throws java.lang.Exception + +CLSS public abstract interface java.lang.Cloneable + +CLSS public abstract interface !annotation java.lang.Deprecated + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, PACKAGE, MODULE, PARAMETER, TYPE]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault boolean forRemoval() +meth public abstract !hasdefault java.lang.String since() + +CLSS public java.lang.Exception +cons protected init(java.lang.String,java.lang.Throwable,boolean,boolean) +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +supr java.lang.Throwable + +CLSS public java.lang.Object +cons public init() +meth protected java.lang.Object clone() throws java.lang.CloneNotSupportedException +meth protected void finalize() throws java.lang.Throwable + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="9") +meth public boolean equals(java.lang.Object) +meth public final java.lang.Class getClass() +meth public final void notify() +meth public final void notifyAll() +meth public final void wait() throws java.lang.InterruptedException +meth public final void wait(long) throws java.lang.InterruptedException +meth public final void wait(long,int) throws java.lang.InterruptedException +meth public int hashCode() +meth public java.lang.String toString() + +CLSS public java.lang.Throwable +cons protected init(java.lang.String,java.lang.Throwable,boolean,boolean) +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +intf java.io.Serializable +meth public final java.lang.Throwable[] getSuppressed() +meth public final void addSuppressed(java.lang.Throwable) +meth public java.lang.StackTraceElement[] getStackTrace() +meth public java.lang.String getLocalizedMessage() +meth public java.lang.String getMessage() +meth public java.lang.String toString() +meth public java.lang.Throwable fillInStackTrace() +meth public java.lang.Throwable getCause() +meth public java.lang.Throwable initCause(java.lang.Throwable) +meth public void printStackTrace() +meth public void printStackTrace(java.io.PrintStream) +meth public void printStackTrace(java.io.PrintWriter) +meth public void setStackTrace(java.lang.StackTraceElement[]) +supr java.lang.Object + +CLSS public abstract interface java.lang.annotation.Annotation +meth public abstract boolean equals(java.lang.Object) +meth public abstract int hashCode() +meth public abstract java.lang.Class annotationType() +meth public abstract java.lang.String toString() + +CLSS public abstract interface !annotation java.lang.annotation.Documented + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation java.lang.annotation.Retention + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.annotation.RetentionPolicy value() + +CLSS public abstract interface !annotation java.lang.annotation.Target + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.annotation.ElementType[] value() + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/signaturetest/jsp/jakarta.servlet.jsp.sig_4.0 b/tck/src/main/resources/ee/jakarta/tck/pages/signaturetest/jsp/jakarta.servlet.jsp.sig_4.0 new file mode 100644 index 00000000..16bf437b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/signaturetest/jsp/jakarta.servlet.jsp.sig_4.0 @@ -0,0 +1,583 @@ +#Signature file v4.1 +#Version 4.0.0 + +CLSS public abstract jakarta.el.ELResolver +cons public init() +meth public <%0 extends java.lang.Object> {%%0} convertToType(jakarta.el.ELContext,java.lang.Object,java.lang.Class<{%%0}>) +meth public abstract boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public abstract java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public abstract java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public abstract java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public abstract void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +meth public java.lang.Object invoke(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Class[],java.lang.Object[]) +supr java.lang.Object + +CLSS public abstract interface jakarta.servlet.Servlet +meth public abstract jakarta.servlet.ServletConfig getServletConfig() +meth public abstract java.lang.String getServletInfo() +meth public abstract void destroy() +meth public abstract void init(jakarta.servlet.ServletConfig) throws jakarta.servlet.ServletException +meth public abstract void service(jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse) throws jakarta.servlet.ServletException,java.io.IOException + +CLSS public final jakarta.servlet.jsp.ErrorData +cons public init(java.lang.Throwable,int,java.lang.String,java.lang.String) + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="4.0") +cons public init(java.lang.Throwable,int,java.lang.String,java.lang.String,java.lang.String,java.lang.String) +meth public int getStatusCode() +meth public java.lang.String getMethod() +meth public java.lang.String getQueryString() +meth public java.lang.String getRequestURI() +meth public java.lang.String getServletName() +meth public java.lang.Throwable getThrowable() +supr java.lang.Object +hfds method,queryString,servletName,statusCode,throwable,uri + +CLSS public abstract interface jakarta.servlet.jsp.HttpJspPage +intf jakarta.servlet.jsp.JspPage +meth public abstract void _jspService(jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse) throws jakarta.servlet.ServletException,java.io.IOException + +CLSS public abstract interface jakarta.servlet.jsp.JspApplicationContext +meth public abstract jakarta.el.ExpressionFactory getExpressionFactory() +meth public abstract void addELContextListener(jakarta.el.ELContextListener) +meth public abstract void addELResolver(jakarta.el.ELResolver) + +CLSS public abstract jakarta.servlet.jsp.JspContext +cons public init() +meth public abstract int getAttributesScope(java.lang.String) +meth public abstract jakarta.el.ELContext getELContext() +meth public abstract jakarta.servlet.jsp.JspWriter getOut() +meth public abstract java.lang.Object findAttribute(java.lang.String) +meth public abstract java.lang.Object getAttribute(java.lang.String) +meth public abstract java.lang.Object getAttribute(java.lang.String,int) +meth public abstract java.util.Enumeration getAttributeNamesInScope(int) +meth public abstract void removeAttribute(java.lang.String) +meth public abstract void removeAttribute(java.lang.String,int) +meth public abstract void setAttribute(java.lang.String,java.lang.Object) +meth public abstract void setAttribute(java.lang.String,java.lang.Object,int) +meth public jakarta.servlet.jsp.JspWriter popBody() +meth public jakarta.servlet.jsp.JspWriter pushBody(java.io.Writer) +supr java.lang.Object + +CLSS public abstract jakarta.servlet.jsp.JspEngineInfo +cons public init() +meth public abstract java.lang.String getSpecificationVersion() +supr java.lang.Object + +CLSS public jakarta.servlet.jsp.JspException +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +supr java.lang.Exception +hfds serialVersionUID + +CLSS public abstract jakarta.servlet.jsp.JspFactory +cons public init() +meth public abstract jakarta.servlet.jsp.JspApplicationContext getJspApplicationContext(jakarta.servlet.ServletContext) +meth public abstract jakarta.servlet.jsp.JspEngineInfo getEngineInfo() +meth public abstract jakarta.servlet.jsp.PageContext getPageContext(jakarta.servlet.Servlet,jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse,java.lang.String,boolean,int,boolean) +meth public abstract void releasePageContext(jakarta.servlet.jsp.PageContext) +meth public static jakarta.servlet.jsp.JspFactory getDefaultFactory() +meth public static void setDefaultFactory(jakarta.servlet.jsp.JspFactory) +supr java.lang.Object +hfds deflt + +CLSS public abstract interface jakarta.servlet.jsp.JspPage +intf jakarta.servlet.Servlet +meth public abstract void jspDestroy() +meth public abstract void jspInit() + +CLSS public jakarta.servlet.jsp.JspTagException +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +supr jakarta.servlet.jsp.JspException +hfds serialVersionUID + +CLSS public abstract jakarta.servlet.jsp.JspWriter +cons protected init(int,boolean) +fld protected boolean autoFlush +fld protected int bufferSize +fld public final static int DEFAULT_BUFFER = -1 +fld public final static int NO_BUFFER = 0 +fld public final static int UNBOUNDED_BUFFER = -2 +meth public abstract int getRemaining() +meth public abstract void clear() throws java.io.IOException +meth public abstract void clearBuffer() throws java.io.IOException +meth public abstract void close() throws java.io.IOException +meth public abstract void flush() throws java.io.IOException +meth public abstract void newLine() throws java.io.IOException +meth public abstract void print(boolean) throws java.io.IOException +meth public abstract void print(char) throws java.io.IOException +meth public abstract void print(char[]) throws java.io.IOException +meth public abstract void print(double) throws java.io.IOException +meth public abstract void print(float) throws java.io.IOException +meth public abstract void print(int) throws java.io.IOException +meth public abstract void print(java.lang.Object) throws java.io.IOException +meth public abstract void print(java.lang.String) throws java.io.IOException +meth public abstract void print(long) throws java.io.IOException +meth public abstract void println() throws java.io.IOException +meth public abstract void println(boolean) throws java.io.IOException +meth public abstract void println(char) throws java.io.IOException +meth public abstract void println(char[]) throws java.io.IOException +meth public abstract void println(double) throws java.io.IOException +meth public abstract void println(float) throws java.io.IOException +meth public abstract void println(int) throws java.io.IOException +meth public abstract void println(java.lang.Object) throws java.io.IOException +meth public abstract void println(java.lang.String) throws java.io.IOException +meth public abstract void println(long) throws java.io.IOException +meth public boolean isAutoFlush() +meth public int getBufferSize() +supr java.io.Writer + +CLSS public abstract jakarta.servlet.jsp.PageContext +cons public init() +fld public final static int APPLICATION_SCOPE = 4 +fld public final static int PAGE_SCOPE = 1 +fld public final static int REQUEST_SCOPE = 2 +fld public final static int SESSION_SCOPE = 3 +fld public final static java.lang.String APPLICATION = "jakarta.servlet.jsp.jspApplication" +fld public final static java.lang.String CONFIG = "jakarta.servlet.jsp.jspConfig" +fld public final static java.lang.String EXCEPTION = "jakarta.servlet.jsp.jspException" +fld public final static java.lang.String OUT = "jakarta.servlet.jsp.jspOut" +fld public final static java.lang.String PAGE = "jakarta.servlet.jsp.jspPage" +fld public final static java.lang.String PAGECONTEXT = "jakarta.servlet.jsp.jspPageContext" +fld public final static java.lang.String REQUEST = "jakarta.servlet.jsp.jspRequest" +fld public final static java.lang.String RESPONSE = "jakarta.servlet.jsp.jspResponse" +fld public final static java.lang.String SESSION = "jakarta.servlet.jsp.jspSession" +meth public abstract jakarta.servlet.ServletConfig getServletConfig() +meth public abstract jakarta.servlet.ServletContext getServletContext() +meth public abstract jakarta.servlet.ServletRequest getRequest() +meth public abstract jakarta.servlet.ServletResponse getResponse() +meth public abstract jakarta.servlet.http.HttpSession getSession() +meth public abstract java.lang.Exception getException() +meth public abstract java.lang.Object getPage() +meth public abstract void forward(java.lang.String) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void handlePageException(java.lang.Exception) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void handlePageException(java.lang.Throwable) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void include(java.lang.String) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void include(java.lang.String,boolean) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void initialize(jakarta.servlet.Servlet,jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse,java.lang.String,boolean,int,boolean) throws java.io.IOException +meth public abstract void release() +meth public jakarta.servlet.jsp.ErrorData getErrorData() +meth public jakarta.servlet.jsp.tagext.BodyContent pushBody() +supr jakarta.servlet.jsp.JspContext + +CLSS public jakarta.servlet.jsp.SkipPageException +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +supr jakarta.servlet.jsp.JspException +hfds serialVersionUID + +CLSS public jakarta.servlet.jsp.el.ImplicitObjectELResolver +cons public init() +meth public boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +supr jakarta.el.ELResolver +hcls EnumeratedMap,ImplicitObjects + +CLSS public jakarta.servlet.jsp.el.ImportELResolver +cons public init() +meth public boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +supr jakarta.el.ELResolver + +CLSS public jakarta.servlet.jsp.el.NotFoundELResolver +cons public init() +meth public boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +supr jakarta.el.ELResolver +hfds LSTRING_FILE,lStrings + +CLSS public jakarta.servlet.jsp.el.ScopedAttributeELResolver +cons public init() +meth public boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +supr jakarta.el.ELResolver + +CLSS public abstract jakarta.servlet.jsp.tagext.BodyContent +cons protected init(jakarta.servlet.jsp.JspWriter) +meth public abstract java.io.Reader getReader() +meth public abstract java.lang.String getString() +meth public abstract void writeOut(java.io.Writer) throws java.io.IOException +meth public jakarta.servlet.jsp.JspWriter getEnclosingWriter() +meth public void clearBody() +meth public void flush() throws java.io.IOException +supr jakarta.servlet.jsp.JspWriter +hfds enclosingWriter + +CLSS public abstract interface jakarta.servlet.jsp.tagext.BodyTag +fld public final static int EVAL_BODY_BUFFERED = 2 +intf jakarta.servlet.jsp.tagext.IterationTag +meth public abstract void doInitBody() throws jakarta.servlet.jsp.JspException +meth public abstract void setBodyContent(jakarta.servlet.jsp.tagext.BodyContent) + +CLSS public jakarta.servlet.jsp.tagext.BodyTagSupport +cons public init() +fld protected jakarta.servlet.jsp.tagext.BodyContent bodyContent +intf jakarta.servlet.jsp.tagext.BodyTag +meth public int doAfterBody() throws jakarta.servlet.jsp.JspException +meth public int doEndTag() throws jakarta.servlet.jsp.JspException +meth public int doStartTag() throws jakarta.servlet.jsp.JspException +meth public jakarta.servlet.jsp.JspWriter getPreviousOut() +meth public jakarta.servlet.jsp.tagext.BodyContent getBodyContent() +meth public void doInitBody() throws jakarta.servlet.jsp.JspException +meth public void release() +meth public void setBodyContent(jakarta.servlet.jsp.tagext.BodyContent) +supr jakarta.servlet.jsp.tagext.TagSupport +hfds serialVersionUID + +CLSS public abstract interface jakarta.servlet.jsp.tagext.DynamicAttributes +meth public abstract void setDynamicAttribute(java.lang.String,java.lang.String,java.lang.Object) throws jakarta.servlet.jsp.JspException + +CLSS public jakarta.servlet.jsp.tagext.FunctionInfo +cons public init(java.lang.String,java.lang.String,java.lang.String) +meth public java.lang.String getFunctionClass() +meth public java.lang.String getFunctionSignature() +meth public java.lang.String getName() +supr java.lang.Object +hfds functionClass,functionSignature,name + +CLSS public abstract interface jakarta.servlet.jsp.tagext.IterationTag +fld public final static int EVAL_BODY_AGAIN = 2 +intf jakarta.servlet.jsp.tagext.Tag +meth public abstract int doAfterBody() throws jakarta.servlet.jsp.JspException + +CLSS public abstract jakarta.servlet.jsp.tagext.JspFragment +cons public init() +meth public abstract jakarta.servlet.jsp.JspContext getJspContext() +meth public abstract void invoke(java.io.Writer) throws jakarta.servlet.jsp.JspException,java.io.IOException +supr java.lang.Object + +CLSS public abstract interface jakarta.servlet.jsp.tagext.JspIdConsumer +meth public abstract void setJspId(java.lang.String) + +CLSS public abstract interface jakarta.servlet.jsp.tagext.JspTag + +CLSS public abstract jakarta.servlet.jsp.tagext.PageData +cons public init() +meth public abstract java.io.InputStream getInputStream() +supr java.lang.Object + +CLSS public abstract interface jakarta.servlet.jsp.tagext.SimpleTag +intf jakarta.servlet.jsp.tagext.JspTag +meth public abstract jakarta.servlet.jsp.tagext.JspTag getParent() +meth public abstract void doTag() throws jakarta.servlet.jsp.JspException,java.io.IOException +meth public abstract void setJspBody(jakarta.servlet.jsp.tagext.JspFragment) +meth public abstract void setJspContext(jakarta.servlet.jsp.JspContext) +meth public abstract void setParent(jakarta.servlet.jsp.tagext.JspTag) + +CLSS public jakarta.servlet.jsp.tagext.SimpleTagSupport +cons public init() +intf jakarta.servlet.jsp.tagext.SimpleTag +meth protected jakarta.servlet.jsp.JspContext getJspContext() +meth protected jakarta.servlet.jsp.tagext.JspFragment getJspBody() +meth public final static jakarta.servlet.jsp.tagext.JspTag findAncestorWithClass(jakarta.servlet.jsp.tagext.JspTag,java.lang.Class) +meth public jakarta.servlet.jsp.tagext.JspTag getParent() +meth public void doTag() throws jakarta.servlet.jsp.JspException,java.io.IOException +meth public void setJspBody(jakarta.servlet.jsp.tagext.JspFragment) +meth public void setJspContext(jakarta.servlet.jsp.JspContext) +meth public void setParent(jakarta.servlet.jsp.tagext.JspTag) +supr java.lang.Object +hfds jspBody,jspContext,parentTag + +CLSS public abstract interface jakarta.servlet.jsp.tagext.Tag +fld public final static int EVAL_BODY_INCLUDE = 1 +fld public final static int EVAL_PAGE = 6 +fld public final static int SKIP_BODY = 0 +fld public final static int SKIP_PAGE = 5 +intf jakarta.servlet.jsp.tagext.JspTag +meth public abstract int doEndTag() throws jakarta.servlet.jsp.JspException +meth public abstract int doStartTag() throws jakarta.servlet.jsp.JspException +meth public abstract jakarta.servlet.jsp.tagext.Tag getParent() +meth public abstract void release() +meth public abstract void setPageContext(jakarta.servlet.jsp.PageContext) +meth public abstract void setParent(jakarta.servlet.jsp.tagext.Tag) + +CLSS public jakarta.servlet.jsp.tagext.TagAdapter +cons public init(jakarta.servlet.jsp.tagext.SimpleTag) +intf jakarta.servlet.jsp.tagext.Tag +meth public int doEndTag() throws jakarta.servlet.jsp.JspException +meth public int doStartTag() throws jakarta.servlet.jsp.JspException +meth public jakarta.servlet.jsp.tagext.JspTag getAdaptee() +meth public jakarta.servlet.jsp.tagext.Tag getParent() +meth public void release() +meth public void setPageContext(jakarta.servlet.jsp.PageContext) +meth public void setParent(jakarta.servlet.jsp.tagext.Tag) +supr java.lang.Object +hfds parent,parentDetermined,simpleTagAdaptee + +CLSS public jakarta.servlet.jsp.tagext.TagAttributeInfo +cons public init(java.lang.String,boolean,java.lang.String,boolean) +cons public init(java.lang.String,boolean,java.lang.String,boolean,boolean) +cons public init(java.lang.String,boolean,java.lang.String,boolean,boolean,java.lang.String,boolean,boolean,java.lang.String,java.lang.String) +fld public final static java.lang.String ID = "id" +meth public boolean canBeRequestTime() +meth public boolean isDeferredMethod() +meth public boolean isDeferredValue() +meth public boolean isFragment() +meth public boolean isRequired() +meth public java.lang.String getDescription() +meth public java.lang.String getExpectedTypeName() +meth public java.lang.String getMethodSignature() +meth public java.lang.String getName() +meth public java.lang.String getTypeName() +meth public java.lang.String toString() +meth public static jakarta.servlet.jsp.tagext.TagAttributeInfo getIdAttribute(jakarta.servlet.jsp.tagext.TagAttributeInfo[]) +supr java.lang.Object +hfds deferredMethod,deferredValue,description,expectedTypeName,fragment,methodSignature,name,reqTime,required,type + +CLSS public jakarta.servlet.jsp.tagext.TagData +cons public init(java.lang.Object[][]) +cons public init(java.util.Hashtable) +fld public final static java.lang.Object REQUEST_TIME_VALUE +intf java.lang.Cloneable +meth public java.lang.Object getAttribute(java.lang.String) +meth public java.lang.String getAttributeString(java.lang.String) +meth public java.lang.String getId() +meth public java.util.Enumeration getAttributes() +meth public void setAttribute(java.lang.String,java.lang.Object) +supr java.lang.Object +hfds attributes + +CLSS public abstract jakarta.servlet.jsp.tagext.TagExtraInfo +cons public init() +meth public boolean isValid(jakarta.servlet.jsp.tagext.TagData) +meth public final jakarta.servlet.jsp.tagext.TagInfo getTagInfo() +meth public final void setTagInfo(jakarta.servlet.jsp.tagext.TagInfo) +meth public jakarta.servlet.jsp.tagext.ValidationMessage[] validate(jakarta.servlet.jsp.tagext.TagData) +meth public jakarta.servlet.jsp.tagext.VariableInfo[] getVariableInfo(jakarta.servlet.jsp.tagext.TagData) +supr java.lang.Object +hfds ZERO_VARIABLE_INFO,tagInfo + +CLSS public jakarta.servlet.jsp.tagext.TagFileInfo +cons public init(java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagInfo) +meth public jakarta.servlet.jsp.tagext.TagInfo getTagInfo() +meth public java.lang.String getName() +meth public java.lang.String getPath() +supr java.lang.Object +hfds name,path,tagInfo + +CLSS public jakarta.servlet.jsp.tagext.TagInfo +cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagLibraryInfo,jakarta.servlet.jsp.tagext.TagExtraInfo,jakarta.servlet.jsp.tagext.TagAttributeInfo[]) +cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagLibraryInfo,jakarta.servlet.jsp.tagext.TagExtraInfo,jakarta.servlet.jsp.tagext.TagAttributeInfo[],java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagVariableInfo[]) +cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagLibraryInfo,jakarta.servlet.jsp.tagext.TagExtraInfo,jakarta.servlet.jsp.tagext.TagAttributeInfo[],java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagVariableInfo[],boolean) +fld public final static java.lang.String BODY_CONTENT_EMPTY = "empty" +fld public final static java.lang.String BODY_CONTENT_JSP = "JSP" +fld public final static java.lang.String BODY_CONTENT_SCRIPTLESS = "scriptless" +fld public final static java.lang.String BODY_CONTENT_TAG_DEPENDENT = "tagdependent" +meth public boolean hasDynamicAttributes() +meth public boolean isValid(jakarta.servlet.jsp.tagext.TagData) +meth public jakarta.servlet.jsp.tagext.TagAttributeInfo[] getAttributes() +meth public jakarta.servlet.jsp.tagext.TagExtraInfo getTagExtraInfo() +meth public jakarta.servlet.jsp.tagext.TagLibraryInfo getTagLibrary() +meth public jakarta.servlet.jsp.tagext.TagVariableInfo[] getTagVariableInfos() +meth public jakarta.servlet.jsp.tagext.ValidationMessage[] validate(jakarta.servlet.jsp.tagext.TagData) +meth public jakarta.servlet.jsp.tagext.VariableInfo[] getVariableInfo(jakarta.servlet.jsp.tagext.TagData) +meth public java.lang.String getBodyContent() +meth public java.lang.String getDisplayName() +meth public java.lang.String getInfoString() +meth public java.lang.String getLargeIcon() +meth public java.lang.String getSmallIcon() +meth public java.lang.String getTagClassName() +meth public java.lang.String getTagName() +meth public void setTagExtraInfo(jakarta.servlet.jsp.tagext.TagExtraInfo) +meth public void setTagLibrary(jakarta.servlet.jsp.tagext.TagLibraryInfo) +supr java.lang.Object +hfds attributeInfo,bodyContent,displayName,dynamicAttributes,infoString,largeIcon,smallIcon,tagClassName,tagExtraInfo,tagLibrary,tagName,tagVariableInfo + +CLSS public abstract jakarta.servlet.jsp.tagext.TagLibraryInfo +cons protected init(java.lang.String,java.lang.String) +fld protected jakarta.servlet.jsp.tagext.FunctionInfo[] functions +fld protected jakarta.servlet.jsp.tagext.TagFileInfo[] tagFiles +fld protected jakarta.servlet.jsp.tagext.TagInfo[] tags +fld protected java.lang.String info +fld protected java.lang.String jspversion +fld protected java.lang.String prefix +fld protected java.lang.String shortname +fld protected java.lang.String tlibversion +fld protected java.lang.String uri +fld protected java.lang.String urn +meth public abstract jakarta.servlet.jsp.tagext.TagLibraryInfo[] getTagLibraryInfos() +meth public jakarta.servlet.jsp.tagext.FunctionInfo getFunction(java.lang.String) +meth public jakarta.servlet.jsp.tagext.FunctionInfo[] getFunctions() +meth public jakarta.servlet.jsp.tagext.TagFileInfo getTagFile(java.lang.String) +meth public jakarta.servlet.jsp.tagext.TagFileInfo[] getTagFiles() +meth public jakarta.servlet.jsp.tagext.TagInfo getTag(java.lang.String) +meth public jakarta.servlet.jsp.tagext.TagInfo[] getTags() +meth public java.lang.String getInfoString() +meth public java.lang.String getPrefixString() +meth public java.lang.String getReliableURN() +meth public java.lang.String getRequiredVersion() +meth public java.lang.String getShortName() +meth public java.lang.String getURI() +supr java.lang.Object + +CLSS public abstract jakarta.servlet.jsp.tagext.TagLibraryValidator +cons public init() +meth public jakarta.servlet.jsp.tagext.ValidationMessage[] validate(java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.PageData) +meth public java.util.Map getInitParameters() +meth public void release() +meth public void setInitParameters(java.util.Map) +supr java.lang.Object +hfds initParameters + +CLSS public jakarta.servlet.jsp.tagext.TagSupport +cons public init() +fld protected jakarta.servlet.jsp.PageContext pageContext +fld protected java.lang.String id +intf jakarta.servlet.jsp.tagext.IterationTag +intf java.io.Serializable +meth public final static jakarta.servlet.jsp.tagext.Tag findAncestorWithClass(jakarta.servlet.jsp.tagext.Tag,java.lang.Class) +meth public int doAfterBody() throws jakarta.servlet.jsp.JspException +meth public int doEndTag() throws jakarta.servlet.jsp.JspException +meth public int doStartTag() throws jakarta.servlet.jsp.JspException +meth public jakarta.servlet.jsp.tagext.Tag getParent() +meth public java.lang.Object getValue(java.lang.String) +meth public java.lang.String getId() +meth public java.util.Enumeration getValues() +meth public void release() +meth public void removeValue(java.lang.String) +meth public void setId(java.lang.String) +meth public void setPageContext(jakarta.servlet.jsp.PageContext) +meth public void setParent(jakarta.servlet.jsp.tagext.Tag) +meth public void setValue(java.lang.String,java.lang.Object) +supr java.lang.Object +hfds parent,serialVersionUID,values + +CLSS public jakarta.servlet.jsp.tagext.TagVariableInfo +cons public init(java.lang.String,java.lang.String,java.lang.String,boolean,int) +meth public boolean getDeclare() +meth public int getScope() +meth public java.lang.String getClassName() +meth public java.lang.String getNameFromAttribute() +meth public java.lang.String getNameGiven() +supr java.lang.Object +hfds className,declare,nameFromAttribute,nameGiven,scope + +CLSS public abstract interface jakarta.servlet.jsp.tagext.TryCatchFinally +meth public abstract void doCatch(java.lang.Throwable) throws java.lang.Throwable +meth public abstract void doFinally() + +CLSS public jakarta.servlet.jsp.tagext.ValidationMessage +cons public init(java.lang.String,java.lang.String) +meth public java.lang.String getId() +meth public java.lang.String getMessage() +supr java.lang.Object +hfds id,message + +CLSS public jakarta.servlet.jsp.tagext.VariableInfo +cons public init(java.lang.String,java.lang.String,boolean,int) +fld public final static int AT_BEGIN = 1 +fld public final static int AT_END = 2 +fld public final static int NESTED = 0 +meth public boolean getDeclare() +meth public int getScope() +meth public java.lang.String getClassName() +meth public java.lang.String getVarName() +supr java.lang.Object +hfds className,declare,scope,varName + +CLSS public abstract interface java.io.Closeable +intf java.lang.AutoCloseable +meth public abstract void close() throws java.io.IOException + +CLSS public abstract interface java.io.Flushable +meth public abstract void flush() throws java.io.IOException + +CLSS public abstract interface java.io.Serializable + +CLSS public abstract java.io.Writer +cons protected init() +cons protected init(java.lang.Object) +fld protected java.lang.Object lock +intf java.io.Closeable +intf java.io.Flushable +intf java.lang.Appendable +meth public abstract void close() throws java.io.IOException +meth public abstract void flush() throws java.io.IOException +meth public abstract void write(char[],int,int) throws java.io.IOException +meth public java.io.Writer append(char) throws java.io.IOException +meth public java.io.Writer append(java.lang.CharSequence) throws java.io.IOException +meth public java.io.Writer append(java.lang.CharSequence,int,int) throws java.io.IOException +meth public static java.io.Writer nullWriter() +meth public void write(char[]) throws java.io.IOException +meth public void write(int) throws java.io.IOException +meth public void write(java.lang.String) throws java.io.IOException +meth public void write(java.lang.String,int,int) throws java.io.IOException +supr java.lang.Object +hfds WRITE_BUFFER_SIZE,writeBuffer + +CLSS public abstract interface java.lang.Appendable +meth public abstract java.lang.Appendable append(char) throws java.io.IOException +meth public abstract java.lang.Appendable append(java.lang.CharSequence) throws java.io.IOException +meth public abstract java.lang.Appendable append(java.lang.CharSequence,int,int) throws java.io.IOException + +CLSS public abstract interface java.lang.AutoCloseable +meth public abstract void close() throws java.lang.Exception + +CLSS public abstract interface java.lang.Cloneable + +CLSS public java.lang.Exception +cons protected init(java.lang.String,java.lang.Throwable,boolean,boolean) +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +supr java.lang.Throwable +hfds serialVersionUID + +CLSS public java.lang.Object +cons public init() +meth protected java.lang.Object clone() throws java.lang.CloneNotSupportedException +meth protected void finalize() throws java.lang.Throwable + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="9") +meth public boolean equals(java.lang.Object) +meth public final java.lang.Class getClass() +meth public final void notify() +meth public final void notifyAll() +meth public final void wait() throws java.lang.InterruptedException +meth public final void wait(long) throws java.lang.InterruptedException +meth public final void wait(long,int) throws java.lang.InterruptedException +meth public int hashCode() +meth public java.lang.String toString() + +CLSS public java.lang.Throwable +cons protected init(java.lang.String,java.lang.Throwable,boolean,boolean) +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +intf java.io.Serializable +meth public final java.lang.Throwable[] getSuppressed() +meth public final void addSuppressed(java.lang.Throwable) +meth public java.lang.StackTraceElement[] getStackTrace() +meth public java.lang.String getLocalizedMessage() +meth public java.lang.String getMessage() +meth public java.lang.String toString() +meth public java.lang.Throwable fillInStackTrace() +meth public java.lang.Throwable getCause() +meth public java.lang.Throwable initCause(java.lang.Throwable) +meth public void printStackTrace() +meth public void printStackTrace(java.io.PrintStream) +meth public void printStackTrace(java.io.PrintWriter) +meth public void setStackTrace(java.lang.StackTraceElement[]) +supr java.lang.Object +hfds CAUSE_CAPTION,EMPTY_THROWABLE_ARRAY,NULL_CAUSE_MESSAGE,SELF_SUPPRESSION_MESSAGE,SUPPRESSED_CAPTION,SUPPRESSED_SENTINEL,UNASSIGNED_STACK,backtrace,cause,depth,detailMessage,serialVersionUID,stackTrace,suppressedExceptions +hcls PrintStreamOrWriter,SentinelHolder,WrappedPrintStream,WrappedPrintWriter + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/signaturetest/jsp/sig-test-pkg-list.txt b/tck/src/main/resources/ee/jakarta/tck/pages/signaturetest/jsp/sig-test-pkg-list.txt new file mode 100644 index 00000000..9fbd5d34 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/signaturetest/jsp/sig-test-pkg-list.txt @@ -0,0 +1,28 @@ +# +# Copyright (c) 2019, 2020 Oracle and/or its affiliates and others. +# All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +## +# This file contains a list of all the packages +# contained in the signature files for this +# deliverable. This file is used to exclude valid +# sub-packages from being verified when their +# parent package's signature is checked. +## + +jakarta.servlet.jsp +jakarta.servlet.jsp.el +jakarta.servlet.jsp.tagext diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/signaturetest/jsp/sig-test.map b/tck/src/main/resources/ee/jakarta/tck/pages/signaturetest/jsp/sig-test.map new file mode 100644 index 00000000..a783b303 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/signaturetest/jsp/sig-test.map @@ -0,0 +1,28 @@ +# +# Copyright (c) 2019, 2021 Oracle and/or its affiliates and others. +# All rights reserved. +# +# This program and the accompanying materials are made available under the +# terms of the Eclipse Public License v. 2.0, which is available at +# http://www.eclipse.org/legal/epl-2.0. +# +# This Source Code may also be made available under the following Secondary +# Licenses when the conditions for such availability set forth in the +# Eclipse Public License v. 2.0 are satisfied: GNU General Public License, +# version 2 with the GNU Classpath Exception, which is available at +# https://www.gnu.org/software/classpath/license.html. +# +# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 +# + +############################################################### +# The signature test mapping file for the JSP TCK. This file +# should be formatted as a standard java properties file. The +# name is the package name and the value is the version of the +# package that should be tested by the signature tests. +############################################################### + + +# JSP +======= +jakarta.servlet.jsp=4.0 diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/WEB-INF/config_charsequence.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/WEB-INF/config_charsequence.tld new file mode 100644 index 00000000..8e40180e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/WEB-INF/config_charsequence.tld @@ -0,0 +1,38 @@ + + + + + + 1.0 + charsequence + + DeferredSyntaxAllowedAsLiteral test + DeferredSyntaxAllowedAsLiteral + ee.jakarta.tck.pages.spec.configuration.charsequence.DeferredSyntaxAllowedAsLiteralTag + empty + + use of '#{' in an attribute value + poundExpr + true + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/deferredSyntaxAllowedAsLiteralFalseActionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/deferredSyntaxAllowedAsLiteralFalseActionTest.jsp new file mode 100644 index 00000000..551ac8a8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/deferredSyntaxAllowedAsLiteralFalseActionTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/config_charsequence.tld" %> + +<% + pageContext.setAttribute("foo", "bar"); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/deferredSyntaxAllowedAsLiteralFalseTemplateTextTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/deferredSyntaxAllowedAsLiteralFalseTemplateTextTest.jsp new file mode 100644 index 00000000..a2e4fb40 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/deferredSyntaxAllowedAsLiteralFalseTemplateTextTest.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% + pageContext.setAttribute("foo", "bar"); +%> +From template text: #{foo} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/deferredSyntaxAllowedAsLiteralTrueActionTest.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/deferredSyntaxAllowedAsLiteralTrueActionTest.gf new file mode 100644 index 00000000..56a7c7db --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/deferredSyntaxAllowedAsLiteralTrueActionTest.gf @@ -0,0 +1 @@ +From tag handler: #{foo} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/deferredSyntaxAllowedAsLiteralTrueActionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/deferredSyntaxAllowedAsLiteralTrueActionTest.jsp new file mode 100644 index 00000000..551ac8a8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/deferredSyntaxAllowedAsLiteralTrueActionTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/config_charsequence.tld" %> + +<% + pageContext.setAttribute("foo", "bar"); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/deferredSyntaxAllowedAsLiteralTrueTemplateTextTest.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/deferredSyntaxAllowedAsLiteralTrueTemplateTextTest.gf new file mode 100644 index 00000000..a4204ae2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/deferredSyntaxAllowedAsLiteralTrueTemplateTextTest.gf @@ -0,0 +1 @@ +From template text: #{foo} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/deferredSyntaxAllowedAsLiteralTrueTemplateTextTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/deferredSyntaxAllowedAsLiteralTrueTemplateTextTest.jsp new file mode 100644 index 00000000..a2e4fb40 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/deferredSyntaxAllowedAsLiteralTrueTemplateTextTest.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% + pageContext.setAttribute("foo", "bar"); +%> +From template text: #{foo} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/jsp_config_charsequence_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/jsp_config_charsequence_web.xml new file mode 100644 index 00000000..0331cfbf --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/jsp_config_charsequence_web.xml @@ -0,0 +1,49 @@ + + + + + JspConfigCharsequence + + 5 + + + + /deferredSyntaxAllowedAsLiteralTrueTemplateTextTest.jsp + true + + + /deferredSyntaxAllowedAsLiteralFalseTemplateTextTest.jsp + false + + + /deferredSyntaxAllowedAsLiteralTrueActionTest.jsp + true + + + /deferredSyntaxAllowedAsLiteralFalseActionTest.jsp + false + + + /noDeferredSyntaxAllowedAsLiteralTemplateTextTest.jsp + + + /noDeferredSyntaxAllowedAsLiteralActionTest.jsp + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/noDeferredSyntaxAllowedAsLiteralActionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/noDeferredSyntaxAllowedAsLiteralActionTest.jsp new file mode 100644 index 00000000..551ac8a8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/noDeferredSyntaxAllowedAsLiteralActionTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/config_charsequence.tld" %> + +<% + pageContext.setAttribute("foo", "bar"); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/noDeferredSyntaxAllowedAsLiteralTemplateTextTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/noDeferredSyntaxAllowedAsLiteralTemplateTextTest.jsp new file mode 100644 index 00000000..a2e4fb40 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/charsequence/noDeferredSyntaxAllowedAsLiteralTemplateTextTest.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% + pageContext.setAttribute("foo", "bar"); +%> +From template text: #{foo} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/compat13/ElCompatTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/compat13/ElCompatTest.jsp new file mode 100644 index 00000000..a114dcc3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/compat13/ElCompatTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<% pageContext.setAttribute("testPassed", "Test PASSED"); %> +${testPassed} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elconffalse/ElEvaluationTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elconffalse/ElEvaluationTest.jsp new file mode 100644 index 00000000..a114dcc3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elconffalse/ElEvaluationTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<% pageContext.setAttribute("testPassed", "Test PASSED"); %> +${testPassed} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elconffalsex/ElEvaluationTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elconffalsex/ElEvaluationTest.jspx new file mode 100644 index 00000000..20ae5c43 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elconffalsex/ElEvaluationTest.jspx @@ -0,0 +1,25 @@ + + + + + + + + ${testPassed} + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elconftrue/ElEvaluationTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elconftrue/ElEvaluationTest.jsp new file mode 100644 index 00000000..a114dcc3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elconftrue/ElEvaluationTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<% pageContext.setAttribute("testPassed", "Test PASSED"); %> +${testPassed} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elconftruex/ElEvaluationTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elconftruex/ElEvaluationTest.jspx new file mode 100644 index 00000000..3856536b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elconftruex/ElEvaluationTest.jspx @@ -0,0 +1,25 @@ + + + + + + + + ${testPassed} + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elpagefalse/ElEvaluationTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elpagefalse/ElEvaluationTest.jsp new file mode 100644 index 00000000..e1dcffa7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elpagefalse/ElEvaluationTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" isELIgnored="false" %> +<% pageContext.setAttribute("testPassed", "Test PASSED"); %> +${testPassed} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elpagefalsex/ElEvaluationTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elpagefalsex/ElEvaluationTest.jspx new file mode 100644 index 00000000..dab3fe33 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elpagefalsex/ElEvaluationTest.jspx @@ -0,0 +1,26 @@ + + + + + + + + ${testPassed} + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elpagetrue/ElEvaluationTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elpagetrue/ElEvaluationTest.jsp new file mode 100644 index 00000000..eb614532 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elpagetrue/ElEvaluationTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" isELIgnored="true" %> +<% pageContext.setAttribute("testPassed", "Test PASSED"); %> +${testPassed} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elpagetruex/ElEvaluationTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elpagetruex/ElEvaluationTest.jspx new file mode 100644 index 00000000..55b10709 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elpagetruex/ElEvaluationTest.jspx @@ -0,0 +1,26 @@ + + + + + + + + ${testPassed} + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elunspec/ElEvaluationTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elunspec/ElEvaluationTest.jsp new file mode 100644 index 00000000..a114dcc3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elunspec/ElEvaluationTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<% pageContext.setAttribute("testPassed", "Test PASSED"); %> +${testPassed} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elunspecx/ElEvaluationTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elunspecx/ElEvaluationTest.jspx new file mode 100644 index 00000000..3856536b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/elunspecx/ElEvaluationTest.jspx @@ -0,0 +1,25 @@ + + + + + + + + ${testPassed} + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/jsp_config_eleval23_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/jsp_config_eleval23_web.xml new file mode 100644 index 00000000..87d6d5b4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/jsp_config_eleval23_web.xml @@ -0,0 +1,26 @@ + + + + + + JspConfigurationElEval23 + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/jsp_config_eleval_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/jsp_config_eleval_web.xml new file mode 100644 index 00000000..9c489a3d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/elevaluation/jsp_config_eleval_web.xml @@ -0,0 +1,82 @@ + + + + + JspConfigurationElEval + + 5 + + + + + Unspecified in configuration and by JSP + /elunspec/* + + + Set to false in configuration not specified in JSP + /elconffalse/* + false + + + Set to true in config not specified in JSP + /elconftrue/* + true + + + Set to false in page...overrides config + /elpagefalse/* + true + + + Set to true in page...overrides config + /elpagetrue/* + false + + + + Unspecified in configuration and by JSP + /elunspecx/* + true + + + Set to false in configuration not specified in JSP + /elconffalsex/* + false + true + + + Set to true in config not specified in JSP + /elconftruex/* + true + true + + + Set to false in page...overrides config + /elpagefalsex/* + true + true + + + Set to true in page...overrides config + /elpagetruex/* + false + true + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/encoding/DifferentEncodingSpecifiedTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/encoding/DifferentEncodingSpecifiedTest.jsp new file mode 100644 index 00000000..37fce2d2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/encoding/DifferentEncodingSpecifiedTest.jsp @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" pageEncoding="ISO-8859-1" %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/encoding/DifferentEncodingSpecifiedTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/encoding/DifferentEncodingSpecifiedTest.jspx new file mode 100644 index 00000000..c5289b44 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/encoding/DifferentEncodingSpecifiedTest.jspx @@ -0,0 +1,26 @@ + + + + + + + A different encoding (UTF-8) is specified in web.xml. + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/encoding/NoEncodingSpecifiedTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/encoding/NoEncodingSpecifiedTest.jsp new file mode 100644 index 00000000..9a258576 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/encoding/NoEncodingSpecifiedTest.jsp @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/encoding/SameEncodingSpecifiedTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/encoding/SameEncodingSpecifiedTest.jsp new file mode 100644 index 00000000..bba7ce85 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/encoding/SameEncodingSpecifiedTest.jsp @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" pageEncoding="UTF-8" %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/encoding/jsp_config_encode_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/encoding/jsp_config_encode_web.xml new file mode 100644 index 00000000..bade980d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/encoding/jsp_config_encode_web.xml @@ -0,0 +1,36 @@ + + + + + JspConfigurationEncoding + + 5 + + + + *.jsp + UTF-8 + + + /DifferentEncodingSpecifiedTest.jspx + UTF-8 + true + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/coda1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/coda1.jsp new file mode 100644 index 00000000..03860fc5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/coda1.jsp @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +In coda1 diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/coda2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/coda2.jsp new file mode 100644 index 00000000..111edccc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/coda2.jsp @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +In coda2 diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/coda3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/coda3.jsp new file mode 100644 index 00000000..4dcd64c4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/coda3.jsp @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +In coda3 diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/identical/willSee.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/identical/willSee.jsp new file mode 100644 index 00000000..915a2f3e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/identical/willSee.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +Test PASSED. This page is served since jsp-property-group has +precedence over servlet-mapping diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/jsp_config_general_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/jsp_config_general_web.xml new file mode 100644 index 00000000..e76aec6c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/jsp_config_general_web.xml @@ -0,0 +1,75 @@ + + + + + JspConfigurationGeneral + + aservlet + ee.jakarta.tck.pages.spec.configuration.general.AServlet + + + aservlet + /specific/svr/* + + + aservlet + /identical/willSee.jsp + + + aservlet + /mostSpecific/* + + + 5 + + + + /specific/* + /coda1.jsp + + + /specific/svr/page/* + /coda1.jsp + + + /identical/willSee.jsp + /coda1.jsp + + + + /mostSpecific/* + true + /prelude1.jsp + /coda1.jsp + + + + /mostSpecific/page/* + /prelude2.jsp + /coda2.jsp + + + + /mostSpecific/page/willSee.jsp + false + /prelude3.jsp + /coda3.jsp + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/mostSpecific/page/willSee.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/mostSpecific/page/willSee.jsp new file mode 100644 index 00000000..1e284a3d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/mostSpecific/page/willSee.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<% + pageContext.setAttribute("elMessage", "el is enabled", + PageContext.PAGE_SCOPE); +%> +${elMessage} +Test PASSED. This page is served since at least one jsp-property-group +contains the most specific mapping. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/prelude1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/prelude1.jsp new file mode 100644 index 00000000..8221c1d4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/prelude1.jsp @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +In prelude1 diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/prelude2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/prelude2.jsp new file mode 100644 index 00000000..6a6923c3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/prelude2.jsp @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +In prelude2 diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/prelude3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/prelude3.jsp new file mode 100644 index 00000000..2b603e04 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/prelude3.jsp @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +In prelude3 diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/specific/svr/page/willSee.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/specific/svr/page/willSee.jsp new file mode 100644 index 00000000..2dcfe356 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/specific/svr/page/willSee.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +Test PASSED. This page is served since jsp-property-group has +more specific url-pattern. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/specific/svr/willNotSee.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/specific/svr/willNotSee.jsp new file mode 100644 index 00000000..52e91c9a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/general/specific/svr/willNotSee.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +Test FAILED. This page should not be served since mapped servlet has +more specific url-pattern. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/IncludesTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/IncludesTest.jsp new file mode 100644 index 00000000..7b239dc4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/IncludesTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +JSP Body diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/WEB-INF/jspf/coda1.jspf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/WEB-INF/jspf/coda1.jspf new file mode 100644 index 00000000..ac7de4b8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/WEB-INF/jspf/coda1.jspf @@ -0,0 +1,18 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> +Coda1 diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/WEB-INF/jspf/coda2.jspf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/WEB-INF/jspf/coda2.jspf new file mode 100644 index 00000000..ca2a181d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/WEB-INF/jspf/coda2.jspf @@ -0,0 +1,18 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> +Coda2 diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/WEB-INF/jspf/coda3.jspf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/WEB-INF/jspf/coda3.jspf new file mode 100644 index 00000000..872c0902 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/WEB-INF/jspf/coda3.jspf @@ -0,0 +1,18 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> +Coda3 diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/WEB-INF/jspf/prelude1.jspf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/WEB-INF/jspf/prelude1.jspf new file mode 100644 index 00000000..d66eda8c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/WEB-INF/jspf/prelude1.jspf @@ -0,0 +1,18 @@ + +Prelude1 diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/WEB-INF/jspf/prelude2.jspf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/WEB-INF/jspf/prelude2.jspf new file mode 100644 index 00000000..4e10801a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/WEB-INF/jspf/prelude2.jspf @@ -0,0 +1,18 @@ + +Prelude2 diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/WEB-INF/jspf/prelude3.jspf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/WEB-INF/jspf/prelude3.jspf new file mode 100644 index 00000000..8290cf14 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/WEB-INF/jspf/prelude3.jspf @@ -0,0 +1,18 @@ + +Prelude3 diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/jsp_config_includes_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/jsp_config_includes_web.xml new file mode 100644 index 00000000..8356b2fa --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/jsp_config_includes_web.xml @@ -0,0 +1,45 @@ + + + + + JspConfigurationIncludes + + 5 + + + + *.jsp + /WEB-INF/jspf/prelude1.jspf + /WEB-INF/jspf/coda1.jspf + + + /two/* + /WEB-INF/jspf/prelude2.jspf + /WEB-INF/jspf/coda2.jspf + + + /three/* + true + /WEB-INF/jspf/prelude2.jspf + /WEB-INF/jspf/prelude3.jspf + /WEB-INF/jspf/coda2.jspf + /WEB-INF/jspf/coda3.jspf + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/three/Includes3Test.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/three/Includes3Test.jspx new file mode 100644 index 00000000..ad11dba0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/three/Includes3Test.jspx @@ -0,0 +1,26 @@ + + + + + + + JSP Body 3 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/two/Includes2Test.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/two/Includes2Test.jsp new file mode 100644 index 00000000..137a795f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/includes/two/Includes2Test.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +JSP Body 2 diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/WEB-INF/tag.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/WEB-INF/tag.tld new file mode 100644 index 00000000..b6c6bf59 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/WEB-INF/tag.tld @@ -0,0 +1,36 @@ + + + + + 1.0 + tag + + echo + ee.jakarta.tck.pages.common.tags.tck.SimpleTag + JSP + + echo + true + true + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/jsp_config_scr_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/jsp_config_scr_web.xml new file mode 100644 index 00000000..6884758c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/jsp_config_scr_web.xml @@ -0,0 +1,64 @@ + + + + + JspConfigurationScripting + + 5 + + + + http://java.sun.com/tck/jsp/scr + /WEB-INF/tag.tld + + + + Unspecified in property-group + /scrunspec/* + + + Property group sets scripting-invalid to false + /scrfalse/* + false + + + Property group sets scripting-invalid to true + /scrtrue/* + true + + + + Unspecified in property-group + /scrunspecx/* + true + + + Property group sets scripting-invalid to false + /scrfalsex/* + false + true + + + Property group sets scripting-invalid to true + /scrtruex/* + true + true + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrfalse/DeclarationTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrfalse/DeclarationTest.jsp new file mode 100644 index 00000000..69ff4eac --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrfalse/DeclarationTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%! int i = 0; %> +Test PASSED diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrfalse/ExpressionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrfalse/ExpressionTest.jsp new file mode 100644 index 00000000..e5370607 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrfalse/ExpressionTest.jsp @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%= "Test PASSED" %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrfalse/ScriptletTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrfalse/ScriptletTest.jsp new file mode 100644 index 00000000..4bbe3311 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrfalse/ScriptletTest.jsp @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<% out.println("Test PASSED"); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrfalsex/DeclarationTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrfalsex/DeclarationTest.jspx new file mode 100644 index 00000000..1aa32c08 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrfalsex/DeclarationTest.jspx @@ -0,0 +1,25 @@ + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrfalsex/ExpressionTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrfalsex/ExpressionTest.jspx new file mode 100644 index 00000000..bfedd56b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrfalsex/ExpressionTest.jspx @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrfalsex/ScriptletTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrfalsex/ScriptletTest.jspx new file mode 100644 index 00000000..1139b820 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrfalsex/ScriptletTest.jspx @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtrue/AttributeExpressionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtrue/AttributeExpressionTest.jsp new file mode 100644 index 00000000..cb8e17a2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtrue/AttributeExpressionTest.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/scr" prefix="scr" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtrue/DeclarationTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtrue/DeclarationTest.jsp new file mode 100644 index 00000000..69ff4eac --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtrue/DeclarationTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%! int i = 0; %> +Test PASSED diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtrue/ExpressionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtrue/ExpressionTest.jsp new file mode 100644 index 00000000..e5370607 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtrue/ExpressionTest.jsp @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%= "Test PASSED" %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtrue/ScriptletTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtrue/ScriptletTest.jsp new file mode 100644 index 00000000..4bbe3311 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtrue/ScriptletTest.jsp @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<% out.println("Test PASSED"); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtruex/AttributeExpressionTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtruex/AttributeExpressionTest.jspx new file mode 100644 index 00000000..66010613 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtruex/AttributeExpressionTest.jspx @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtruex/DeclarationTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtruex/DeclarationTest.jspx new file mode 100644 index 00000000..1aa32c08 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtruex/DeclarationTest.jspx @@ -0,0 +1,25 @@ + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtruex/ExpressionTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtruex/ExpressionTest.jspx new file mode 100644 index 00000000..bfedd56b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtruex/ExpressionTest.jspx @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtruex/ScriptletTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtruex/ScriptletTest.jspx new file mode 100644 index 00000000..1139b820 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrtruex/ScriptletTest.jspx @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrunspec/DeclarationTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrunspec/DeclarationTest.jsp new file mode 100644 index 00000000..69ff4eac --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrunspec/DeclarationTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%! int i = 0; %> +Test PASSED diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrunspec/ExpressionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrunspec/ExpressionTest.jsp new file mode 100644 index 00000000..e5370607 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrunspec/ExpressionTest.jsp @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%= "Test PASSED" %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrunspec/ScriptletTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrunspec/ScriptletTest.jsp new file mode 100644 index 00000000..4bbe3311 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrunspec/ScriptletTest.jsp @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<% out.println("Test PASSED"); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrunspecx/DeclarationTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrunspecx/DeclarationTest.jspx new file mode 100644 index 00000000..1aa32c08 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrunspecx/DeclarationTest.jspx @@ -0,0 +1,25 @@ + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrunspecx/ExpressionTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrunspecx/ExpressionTest.jspx new file mode 100644 index 00000000..bfedd56b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrunspecx/ExpressionTest.jspx @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrunspecx/ScriptletTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrunspecx/ScriptletTest.jspx new file mode 100644 index 00000000..1139b820 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/scripting/scrunspecx/ScriptletTest.jspx @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/xml/jsp_config_xml_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/xml/jsp_config_xml_web.xml new file mode 100644 index 00000000..89979578 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/xml/jsp_config_xml_web.xml @@ -0,0 +1,38 @@ + + + + + JspConfigurationXml + + 5 + + + + /unspec/* + + + /xmlfalse/* + false + + + /xmltrue/* + true + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/xml/unspec/NonXmlTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/xml/unspec/NonXmlTest.jsp new file mode 100644 index 00000000..e6b161d1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/xml/unspec/NonXmlTest.jsp @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +Test PASSED diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/xml/xmlfalse/NonXmlTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/xml/xmlfalse/NonXmlTest.jsp new file mode 100644 index 00000000..e6b161d1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/xml/xmlfalse/NonXmlTest.jsp @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +Test PASSED diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/xml/xmltrue/XmlJspTest.xsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/xml/xmltrue/XmlJspTest.xsp new file mode 100644 index 00000000..e28f3293 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/configuration/xml/xmltrue/XmlJspTest.xsp @@ -0,0 +1,23 @@ + + + + + + Test PASSED]]> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeDuplicatedAttributeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeDuplicatedAttributeTest.jsp new file mode 100644 index 00000000..8adb804f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeDuplicatedAttributeTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/attribute" prefix="attr" %> +<%-- + a translation-time error must occur of the the jsp:attribute + action is used to specify an attribute when that attribute already + exists as an xml attribute +--%> + + + Test PASSED + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeDynamicTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeDynamicTest1.jsp new file mode 100644 index 00000000..e3bcddb0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeDynamicTest1.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/attribute" prefix="attr" %> + + + + value + + + + + + value + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeDynamicTest2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeDynamicTest2.jsp new file mode 100644 index 00000000..d4c385e5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeDynamicTest2.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/attribute" prefix="attr" %> + + + + <%= "value" %> + + + + + + <%= "value" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeElementInteractionTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeElementInteractionTest.jspx new file mode 100644 index 00000000..55af3de7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeElementInteractionTest.jspx @@ -0,0 +1,29 @@ + + + + + + + + + passed + + Test PASSED + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeEmptyBodyTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeEmptyBodyTest.jsp new file mode 100644 index 00000000..76adb876 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeEmptyBodyTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/attribute" prefix="attr" %> + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentNonScrBodyTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentNonScrBodyTest1.jsp new file mode 100644 index 00000000..dca59f75 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentNonScrBodyTest1.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/attribute" prefix="attr" %> + + + + <%= "fragment body" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentNonScrBodyTest2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentNonScrBodyTest2.jsp new file mode 100644 index 00000000..36db499f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentNonScrBodyTest2.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/attribute" prefix="attr" %> + + + + <%! String t = "fragment body"; %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentNonScrBodyTest3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentNonScrBodyTest3.jsp new file mode 100644 index 00000000..45838aa8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentNonScrBodyTest3.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/attribute" prefix="attr" %> + + + + <% String t = "fragment body"; %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentNonScrBodyTest4.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentNonScrBodyTest4.jsp new file mode 100644 index 00000000..433ad42f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentNonScrBodyTest4.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/attribute" prefix="attr" %> + + + + <%= "fragment body" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentNonScrBodyTest5.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentNonScrBodyTest5.jsp new file mode 100644 index 00000000..b6b5d30d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentNonScrBodyTest5.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/attribute" prefix="attr" %> + + + + <%! String t = "fragment body"; %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentNonScrBodyTest6.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentNonScrBodyTest6.jsp new file mode 100644 index 00000000..86960fb8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentNonScrBodyTest6.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/attribute" prefix="attr" %> + + + + <% String t = "fragment body"; %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentTest.jsp new file mode 100644 index 00000000..28ace303 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeFragmentTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/attribute" prefix="attr" %> + + + + jspfragment body + + + + + + jspfragment body + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeNameReqAttributeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeNameReqAttributeTest.jsp new file mode 100644 index 00000000..4d111140 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeNameReqAttributeTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/attribute" prefix="attr" %> + + + + somevalue + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeNoAttributeFoundTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeNoAttributeFoundTest.jsp new file mode 100644 index 00000000..72092833 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeNoAttributeFoundTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/attribute" prefix="attr" %> + + + Test FAILED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeQNameTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeQNameTest1.jsp new file mode 100644 index 00000000..ec4103cc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeQNameTest1.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/attribute" prefix="attr" %> + +<%-- Matching QName --%> + + ok + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeQNameTest2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeQNameTest2.jsp new file mode 100644 index 00000000..ed3f9dff --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeQNameTest2.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/attribute" prefix="attr" %> + +<%-- Matching QName --%> + + Test FAILED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeQNameTest3.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeQNameTest3.jspx new file mode 100644 index 00000000..39b20bbc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeQNameTest3.jspx @@ -0,0 +1,25 @@ + + + + + + passed + Test PASSED + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeQNameTest4.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeQNameTest4.jsp new file mode 100644 index 00000000..628ed202 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeQNameTest4.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/attribute" prefix="attr" %> + + + dynamic value + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeRtTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeRtTest.jsp new file mode 100644 index 00000000..e308fa8e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeRtTest.jsp @@ -0,0 +1,182 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/attribute" prefix="attr" %> + + + + <%= new Boolean(true) %> + + + <%= new Character('a') %> + + + <%= new Short((short) 1) %> + + + <%= new Integer(1) %> + + + <%= new Long(1l) %> + + + <%= new Float(1.0f) %> + + + <%= new Double(1.0d) %> + + + <%= "string" %> + + + + + + <%= false %> + + + <%= 'b' %> + + + <%= (short) 2 %> + + + <%= 2 %> + + + <%= 2l %> + + + <%= 2.0f %> + + + <%= 2.0d %> + + + <%= "string" %> + + + + + + false + + + b + + + 3 + + + 3 + + + 3 + + + 3.0 + + + 3.0 + + + <%= "string" %> + + + + + + <%= new Boolean(true) %> + + + <%= new Character('a') %> + + + <%= new Short((short) 1) %> + + + <%= new Integer(1) %> + + + <%= new Long(1l) %> + + + <%= new Float(1.0f) %> + + + <%= new Double(1.0d) %> + + + <%= "string" %> + + + + + + <%= false %> + + + <%= 'b' %> + + + <%= (short) 2 %> + + + <%= 2 %> + + + <%= 2l %> + + + <%= 2.0f %> + + + <%= 2.0d %> + + + <%= "string" %> + + + + + + false + + + b + + + 3 + + + 3 + + + 3 + + + 3.0 + + + 3.0 + + + <%= "string" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeTrimTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeTrimTest.jsp new file mode 100644 index 00000000..7f5ca67f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeTrimTest.jsp @@ -0,0 +1,57 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/attribute" prefix="attr" %> + +<% + pageContext.setAttribute("trimString", " not trimmed "); +%> + + + not trimmed + + + + + trimmed + + + + + + trimmed + + + +<%-- + Trimming should not occur for runtime values no matter the value of + the trim attribute. +--%> + + + ${trimString} + + + + ${trimString} + + + + ${trimString} + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeUsageContextTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeUsageContextTest1.jsp new file mode 100644 index 00000000..b9ab2164 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeUsageContextTest1.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- + The use of jsp:attribute outside of being nested + within a standard or custom action will result in + a translation-time error +--%> + + + attribute body + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeUsageContextTest2.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeUsageContextTest2.jspx new file mode 100644 index 00000000..0503653b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeUsageContextTest2.jspx @@ -0,0 +1,29 @@ + + + + + + + + myAttrValue + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeUsageContextTest3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeUsageContextTest3.jsp new file mode 100644 index 00000000..fe680879 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/JspAttributeUsageContextTest3.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%@ taglib uri="http://java.sun.com/tck/jsp/attribute" prefix="attr" %> + + + + + dynamic + + + value + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/WEB-INF/attribute.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/WEB-INF/attribute.tld new file mode 100644 index 00000000..b48f8701 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/WEB-INF/attribute.tld @@ -0,0 +1,156 @@ + + + + + 1.0 + attribute + + classic + ee.jakarta.tck.pages.spec.core_syntax.actions.attribute.ClassicAttributeTestTag + JSP + + fragment + true + + true + + + simple + ee.jakarta.tck.pages.spec.core_syntax.actions.attribute.SimpleAttributeTestTag + scriptless + + fragment + true + + true + + + dynamic + ee.jakarta.tck.pages.spec.core_syntax.actions.attribute.DynamicTag + JSP + true + + + attribute + ee.jakarta.tck.pages.spec.core_syntax.actions.attribute.AttributeTag + JSP + + expected + true + + + attribute + true + true + + + + ctype + ee.jakarta.tck.pages.spec.core_syntax.actions.attribute.ClassicTypeTag + JSP + + boolean + true + java.lang.Boolean + + + character + true + java.lang.Character + + + short + true + java.lang.Short + + + integer + true + java.lang.Integer + + + long + true + java.lang.Long + + + float + true + java.lang.Float + + + double + true + java.lang.Double + + + string + true + java.lang.String + + + + stype + ee.jakarta.tck.pages.spec.core_syntax.actions.attribute.SimpleTypeTag + scriptless + + boolean + true + java.lang.Boolean + + + character + true + java.lang.Character + + + short + true + java.lang.Short + + + integer + true + java.lang.Integer + + + long + true + java.lang.Long + + + float + true + java.lang.Float + + + double + true + java.lang.Double + + + string + true + java.lang.String + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/jsp_core_act_attribute_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/jsp_core_act_attribute_web.xml new file mode 100644 index 00000000..750fe30a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/attribute/jsp_core_act_attribute_web.xml @@ -0,0 +1,31 @@ + + + + + JspCorSynActAttribute + + 5 + + + + http://java.sun.com/tck/jsp/attribute + /WEB-INF/attribute.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyEmptyBodyTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyEmptyBodyTest.jsp new file mode 100644 index 00000000..6c4e9e11 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyEmptyBodyTest.jsp @@ -0,0 +1,58 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/body" prefix="body" %> + +<%-- + If one or more jsp:attribute elements appear in the body + of an action, and there is no jsp:body element appears, it + is the equivalent of having an empty body +--%> + + + value1 + value2 + + + + value1 + + +<%-- + Any empty body can also be provided by jsp:body + by the production and +--%> + + + + + + + + + + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyTest.jsp new file mode 100644 index 00000000..6bb114df --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyTest.jsp @@ -0,0 +1,44 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/body" prefix="body" %> + +<%-- + Impl note: standard actions that can accept bodies will be tested + in the test areas for those actions. We'll only test custom and + standard actions here +--%> + + + testpassed + + + + testpassed + + + + value1 + testpassed + + + + value1 + testpassed + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyUsageContextTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyUsageContextTest1.jsp new file mode 100644 index 00000000..d24c6369 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyUsageContextTest1.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- + jsp:body must appear as a child of an action that accepts + a body. +--%> + +bodycontent diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyUsageContextTest2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyUsageContextTest2.jsp new file mode 100644 index 00000000..c40fd360 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyUsageContextTest2.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/body" prefix="body" %> +<%-- + jsp:body cannot be used to provide bodies to actions that do + not accept bodies +--%> + + + bodycontent + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyUsageContextTest3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyUsageContextTest3.jsp new file mode 100644 index 00000000..f9a53b61 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyUsageContextTest3.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/body" prefix="body" %> +<%-- + jsp:body cannot be used to provide bodies to actions that do + not accept bodies +--%> + + + bodycontent + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyUsageContextTest4.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyUsageContextTest4.jsp new file mode 100644 index 00000000..1234de61 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyUsageContextTest4.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/body" prefix="body" %> + +<%-- + jsp:body cannot be a child of jsp:body +--%> + + + + bodycontent + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyUsageContextTest5.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyUsageContextTest5.jsp new file mode 100644 index 00000000..a3015d7f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/JspBodyUsageContextTest5.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/body" prefix="body" %> +<%-- + jsp:body cannot be a child of jsp:attribute +--%> + + + + bodycontent + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/WEB-INF/body.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/WEB-INF/body.tld new file mode 100644 index 00000000..0e674b50 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/WEB-INF/body.tld @@ -0,0 +1,60 @@ + + + + + 1.0 + body + + classic + ee.jakarta.tck.pages.spec.core_syntax.actions.body.ClassicBodyTag + JSP + true + + + simple + ee.jakarta.tck.pages.spec.core_syntax.actions.body.SimpleBodyTag + scriptless + true + + + clnobody + ee.jakarta.tck.pages.spec.core_syntax.actions.body.ClassicNoBodyTag + empty + + + smnobody + ee.jakarta.tck.pages.spec.core_syntax.actions.body.SimpleNoBodyTag + empty + + + cemptybody + ee.jakarta.tck.pages.spec.core_syntax.actions.body.ClassicEmptyBodyTag + JSP + true + + + semptybody + ee.jakarta.tck.pages.spec.core_syntax.actions.body.SimpleEmptyBodyTag + scriptless + true + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/jsp_core_act_body_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/jsp_core_act_body_web.xml new file mode 100644 index 00000000..5934a211 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/body/jsp_core_act_body_web.xml @@ -0,0 +1,31 @@ + + + + + JspCorSynActBody + + 5 + + + + http://java.sun.com/tck/jsp/body + /WEB-INF/body.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/JspDeclarationUsageContextTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/JspDeclarationUsageContextTest1.jsp new file mode 100644 index 00000000..9052b171 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/JspDeclarationUsageContextTest1.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" import="java.io.IOException" %> + + public void displayTestStatus(JspWriter out) throws IOException { + out.print("Test PASSED"); + } + +<% + displayTestStatus(out); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/JspDeclarationUsageContextTest2.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/JspDeclarationUsageContextTest2.jspx new file mode 100644 index 00000000..e6d25eb1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/JspDeclarationUsageContextTest2.jspx @@ -0,0 +1,28 @@ + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/JspDeclarationUsageContextTest3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/JspDeclarationUsageContextTest3.jsp new file mode 100644 index 00000000..ca1099e7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/JspDeclarationUsageContextTest3.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/JspDeclarationUsageContextTest4.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/JspDeclarationUsageContextTest4.jspx new file mode 100644 index 00000000..8692a3db --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/JspDeclarationUsageContextTest4.jspx @@ -0,0 +1,23 @@ + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/WEB-INF/tags/JspDeclarationTag1.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/WEB-INF/tags/JspDeclarationTag1.tag new file mode 100644 index 00000000..0c81224f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/WEB-INF/tags/JspDeclarationTag1.tag @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag import="java.io.IOException" %> + + public void displayTestStatus(JspWriter out) throws IOException { + out.print("Test PASSED"); + } + +<% + displayTestStatus(out); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/WEB-INF/tags/JspDeclarationTag2.tagx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/WEB-INF/tags/JspDeclarationTag2.tagx new file mode 100644 index 00000000..e2b53005 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/WEB-INF/tags/JspDeclarationTag2.tagx @@ -0,0 +1,28 @@ + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/jsp_core_act_decl_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/jsp_core_act_decl_web.xml new file mode 100644 index 00000000..0a7dc5fb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/declaration/jsp_core_act_decl_web.xml @@ -0,0 +1,25 @@ + + + + + JspCorSynActDecl + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyInvalidApplicationScopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyInvalidApplicationScopeTest.jsp new file mode 100644 index 00000000..81211603 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyInvalidApplicationScopeTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + Test FAILED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyInvalidPageScopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyInvalidPageScopeTest.jsp new file mode 100644 index 00000000..adb77027 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyInvalidPageScopeTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + Test FAILED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyInvalidRequestScopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyInvalidRequestScopeTest.jsp new file mode 100644 index 00000000..a85d299e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyInvalidRequestScopeTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + Test FAILED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyInvalidScopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyInvalidScopeTest.jsp new file mode 100644 index 00000000..9cecefa1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyInvalidScopeTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + Test FAILED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyInvalidSessionScopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyInvalidSessionScopeTest.jsp new file mode 100644 index 00000000..22da94e4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyInvalidSessionScopeTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + Test FAILED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyJspAttributeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyJspAttributeTest.jsp new file mode 100644 index 00000000..26b8d635 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyJspAttributeTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + Body Content + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyNoVarVarReaderScopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyNoVarVarReaderScopeTest.jsp new file mode 100644 index 00000000..8c2d5005 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyNoVarVarReaderScopeTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + Test FAILED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyNonEmptyBodyTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyNonEmptyBodyTest1.jsp new file mode 100644 index 00000000..9c9be435 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyNonEmptyBodyTest1.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + Test FAILED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyNonEmptyBodyTest2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyNonEmptyBodyTest2.jsp new file mode 100644 index 00000000..29bef9ce --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyNonEmptyBodyTest2.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + Test FAILED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyScopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyScopeTest.jsp new file mode 100644 index 00000000..5589097e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyScopeTest.jsp @@ -0,0 +1,66 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + java.io.Reader"%> +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + Body Content + + +<% + final int[] scopes = { + PageContext.REQUEST_SCOPE, + PageContext.SESSION_SCOPE, + PageContext.APPLICATION_SCOPE + }; + + final String[] attrNames = { + "requestVar", "sessionVar", "applicationVar" + }; + + for (int i = 0; i < scopes.length; i++) { + Object o = pageContext.getAttribute(attrNames[i], scopes[i]); + if (o != null) { + if (o instanceof Reader) { + Reader r = (Reader) o; + StringBuffer sb = new StringBuffer(); + for (int read = r.read(); read != -1; read = r.read()) { + sb.append((char) read); + } + o = sb.toString(); + } + + if (((String) o).trim().equals("Body Content")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Attribute found in the " + + JspTestUtil.getScopeName(scopes[i]) + ", but the value" + + " of the attribute was not 'Body Content'. Received" + + ": " + o); + } + } else { + out.println("Test FAILED. Unable to find attribute '" + + attrNames[i] + "' in the " + JspTestUtil.getScopeName(scopes[i]) + + " scope."); + } + } + +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyUsageContextTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyUsageContextTest1.jsp new file mode 100644 index 00000000..e747bda6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyUsageContextTest1.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyUsageContextTest2.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyUsageContextTest2.jspx new file mode 100644 index 00000000..4444e1c6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyUsageContextTest2.jspx @@ -0,0 +1,22 @@ + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyUsageContextTest3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyUsageContextTest3.jsp new file mode 100644 index 00000000..e9bf1050 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyUsageContextTest3.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<% pageContext.setAttribute("testPassed", "Test PASSED"); %> + + + ${testPassed} + + + + ${testPassed} + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyVarReaderTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyVarReaderTest.jsp new file mode 100644 index 00000000..4dc4b39f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyVarReaderTest.jsp @@ -0,0 +1,63 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" import="java.io.Reader" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + Body Content + + +<% + Object export = pageContext.getAttribute("reqVar", PageContext.REQUEST_SCOPE); + if (export != null) { + if (export instanceof Reader) { + StringBuffer sb = new StringBuffer(); + Reader reader = (Reader) export; + for (int read = reader.read(); read != -1; read = reader.read()) { + sb.append((char) read); + } + String result = sb.toString().trim(); + if (result.equals("Body Content")) { + reader.reset(); + sb = new StringBuffer(); + for (int read = reader.read(); read != -1; read = reader.read()) { + sb.append((char) read); + } + result = sb.toString().trim(); + if (result.equals("Body Content")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. It seems the exported reader is" + + " not resettable. Expected content of reader to be" + + " 'Body Content' after the reset. Received: " + + result); + } + } else { + out.println("Test FAILED. Expected result of body evaluation to" + + " be 'Body Content'. Received: " + result); + } + } else { + out.println("Test FAILED. The type of the exported variable was" + + " not java.lang.String. Received: " + export.getClass().getName()); + } + } else { + out.println("Test FAILED. Variable 'reqVar' was not exported to the" + + " request scope by the jsp:doBody action."); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyVarTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyVarTest.jsp new file mode 100644 index 00000000..8e61db97 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyVarTest.jsp @@ -0,0 +1,44 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + Body Content + + +<% + Object export = pageContext.getAttribute("reqVar", PageContext.REQUEST_SCOPE); + if (export != null) { + if (export instanceof java.lang.String) { + if (((String) export).trim().equals("Body Content")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected result of body evaluation to" + + " be 'Body Content'. Received: " + ((String) export).trim()); + } + } else { + out.println("Test FAILED. The type of the exported variable was" + + " not java.lang.String. Received: " + export.getClass().getName()); + } + } else { + out.println("Test FAILED. Variable 'reqVar' was not exported to the" + + " request scope by the jsp:doBody action."); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyVarVarReaderTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyVarVarReaderTest.jsp new file mode 100644 index 00000000..9be0ef7b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/JspDoBodyVarVarReaderTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + Test FAILED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyAttributeTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyAttributeTag.tag new file mode 100644 index 00000000..4838701f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyAttributeTag.tag @@ -0,0 +1,71 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + + pageVar + page + + + + pageVarReader + page + + +<% + Object obj1 = jspContext.getAttribute("pageVar"); + Object obj2 = jspContext.getAttribute("pageVarReader"); + + if (obj1 != null) { + if (obj1 instanceof String) { + if (((String) obj1).trim().equals("Body Content")) { + if (obj2 != null) { + if (obj2 instanceof java.io.Reader) { + StringBuffer sb = new StringBuffer(); + java.io.Reader reader = (java.io.Reader) obj2; + for (int read = reader.read(); read != -1; read = reader.read()) { + sb.append((char) read); + } + obj2 = sb.toString().trim(); + if (obj2.equals("Body Content")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected content of reader" + + " to be 'Body Content'. Received: " + obj2); + } + } else { + out.println("Test FAILED. a java.io.Reader object was" + + " not exported when varReader was specified. Actual" + + " class type: " + obj2.getClass().getName()); + } + } else { + out.println("Test FAILED. No object exported when varReader" + + " was specified."); + } + } else { + out.println("Test FAILED. Expected exported result to be " + + "'Body Content'. Received: " + ((String) obj1).trim()); + } + } else { + out.println("Test FAILED. Expected exported object for var to be" + + " of type java.lang.String. Received: " + obj1.getClass().getName()); + } + } else { + out.println("Test FAILED. No object exported when 'var' attribute was" + + " specified."); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyInvalidApplicationScopeTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyInvalidApplicationScopeTag.tag new file mode 100644 index 00000000..e28716c3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyInvalidApplicationScopeTag.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyInvalidPageScopeTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyInvalidPageScopeTag.tag new file mode 100644 index 00000000..f1fc63e5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyInvalidPageScopeTag.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyInvalidRequestScopeTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyInvalidRequestScopeTag.tag new file mode 100644 index 00000000..6218709a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyInvalidRequestScopeTag.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyInvalidScopeTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyInvalidScopeTag.tag new file mode 100644 index 00000000..87444aaa --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyInvalidScopeTag.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyInvalidSessionScopeTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyInvalidSessionScopeTag.tag new file mode 100644 index 00000000..93072932 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyInvalidSessionScopeTag.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyNoVarVarReaderScopeTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyNoVarVarReaderScopeTag.tag new file mode 100644 index 00000000..e4908aa3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyNoVarVarReaderScopeTag.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyNonEmptyBodyTag1.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyNonEmptyBodyTag1.tag new file mode 100644 index 00000000..3e4fa971 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyNonEmptyBodyTag1.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + + body content + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyNonEmptyBodyTag2.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyNonEmptyBodyTag2.tag new file mode 100644 index 00000000..500d47df --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyNonEmptyBodyTag2.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + + body content + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyScopeTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyScopeTag.tag new file mode 100644 index 00000000..5b8d984b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyScopeTag.tag @@ -0,0 +1,53 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + + + + + + +<% + Object o = jspContext.getAttribute("defaultPage", PageContext.PAGE_SCOPE); + if (o != null) { + if (((String) o).trim().equals("Body Content")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. The page scoped attribute, 'defaultPage' " + + "was found, but had an incorrect value. Expected 'Body Content'" + + ", received: " + o); + } + } else { + out.println("Test FAILED. Unable to find the page scoped attribute '" + + "defaultPage' in the tag file's page context."); + } + + o = jspContext.getAttribute("pageVar", PageContext.PAGE_SCOPE); + if (o != null) { + if (((String) o).trim().equals("Body Content")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. The page scoped attribute, 'pageVar' " + + "was found, but had an incorrect value. Expected 'Body Content'" + + ", received: " + o); + } + } else { + out.println("Test FAILED. Unable to find the page scoped attribute '" + + "pageVar' in the tag file's page context."); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyUsageContextTagA.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyUsageContextTagA.tag new file mode 100644 index 00000000..d75121df --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyUsageContextTagA.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyUsageContextTagB.tagx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyUsageContextTagB.tagx new file mode 100644 index 00000000..75d0f71d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyUsageContextTagB.tagx @@ -0,0 +1,22 @@ + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyVarReaderTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyVarReaderTag.tag new file mode 100644 index 00000000..e9e752fd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyVarReaderTag.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyVarTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyVarTag.tag new file mode 100644 index 00000000..7d7f3c08 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyVarTag.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyVarVarReaderTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyVarVarReaderTag.tag new file mode 100644 index 00000000..61d52fbc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/WEB-INF/tags/DoBodyVarVarReaderTag.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/jsp_core_act_dobody_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/jsp_core_act_dobody_web.xml new file mode 100644 index 00000000..7ab05127 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/dobody/jsp_core_act_dobody_web.xml @@ -0,0 +1,25 @@ + + + + + JspCorSynActDoBody + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementDynamicAttributeTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementDynamicAttributeTest1.jsp new file mode 100644 index 00000000..dce3af3a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementDynamicAttributeTest1.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +body1 +body2 diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementDynamicAttributeTest2.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementDynamicAttributeTest2.jspx new file mode 100644 index 00000000..3e8b543e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementDynamicAttributeTest2.jspx @@ -0,0 +1,25 @@ + + + + + + + body1 + body2 + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementDynamicAttributeTest3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementDynamicAttributeTest3.jsp new file mode 100644 index 00000000..d8297666 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementDynamicAttributeTest3.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementJspAttributeTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementJspAttributeTest1.jsp new file mode 100644 index 00000000..5e640169 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementJspAttributeTest1.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + + + value1 + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementJspAttributeTest2.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementJspAttributeTest2.jspx new file mode 100644 index 00000000..70189ce9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementJspAttributeTest2.jspx @@ -0,0 +1,27 @@ + + + + + + + + value1 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementJspAttributeTest3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementJspAttributeTest3.jsp new file mode 100644 index 00000000..658085b8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementJspAttributeTest3.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementJspBodyTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementJspBodyTest1.jsp new file mode 100644 index 00000000..51862ad1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementJspBodyTest1.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + + + body1 + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementJspBodyTest2.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementJspBodyTest2.jspx new file mode 100644 index 00000000..2890aaea --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementJspBodyTest2.jspx @@ -0,0 +1,26 @@ + + + + + + + + body1 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementJspBodyTest3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementJspBodyTest3.jsp new file mode 100644 index 00000000..0515a998 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementJspBodyTest3.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementNameReqAttributeTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementNameReqAttributeTest1.jsp new file mode 100644 index 00000000..dafd09c5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementNameReqAttributeTest1.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + + + body + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementNameReqAttributeTest2.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementNameReqAttributeTest2.jspx new file mode 100644 index 00000000..2d486435 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementNameReqAttributeTest2.jspx @@ -0,0 +1,23 @@ + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementNameReqAttributeTest3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementNameReqAttributeTest3.jsp new file mode 100644 index 00000000..4f66055f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementNameReqAttributeTest3.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementTest1.jsp new file mode 100644 index 00000000..76026459 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementTest1.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +body1 + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementTest2.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementTest2.jspx new file mode 100644 index 00000000..78465db1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementTest2.jspx @@ -0,0 +1,29 @@ + + + + + + + body1 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementTest3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementTest3.jsp new file mode 100644 index 00000000..ed24f54b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/JspElementTest3.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/WEB-INF/tags/JspElementDynAttrTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/WEB-INF/tags/JspElementDynAttrTag.tag new file mode 100644 index 00000000..463a7c54 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/WEB-INF/tags/JspElementDynAttrTag.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +body1 +body2 diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/WEB-INF/tags/JspElementJspAttributeTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/WEB-INF/tags/JspElementJspAttributeTag.tag new file mode 100644 index 00000000..5c877247 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/WEB-INF/tags/JspElementJspAttributeTag.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + + value1 + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/WEB-INF/tags/JspElementJspBodyTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/WEB-INF/tags/JspElementJspBodyTag.tag new file mode 100644 index 00000000..d404e493 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/WEB-INF/tags/JspElementJspBodyTag.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + + body1 + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/WEB-INF/tags/JspElementTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/WEB-INF/tags/JspElementTag.tag new file mode 100644 index 00000000..d6f77c00 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/WEB-INF/tags/JspElementTag.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +body1 + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/WEB-INF/tags/NameAttrTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/WEB-INF/tags/NameAttrTag.tag new file mode 100644 index 00000000..6f797995 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/WEB-INF/tags/NameAttrTag.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +body1 diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/jsp_core_act_element_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/jsp_core_act_element_web.xml new file mode 100644 index 00000000..e5e74c85 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/element/jsp_core_act_element_web.xml @@ -0,0 +1,25 @@ + + + + + JspCorSynActElement + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/JspExpressionUsageContextTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/JspExpressionUsageContextTest1.jsp new file mode 100644 index 00000000..7f673169 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/JspExpressionUsageContextTest1.jsp @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +"Test PASSED" diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/JspExpressionUsageContextTest2.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/JspExpressionUsageContextTest2.jspx new file mode 100644 index 00000000..afe2bd81 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/JspExpressionUsageContextTest2.jspx @@ -0,0 +1,23 @@ + + + + + + "Test PASSED" + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/JspExpressionUsageContextTest3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/JspExpressionUsageContextTest3.jsp new file mode 100644 index 00000000..041c5093 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/JspExpressionUsageContextTest3.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/JspExpressionUsageContextTest4.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/JspExpressionUsageContextTest4.jspx new file mode 100644 index 00000000..1b814e3c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/JspExpressionUsageContextTest4.jspx @@ -0,0 +1,23 @@ + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/WEB-INF/tags/JspExpressionTag1.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/WEB-INF/tags/JspExpressionTag1.tag new file mode 100644 index 00000000..ba9faa42 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/WEB-INF/tags/JspExpressionTag1.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +"Test PASSED" diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/WEB-INF/tags/JspExpressionTag2.tagx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/WEB-INF/tags/JspExpressionTag2.tagx new file mode 100644 index 00000000..1b7e4fb6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/WEB-INF/tags/JspExpressionTag2.tagx @@ -0,0 +1,20 @@ + + + "Test PASSED" + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/jsp_core_act_expr_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/jsp_core_act_expr_web.xml new file mode 100644 index 00000000..9acdf422 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/expression/jsp_core_act_expr_web.xml @@ -0,0 +1,25 @@ + + + + + JspCorSynActExpr + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/flushedBufferForwardTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/flushedBufferForwardTest.jsp new file mode 100644 index 00000000..41e1d310 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/flushedBufferForwardTest.jsp @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/flushedBufferForwardTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/flushedBufferForwardTest1.jsp new file mode 100644 index 00000000..c70d7449 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/flushedBufferForwardTest1.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ page errorPage="flushedBufferForwardTest_error.jsp" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/flushedBufferForwardTest_error.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/flushedBufferForwardTest_error.jsp new file mode 100644 index 00000000..fb071dd3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/flushedBufferForwardTest_error.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page isErrorPage="true" %> +<%@ page contentType="text/plain" %> + + +<% + if(exception instanceof IllegalStateException) { + out.println("Got IllegalStateException"); + } else { + out.println("IllegalStateException not received"); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/forwardcommon.html b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/forwardcommon.html new file mode 100644 index 00000000..d96dd3ad --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/forwardcommon.html @@ -0,0 +1,6 @@ + +forwarded + +This is forwarded html file + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/forwardcommon.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/forwardcommon.jsp new file mode 100644 index 00000000..2c16aa96 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/forwardcommon.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +forwarded + +<% out.print("This is forwarded file"); %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/jsp_coresyntx_act_forward_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/jsp_coresyntx_act_forward_web.xml new file mode 100644 index 00000000..cbb0f838 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/jsp_coresyntx_act_forward_web.xml @@ -0,0 +1,25 @@ + + + + + JspCorSynActFwd + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardCtxRelative.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardCtxRelative.gf new file mode 100644 index 00000000..d0cdc1e8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardCtxRelative.gf @@ -0,0 +1,6 @@ + +forwarded + +This is forwarded file + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardCtxRelative.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardCtxRelative.jsp new file mode 100644 index 00000000..072089ec --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardCtxRelative.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + + +<% + /* + Name: positiveForwardCtxRelative.jsp + Description: Use a valid jsp:forward directive + using a context-relative path. + Result: The should be the forwarded page. + + */ + +%> + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardCtxRelativeHtml.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardCtxRelativeHtml.gf new file mode 100644 index 00000000..d96dd3ad --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardCtxRelativeHtml.gf @@ -0,0 +1,6 @@ + +forwarded + +This is forwarded html file + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardCtxRelativeHtml.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardCtxRelativeHtml.jsp new file mode 100644 index 00000000..5434fd0d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardCtxRelativeHtml.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveForwardAbshtml.jsp + +<% /** Name : positiveForwardCtxRelativeHtml.jsp + Description :We are testing for forwarding to a html page using + tag. We test if the forwarded static content + got forwarded in the output. Here we use a context-relative path. +**/ %> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardPageRelative.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardPageRelative.gf new file mode 100644 index 00000000..d0cdc1e8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardPageRelative.gf @@ -0,0 +1,6 @@ + +forwarded + +This is forwarded file + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardPageRelative.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardPageRelative.jsp new file mode 100644 index 00000000..0deabaf0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardPageRelative.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + + +<% + /* + Name: positiveForwardPageRelative + Description: Use a valid jsp:forward directive + using a page relative path. + Result: The page should result due to forwarding + + */ + +%> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardPageRelativeHtml.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardPageRelativeHtml.gf new file mode 100644 index 00000000..d96dd3ad --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardPageRelativeHtml.gf @@ -0,0 +1,6 @@ + +forwarded + +This is forwarded html file + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardPageRelativeHtml.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardPageRelativeHtml.jsp new file mode 100644 index 00000000..7c2cb030 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveForwardPageRelativeHtml.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveForwardRelhtml.jsp + +<% /** Name : positiveForwardPageRelativeHtml.jsp + Description :We are testing for request time Static forwarding using + tag. We test the forwarded static content + got forwarded in the output. Here we use a page-relative path. + Result : +**/ %> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveRequestAttrCtxRelative.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveRequestAttrCtxRelative.gf new file mode 100644 index 00000000..d0cdc1e8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveRequestAttrCtxRelative.gf @@ -0,0 +1,6 @@ + +forwarded + +This is forwarded file + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveRequestAttrCtxRelative.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveRequestAttrCtxRelative.jsp new file mode 100644 index 00000000..352e0a0e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveRequestAttrCtxRelative.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveRequestAttrAbs + +<% /** Name : positiveRequestAttrCtxRelative + Description : We are testing for request time dynamic inclusion + using tag. We test if we get the forwarded jsp got + parsed at request time and forwarded to the output using a + context-relative path. +**/ %> +<% String test="/forwardcommon"; %> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveRequestAttrPageRelative.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveRequestAttrPageRelative.gf new file mode 100644 index 00000000..d0cdc1e8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveRequestAttrPageRelative.gf @@ -0,0 +1,6 @@ + +forwarded + +This is forwarded file + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveRequestAttrPageRelative.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveRequestAttrPageRelative.jsp new file mode 100644 index 00000000..d7a88979 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/positiveRequestAttrPageRelative.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveRequestAttrRelative + +<% /** Name : positiveRequestAttrPageRelative + Description : We check if request time attributes work by forwarding + the request using a page-relative path. + Result : we should get the forwarded file without error + **/ %> +<% String test="forwardcommon"; %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/unbufferedWriteForwardTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/unbufferedWriteForwardTest.jsp new file mode 100644 index 00000000..45bda0a6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/unbufferedWriteForwardTest.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ page errorPage="unbufferedWriteForwardTest_error.jsp" %> +<%@ page buffer="none" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/unbufferedWriteForwardTest_error.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/unbufferedWriteForwardTest_error.jsp new file mode 100644 index 00000000..6d33932d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/forward/unbufferedWriteForwardTest_error.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page isErrorPage="true" %> +<%@ page contentType="text/plain" %> + + +<% + if(exception instanceof IllegalStateException) { + out.println("Got IllegalStateException"); + } else { + out.println("IllegalStateException not received"); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/getproperty/jsp_coresyntx_act_getproperty_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/getproperty/jsp_coresyntx_act_getproperty_web.xml new file mode 100644 index 00000000..c78db166 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/getproperty/jsp_coresyntx_act_getproperty_web.xml @@ -0,0 +1,25 @@ + + + + + JspCorSynActGetPrpty + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/getproperty/nullPropertyValueTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/getproperty/nullPropertyValueTest.jsp new file mode 100644 index 00000000..12620a31 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/getproperty/nullPropertyValueTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ page import="ee.jakarta.tck.pages.spec.core_syntax.actions.getproperty.*" %> + +<% + StringBean sb = new StringBean(); + sb.setName(null); + pageContext.setAttribute("sbb", sb, PageContext.PAGE_SCOPE); +%> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/getproperty/positiveGetProps.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/getproperty/positiveGetProps.gf new file mode 100644 index 00000000..f0dd26cd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/getproperty/positiveGetProps.gf @@ -0,0 +1,9 @@ + +positiveGetProps + + + + +hello + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/getproperty/positiveGetProps.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/getproperty/positiveGetProps.jsp new file mode 100644 index 00000000..79396a3b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/getproperty/positiveGetProps.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveGetProps + +<% /** Name : positiveGetProps + Description : Create a valid useBean tag in the JSP. Access one of its + properties through a getProperty tag. + Result : Should return the value of the property as part of the returned + HTML +**/ %> + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/C.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/C.jsp new file mode 100644 index 00000000..1c13d3e5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/C.jsp @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +In /C.jsp diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/dynamicDynamic_A.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/dynamicDynamic_A.jsp new file mode 100644 index 00000000..0c15f875 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/dynamicDynamic_A.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +In dynamicDynamic_A.jsp + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/dynamicStatic_A.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/dynamicStatic_A.jsp new file mode 100644 index 00000000..3f7a3ae2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/dynamicStatic_A.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +In dynamicStatic_A.jsp + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/forwardtarget.html b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/forwardtarget.html new file mode 100644 index 00000000..b75a88d0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/forwardtarget.html @@ -0,0 +1,6 @@ + +forward target + +This is forwarded html file + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/include/C.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/include/C.jsp new file mode 100644 index 00000000..a8546563 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/include/C.jsp @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +In /include/C.jsp diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/include/dynamic_B.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/include/dynamic_B.jsp new file mode 100644 index 00000000..bcc4ce98 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/include/dynamic_B.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +In /include/dynamic_B.jsp + \ No newline at end of file diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/include/include2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/include/include2.jsp new file mode 100644 index 00000000..af7651d3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/include/include2.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +included2 + +<% out.print("Test PASSED. This is /include/include2.jsp"); %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/include/includeMappedServlet.html b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/include/includeMappedServlet.html new file mode 100644 index 00000000..f07e2c46 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/include/includeMappedServlet.html @@ -0,0 +1,24 @@ + + + +includeMappedServlet + +This file shoule not be served. The mapped servlet should be included. + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/include/includeMappedServlet.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/include/includeMappedServlet.jsp new file mode 100644 index 00000000..68ec69fe --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/include/includeMappedServlet.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%-- +This jsp is to be included by ../includeMappedServletTest.jsp +--%> +Test PASSED. The mapped jsp file is included. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/include/static_B.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/include/static_B.jsp new file mode 100644 index 00000000..27e79e17 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/include/static_B.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +In /include/static_B.jsp +<%@ include file="C.jsp" %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/includeMappedServletTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/includeMappedServletTest.jsp new file mode 100644 index 00000000..a9a59b62 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/includeMappedServletTest.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%-- +the following include action should go to a mapped servlet +--%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/includecommon.html b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/includecommon.html new file mode 100644 index 00000000..37053f9c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/includecommon.html @@ -0,0 +1,6 @@ + +included + +This is included html file + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/includecommon.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/includecommon.jsp new file mode 100644 index 00000000..25f2cea7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/includecommon.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +included + +<% out.print("This is included file"); %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/includeforward.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/includeforward.jsp new file mode 100644 index 00000000..c7660194 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/includeforward.jsp @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/jsp_coresyntx_act_include_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/jsp_coresyntx_act_include_web.xml new file mode 100644 index 00000000..a4f3d8f0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/jsp_coresyntx_act_include_web.xml @@ -0,0 +1,40 @@ + + + + + JspCorSynActInc + + includeMappedServlet + /include/includeMappedServlet.jsp + + + includeMappedServlet + /include/includeMappedServlet.html + + + 5 + + + + + /include/* + true + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludeCtxRelative.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludeCtxRelative.gf new file mode 100644 index 00000000..f99931e4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludeCtxRelative.gf @@ -0,0 +1,13 @@ + + + + + +included + +This is included file + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludeCtxRelative.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludeCtxRelative.jsp new file mode 100644 index 00000000..3cce2303 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludeCtxRelative.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + + +<% + /* + Name: positiveIncludeCtxRelative + Description: Use a valid jsp:include + Result: The page should be included. + + */ + +%> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludeCtxRelativeHtml.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludeCtxRelativeHtml.gf new file mode 100644 index 00000000..812185c3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludeCtxRelativeHtml.gf @@ -0,0 +1,14 @@ + +positiveIncludeCtxRelativeHtml + + + + +included + +This is included html file + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludeCtxRelativeHtml.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludeCtxRelativeHtml.jsp new file mode 100644 index 00000000..d0127f97 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludeCtxRelativeHtml.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveIncludeCtxRelativeHtml + +<% /** Name : positiveIncludeCtxRelativeHtml + Description :We are testing for static inclusion of html page using + tag. We test if we get the included static content + got included in the output. Here we use absolute path from current + context as url. +**/ %> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludeForward.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludeForward.gf new file mode 100644 index 00000000..b75a88d0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludeForward.gf @@ -0,0 +1,6 @@ + +forward target + +This is forwarded html file + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludeForward.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludeForward.jsp new file mode 100644 index 00000000..c1a27671 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludeForward.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +Unexpected from test jsp + +Unexpected 2 from test jsp diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludePageRelative.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludePageRelative.gf new file mode 100644 index 00000000..f99931e4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludePageRelative.gf @@ -0,0 +1,13 @@ + + + + + +included + +This is included file + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludePageRelative.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludePageRelative.jsp new file mode 100644 index 00000000..8c1b0224 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludePageRelative.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + + +<% + /* + Name: positiveIncludePageRelative + Description: Use a valid jsp:include directive + Result: The page should be included. + + */ + +%> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludePageRelative2.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludePageRelative2.gf new file mode 100644 index 00000000..755cff18 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludePageRelative2.gf @@ -0,0 +1,13 @@ + + + + + +included2 + +Test PASSED. This is /include/include2.jsp + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludePageRelative2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludePageRelative2.jsp new file mode 100644 index 00000000..6a283f02 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludePageRelative2.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + + +<% + /* + Name: positiveIncludePageRelative2 + Description: Use a valid jsp:include directive + Result: The page include/include2.jsp should be included. + + */ + +%> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludePageRelativeHtml.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludePageRelativeHtml.gf new file mode 100644 index 00000000..ffae7f7e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludePageRelativeHtml.gf @@ -0,0 +1,14 @@ + +positiveIncludePageRelativeHtml.jsp + + + + +included + +This is included html file + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludePageRelativeHtml.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludePageRelativeHtml.jsp new file mode 100644 index 00000000..d982b61e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveIncludePageRelativeHtml.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveIncludePageRelativeHtml + +<% /** Name : positiveIncludePageRelativeHtml + Description :We are testing for request time Static inclusion using + tag. We test if we get the included static content + got included in the output.here we use relative path from current + context as url. + Result : +**/ %> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveRequestAttrCtxRelative.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveRequestAttrCtxRelative.gf new file mode 100644 index 00000000..98455e43 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveRequestAttrCtxRelative.gf @@ -0,0 +1,15 @@ + +positiveRequestAttrCtxRelative + + + + + +included + +This is included file + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveRequestAttrCtxRelative.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveRequestAttrCtxRelative.jsp new file mode 100644 index 00000000..4f8e8c88 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveRequestAttrCtxRelative.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveRequestAttrCtxRelative + +<% /** Name : positiveRequestAttrCtxRelative + Description : We are testing for request time dynamic inclusion + using tag. We test if we get the included jsp got + parsed at request time and included to the output. we use absolute + path from contex-root root as url +**/ %> +<% String test="/includecommon"; %> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveRequestAttrPageRelative.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveRequestAttrPageRelative.gf new file mode 100644 index 00000000..8ef1225d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveRequestAttrPageRelative.gf @@ -0,0 +1,14 @@ + +positiveRequestAttrPageRelative + + + + +included + +This is included file + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveRequestAttrPageRelative.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveRequestAttrPageRelative.jsp new file mode 100644 index 00000000..3054aa62 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/positiveRequestAttrPageRelative.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveRequestAttrPageRelative + +<% /** Name : positiveRequestAttrPageRelative + Description : we check if request time attributes work with include + and we use them in double quoted expression + Result : we should get the included file without error + **/ %> +<% String test="includecommon"; %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/staticDynamic_A.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/staticDynamic_A.jsp new file mode 100644 index 00000000..9a494c15 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/staticDynamic_A.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +In staticDynamic_A.jsp +<%@ include file="include/dynamic_B.jsp" %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/staticStatic_A.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/staticStatic_A.jsp new file mode 100644 index 00000000..69fe6532 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/include/staticStatic_A.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +In staticStatic_A.jsp +<%@ include file="include/static_B.jsp" %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeFragmentReqAttributeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeFragmentReqAttributeTest.jsp new file mode 100644 index 00000000..dd381031 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeFragmentReqAttributeTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + + attribute value + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeInvalidApplicationScopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeInvalidApplicationScopeTest.jsp new file mode 100644 index 00000000..18b7e262 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeInvalidApplicationScopeTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + + attribute value + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeInvalidPageScopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeInvalidPageScopeTest.jsp new file mode 100644 index 00000000..a204d436 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeInvalidPageScopeTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + + attribute value + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeInvalidRequestScopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeInvalidRequestScopeTest.jsp new file mode 100644 index 00000000..35f09644 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeInvalidRequestScopeTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + + attribute value + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeInvalidScopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeInvalidScopeTest.jsp new file mode 100644 index 00000000..af904018 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeInvalidScopeTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + + attribute value + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeInvalidSessionScopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeInvalidSessionScopeTest.jsp new file mode 100644 index 00000000..236590ea --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeInvalidSessionScopeTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + + attribute value + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeJspAttributeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeJspAttributeTest.jsp new file mode 100644 index 00000000..4edb148f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeJspAttributeTest.jsp @@ -0,0 +1,60 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="java.io.Reader"%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + + attribute value + + + +<% + Object o = pageContext.getAttribute("requestVar", PageContext.REQUEST_SCOPE); + if (o != null) { + if (o.equals("attribute value")) { + o = pageContext.getAttribute("requestVarReader", PageContext.REQUEST_SCOPE); + if (o != null) { + Reader r = (Reader) o; + StringBuffer sb = new StringBuffer(); + for (int read = r.read(); read != -1; read = r.read()) { + sb.append((char) read); + } + if (sb.toString().equals("attribute value")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. The exported requestVarReader contained " + + "incorrrect data. Expected 'attribute value', received " + + o); + } + } else { + out.println("Test FAILED. Unable to find the requestVarReader attribute"); + } + } else { + out.println("Test FAILED. Expected the exported variable requestVar was" + + " incorrect. Expected the value to be 'attribute value', received: " + + o); + } + } else { + out.println("Test FAILED. Unable to find the requestVar attribute"); + } + +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeNoVarVarReaderScopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeNoVarVarReaderScopeTest.jsp new file mode 100644 index 00000000..6198dd6c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeNoVarVarReaderScopeTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + + attribute value + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeNonEmptyBodyTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeNonEmptyBodyTest.jsp new file mode 100644 index 00000000..ae449175 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeNonEmptyBodyTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + + attribute value + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeNotInSessionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeNotInSessionTest.jsp new file mode 100644 index 00000000..8404200a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeNotInSessionTest.jsp @@ -0,0 +1,46 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" session="false" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<% try { %> + + + + attribute value + + + +Test FAILED. This page doesn't participate in a session. The +tag called by this page set an attribute in the SESSION scope, +but no IllegalStateException was thrown. + +<% } catch (Throwable t) { + if (t instanceof IllegalStateException) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. An Exception was thrown when the calling" + + " page doesn't participate in a session and a tag called by the" + + " page attempts to set an attribute in the session scope.\n" + + "Expected an instance of IllegalStateException but received" + + " " + t.getClass().getName()); + } + } +%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeScopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeScopeTest.jsp new file mode 100644 index 00000000..b346c954 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeScopeTest.jsp @@ -0,0 +1,68 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + java.io.Reader"%> +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + + attribute value + + + +<% + final int[] scopes = { + PageContext.REQUEST_SCOPE, + PageContext.SESSION_SCOPE, + PageContext.APPLICATION_SCOPE + }; + + final String[] attrNames = { + "requestVar", "sessionVar", "applicationVar" + }; + + for (int i = 0; i < scopes.length; i++) { + Object o = pageContext.getAttribute(attrNames[i], scopes[i]); + if (o != null) { + if (o instanceof Reader) { + Reader r = (Reader) o; + StringBuffer sb = new StringBuffer(); + for (int read = r.read(); read != -1; read = r.read()) { + sb.append((char) read); + } + o = sb.toString(); + } + + if (o.equals("attribute value")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Attribute found in the " + + JspTestUtil.getScopeName(scopes[i]) + ", but the value" + + " of the attribute was not 'attribute value'. Received" + + ": " + o); + } + } else { + out.println("Test FAILED. Unable to find attribute '" + + attrNames[i] + "' in the " + JspTestUtil.getScopeName(scopes[i]) + + " scope."); + } + } + +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeUsageContextTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeUsageContextTest1.jsp new file mode 100644 index 00000000..1d22c8ab --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeUsageContextTest1.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- + jsp:invoke not in a tag file is invalid and thus + a translation error must occur +--%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeUsageContextTest2.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeUsageContextTest2.jspx new file mode 100644 index 00000000..a71d1ddc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeUsageContextTest2.jspx @@ -0,0 +1,27 @@ + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeUsageContextTest3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeUsageContextTest3.jsp new file mode 100644 index 00000000..b22e4c31 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeUsageContextTest3.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + + Test PASSED + + + + + + Test PASSED + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeVarReaderTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeVarReaderTest.jsp new file mode 100644 index 00000000..5bcffa82 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeVarReaderTest.jsp @@ -0,0 +1,65 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" import="java.io.Reader,java.io.IOException"%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + + attribute value + + + +<% + Object o = pageContext.getAttribute("pageVar", PageContext.REQUEST_SCOPE); + if (o != null) { + if (o instanceof java.io.Reader) { + Reader r = (Reader) o; + StringBuffer sb = new StringBuffer(); + for (int i = r.read(); i != -1; i = r.read()) { + sb.append((char) i); + } + if (sb.toString().equals("attribute value")) { + r.reset(); + sb = new StringBuffer(); + for (int i = r.read(); i != -1; i = r.read()) { + sb.append((char) i); + } + if (sb.toString().equals("attribute value")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected the result from reading the" + + " stream after resetting it to be 'attribute value'. Received: " + + sb.toString()); + } + } else { + out.println("Test FAILED. Expected the result from reading the " + + " stream to be 'attribute value'. Received: " + + sb.toString()); + } + } else { + out.println("Test FAILED. The exported result of jsp:invoke" + + " using the 'var' attribute of the jsp:invoke action was not" + + " of type 'java.lang.String'. Received: " + o.getClass().getName()); + } + } else { + out.println("Test FAILED. Unabled to find the page scoped variable, " + + "'pageVar', that should have been exported by the jsp:invoke action."); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeVarTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeVarTest.jsp new file mode 100644 index 00000000..7ea65acf --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeVarTest.jsp @@ -0,0 +1,49 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + + attribute value + + + +<% + Object o = pageContext.getAttribute("pageVar", PageContext.REQUEST_SCOPE); + if (o != null) { + if (o instanceof java.lang.String) { + if (o.equals("attribute value")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. The exported result of jsp:invoke" + + " was not the expected value of 'attribute value'. " + + "Received: " + o); + } + } else { + out.println("Test FAILED. The exported result of jsp:invoke" + + " using the 'var' attribute of the jsp:invoke action was not" + + " of type 'java.lang.String'. Received: " + o.getClass().getName()); + } + } else { + out.println("Test FAILED. Unabled to find the page scoped variable, " + + "'pageVar', that should have been exported by the jsp:invoke action."); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeVarVarReaderTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeVarVarReaderTest.jsp new file mode 100644 index 00000000..ed639f9d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/JspInvokeVarVarReaderTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + + attribute value + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/FragmentReqAttributeTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/FragmentReqAttributeTag.tag new file mode 100644 index 00000000..1d07923d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/FragmentReqAttributeTag.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="attr1" required="true" fragment="true" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/InvalidApplicationScopeTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/InvalidApplicationScopeTag.tag new file mode 100644 index 00000000..7f1a5f37 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/InvalidApplicationScopeTag.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="attr1" required="true" fragment="true" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/InvalidPageScopeTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/InvalidPageScopeTag.tag new file mode 100644 index 00000000..0d9dd4f7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/InvalidPageScopeTag.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="attr1" required="true" fragment="true" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/InvalidRequestScopeTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/InvalidRequestScopeTag.tag new file mode 100644 index 00000000..93f8e361 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/InvalidRequestScopeTag.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="attr1" required="true" fragment="true" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/InvalidScopeTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/InvalidScopeTag.tag new file mode 100644 index 00000000..037f0ba8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/InvalidScopeTag.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="attr1" required="true" fragment="true" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/InvalidSessionScopeTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/InvalidSessionScopeTag.tag new file mode 100644 index 00000000..7d22a91d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/InvalidSessionScopeTag.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="attr1" required="true" fragment="true" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/JspAttributeTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/JspAttributeTag.tag new file mode 100644 index 00000000..229ccba5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/JspAttributeTag.tag @@ -0,0 +1,43 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="attr1" required="true" fragment="true" %> + + + + attr1 + + + requestVar + + + request + + + + + + attr1 + + + requestVarReader + + + request + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/JspInvokeUsageContextTag3a.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/JspInvokeUsageContextTag3a.tag new file mode 100644 index 00000000..678ae535 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/JspInvokeUsageContextTag3a.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="attr1" required="true" fragment="true" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/JspInvokeUsageContextTag3b.tagx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/JspInvokeUsageContextTag3b.tagx new file mode 100644 index 00000000..cb9856cb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/JspInvokeUsageContextTag3b.tagx @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/JspInvokeVarReaderTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/JspInvokeVarReaderTag.tag new file mode 100644 index 00000000..188a98d5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/JspInvokeVarReaderTag.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="attr1" required="true" fragment="true" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/JspInvokeVarTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/JspInvokeVarTag.tag new file mode 100644 index 00000000..d8bcece7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/JspInvokeVarTag.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="attr1" required="true" fragment="true" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/NoVarVarReaderScopeTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/NoVarVarReaderScopeTag.tag new file mode 100644 index 00000000..570e3d86 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/NoVarVarReaderScopeTag.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="attr1" required="true" fragment="true" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/NonEmptyBodyTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/NonEmptyBodyTag.tag new file mode 100644 index 00000000..483c999d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/NonEmptyBodyTag.tag @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="attr1" required="true" fragment="true" %> + + + body + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/NotInSessionTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/NotInSessionTag.tag new file mode 100644 index 00000000..7d40b2ca --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/NotInSessionTag.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="attr1" required="true" fragment="true" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/ScopeTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/ScopeTag.tag new file mode 100644 index 00000000..fe5de6a3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/ScopeTag.tag @@ -0,0 +1,55 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="attr1" required="true" fragment="true" %> + + + + + + + +<% + Object o = jspContext.getAttribute("defaultPage", PageContext.PAGE_SCOPE); + if (o != null) { + if (o.equals("attribute value")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. The page scoped attribute, 'defaultPage' " + + "was found, but had an incorrect value. Expected 'attribute value'" + + ", received: " + o); + } + } else { + out.println("Test FAILED. Unable to find the page scoped attribute '" + + "defaultPage' in the tag file's page context."); + } + + o = jspContext.getAttribute("pageVar", PageContext.PAGE_SCOPE); + if (o != null) { + if (o.equals("attribute value")) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. The page scoped attribute, 'pageVar' " + + "was found, but had an incorrect value. Expected 'attribute value'" + + ", received: " + o); + } + } else { + out.println("Test FAILED. Unable to find the page scoped attribute '" + + "pageVar' in the tag file's page context."); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/VarVarReaderTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/VarVarReaderTag.tag new file mode 100644 index 00000000..15ec7b31 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/VarVarReaderTag.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="attr1" required="true" fragment="true" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/jspFragmentNullTest.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/jspFragmentNullTest.tag new file mode 100644 index 00000000..3d00662d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/WEB-INF/tags/jspFragmentNullTest.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="frag" fragment="true" %> +BEGINEND diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/jspFragmentNullTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/jspFragmentNullTest.jsp new file mode 100644 index 00000000..201000b7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/jspFragmentNullTest.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/jsp_core_act_invoke_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/jsp_core_act_invoke_web.xml new file mode 100644 index 00000000..d200d00b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/invoke/jsp_core_act_invoke_web.xml @@ -0,0 +1,25 @@ + + + + + JspCorSynActInvoke + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputBodyTest1.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputBodyTest1.jspx new file mode 100644 index 00000000..e372cc3b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputBodyTest1.jspx @@ -0,0 +1,25 @@ + + + + + + + Test FAILED + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputBodyTest2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputBodyTest2.jsp new file mode 100644 index 00000000..da3ff72c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputBodyTest2.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputJspRootOmitDeclDefaultTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputJspRootOmitDeclDefaultTest.jspx new file mode 100644 index 00000000..35d7d583 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputJspRootOmitDeclDefaultTest.jspx @@ -0,0 +1,24 @@ + + + + + + + body + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclDefaultTagTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclDefaultTagTest.jsp new file mode 100644 index 00000000..31cc488b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclDefaultTagTest.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclDefaultTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclDefaultTest.jspx new file mode 100644 index 00000000..0d7337f7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclDefaultTest.jspx @@ -0,0 +1,23 @@ + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest1.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest1.jspx new file mode 100644 index 00000000..a8037e1d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest1.jspx @@ -0,0 +1,23 @@ + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest2.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest2.jspx new file mode 100644 index 00000000..d9137197 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest2.jspx @@ -0,0 +1,23 @@ + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest3.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest3.jspx new file mode 100644 index 00000000..0155a8cd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest3.jspx @@ -0,0 +1,23 @@ + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest4.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest4.jspx new file mode 100644 index 00000000..225fa625 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest4.jspx @@ -0,0 +1,23 @@ + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest5.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest5.jsp new file mode 100644 index 00000000..d2a90f9c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest5.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest6.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest6.jsp new file mode 100644 index 00000000..10e1fb4e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest6.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest7.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest7.jsp new file mode 100644 index 00000000..c7d6a63e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest7.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest8.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest8.jsp new file mode 100644 index 00000000..bafd6b8f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputOmitDeclValidValuesTest8.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputUsageContextTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputUsageContextTest1.jsp new file mode 100644 index 00000000..81e94b68 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputUsageContextTest1.jsp @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputUsageContextTest2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputUsageContextTest2.jsp new file mode 100644 index 00000000..71fe002c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputUsageContextTest2.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputUsageContextTest3.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputUsageContextTest3.jspx new file mode 100644 index 00000000..0155a8cd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputUsageContextTest3.jspx @@ -0,0 +1,23 @@ + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputUsageContextTest4.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputUsageContextTest4.jsp new file mode 100644 index 00000000..c6d1ca22 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/JspOutputUsageContextTest4.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputBodyTag.tagx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputBodyTag.tagx new file mode 100644 index 00000000..2b22eff2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputBodyTag.tagx @@ -0,0 +1,24 @@ + + + + + + Test FAILED + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputDefaultTag.tagx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputDefaultTag.tagx new file mode 100644 index 00000000..4d39771f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputDefaultTag.tagx @@ -0,0 +1,22 @@ + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputOmitDeclFalseTag.tagx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputOmitDeclFalseTag.tagx new file mode 100644 index 00000000..c28ada60 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputOmitDeclFalseTag.tagx @@ -0,0 +1,22 @@ + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputOmitDeclNoTag.tagx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputOmitDeclNoTag.tagx new file mode 100644 index 00000000..676a6cc8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputOmitDeclNoTag.tagx @@ -0,0 +1,22 @@ + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputOmitDeclTrueTag.tagx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputOmitDeclTrueTag.tagx new file mode 100644 index 00000000..b3f05a89 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputOmitDeclTrueTag.tagx @@ -0,0 +1,22 @@ + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputOmitDeclYesTag.tagx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputOmitDeclYesTag.tagx new file mode 100644 index 00000000..89a61332 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputOmitDeclYesTag.tagx @@ -0,0 +1,22 @@ + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputUsageTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputUsageTag.tag new file mode 100644 index 00000000..1706e9dd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputUsageTag.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputUsageXMLTag.tagx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputUsageXMLTag.tagx new file mode 100644 index 00000000..c28ada60 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/WEB-INF/tags/JspOutputUsageXMLTag.tagx @@ -0,0 +1,22 @@ + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/doctypeSystemPublicTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/doctypeSystemPublicTest.jspx new file mode 100644 index 00000000..88bb3f60 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/doctypeSystemPublicTest.jspx @@ -0,0 +1,27 @@ + + + + + + +

          Example XHTML Document

          + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/doctypeSystemTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/doctypeSystemTest.jspx new file mode 100644 index 00000000..d6629367 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/doctypeSystemTest.jspx @@ -0,0 +1,27 @@ + + + + + + +

          Example XHTML Document

          + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/jsp_core_act_output_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/jsp_core_act_output_web.xml new file mode 100644 index 00000000..75c88ba5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/jsp_core_act_output_web.xml @@ -0,0 +1,25 @@ + + + + + JspCorSynActOutput + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/negativeDoctypePublicNoSystemTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/negativeDoctypePublicNoSystemTest.jspx new file mode 100644 index 00000000..ba155bfb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/negativeDoctypePublicNoSystemTest.jspx @@ -0,0 +1,26 @@ + + + + + + +

          Example XHTML Document

          + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/negativeDoctypeRootNoSystem.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/negativeDoctypeRootNoSystem.jspx new file mode 100644 index 00000000..556292d5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/negativeDoctypeRootNoSystem.jspx @@ -0,0 +1,26 @@ + + + + + + +

          Example XHTML Document

          + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/negativeDoctypeSystemNoRoot.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/negativeDoctypeSystemNoRoot.jspx new file mode 100644 index 00000000..9fbcce11 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/negativeDoctypeSystemNoRoot.jspx @@ -0,0 +1,26 @@ + + + + + + +

          Example XHTML Document

          + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/negativeMultipleDoctypeTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/negativeMultipleDoctypeTest.jspx new file mode 100644 index 00000000..44f7e429 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/negativeMultipleDoctypeTest.jspx @@ -0,0 +1,30 @@ + + + + + + + +

          Example XHTML Document

          + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/simpleDefaultTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/simpleDefaultTest.jspx new file mode 100644 index 00000000..0cd68d33 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/output/simpleDefaultTest.jspx @@ -0,0 +1,20 @@ + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamAttributesTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamAttributesTest.jsp new file mode 100644 index 00000000..b64f0913 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamAttributesTest.jsp @@ -0,0 +1,44 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- + Validate: + - The 'value' attributes acceptance of RT/EL expressions. + - The ablity to provide values for the 'name' and 'value' + - attributes via jsp:attribute actions +--%> + + + + + + + + + + param1 + + + + + value2 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamForwardTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamForwardTest.jsp new file mode 100644 index 00000000..406f8caf --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamForwardTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- + validate the interaction of jsp:forward with nested jsp:param elements. +--%> + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamIncludeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamIncludeTest.jsp new file mode 100644 index 00000000..0b44c002 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamIncludeTest.jsp @@ -0,0 +1,55 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil"%> + +<%@ page contentType="text/plain" %> + +<%-- + validate the interaction of jsp:include with nested jsp:param elements. +--%> + + + + + + +<%-- Validate that param1 value2 and param2 are no longer present in the request --%> +<% + String[] param1Values = request.getParameterValues("param1"); + String[] param2Values = request.getParameterValues("param2"); + + if (param1Values.length == 1) { + if (param2Values == null) { + if ("value1".equals(param1Values[0])) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected the value of param1 to be 'param2'" + + " after the include completed. Actual: " + param1Values[0]); + } + } else { + out.println("Test FAILED. The parameter, param2, should not exist in" + + "the request after the included completed. However, values were found:" + + " " + JspTestUtil.getAsString(param2Values)); + } + } else { + out.println("Test FAILED. Expected param1 to only have 1 value. The " + + "actual number is " + param1Values.length); + } + +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamNameElValuesTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamNameElValuesTest.jsp new file mode 100644 index 00000000..b499b3ae --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamNameElValuesTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- + EL expressions are not allowed with the name attribute. A + translation-time error must occur. +--%> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamNameRtValuesTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamNameRtValuesTest.jsp new file mode 100644 index 00000000..03f992f4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamNameRtValuesTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- + RT expressions are not allowed with the name attribute. A + translation-time error must occur. +--%> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamNoNameAttributeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamNoNameAttributeTest.jsp new file mode 100644 index 00000000..3bb57914 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamNoNameAttributeTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- A jsp:param element with no name attribute == translation-time error --%> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamNoValueAttributeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamNoValueAttributeTest.jsp new file mode 100644 index 00000000..d82c30a9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamNoValueAttributeTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- A jsp:param element with no value attribute == translation-time error --%> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamUsageContextTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamUsageContextTest1.jsp new file mode 100644 index 00000000..24149569 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamUsageContextTest1.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- jsp:param not nested in any action == tranlation-time error --%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamUsageContextTest2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamUsageContextTest2.jsp new file mode 100644 index 00000000..e906bec5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamUsageContextTest2.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- jsp:param nested in a jsp:useBean action == translation-time error --%> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamUsageContextTest3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamUsageContextTest3.jsp new file mode 100644 index 00000000..c69a9b4d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamUsageContextTest3.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- jsp:param nexted within a jsp:plugin element == translation-time error --%> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamUsageContextTest4.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamUsageContextTest4.jsp new file mode 100644 index 00000000..3e66fcc1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/JspParamUsageContextTest4.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/param" prefix="simple" %> + +<%-- jsp:param nested within a custom action == translation-time error --%> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/Resource.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/Resource.jsp new file mode 100644 index 00000000..819c2a7e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/Resource.jsp @@ -0,0 +1,60 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil"%> + +<%@ page contentType="text/plain" %> +<% + String[] param1Values = request.getParameterValues("param1"); + String[] param2Values = request.getParameterValues("param2"); + + if (param1Values != null) { + if (param2Values != null) { + if (param1Values.length == 2) { + if (param2Values.length == 1) { + if ("value2".equals(param1Values[0]) + && "value1".equals(param1Values[1])) { + if ("value2".equals(param2Values[0])) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected the value of param2 to be value2." + + " Value(s) received: " + JspTestUtil.getAsString(param2Values)); + } + } else { + out.println("Test FAILED. Expected the first value of param1 to be 'value2'" + + " and the second value to be 'value1'. Values as received: " + + JspTestUtil.getAsString(param1Values)); + } + } else { + out.println("Test FAILED. Expected one value for param2: value1." + + " Actual param values received: " + + JspTestUtil.getAsString(param2Values)); + } + } else { + out.println("Test FAILED. Expected two values for param1: value2, value1." + + " Actual param values received: " + + JspTestUtil.getAsString(param1Values)); + } + } else { + out.println("Test FAILED. Request parameter 'param2' not available."); + } + } else { + out.println("Test FAILED. Request parameter 'param1' not available."); + } + +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/WEB-INF/simple.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/WEB-INF/simple.tld new file mode 100644 index 00000000..3c816292 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/WEB-INF/simple.tld @@ -0,0 +1,31 @@ + + + + + 1.0 + simple + + echo + ee.jakarta.tck.pages.common.tags.tck.SimpleTag + JSP + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/jsp_core_act_param_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/jsp_core_act_param_web.xml new file mode 100644 index 00000000..09f3241e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/param/jsp_core_act_param_web.xml @@ -0,0 +1,31 @@ + + + + + JspCorSynActParam + + 5 + + + + http://java.sun.com/tck/jsp/param + /WEB-INF/simple.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootJspBodyTest1.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootJspBodyTest1.jspx new file mode 100644 index 00000000..d0a1b5cc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootJspBodyTest1.jspx @@ -0,0 +1,25 @@ + + + + + + + Test PASSED + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootJspBodyTest2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootJspBodyTest2.jsp new file mode 100644 index 00000000..13a3504f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootJspBodyTest2.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootUsageContextTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootUsageContextTest1.jsp new file mode 100644 index 00000000..1ecbd4cf --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootUsageContextTest1.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + + <%@ page contentType="text/plain" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootUsageContextTest2.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootUsageContextTest2.jspx new file mode 100644 index 00000000..e2c74598 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootUsageContextTest2.jspx @@ -0,0 +1,22 @@ + + + + + Test PASSED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootUsageContextTest3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootUsageContextTest3.jsp new file mode 100644 index 00000000..1de5f9ba --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootUsageContextTest3.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootUsageContextTest4.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootUsageContextTest4.jsp new file mode 100644 index 00000000..33c77c64 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootUsageContextTest4.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootVersionAttrAllowableValuesTest1.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootVersionAttrAllowableValuesTest1.jspx new file mode 100644 index 00000000..cc3698da --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootVersionAttrAllowableValuesTest1.jspx @@ -0,0 +1,23 @@ + + + + + + Test PASSED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootVersionAttrAllowableValuesTest2.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootVersionAttrAllowableValuesTest2.jspx new file mode 100644 index 00000000..56662d5b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootVersionAttrAllowableValuesTest2.jspx @@ -0,0 +1,23 @@ + + + + + + Test PASSED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootVersionAttrInvalidValueTest1.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootVersionAttrInvalidValueTest1.jspx new file mode 100644 index 00000000..8b1b0907 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootVersionAttrInvalidValueTest1.jspx @@ -0,0 +1,23 @@ + + + + + + Test FAILED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootVersionAttrInvalidValueTest2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootVersionAttrInvalidValueTest2.jsp new file mode 100644 index 00000000..027321f3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootVersionAttrInvalidValueTest2.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootVersionReqAttrTest1.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootVersionReqAttrTest1.jspx new file mode 100644 index 00000000..22353a94 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootVersionReqAttrTest1.jspx @@ -0,0 +1,23 @@ + + + + + + Test FAILED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootVersionReqAttrTest2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootVersionReqAttrTest2.jsp new file mode 100644 index 00000000..e5dd9d71 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/JspRootVersionReqAttrTest2.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/WEB-INF/tags/JspRootJspBodyTag.tagx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/WEB-INF/tags/JspRootJspBodyTag.tagx new file mode 100644 index 00000000..e5c2bd11 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/WEB-INF/tags/JspRootJspBodyTag.tagx @@ -0,0 +1,24 @@ + + + + + + Test PASSED + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/WEB-INF/tags/JspRootUsageContextTag1.tagx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/WEB-INF/tags/JspRootUsageContextTag1.tagx new file mode 100644 index 00000000..5f72ee7e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/WEB-INF/tags/JspRootUsageContextTag1.tagx @@ -0,0 +1,22 @@ + + + + + Test PASSED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/WEB-INF/tags/JspRootUsageContextTag2.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/WEB-INF/tags/JspRootUsageContextTag2.tag new file mode 100644 index 00000000..1ecbd4cf --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/WEB-INF/tags/JspRootUsageContextTag2.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + + <%@ page contentType="text/plain" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/WEB-INF/tags/JspRootVersionInvalidValueTag.tagx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/WEB-INF/tags/JspRootVersionInvalidValueTag.tagx new file mode 100644 index 00000000..5bec4c2e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/WEB-INF/tags/JspRootVersionInvalidValueTag.tagx @@ -0,0 +1,22 @@ + + + + + Test FAILED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/WEB-INF/tags/JspRootVersionReqAttrTag.tagx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/WEB-INF/tags/JspRootVersionReqAttrTag.tagx new file mode 100644 index 00000000..751cfcc6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/WEB-INF/tags/JspRootVersionReqAttrTag.tagx @@ -0,0 +1,22 @@ + + + + + Test FAILED + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/jsp_core_act_root_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/jsp_core_act_root_web.xml new file mode 100644 index 00000000..6d4e0ca9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/root/jsp_core_act_root_web.xml @@ -0,0 +1,26 @@ + + + + + JspCorSynActRoot + + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/JspScriptletUsageContextTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/JspScriptletUsageContextTest1.jsp new file mode 100644 index 00000000..9df33416 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/JspScriptletUsageContextTest1.jsp @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +out.print("Test PASSED"); diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/JspScriptletUsageContextTest2.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/JspScriptletUsageContextTest2.jspx new file mode 100644 index 00000000..80acb7c6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/JspScriptletUsageContextTest2.jspx @@ -0,0 +1,23 @@ + + + + + + out.print("Test PASSED"); + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/JspScriptletUsageContextTest3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/JspScriptletUsageContextTest3.jsp new file mode 100644 index 00000000..525e37b3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/JspScriptletUsageContextTest3.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/JspScriptletUsageContextTest4.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/JspScriptletUsageContextTest4.jspx new file mode 100644 index 00000000..b2cbcecd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/JspScriptletUsageContextTest4.jspx @@ -0,0 +1,22 @@ + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/WEB-INF/tags/JspScriptletTag1.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/WEB-INF/tags/JspScriptletTag1.tag new file mode 100644 index 00000000..f47e4ba1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/WEB-INF/tags/JspScriptletTag1.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +out.print("Test PASSED"); diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/WEB-INF/tags/JspScriptletTag2.tagx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/WEB-INF/tags/JspScriptletTag2.tagx new file mode 100644 index 00000000..790403dd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/WEB-INF/tags/JspScriptletTag2.tagx @@ -0,0 +1,22 @@ + + + + + out.print("Test PASSED"); + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/jsp_core_act_scr_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/jsp_core_act_scr_web.xml new file mode 100644 index 00000000..7502069a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/scriptlet/jsp_core_act_scr_web.xml @@ -0,0 +1,25 @@ + + + + + JspCorSynActScr + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/Errorpage.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/Errorpage.jsp new file mode 100644 index 00000000..add45cd0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/Errorpage.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +Errorpage + +

          Error occured !

          + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/jsp_coresyntx_act_setproperty_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/jsp_coresyntx_act_setproperty_web.xml new file mode 100644 index 00000000..6330610f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/jsp_coresyntx_act_setproperty_web.xml @@ -0,0 +1,25 @@ + + + + + JspCorSynActSetPrpty + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveBeanPropertyEditor.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveBeanPropertyEditor.gf new file mode 100644 index 00000000..eee41f3c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveBeanPropertyEditor.gf @@ -0,0 +1,20 @@ + +positiveBeanPropertyEditor + + + + + + + + +PString Validated + + +true + + +218314 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveBeanPropertyEditor.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveBeanPropertyEditor.jsp new file mode 100644 index 00000000..aaa9cb6a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveBeanPropertyEditor.jsp @@ -0,0 +1,43 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveBeanPropertyEditor + +<% /** Name : positiveBeanPropertyEditor + Description : Using a bean that has been configured with a + PropertyEditor, validate that the editors + are in fact used. + Result : Output to the client (see comments below) +**/ %> + + + + + + + + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetBooleanObj.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetBooleanObj.gf new file mode 100644 index 00000000..66edd402 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetBooleanObj.gf @@ -0,0 +1,11 @@ + +positiveSetBooleanObj + + + + + +true + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetBooleanObj.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetBooleanObj.jsp new file mode 100644 index 00000000..22943ce8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetBooleanObj.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetBooleanObj + +<% /** Name : positiveSetBooleanObj + Description : use a setProperty to set a Boolean value in a bean + Result : should return a Boolean value. +**/ %> + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetBooleanPrim.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetBooleanPrim.gf new file mode 100644 index 00000000..bf8d8cf8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetBooleanPrim.gf @@ -0,0 +1,11 @@ + +positiveSetBooleanPrim + + + + + +false + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetBooleanPrim.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetBooleanPrim.jsp new file mode 100644 index 00000000..0e88bbf3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetBooleanPrim.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetBooleanPrim + +<% /** Name : positiveSetBooleanPrim + Description : use a setProperty to set a boolean value in a bean + Result :should return a boolean value. +**/ %> + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetByteObj.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetByteObj.gf new file mode 100644 index 00000000..d6a17418 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetByteObj.gf @@ -0,0 +1,11 @@ + +positiveSetByteObj + + + + + +123 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetByteObj.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetByteObj.jsp new file mode 100644 index 00000000..c7f66549 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetByteObj.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetByteObj + +<% /** Name : positiveSetByteObj + Description :use a setProperty to set a Byte value in a bean + Result :should return a Byte value. +**/ %> + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetBytePrim.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetBytePrim.gf new file mode 100644 index 00000000..143497d2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetBytePrim.gf @@ -0,0 +1,11 @@ + +positiveSetBytePrim + + + + + +123 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetBytePrim.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetBytePrim.jsp new file mode 100644 index 00000000..7afc2dbe --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetBytePrim.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetBytePrim + +<% /** Name : positiveSetBytePrim + Description : use a setProperty to set a byte value in a bean + Result :should return a byte value. +**/ %> + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetCharObj.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetCharObj.gf new file mode 100644 index 00000000..0b721d2c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetCharObj.gf @@ -0,0 +1,11 @@ + +positiveSetCharObj + + + + + +A + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetCharObj.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetCharObj.jsp new file mode 100644 index 00000000..306fbf9d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetCharObj.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetCharObj + +<% /** Name : positiveSetCharObj + Description : use setProperty to set a Character value in a bean. + Result :should return a Character value. +**/ %> + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetCharPrim.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetCharPrim.gf new file mode 100644 index 00000000..21ff916b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetCharPrim.gf @@ -0,0 +1,11 @@ + +positiveSetCharPrim + + + + + +R + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetCharPrim.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetCharPrim.jsp new file mode 100644 index 00000000..55c0ea2f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetCharPrim.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetCharPrim + +<% /** Name : positiveSetCharPrim + Description : use setProperty to set a char value in a bean. + Result :should return a char value. +**/ %> + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetDoubleObj.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetDoubleObj.gf new file mode 100644 index 00000000..8d132829 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetDoubleObj.gf @@ -0,0 +1,11 @@ + +positiveSetDoubleObj + + + + + +123456.0 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetDoubleObj.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetDoubleObj.jsp new file mode 100644 index 00000000..8d0297aa --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetDoubleObj.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetDoubleObj + +<% /** Name : positiveSetDoubleObj + Description : use a setProperty to set a Double value in a bean + Result :should return a Double value. +**/ %> + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetDoublePrim.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetDoublePrim.gf new file mode 100644 index 00000000..80ba5731 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetDoublePrim.gf @@ -0,0 +1,11 @@ + +positiveSetDoublePrim + + + + + +123456.0 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetDoublePrim.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetDoublePrim.jsp new file mode 100644 index 00000000..2da10e04 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetDoublePrim.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetDoublePrim + +<% /** Name : positiveSetDoublePrim + Description : use a setProperty to set a double value in a bean + Result :should return a double value. +**/ %> + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetFloatObj.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetFloatObj.gf new file mode 100644 index 00000000..c846952e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetFloatObj.gf @@ -0,0 +1,11 @@ + +positiveSetFloatObj + + + + + +15.0 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetFloatObj.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetFloatObj.jsp new file mode 100644 index 00000000..46f1d71c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetFloatObj.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetFloatObj + +<% /** Name : positiveSetFloatObj + Description : use a setProperty to set a Float value in a bean + Result :should return a Float value. +**/ %> + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetFloatPrim.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetFloatPrim.gf new file mode 100644 index 00000000..44f29217 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetFloatPrim.gf @@ -0,0 +1,11 @@ + +positiveSetFloatPrim + + + + + +123.0 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetFloatPrim.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetFloatPrim.jsp new file mode 100644 index 00000000..554473d2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetFloatPrim.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetFloatPrim + +<% /** Name : positiveSetFloatPrim + Description : use a setProperty to set a float value in a bean + Result :should return a float value. +**/ %> + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetIndexedProp.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetIndexedProp.gf new file mode 100644 index 00000000..b853aed2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetIndexedProp.gf @@ -0,0 +1,48 @@ + +positiveSetIndexedProp + + + + + + + + + + + + + + + + + + + + + + + + + + +1 2 3 +1 2 3 +1 2 3 +24 25 26 +1.1 1.2 1.3 +1 1 1 +1.1 1.2 1.3 +false true false +-128 127 +1 2 3 +-32768 32767 +-2147483648 2147483647 +1.1 1.2 3.14 +-9223372036854775808 9223372036854775807 +1.1 2.81 3.14 +true false true + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetIndexedProp.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetIndexedProp.jsp new file mode 100644 index 00000000..48ada32b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetIndexedProp.jsp @@ -0,0 +1,226 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetIndexedProp + +<% +/** + * TestCase name : positiveSetIndexedProp + * Description : Here, the setProperty tag is used to set the value for + * an indexed property.An array is declared and defined in a + * scriptlet and then assigned through the setProperty tag, with + * an expression. + * Result : Expected to set the value of the array. + */ + %> + +<% +//Declare primative arrays +byte[] bArray = { 1, 2, 3 }; +char[] cArray = { '1', '2', '3' }; +short[] sArray = { 1, 2, 3 }; +int[] iArray = {24, 25, 26 }; +float[] fArray = { 1.1f, 1.2f, 1.3f }; +long[] lArray = { 1, 1, 1 }; +double[] dArray = { 1.1d, 1.2d, 1.3d }; +boolean[] boArray = { false, true, false }; + +//Declare Object arrays +Boolean[] booleanArray = { new Boolean( "true" ), new Boolean( "false" ), new Boolean( "true" ) }; +Byte[] byteArray = { new Byte( Byte.MIN_VALUE ), new Byte( Byte.MAX_VALUE ) }; +Character[] charArray = { new Character( '1' ), new Character( '2' ), new Character( '3' ) }; +Short[] shortArray = { new Short( Short.MIN_VALUE ), new Short( Short.MAX_VALUE ) }; +Integer[] integerArray = { new Integer( Integer.MIN_VALUE ), new Integer( Integer.MAX_VALUE ) }; +Float[] floatArray = { new Float( 1.1f ), new Float( 1.2F ), new Float( 3.14f ) }; +Long[] longArray = { new Long( Long.MIN_VALUE ), new Long( Long.MAX_VALUE ) }; +Double[] doubleArray = { new Double( 1.1d ), new Double( 2.81d ), new Double( 3.14d ) }; + +%> + + + + + + + + + + + + + + + + + + + + + + +<% +// Accessing the set property. +byte[] bary = myBean.getBArray(); +for(int j = 0; j < bary.length; j++ ) { + if ( j == bary.length - 1 ) { + out.println( bary[ j ] ); + } else { + out.print( bary[ j ] + " " ); + } +} + +char[] cary = myBean.getCArray(); +for(int j = 0; j < cary.length; j++ ) { + if ( j == cary.length - 1 ) { + out.println( cary[ j ] ); + } else { + out.print( cary[ j ] + " " ); + } +} + +short[] sary = myBean.getSArray(); +for(int j = 0; j < sary.length; j++ ) { + if ( j == sary.length - 1 ) { + out.println( sary[ j ] ); + } else { + out.print( sary[ j ] + " " ); + } +} + +int[] iary = myBean.getIArray(); +for(int j = 0; j < iary.length; j++ ) { + if ( j == iary.length - 1 ) { + out.println( iary[ j ] ); + } else { + out.print( iary[ j ] + " " ); + } +} + +float[] fary = myBean.getFArray(); +for(int j = 0; j < fary.length; j++ ) { + if ( j == fary.length - 1 ) { + out.println( fary[ j ] ); + } else { + out.print( fary[ j ] + " " ); + } +} + +long[] lary = myBean.getLArray(); +for(int j = 0; j < lary.length; j++ ) { + if ( j == lary.length - 1 ) { + out.println( lary[ j ] ); + } else { + out.print( lary[ j ] + " " ); + } +} + +double[] dary = myBean.getDArray(); +for(int j = 0; j < dary.length; j++ ) { + if ( j == dary.length - 1 ) { + out.println( dary[ j ] ); + } else { + out.print( dary[ j ] + " " ); + } +} + +boolean[] boary = myBean.getBoArray(); +for(int j = 0; j < boary.length; j++ ) { + if ( j == boary.length - 1 ) { + out.println( boary[ j ] ); + } else { + out.print( boary[ j ] + " " ); + } +} + +Byte[] byteary = myBean.getByteArray(); +for(int j = 0; j < byteary.length; j++ ) { + if ( j == byteary.length - 1 ) { + out.println( byteary[ j ] ); + } else { + out.print( byteary[ j ] + " " ); + } +} + +Character[] charary = myBean.getCharArray(); +for(int j = 0; j < charary.length; j++ ) { + if ( j == charary.length - 1 ) { + out.println( charary[ j ] ); + } else { + out.print( charary[ j ] + " " ); + } +} + +Short[] shortary = myBean.getShortArray(); +for(int j = 0; j < shortary.length; j++ ) { + if ( j == shortary.length - 1 ) { + out.println( shortary[ j ] ); + } else { + out.print( shortary[ j ] + " " ); + } +} + +Integer[] intary = myBean.getIntegerArray(); +for(int j = 0; j < intary.length; j++ ) { + if ( j == intary.length - 1 ) { + out.println( intary[ j ] ); + } else { + out.print( intary[ j ] + " " ); + } +} + +Float[] floatary = myBean.getFloatArray(); +for(int j = 0; j < floatary.length; j++ ) { + if ( j == floatary.length - 1 ) { + out.println( floatary[ j ] ); + } else { + out.print( floatary[ j ] + " " ); + } +} + +Long[] longary = myBean.getLongArray(); +for(int j = 0; j < longary.length; j++ ) { + if ( j == longary.length - 1 ) { + out.println( longary[ j ] ); + } else { + out.print( longary[ j ] + " " ); + } +} + +Double[] doary = myBean.getDoubleArray(); +for(int j = 0; j < doary.length; j++ ) { + if ( j == doary.length - 1 ) { + out.println( doary[ j ] ); + } else { + out.print( doary[ j ] + " " ); + } +} + +Boolean[] bolary = myBean.getBooleanArray(); +for(int j = 0; j < bolary.length; j++ ) { + if ( j == bolary.length - 1 ) { + out.println( bolary[ j ] ); + } else { + out.print( bolary[ j ] + " " ); + } +} + +%> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetIntObj.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetIntObj.gf new file mode 100644 index 00000000..d9d6ceb3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetIntObj.gf @@ -0,0 +1,11 @@ + +positiveSetIntObj + + + + + +21 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetIntObj.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetIntObj.jsp new file mode 100644 index 00000000..714337a6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetIntObj.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetIntObj + +<% /** Name : positiveSetIntObj + Description :use a setProperty to set a Integer value in a bean. + Result :should return a Integer value. +**/ %> + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetIntPrim.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetIntPrim.gf new file mode 100644 index 00000000..13632766 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetIntPrim.gf @@ -0,0 +1,11 @@ + +positiveSetIntPrim + + + + + +12 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetIntPrim.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetIntPrim.jsp new file mode 100644 index 00000000..90ca3c09 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetIntPrim.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetIntPrim + +<% /** Name : positiveSetIntPrim + Description :use a setProperty to set a int value in a bean. + Result :should return a int value. +**/ %> + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetLongObj.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetLongObj.gf new file mode 100644 index 00000000..5eab825f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetLongObj.gf @@ -0,0 +1,11 @@ + +positiveSetLongObj + + + + + +12345 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetLongObj.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetLongObj.jsp new file mode 100644 index 00000000..3a0c578d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetLongObj.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetLongObj + +<% /** Name : positiveSetLongObj + Description : use a setProperty to set a Long value in a bean + Result :should return a Long value. +**/ %> + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetLongPrim.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetLongPrim.gf new file mode 100644 index 00000000..91b31fe1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetLongPrim.gf @@ -0,0 +1,11 @@ + +positiveSetLongPrim + + + + + +54321 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetLongPrim.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetLongPrim.jsp new file mode 100644 index 00000000..1097786b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetLongPrim.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetLongPrim + +<% /** Name : positiveSetLongPrim + Description : use a setProperty to set a long value in a bean + Result :should return a long value. +**/ %> + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropAll.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropAll.gf new file mode 100644 index 00000000..c70282d3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropAll.gf @@ -0,0 +1,14 @@ + +positiveSetPropAll + + + + + + +Validated
          +Frodo
          +116165
          + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropAll.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropAll.jsp new file mode 100644 index 00000000..9f25efbb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropAll.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetPropAll + +<% /** Name : positiveSetPropAll + Description : Create a valid useBean action in JSP. Set all properties + of that bean from the request using a + action. Then access all + properties of the bean. + Result : The client request will set name=Frodo, num=116165, str=Validated, as + a result, these values should be displayed when accessed. +**/ %> + + + + +<% out.print(myBean.getStr()); %>
          +<% out.print(myBean.getName()); %>
          +<% out.print(myBean.getNum()); %>
          + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropNoParam.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropNoParam.gf new file mode 100644 index 00000000..1fd8ee71 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropNoParam.gf @@ -0,0 +1,14 @@ + +positiveSetPropNoParam + + + + + + + + +SAPPOTA + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropNoParam.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropNoParam.jsp new file mode 100644 index 00000000..042393cc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropNoParam.jsp @@ -0,0 +1,41 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetPropNoParam + +<% /** Name : positiveSetPropNoParam + Description : Create a valid useBean action in JSP. Set a specific + property of that bean from the request using a + action. Then access + that property.Ensure that the request contains a parameter + with the same name as the Bean Name. + Result :As we are setting "param as Str=SAPPOTA" + It should return "SAPPOTA". +**/ %> + + + + + + +<% +out.println(myBean.getStr()); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropParam.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropParam.gf new file mode 100644 index 00000000..8a7cf792 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropParam.gf @@ -0,0 +1,12 @@ + +positiveSetPropParam + + + + + + +MANGO + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropParam.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropParam.jsp new file mode 100644 index 00000000..aa97335d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropParam.jsp @@ -0,0 +1,38 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetPropParam + +<% /** Name : positiveSetPropParam + Description : Create a valid useBean action in JSP. Set a specific + property of that bean from the request using a + action. + Then access that property. + Result : As we are setting "param as Name=MANGO", It should + return "MANGO". +**/ %> + + + + +<% +out.println(myBean.getName()); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropReqTimeDoubleQuotes.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropReqTimeDoubleQuotes.gf new file mode 100644 index 00000000..c3eb962c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropReqTimeDoubleQuotes.gf @@ -0,0 +1,11 @@ + +positiveSetPropReqTimeDoubleQuotes + + + + + +HTTP/1.0 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropReqTimeDoubleQuotes.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropReqTimeDoubleQuotes.jsp new file mode 100644 index 00000000..d1991e07 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropReqTimeDoubleQuotes.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetPropReqTimeDoubleQuotes + +<% /** Name : positiveSetPropReqTimeDoubleQuotes + Description : use a scriptlet expression in double quotes + as 'value' attribute in setProperty + Result :we should get the expected page without error +**/ %> + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropReqTimeSingleQuotes.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropReqTimeSingleQuotes.gf new file mode 100644 index 00000000..08504d64 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropReqTimeSingleQuotes.gf @@ -0,0 +1,11 @@ + +positiveSetPropReqTimeSingleQuotes + + + + + +HTTP/1.0 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropReqTimeSingleQuotes.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropReqTimeSingleQuotes.jsp new file mode 100644 index 00000000..916bda6b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropReqTimeSingleQuotes.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetPropReqTimeSingleQuotes + +<% /** Name : positiveSetPropReqTimeSingleQuotes + Description : use a scriptlet expression in single quotes + as 'value' attribute in setProperty + Result :we should get the expected page without error +**/ %> + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropValue.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropValue.gf new file mode 100644 index 00000000..439165c0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropValue.gf @@ -0,0 +1,12 @@ + +positiveSetPropValue + + + + + + +KHATTA-MEETHA + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropValue.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropValue.jsp new file mode 100644 index 00000000..205e78f1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/setproperty/positiveSetPropValue.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSetPropValue + +<% /** Name : positiveSetPropValue + Description : Create a valid useBean action in JSP. Set a specific + property of that bean from the request using a + action. + Then access that property. + Result : Should return the new value of that property. +**/ %> + + + + +<% +out.println(myBean.getName()); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextBodyRestrictionsTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextBodyRestrictionsTest1.jsp new file mode 100644 index 00000000..b5223a38 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextBodyRestrictionsTest1.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- + Custom actions nor scripting elements are allowed + in the body of jsp:text +--%> + + + elementBody + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextBodyRestrictionsTest2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextBodyRestrictionsTest2.jsp new file mode 100644 index 00000000..41b5f963 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextBodyRestrictionsTest2.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- + Custom actions nor scripting elements are allowed + in the body of jsp:text +--%> + + + <% out.println("Test FAILED"); %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextBodyRestrictionsTest3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextBodyRestrictionsTest3.jsp new file mode 100644 index 00000000..f551ca50 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextBodyRestrictionsTest3.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ page import="java.io.PrintWriter"%> +<%-- + Custom actions nor scripting elements are allowed + in the body of jsp:text +--%> + + + <%! + public void test(PrintWriter out) { + out.println("Test FAILED"); + } + %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextBodyRestrictionsTest4.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextBodyRestrictionsTest4.jsp new file mode 100644 index 00000000..185c06ba --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextBodyRestrictionsTest4.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ page import="java.io.PrintWriter"%> +<%-- + Custom actions nor scripting elements are allowed + in the body of jsp:text +--%> + + + <%= "Test FAILED" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextBodyRestrictionsTest5.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextBodyRestrictionsTest5.jspx new file mode 100644 index 00000000..6381d49c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextBodyRestrictionsTest5.jspx @@ -0,0 +1,31 @@ + + + + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextUsageContextTest1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextUsageContextTest1.jsp new file mode 100644 index 00000000..4dec547d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextUsageContextTest1.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<% pageContext.setAttribute("tmplText", "Template Text2"); %> + +Template +Text +${tmplText} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextUsageContextTest2.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextUsageContextTest2.jspx new file mode 100644 index 00000000..aa58e3eb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextUsageContextTest2.jspx @@ -0,0 +1,27 @@ + + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextUsageContextTest3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextUsageContextTest3.jsp new file mode 100644 index 00000000..2aae90ed --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/JspTextUsageContextTest3.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/WEB-INF/tags/JspTextTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/WEB-INF/tags/JspTextTag.tag new file mode 100644 index 00000000..e9663c3a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/WEB-INF/tags/JspTextTag.tag @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +Template Text +Template +Text2 diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/jsp_core_act_text_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/jsp_core_act_text_web.xml new file mode 100644 index 00000000..38b315cd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/text/jsp_core_act_text_web.xml @@ -0,0 +1,25 @@ + + + + + JspCorSynActText + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/ScopeResult.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/ScopeResult.jsp new file mode 100644 index 00000000..8c5b4d52 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/ScopeResult.jsp @@ -0,0 +1,75 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain;charset=ISO-8859-1" %> +<%-- + Simple JSP to valid scoped objects created with jsp:useBean +--%> + +<%! + public void sendPass( HttpServletResponse resp ) { + resp.addHeader( "status", "Test Status=PASSED" ); + return; + } +%> + +<%! + public void sendFail( HttpServletResponse resp, String msg ) { + resp.addHeader( "status", "Test Status=FAILED - " + msg ); + return; + } +%> + +<% + String _scope = request.getParameter( "scope" ); + String _objId = request.getParameter( "objId" ); + + + if ( _scope.equals( "application" ) ) { + if ( ( application.getAttribute( _objId ) ) != null ) { + sendPass( response ); + } else { + sendFail( response, "Application scoped object not found in ServletContext" ); + } + } + + if ( _scope.equals( "session" ) ) { + if ( ( session.getAttribute( _objId ) ) != null ) { + sendPass( response ); + } else { + sendFail( response, "Session scoped object not found in HttpSession" ); + } + } + + if ( _scope.equals( "request" ) ) { + if ( ( request.getAttribute( _objId ) ) != null ) { + sendPass( response ); + } else { + sendFail( response, "Request scoped object not found in HttpServletResponse" ); + } + } + + if ( _scope.equals( "page" ) ) { + if ( ( pageContext.getAttribute( _objId ) ) == null ) { + sendPass( response ); + } else { + sendFail( response, "Page scoped object found in current page and should not be" ); + } + } +%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/date.ser b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/date.ser new file mode 100644 index 00000000..60a91ec7 Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/date.ser differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/defaultScope.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/defaultScope.jsp new file mode 100644 index 00000000..7b2614b9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/defaultScope.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +defaultScopeTest + +<% /** Name : defaultScopeTest + Description : default useBean scope is page + Result : Test PASSED +**/ %> + +<% + int aScope = pageContext.getAttributesScope("nowDate"); + if(aScope == pageContext.PAGE_SCOPE) { + out.println("Test PASSED. default scope is page: " + aScope); + } else { + out.println("Test FAILED: default scope is not page: " + aScope); + } +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/errorPage.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/errorPage.jsp new file mode 100644 index 00000000..e23c7497 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/errorPage.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +errorPage + + +<%@ page isErrorPage="true" %> +<% + out.println("errorPage"); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/jsp_coresyntx_act_usebean_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/jsp_coresyntx_act_usebean_web.xml new file mode 100644 index 00000000..15a08318 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/jsp_coresyntx_act_usebean_web.xml @@ -0,0 +1,25 @@ + + + + + JspCorSynActUseBean + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeClassCastException.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeClassCastException.gf new file mode 100644 index 00000000..5f7435e4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeClassCastException.gf @@ -0,0 +1,10 @@ + +negativeClassCastException + + + +ClassCastException successfully caught. +Test status: PASS + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeClassCastException.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeClassCastException.jsp new file mode 100644 index 00000000..7d245942 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeClassCastException.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeClassCastException + +<% /** Name : negativeClassCastException + Description : Using a bean of a particular type declared with + session scope from another page, attempt to verify + that a ClassCastException is thrown if the bean + on this page specifies a conflicting type. + Result : Catch the ClassCastException and print a message. +**/ %> +<% try { %> + +<% } catch ( java.lang.ClassCastException cce ) { + out.println( "ClassCastException successfully caught.\nTest status: PASS" ); + } +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeClassCastExceptionFwd.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeClassCastExceptionFwd.jsp new file mode 100644 index 00000000..077fe3ce --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeClassCastExceptionFwd.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeClassCastExceptionFwd + +<% /** Name : negativeClassCastFwd + Description: Declare a bean with session scope + and then forward the request to another + page. + Result : None. The interesting stuff will occur in the + negativeClassCastException.jsp page. +**/ %> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeDuplicateIDFatalTranslationError.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeDuplicateIDFatalTranslationError.jsp new file mode 100644 index 00000000..28ace8a8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeDuplicateIDFatalTranslationError.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateIDFatalTranslation + +<% /** Name : negativeDuplicateIDFatalTranslation + Description : Verify that duplicate useBean id's + within the same translation unit yeild + a fatal translation error. + Result : Fatal translation error +**/ %> + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeInvalidScope.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeInvalidScope.jsp new file mode 100644 index 00000000..b258940b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeInvalidScope.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeInvalidScope + +<% /** Name : negativeInvalidScope + Description : use invalid jsp:useBean scope value + Result : Fatal translation error +**/ %> + +<% + out.println(currentDate.toString()); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeSessionScopeFatalTranslationError.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeSessionScopeFatalTranslationError.jsp new file mode 100644 index 00000000..eeb73758 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeSessionScopeFatalTranslationError.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page session="false" %> + +negativeSessionScopeFatalTranslationError + +<% /** Name : negativeSessionScopeFatalTranslationError + Description : Declare a bean with scope set to session, + and configure the page so that it doesn't + participate in a session. This should + cause a fatal translation error. + Result : Fatal translation error +**/ %> + + +<% + out.println(myBean.getCount()); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeTypeAssignable.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeTypeAssignable.jsp new file mode 100644 index 00000000..418fec31 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/negativeTypeAssignable.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeTypeAssignable + +<% /** Name : negativeTypeAssignableTest + Description : we are using 'class' and 'type' together and 'class' + is not assignable to 'type'. + Result :translation error +**/ %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveApplicationScopedObject.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveApplicationScopedObject.jsp new file mode 100644 index 00000000..0987340b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveApplicationScopedObject.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveApplicationScopedObject + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveBeanNameType.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveBeanNameType.gf new file mode 100644 index 00000000..f6e0f2ea --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveBeanNameType.gf @@ -0,0 +1,11 @@ + +positiveBeanNameType + + + + + +0 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveBeanNameType.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveBeanNameType.jsp new file mode 100644 index 00000000..b8d2f1af --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveBeanNameType.jsp @@ -0,0 +1,38 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveBeanNameType + +<% /** Name : positiveBeanNameType + Description : Declaring the bean using beanName. + When using beanName, the bean can either be a serialized + Object, or a fully qualified class. + This test uses a fully qualfied class with the same type. + Result :We should get page output without error +**/ %> + + + +<% + out.println(myBean.getCount()); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveBeanNameTypeCast.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveBeanNameTypeCast.gf new file mode 100644 index 00000000..33e68506 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveBeanNameTypeCast.gf @@ -0,0 +1,11 @@ + +positiveBeanNameTypeCast + + + + + +0 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveBeanNameTypeCast.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveBeanNameTypeCast.jsp new file mode 100644 index 00000000..0db94f21 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveBeanNameTypeCast.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveBeanNameTypeCast + +<% /** Name : positiveBeanNameTypeCast + Description : Declaring the bean using beanName. + When using beanName, the bean can either be a serialized + Object, or a fully qualified class. When the class is loaded, + it is cast to the type specified by the "type" attribute. + This test uses a fully qualfied class. + Result :We should get page output without error +**/ %> + + + +<% + out.println(myBean.getCount()); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveBodyNew.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveBodyNew.gf new file mode 100644 index 00000000..7fc93e97 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveBodyNew.gf @@ -0,0 +1,12 @@ + +positiveBodyNew + + + + + + +APPLE + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveBodyNew.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveBodyNew.jsp new file mode 100644 index 00000000..aafc84c5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveBodyNew.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveBodyNew + +<% /** Name : positiveBodyNew + Description : Try to create a valid useBean tag in the JSP page with a + non-empty body. Ensure that the classname specified + does not exist. + Result :Should return the contents of the HTML page along with what + exists in the body. +**/ %> + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveClassTypeCast.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveClassTypeCast.gf new file mode 100644 index 00000000..79c2240b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveClassTypeCast.gf @@ -0,0 +1,10 @@ + +positiveClassTypeCast + + + + +0 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveClassTypeCast.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveClassTypeCast.jsp new file mode 100644 index 00000000..b08f05ec --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveClassTypeCast.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveClassTypeCast + +<% /** Name : positiveClassTypeCast + Description : we are using 'class' and 'type' together and 'class' + is assignable to 'type'. + Result :we should get the expected page without an error +**/ %> + + +<% out.println( ncounter.getCount()); %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveNoBody.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveNoBody.gf new file mode 100644 index 00000000..480ad550 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveNoBody.gf @@ -0,0 +1,9 @@ + +positiveNoBody + + + + +hello + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveNoBody.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveNoBody.jsp new file mode 100644 index 00000000..8941adfc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveNoBody.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveNoBody + +<% /** Name : positiveNoBody + Description : Create a new instance of a bean with no body. + Access the name property. + Result : Returns the default instance value of the name property: hello. +**/ %> + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positivePageScopedObject.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positivePageScopedObject.jsp new file mode 100644 index 00000000..5bfab8ab --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positivePageScopedObject.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positivePageScopedObject + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveRequestScopedObject.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveRequestScopedObject.jsp new file mode 100644 index 00000000..460f3848 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveRequestScopedObject.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveRequestScopedObject + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveSessionScopedObject.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveSessionScopedObject.jsp new file mode 100644 index 00000000..c652c3b4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/positiveSessionScopedObject.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSessionScopedObject + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/requestTimeBeanName.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/requestTimeBeanName.jsp new file mode 100644 index 00000000..2ae3833d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/requestTimeBeanName.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +requestTimeBeanNameTest + +<% /** Name : requestTimeBeanNameTest + Description : use a request-time attribute expression for beanName + Result : Test PASSED +**/ %> +<%! String aName = "java.util.Date"; %> + +<% + out.println(aDate.toString()); + out.println("Test PASSED."); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/serBeanName.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/serBeanName.jsp new file mode 100644 index 00000000..7f41c5cc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean/serBeanName.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +serBeanNameTest + +<% /** Name : serBeanNameTest + Description : use beanName of the form a/b/c.ser + Result : Test PASSED +**/ %> + +<% + out.println(aSer.getTime()); + out.println("Test PASSED."); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/WEB-INF/tags/beanBody.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/WEB-INF/tags/beanBody.tag new file mode 100644 index 00000000..82729ad0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/WEB-INF/tags/beanBody.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +In beanBody tag after doBody diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/blockSCopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/blockSCopeTest.jsp new file mode 100644 index 00000000..1df5d43e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/blockSCopeTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<% { // introduce a new block %> + + <% + list.add("one"); + %> +<% } // close the block %> + +<% +// the variable customer is out of scope now but +// the object is still valid (and accessible via pageContext) +// declear list as a new variable. + String list = "two"; + out.println(pageContext.getAttribute("list")); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/existingWithBodyTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/existingWithBodyTest.jsp new file mode 100644 index 00000000..e92414fe --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/existingWithBodyTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<% + list.add("one"); +%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/existingWithBodyTestInclude.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/existingWithBodyTestInclude.jsp new file mode 100644 index 00000000..725afd9c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/existingWithBodyTestInclude.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + + This body should be ignored + +<% + out.println(list); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/inScriptlessTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/inScriptlessTest.jsp new file mode 100644 index 00000000..20254370 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/inScriptlessTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +${list1} +invoke tag + + + ${list2} + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/jsp_coresyntx_act_usebean2_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/jsp_coresyntx_act_usebean2_web.xml new file mode 100644 index 00000000..0c14203c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/jsp_coresyntx_act_usebean2_web.xml @@ -0,0 +1,33 @@ + + + + + JspCorSynActUseBean2 + + 5 + + + + + Property group sets scripting-invalid to true + /inScriptlessTest.jsp + true + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/noClassNoBeanNameTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/noClassNoBeanNameTest.jsp new file mode 100644 index 00000000..7c351f52 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/noClassNoBeanNameTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<% +try { +%> + + Test FAILED. +<% +} catch (InstantiationException ex) { + out.println("Test PASSED. InstantiationException is raised."); +} catch (Throwable th) { + out.println("Test FAILED. Unexpected exception type."); +} +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/unrestrictedBodyTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/unrestrictedBodyTest.jsp new file mode 100644 index 00000000..986e1702 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/unrestrictedBodyTest.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + + + add to list + <% + list.add("one"); + %> + added to list + + +<% + out.println(list.get(0)); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/unrestrictedBodyTestInclude.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/unrestrictedBodyTestInclude.jsp new file mode 100644 index 00000000..1ee9e665 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/actions/usebean2/unrestrictedBodyTestInclude.jsp @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +In unrestrictedBodyTestInclude.jsp diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/include/includecommon.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/include/includecommon.jsp new file mode 100644 index 00000000..cecf510e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/include/includecommon.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +included + + +<% out.println("This is included file"); %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/include/jsp_coresyntx_direct_include_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/include/jsp_coresyntx_direct_include_web.xml new file mode 100644 index 00000000..99be0892 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/include/jsp_coresyntx_direct_include_web.xml @@ -0,0 +1,25 @@ + + + + + JspCorSynDirctInc + + 24 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/include/positiveIncludeCtxRelativeDirective.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/include/positiveIncludeCtxRelativeDirective.gf new file mode 100644 index 00000000..ed172d80 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/include/positiveIncludeCtxRelativeDirective.gf @@ -0,0 +1,16 @@ + +positiveIncludeCtxRelativeDirective + + + + +included + + +This is included file + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/include/positiveIncludeCtxRelativeDirective.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/include/positiveIncludeCtxRelativeDirective.jsp new file mode 100644 index 00000000..aa22cdcf --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/include/positiveIncludeCtxRelativeDirective.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveIncludeCtxRelativeDirective + +<% /** Name : positiveIncludeCtxRelativeDirective + Description : Create a JSP page with the include directive using + a context-relative path. The included + page should exist in the desired location + Result :Send out the HTML of the first page with the output of the + second page and revert back to sending the first page once + second page is complete. +**/ %> + +<%@ include file = "/includecommon.jsp" %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/include/positiveIncludePageRelativeDirective.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/include/positiveIncludePageRelativeDirective.gf new file mode 100644 index 00000000..c659648b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/include/positiveIncludePageRelativeDirective.gf @@ -0,0 +1,16 @@ + +positiveIncludePageRelative + + + + +included + + +This is included file + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/include/positiveIncludePageRelativeDirective.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/include/positiveIncludePageRelativeDirective.jsp new file mode 100644 index 00000000..7bcbe923 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/include/positiveIncludePageRelativeDirective.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveIncludePageRelative + +<% /** Name : positiveIncludePageRelative + Description : Create a JSP page with the include directive using a + page-relative path. The included + page should exist in the desired location + Result :Send out the HTML of the first page with the output of the + second page and revert back to sending the first page once + second page is complete. +**/ %> + +<%@ include file = "includecommon.jsp" %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxAllowedAsLiteralFalseActionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxAllowedAsLiteralFalseActionTest.jsp new file mode 100644 index 00000000..44a28163 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxAllowedAsLiteralFalseActionTest.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : DeferredSyntaxAllowedAsLiteralFalseActionTest + Description : Verify that when the DeferredSyntaxAllowedAsLiteral + page directive attribute is set to false, a + translation error occurs when the '{#' character + sequence is used in an action. +**/ %> + +<%@ taglib prefix="test" uri="/WEB-INF/deferredsyntaxaction.tld" %> +<%@ page deferredSyntaxAllowedAsLiteral="false" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxAllowedAsLiteralFalseTemplateTextTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxAllowedAsLiteralFalseTemplateTextTest.jsp new file mode 100644 index 00000000..083c85b8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxAllowedAsLiteralFalseTemplateTextTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : DeferredSyntaxAllowedAsLiteralFalseTemplateTextTest + Description : Verify that when the DeferredSyntaxAllowedAsLiteral + page directive attribute is set to false, a + translation error occurs when the '{#' character + sequence is used in template text. +**/ %> + +<%@ page deferredSyntaxAllowedAsLiteral="false" %> + +#{expr} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxAllowedAsLiteralTrueActionTest.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxAllowedAsLiteralTrueActionTest.gf new file mode 100644 index 00000000..bc50afbe --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxAllowedAsLiteralTrueActionTest.gf @@ -0,0 +1 @@ +#{expr} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxAllowedAsLiteralTrueActionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxAllowedAsLiteralTrueActionTest.jsp new file mode 100644 index 00000000..0ccd79b5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxAllowedAsLiteralTrueActionTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : DeferredSyntaxAllowedAsLiteralFalseActionTest + Description : Verify that when the DeferredSyntaxAllowedAsLiteral + page directive attribute is set to true, the + '{#' character sequence is allowed in an action. +**/ %> + +<%@ taglib prefix="test" uri="/WEB-INF/deferredsyntaxaction.tld" %> +<%@ page deferredSyntaxAllowedAsLiteral="true" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxAllowedAsLiteralTrueTemplateTextTest.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxAllowedAsLiteralTrueTemplateTextTest.gf new file mode 100644 index 00000000..bc50afbe --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxAllowedAsLiteralTrueTemplateTextTest.gf @@ -0,0 +1 @@ +#{expr} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxAllowedAsLiteralTrueTemplateTextTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxAllowedAsLiteralTrueTemplateTextTest.jsp new file mode 100644 index 00000000..8cdd75a8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/DeferredSyntaxAllowedAsLiteralTrueTemplateTextTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : DeferredSyntaxAllowedAsLiteralTrueActionTest + Description : Verify that when the DeferredSyntaxAllowedAsLiteral + page directive attribute is set to true, the '{#' + character sequence is allowed in template text. + +**/ %> + +<%@ page deferredSyntaxAllowedAsLiteral="true" %> + +#{expr} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/ErrorOnELNotFoundFalseTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/ErrorOnELNotFoundFalseTest.jsp new file mode 100644 index 00000000..ed5e5672 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/ErrorOnELNotFoundFalseTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2021 Contributors to the Eclipse Foundation. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : ErrorOnELNotFoundFalseTest + Description : Verify that when the ErrorOnELNotFound + page directive attribute is set to false, referencing + an unknown identifier does not trigger a + ProeprtyNotFoundException +**/ %> + +<%@ page errorOnELNotFound="false" %> + +${notfound} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/ErrorOnELNotFoundTrueTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/ErrorOnELNotFoundTrueTest.jsp new file mode 100644 index 00000000..0f458d56 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/ErrorOnELNotFoundTrueTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2021 Contributors to the Eclipse Foundation. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : ErrorOnELNotFoundTrueTest + Description : Verify that when the ErrorOnELNotFound + page directive attribute is set to false, referencing + an unknown identifier does trigger a + ProeprtyNotFoundException +**/ %> + +<%@ page errorOnELNotFound="true" %> + +${notfound} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/FatalTranslationErrorPage.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/FatalTranslationErrorPage.jsp new file mode 100644 index 00000000..43282815 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/FatalTranslationErrorPage.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +FatalTranslationErrorPage + +<% + // The code below should cause the container + // to throw a fatal translation error. + if ( exception == null ) { + out.println( "Exception was null" ); + else { + out.println( "Exception was not null" ); + } +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredFalseActionTest.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredFalseActionTest.gf new file mode 100644 index 00000000..370acb93 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredFalseActionTest.gf @@ -0,0 +1,2 @@ +Non-deferred value = dollar +Deferred value = pound diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredFalseActionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredFalseActionTest.jsp new file mode 100644 index 00000000..bae39972 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredFalseActionTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : IsELIgnoredFalseActionTest + Description : Verify that EL expressions are recognized by the + container in actions when the isELIgnored + attribute is set to false. +**/ %> +<%@ taglib prefix="test" uri="/WEB-INF/iselignoredaction.tld" %> + +<%@ page isELIgnored="false" %> + +<% + pageContext.setAttribute("dexp", "dollar", PageContext.PAGE_SCOPE); + pageContext.setAttribute("pexp", "pound", PageContext.PAGE_SCOPE); + %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredFalseTemplateTextDollarTest.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredFalseTemplateTextDollarTest.gf new file mode 100644 index 00000000..5e3cf678 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredFalseTemplateTextDollarTest.gf @@ -0,0 +1,3 @@ +begin + dollar +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredFalseTemplateTextDollarTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredFalseTemplateTextDollarTest.jsp new file mode 100644 index 00000000..9b67165d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredFalseTemplateTextDollarTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : IsELIgnoredFalseTemplateTextDollarTest + Description : Verify that EL expressions are interpreted by the + container in template text when the isELIgnored + attribute is set to false and the '$' character is + used. +**/ %> +<%@ page isELIgnored="false" %> + +<% + pageContext.setAttribute("dexp", "dollar", PageContext.PAGE_SCOPE); + %> + +begin + ${dexp} +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredFalseTemplateTextPoundTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredFalseTemplateTextPoundTest.jsp new file mode 100644 index 00000000..caf4a253 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredFalseTemplateTextPoundTest.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : IsELIgnoredFalseTemplateTextPoundTest + Description : Verify that EL expressions are recognized by the + container in template text when the isELIgnored + attribute is set to false and the '#' character is + used. Since the use of the '#' character is illegal + in template text, a translation error should be + generated. +**/ %> +<%@ page isELIgnored="false" %> + +<% + pageContext.setAttribute("pexp", "pound", PageContext.PAGE_SCOPE); + %> + +begin + #{pexp} +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredTrueActionTest.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredTrueActionTest.gf new file mode 100644 index 00000000..96e3a65f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredTrueActionTest.gf @@ -0,0 +1,2 @@ +Dollar value = ${dval} +Pound value = #{pval} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredTrueActionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredTrueActionTest.jsp new file mode 100644 index 00000000..8426f342 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredTrueActionTest.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : IsELIgnoredTrueActionTest + Description : Verify that EL expressions are ignored by the + container in actions when the isELIgnored + attribute is set to true. +**/ %> +<%@ taglib prefix="test" uri="/WEB-INF/iselignoredaction.tld" %> + +<%@ page isELIgnored="true" %> + +<% + pageContext.setAttribute("dval", "dollar", PageContext.PAGE_SCOPE); + pageContext.setAttribute("pval", "pound", PageContext.PAGE_SCOPE); + %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredTrueTemplateTextTest.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredTrueTemplateTextTest.gf new file mode 100644 index 00000000..367a2395 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredTrueTemplateTextTest.gf @@ -0,0 +1,4 @@ +begin + ${dval} + #{pval} +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredTrueTemplateTextTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredTrueTemplateTextTest.jsp new file mode 100644 index 00000000..d7e4464d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/IsELIgnoredTrueTemplateTextTest.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : IsELIgnoredTrueActionTest + Description : Verify that EL expressions are interpreted by the + container in template text when the isELIgnored + attribute is set to true. +**/ %> + +<%@ page isELIgnored="true" %> + +<% + pageContext.setAttribute("dval", "dollar", PageContext.PAGE_SCOPE); + pageContext.setAttribute("pval", "pound", PageContext.PAGE_SCOPE); + %> + +begin + ${dval} + #{pval} +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/WEB-INF/deferredsyntaxaction.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/WEB-INF/deferredsyntaxaction.tld new file mode 100644 index 00000000..ae6774f1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/WEB-INF/deferredsyntaxaction.tld @@ -0,0 +1,37 @@ + + + + + + 1.0 + DeferredSyntaxAction + + DeferredSyntaxAction test + DeferredSyntaxAction + ee.jakarta.tck.pages.spec.core_syntax.directives.page.DeferredSyntaxActionTag + empty + + literal + true + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/WEB-INF/iselignoredaction.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/WEB-INF/iselignoredaction.tld new file mode 100644 index 00000000..0c6e3d62 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/WEB-INF/iselignoredaction.tld @@ -0,0 +1,60 @@ + + + + + + 1.0 + IsELIgnoredAction + + IsELIgnoredFalseAction test + IsELIgnoredFalseAction + ee.jakarta.tck.pages.spec.core_syntax.directives.page.IsELIgnoredFalseActionTag + empty + + dollarExpr + true + true + java.lang.String + + + poundExpr + true + + java.lang.String + + + + + IsELIgnoredTrueAction test + IsELIgnoredTrueAction + ee.jakarta.tck.pages.spec.core_syntax.directives.page.IsELIgnoredTrueActionTag + empty + + dollarValue + true + + + poundValue + true + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/duplicateErrorPage.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/duplicateErrorPage.jsp new file mode 100644 index 00000000..c783987e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/duplicateErrorPage.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +duplicateErrorPage.jsp + +This error page is used by negativeDuplicateErrorPageFatalTranslationError.jsp +where two different errorPage page directive attributes are specified. +negativeDuplicateErrorPageFatalTranslationError.jsp must fail. + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/errorPageExceptionAttributeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/errorPageExceptionAttributeTest.jsp new file mode 100644 index 00000000..1ff4f1c6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/errorPageExceptionAttributeTest.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ page errorPage="errorPageExceptionAttributeTestError.jsp" autoFlush="false" %> +<%! int i=0; %> +<%= 9/i %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/errorPageExceptionAttributeTestError.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/errorPageExceptionAttributeTestError.jsp new file mode 100644 index 00000000..e7792216 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/errorPageExceptionAttributeTestError.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2004, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ page isErrorPage="true" %> + +<% + Object jspException = request.getAttribute("jakarta.servlet.jsp.jspException"); + Object error_exception = + request.getAttribute("jakarta.servlet.error.exception"); + if(jspException == null) { + out.println("Test FAILED. jakarta.servlet.jsp.jspException is null"); + } else if(error_exception == null) { + out.println("Test FAILED. jakarta.servlet.error.exception is null"); + } else if(error_exception != jspException) { + out.println("Test FAILED. jakarta.servlet.error.exception and jakarta.servlet.jsp.jspException are not the same"); + } else { + out.println("Test PASSED. jakarta.servlet.error.exception and jakarta.servlet.jsp.jspException are the same"); + out.println(jspException.toString()); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/errorpagedefault.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/errorpagedefault.jsp new file mode 100644 index 00000000..655286e3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/errorpagedefault.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +errorpage + +<% out.println("This is test error page for isErrorPage=false"); + if ( exception == null ) { + out.println( "implicit exception object is null" ); + } +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicit.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicit.jsp new file mode 100644 index 00000000..6580b783 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicit.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + + +<% + + out.println(request.getProtocol()); + + %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportHttp.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportHttp.gf new file mode 100644 index 00000000..5d548253 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportHttp.gf @@ -0,0 +1,14 @@ + + + + + + + + + + +true + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportHttp.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportHttp.jsp new file mode 100644 index 00000000..504bc6f2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportHttp.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2021 Oracle and/or its affiliates and others. + All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + + +<% /** Name: implicitImportJsp + Description: Use jsp page directive with language="java" + Do not specify jakarta.servlet.http in the import attribute + as it should be available implicitly. Validate + that an Cookie object can be created. + + Result:No error +**/ %> + + + +<%@ page language="java" %> + +<% + + Cookie cookie = new Cookie("name","value"); + + +%> + +<%= cookie instanceof jakarta.servlet.http.Cookie %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportJsp.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportJsp.gf new file mode 100644 index 00000000..208204e2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportJsp.gf @@ -0,0 +1,16 @@ + + + + + + + + + + + +true + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportJsp.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportJsp.jsp new file mode 100644 index 00000000..e2cd4ab0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportJsp.jsp @@ -0,0 +1,44 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + + +<% /** Name: implicitImportJsp + Description: Use jsp page directive with language="java" + with no import statement. Validate that + jakarta.servlet.jsp.* was imported implicitly + by creating an instance of JspFactory. + Result:No error +**/ %> + + + + +<%@ page language="java" %> + +<% + + JspFactory jfac=JspFactory.getDefaultFactory(); + +%> + +<%= jfac instanceof jakarta.servlet.jsp.JspFactory %> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportLang.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportLang.gf new file mode 100644 index 00000000..8524b572 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportLang.gf @@ -0,0 +1,15 @@ + +implicitImportLang + + + + + + + +sun +5 + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportLang.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportLang.jsp new file mode 100644 index 00000000..e15bf805 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportLang.jsp @@ -0,0 +1,46 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +implicitImportLang + +<% /** Name: implicitImportLang + Description: Use a jsp directive with language="java" + Do not specify the import attribute. The java.lang + package should be available implicitly. Validate + that a String and Integer object can be created. + + Result:No error +**/ %> + +<%@ page language="java" %> + + + +<% + String str="sun"; + out.println(str); + Integer i=new Integer(5); + String x=i.toString(); + out.println(x); + + + %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportServlet.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportServlet.gf new file mode 100644 index 00000000..75a25da6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportServlet.gf @@ -0,0 +1,6 @@ + + +HTTP/1.0 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportServlet.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportServlet.jsp new file mode 100644 index 00000000..0e904dd9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/implicitImportServlet.jsp @@ -0,0 +1,46 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + + +<% /** Name: implicitImportServlet + Description: Use jsp page directive with language="java" + Do not specify the import attribute. The jakarta.servlet + package should be available implicitly. Validate + that a RequestDispatch object can be created. + + Result:No error +**/ %> + + + +<%@ page language="java" %> + +<% + +try{ + + RequestDispatcher rd = getServletConfig().getServletContext().getRequestDispatcher( "/implicit.jsp"); + rd.forward(request, response); + + }catch(Exception o){o.printStackTrace();} + +%> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/jsp_coresyntx_directive_page_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/jsp_coresyntx_directive_page_web.xml new file mode 100644 index 00000000..7fa6b8cd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/jsp_coresyntx_directive_page_web.xml @@ -0,0 +1,29 @@ + + + + + JspCorSynDirctPage + + 5 + + + java.lang.ArithmeticException + /willNotSee.jsp + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/myerrorpage.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/myerrorpage.jsp new file mode 100644 index 00000000..d081552e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/myerrorpage.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +myerrorpage + + +<%@ page isErrorPage="true" %> +<% out.println("This is a test error page"); %> +<% out.println("You have recieved the correct error page."); %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeBuffAutoflush.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeBuffAutoflush.jsp new file mode 100644 index 00000000..7b757502 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeBuffAutoflush.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeBuffAutoflush + +<% /** Name: negativeBuffAutoflush + Description: Set autoflush to false when buffer=none + Result: translation error +**/ %> +<%@ page autoFlush="false" %> +<%@ page buffer="none" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeBufferOverflowException.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeBufferOverflowException.gf new file mode 100644 index 00000000..cb3d0d88 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeBufferOverflowException.gf @@ -0,0 +1,5 @@ +Buffer overflow occurred. Exception successfully caught. +Test status: PASS + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeBufferOverflowException.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeBufferOverflowException.jsp new file mode 100644 index 00000000..4c10528b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeBufferOverflowException.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeBufferOverflowException + +<% /** Name: negativeBufferOverflowException + Description: Set autoflush to false. Write more + date out than the 8KB buffer can handle. + Result: An exception should be thrown. +**/ %> +<%@ page autoFlush="false" %> +<% try { + for (int d = 0; d < 60000; d++ ) { + out.print(d+" "); + } + } catch ( Throwable t ) { + out.clear(); + out.println( "Buffer overflow occurred. Exception successfully caught." ); + out.println( "Test status: PASS" ); + } +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeBufferSuffix.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeBufferSuffix.jsp new file mode 100644 index 00000000..cc4374c5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeBufferSuffix.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeBufferSuffixTest + +<%@ page buffer="23k" %> +Test FAILED. + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeBufferSuffix2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeBufferSuffix2.jsp new file mode 100644 index 00000000..7e6fe3bb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeBufferSuffix2.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + + + Test FAILED. + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateAutoFlushFatalTranslationError.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateAutoFlushFatalTranslationError.jsp new file mode 100644 index 00000000..8b93e3eb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateAutoFlushFatalTranslationError.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateAutoFlushFatalTranslationError + +<% /** Name: negativeDuplicateAutoFlushFatalTranslationError + Description: Verify that multiple uses of autoFlush attribute + with different values result in a fatal translation error. + Result: A fatal translation error +**/ %> +<%@ page autoFlush="false" autoFlush="true" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateAutoFlushFatalTranslationError2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateAutoFlushFatalTranslationError2.jsp new file mode 100644 index 00000000..2f0f7ac6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateAutoFlushFatalTranslationError2.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateAutoFlushFatalTranslationError + +<% /** Name: negativeDuplicateAutoFlushFatalTranslationError + Description: Verify that multiple uses of autoFlush attribute + with different values result in a fatal translation error. + Result: A fatal translation error +**/ %> +<%@ page autoFlush="false" %> +<%@ page autoFlush="true" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateBufferFatalTranslationError.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateBufferFatalTranslationError.jsp new file mode 100644 index 00000000..db587a19 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateBufferFatalTranslationError.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateBufferFatalTranslationError + +<% /** Name: negativeDuplicateBufferFatalTranslationError + Description: Verify that multiple uses of buffer attribute + result in a fatal translation error. + Result: A fatal translation error +**/ %> +<%@ page buffer="12kb" buffer="8kb" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateBufferFatalTranslationError2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateBufferFatalTranslationError2.jsp new file mode 100644 index 00000000..ebc70904 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateBufferFatalTranslationError2.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateBufferFatalTranslationError + +<% /** Name: negativeDuplicateBufferFatalTranslationError + Description: Verify that multiple uses of buffer attribute + result in a fatal translation error. + Result: A fatal translation error +**/ %> +<%@ page buffer="12kb" %> +<%@ page buffer="8kb" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateContentFatalTranslationError.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateContentFatalTranslationError.jsp new file mode 100644 index 00000000..f0cde0ae --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateContentFatalTranslationError.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateContentFatalTranslationError + +<% +/** + Name : negativeDuplicateContentFatalTranslationError + Description : Verify that multiple uses of the contentType attribute + result in a fatal translation error. + Result : A fatal translation error +**/ +%> +<%@ page contentType="text/plain;charset=ISO-8859-1" contentType="text/html;charset=ISO-8859-1" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateContentFatalTranslationError2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateContentFatalTranslationError2.jsp new file mode 100644 index 00000000..c2f10d58 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateContentFatalTranslationError2.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateContentFatalTranslationError + +<% +/** + Name : negativeDuplicateContentFatalTranslationError + Description : Verify that multiple uses of the contentType attribute + result in a fatal translation error. + Result : A fatal translation error +**/ +%> +<%@ page contentType="text/plain;charset=ISO-8859-1" %> +<%@ page contentType="text/html;charset=ISO-8859-1" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateErrorPageFatalTranslationError.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateErrorPageFatalTranslationError.jsp new file mode 100644 index 00000000..ad91f565 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateErrorPageFatalTranslationError.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateErrorPageFatalTranslationError + +<% /** Name : negativeDuplicateErrorPageFatalTranslationError + Description : Verify that multiple uses of the errorPage attribute + with different values result in a fatal translation error. + Result : A fatal translation error. +**/ %> +<%@ page errorPage="FatalTranslationErrorPage.jsp" errorPage="duplicateErrorPage.jsp" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateErrorPageFatalTranslationError2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateErrorPageFatalTranslationError2.jsp new file mode 100644 index 00000000..d9c8e16d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateErrorPageFatalTranslationError2.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateErrorPageFatalTranslationError + +<% /** Name : negativeDuplicateErrorPageFatalTranslationError + Description : Verify that multiple uses of the errorPage attribute + with different values result in a fatal translation error. + Result : A fatal translation error. +**/ %> +<%@ page errorPage="FatalTranslationErrorPage.jsp" %> +<%@ page errorPage="duplicateErrorPage.jsp" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateExtendsFatalTranslationError.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateExtendsFatalTranslationError.jsp new file mode 100644 index 00000000..e895eb89 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateExtendsFatalTranslationError.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateExtendsFatalTranslationError + +<% /** Name : negativeDuplicateExtendsFatalTranslationError + Description : Verify that multiple uses of the extends attribute + result in a fatal translation error. + Result : A fatal translation error. +**/ %> +<%@ page extends="ee.jakarta.tck.pages.spec.core_syntax.directives.page.SuperPage" extends="ee.jakarta.tck.pages.spec.core_syntax.directives.page.DuperPage" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateExtendsFatalTranslationError2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateExtendsFatalTranslationError2.jsp new file mode 100644 index 00000000..3aa1477a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateExtendsFatalTranslationError2.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateExtendsFatalTranslationError + +<% /** Name : negativeDuplicateExtendsFatalTranslationError + Description : Verify that multiple uses of the extends attribute + result in a fatal translation error. + Result : A fatal translation error. +**/ %> +<%@ page extends="ee.jakarta.tck.pages.spec.core_syntax.directives.page.SuperPage" %> +<%@ page extends="ee.jakarta.tck.pages.spec.core_syntax.directives.page.DuperPage" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateInfoFatalTranslationError.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateInfoFatalTranslationError.jsp new file mode 100644 index 00000000..9a3392a9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateInfoFatalTranslationError.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateInfoFatalTranslationError + +<% /** Name : negativeDuplicateInfoFatalTranslationError + Description : Verify that multiple uses of the info attribute with + different values result in a fatal translation error. + Result : A fatal translation error. +**/ %> +<%@ page info="Fatal Translation Error" info="Another Fatal" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateInfoFatalTranslationError2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateInfoFatalTranslationError2.jsp new file mode 100644 index 00000000..4aba8f47 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateInfoFatalTranslationError2.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateInfoFatalTranslationError + +<% /** Name : negativeDuplicateInfoFatalTranslationError + Description : Verify that multiple uses of the info attribute with + different values result in a fatal translation error. + Result : A fatal translation error. +**/ %> +<%@ page info="Fatal Translation Error" %> +<%@ page info="Another Fatal" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateIsELIgnoredFatalTranslationError.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateIsELIgnoredFatalTranslationError.jsp new file mode 100644 index 00000000..fd446684 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateIsELIgnoredFatalTranslationError.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateIsELIgnoredFatalTranslationError + +<% /** Name: negativeDuplicateIsELIgnoredFatalTranslationError + Description: Verify that multiple uses of isELIgnored attribute + result in a fatal translation error. + Result: A fatal translation error +**/ %> +<%@ page isELIgnored="true" isELIgnored="false" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateIsELIgnoredFatalTranslationError2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateIsELIgnoredFatalTranslationError2.jsp new file mode 100644 index 00000000..4a7efeb3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateIsELIgnoredFatalTranslationError2.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateIsELIgnoredFatalTranslationError + +<% /** Name: negativeDuplicateIsELIgnoredFatalTranslationError + Description: Verify that multiple uses of isELIgnored attribute + result in a fatal translation error. + Result: A fatal translation error +**/ %> +<%@ page isELIgnored="true" %> +<%@ page isELIgnored="false" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateIsErrorPageFatalTranslationError.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateIsErrorPageFatalTranslationError.jsp new file mode 100644 index 00000000..4b3edc86 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateIsErrorPageFatalTranslationError.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateIsErrorPageFatalTranslationError + +<% /** Name: negativeDuplicateIsErrorPageFatalTranslationError + Description: Verify that multiple uses of isErrorPage attribute + with different values result in a fatal translation error. + Result: A fatal translation error +**/ %> +<%@ page isErrorPage="false" isErrorPage="true" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateIsErrorPageFatalTranslationError2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateIsErrorPageFatalTranslationError2.jsp new file mode 100644 index 00000000..34efcd4e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateIsErrorPageFatalTranslationError2.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateIsErrorPageFatalTranslationError + +<% /** Name: negativeDuplicateIsErrorPageFatalTranslationError + Description: Verify that multiple uses of isErrorPage attribute + with different values result in a fatal translation error. + Result: A fatal translation error +**/ %> +<%@ page isErrorPage="false" %> +<%@ page isErrorPage="true" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateLanguageFatalTranslationError.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateLanguageFatalTranslationError.jsp new file mode 100644 index 00000000..11dfb47f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateLanguageFatalTranslationError.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateLanguageFatalTranslationError + +<% /** Name : negativeDuplicateLanguageFatalTranslationError + Description : Verify that multiple uses of the language attribute with + different values result in a fatal translation error. + Result : A fatal translation error. +**/ %> +<%@ page language="java" language="c" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateLanguageFatalTranslationError2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateLanguageFatalTranslationError2.jsp new file mode 100644 index 00000000..97fbd335 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateLanguageFatalTranslationError2.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateLanguageFatalTranslationError + +<% /** Name : negativeDuplicateLanguageFatalTranslationError + Description : Verify that multiple uses of the language attribute with + different values result in a fatal translation error. + Result : A fatal translation error. +**/ %> +<%@ page language="java" %> +<%@ page language="c" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateSessionFatalTranslationError.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateSessionFatalTranslationError.jsp new file mode 100644 index 00000000..69bd7656 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateSessionFatalTranslationError.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateSessionFatalTranslationError + +<% /** Name : negativeDuplicateSessionFatalTranslationError + Description : Verify that multiple uses of the session attribute with + different values result in a fatal translation error. + Result : A fatal translation error. +**/ %> +<%@ page session="true" session="false" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateSessionFatalTranslationError2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateSessionFatalTranslationError2.jsp new file mode 100644 index 00000000..2d074f24 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeDuplicateSessionFatalTranslationError2.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeDuplicateSessionFatalTranslationError + +<% /** Name : negativeDuplicateSessionFatalTranslationError + Description : Verify that multiple uses of the session attribute with + different values result in a fatal translation error. + Result : A fatal translation error. +**/ %> +<%@ page session="true" %> +<%@ page session="false" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeFatalTranslationError.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeFatalTranslationError.jsp new file mode 100644 index 00000000..2e75ed5d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeFatalTranslationError.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeFatalTranslationError + +<% /** Name : negativeFatalTranslationError + Description : Here, the errorPage attribute of the page + directive is used. An exception is + generated by dividing an integer value by 0. + The request is forward onto an error page where + the isErrorPage attribute is set to the default + of false. The Error page will attempt to access + the implicit exception object. + Result : A fatal translation error should occur. +**/ %> + +<%@ page errorPage="FatalTranslationErrorPage.jsp" autoFlush="false" %> +<%! int i=0; %> +<%= 9/i %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeImportIo.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeImportIo.jsp new file mode 100644 index 00000000..48bf262c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeImportIo.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeImportUtil + +<% /** Name: negativeImportUtil + Description: Use jsp page directive with language="java". + Validate that java.util.* is not imported by default +**/ %> +<%@ page language="java" %> + +<% + File file=new File(); + %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeImportUtil.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeImportUtil.jsp new file mode 100644 index 00000000..4c9b3f4f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeImportUtil.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeImportUtil + +<% /** Name: negativeImportUtil + Description: Use jsp page directive with language="java". + Validate that java.util.* is not imported by default +**/ %> +<%@ page language="java" %> + +<% + Properties props=new Properties(); + %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeMultiplePageEncoding.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeMultiplePageEncoding.jsp new file mode 100644 index 00000000..3751d4b3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeMultiplePageEncoding.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeMultiplePageEncoding + +<% /** Name: negativeMultiplePageEncoding + Description: Validate the multiple pageEncoding attributes + cause translation error + Result:a translation error +**/ %> +<%@ page pageEncoding="UTF-8" %> +<%@ page pageEncoding="ISO-8859-15" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeSessionFatalTranslationError.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeSessionFatalTranslationError.jsp new file mode 100644 index 00000000..b4cbe037 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/negativeSessionFatalTranslationError.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +negativeSessionFatalTranslationError + +<% /** Name : negativeSessionFatalTranslationError + Description:Set the value of the session attribute to "false". + Try to access the implicit session object. + Result: A fatal translation error should occur. +**/ %> + +<%@ page session="false" %> +<% + if ( session == null ) { + out.println( "Session object shouldn't be available." ); + } +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveBuffAutoflush.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveBuffAutoflush.jsp new file mode 100644 index 00000000..f3d28947 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveBuffAutoflush.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveBuffAutoflush + +<% /** Name: positiveBuffAutoflush + Description: Set autoflush to true. Use default buffer size of 8kb. + Write more than 8kb of data to the out object + Result: Should return all data written to out without throwing an + exception. +**/ %> + +<%@ page autoFlush="true" %> +<% for(int d=0;d<6000;d++) out.print(d+" "); %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveBuffCreate.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveBuffCreate.jsp new file mode 100644 index 00000000..c2b3fbf6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveBuffCreate.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveBuffCreate + +<% /** Name: positiveBuffCreate + Description: Create a buffer size of say 12kb. Keep autoflush + set to false(default).Write characters to the out object. Invoke + the flush() method on out to flush the output to the client. + Result:Should return the output that you sent to the client. +**/ %> + +<%@ page buffer="12kb" autoFlush="false" %> +<% for(int d=0;d<1000;d++) out.print(d+" "); out.flush(); %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveContenttype.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveContenttype.jsp new file mode 100644 index 00000000..b5f70836 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveContenttype.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveContenttype + +<% +/** + Name : positiveContenttype + Description : Here, the contentType directive is used to set the contentType as text/plain + and charset as ISO-8859-1. + Result : Expected to give the same values at javatest side, when these values are trapped. +**/ +%> +<%@ page contentType="text/plain;charset=ISO-8859-1" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDefaultIsErrorPage.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDefaultIsErrorPage.jsp new file mode 100644 index 00000000..791b8f3b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDefaultIsErrorPage.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveDefaultIsErrorPage + +<% /** Name : positiveDefaultIsErrorPage.jsp + Description : Test the value of isErrorPage=false is default in a page. + This is set in the 'errorpagedefault.jsp' +**/ %> + +<%@ page errorPage="errorpagedefault.jsp" autoFlush="false" %> +<%! int i=0; %> +<%= 9/i %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateAutoFlush.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateAutoFlush.jsp new file mode 100644 index 00000000..6ebc2b46 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateAutoFlush.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveDuplicateAutoFlush + +<% /** Name : positiveDuplicateAutoFlush + Description : Verify that multiple uses of the autoFlush attribute with + identical values accepted. + Result : Test Passed. +**/ %> +<%@ page autoFlush="true" %> +<%@ page autoFlush="true" %> +Test PASSED. + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateBuffer.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateBuffer.jsp new file mode 100644 index 00000000..64130f56 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateBuffer.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveDuplicateBuffer + +<% /** Name: positiveDuplicateBuffer + Description: Verify that multiple uses of buffer attribute + with identical values accepted. + Result: Test Passed. +**/ %> +<%@ page buffer="8kb" %> +<%@ page buffer="8kb" %> +Test PASSED. + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateContent.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateContent.jsp new file mode 100644 index 00000000..d484d447 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateContent.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveDuplicateContent + +<% +/** + Name : positiveDuplicateContent + Description : Verify that multiple uses of the contentType attribute + with identical values are accepted. + Result : Test Passed. +**/ +%> +<%@ page contentType="text/plain;charset=ISO-8859-1" %> +<%@ page contentType="text/plain;charset=ISO-8859-1" %> +Test PASSED. + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateErrorPage.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateErrorPage.jsp new file mode 100644 index 00000000..9e5e0a67 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateErrorPage.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveDuplicateErrorPage + +<% /** Name : positiveDuplicateErrorPage + Description : Verify that multiple uses of the errorPage attribute + with identical values accepted. + Result : Test Passed. +**/ %> +<%@ page errorPage="FatalTranslationErrorPage.jsp" %> +<%@ page errorPage="FatalTranslationErrorPage.jsp" %> +Test PASSED. + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateExtends.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateExtends.jsp new file mode 100644 index 00000000..d8cfc898 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateExtends.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveDuplicateExtends + +<% /** Name : positiveDuplicateExtends + Description : Verify that multiple uses of the extends attribute + with identical values accepted. + Result : Test Passed. +**/ %> +<%@ page extends="ee.jakarta.tck.pages.spec.core_syntax.directives.page.SuperPage" %> +<%@ page extends="ee.jakarta.tck.pages.spec.core_syntax.directives.page.SuperPage" %> +Test PASSED. + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateInfo.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateInfo.jsp new file mode 100644 index 00000000..993aaa08 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateInfo.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveDuplicateInfo + +<% /** Name : positiveDuplicateInfo + Description : Verify that multiple uses of the info attribute with + identical values accepted. + Result : Test Passed. +**/ %> +<%@ page info="two info attributes" %> +<%@ page info="two info attributes" %> +Test PASSED. + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateIsELIgnored.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateIsELIgnored.jsp new file mode 100644 index 00000000..0f4e5abb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateIsELIgnored.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveDuplicateIsELIgnored + +<% /** Name : positiveDuplicateIsELIgnored + Description : Verify that multiple uses of the isELIgnored attribute with + identical values accepted. + Result : Test Passed. +**/ %> +<%@ page isELIgnored="true" %> +<%@ page isELIgnored="true" %> +Test PASSED. + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateIsErrorPage.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateIsErrorPage.jsp new file mode 100644 index 00000000..fdb61441 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateIsErrorPage.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveDuplicateIsErrorPage + +<% /** Name : positiveDuplicateIsErrorPage + Description : Verify that multiple uses of the isErrorPage attribute with + identical values accepted. + Result : Test Passed. +**/ %> +<%@ page isErrorPage="false" %> +<%@ page isErrorPage="false" %> +Test PASSED. + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateLanguage.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateLanguage.jsp new file mode 100644 index 00000000..d03cfe29 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateLanguage.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveDuplicateLanguage + +<% /** Name : positiveDuplicateLanguage + Description : Verify that multiple uses of the language attribute with + identical values accepted. + Result : Test Passed. +**/ %> +<%@ page language="java" %> +<%@ page language="java" %> +Test PASSED. + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateSession.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateSession.jsp new file mode 100644 index 00000000..96ce5114 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveDuplicateSession.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveDuplicateSession + +<% /** Name : positiveDuplicateSession + Description : Verify that multiple uses of the session attribute with + identical values accepted. + Result : Test Passed. +**/ %> +<%@ page session="true" %> +<%@ page session="true" %> +Test PASSED. + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveErrorPage.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveErrorPage.gf new file mode 100644 index 00000000..269dddc3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveErrorPage.gf @@ -0,0 +1,11 @@ + +myerrorpage + + + +This is a test error page + +You have recieved the correct error page. + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveErrorPage.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveErrorPage.jsp new file mode 100644 index 00000000..fec8bc39 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveErrorPage.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveErrorPage + +<% /** Name : positiveErrorPage + Description : Here, the errorPage attribute of the page + directive is used. An exception is + generated by dividing an integer value by 0. + Result : Expected to show the specified errorpage. +**/ %> + +<%@ page errorPage="myerrorpage.jsp" autoFlush="false" %> +<%! int i=0; %> +<%= 9/i %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveExtends.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveExtends.gf new file mode 100644 index 00000000..4729019f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveExtends.gf @@ -0,0 +1,8 @@ + +positiveExtends + + + +true + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveExtends.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveExtends.jsp new file mode 100644 index 00000000..25938ff4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveExtends.jsp @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveExtends + +<% /** + Name : positiveExtends + Description: we use extends directive to point our own defined class + as super class to the jsp + Result: we should get true to the expression after the directive + */ %> +<%@ page extends="ee.jakarta.tck.pages.spec.core_syntax.directives.page.SuperPage" %> +<%= (this instanceof ee.jakarta.tck.pages.spec.core_syntax.directives.page.SuperPage ) %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveImport.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveImport.gf new file mode 100644 index 00000000..bfba9623 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveImport.gf @@ -0,0 +1,12 @@ + +positiveImport + + + + + +harry + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveImport.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveImport.jsp new file mode 100644 index 00000000..34f7b39d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveImport.jsp @@ -0,0 +1,38 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveImport + +<% /** Name: positiveImport + Description: Use jsp page directive with language="java" and an + import attribute of java.util.Properties. Validate + that the Properties object can be created. + Result:No error +**/ %> + +<%@ page language="java" import="java.util.Properties" %> + +<% Properties props=new Properties(); + props.put("name","harry"); + String name=(String)props.getProperty("name"); + out.println(name); + %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveInfo.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveInfo.gf new file mode 100644 index 00000000..1dbe05c3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveInfo.gf @@ -0,0 +1,10 @@ + +positiveInfo + + + + +positiveInfo of JCK + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveInfo.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveInfo.jsp new file mode 100644 index 00000000..c5cee358 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveInfo.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveInfo + +<% /** Name :positiveInfo + Description: Set the value of the info attribute to a specific + value.Then invoke the getServletInfo method on the current + page's Servlet object + Result: Should return the correct value of the set string. +**/ %> + +<%@ page info="positiveInfo of JCK" %> +<% out.println(getServletInfo()); %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveLang.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveLang.gf new file mode 100644 index 00000000..46941453 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveLang.gf @@ -0,0 +1,9 @@ + +positiveLang + + + + +hello + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveLang.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveLang.jsp new file mode 100644 index 00000000..e0acf9f4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveLang.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveLang + +<% /** Name: positiveLang + Description: Use jsp page directive with the language + attribute in a page with the language attribute + set to "java". + Result:No error should be returned +**/ %> + +<%@ page language="java" %> +hello + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveMultipleImport.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveMultipleImport.jsp new file mode 100644 index 00000000..6efcff60 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveMultipleImport.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveMultipleImport + +<% /** Name: positiveMultipleImport + Description: Validate the multiple import attributes + can be used without causing a fatal translation error. + Result:No error +**/ %> +<%@ page language="java" import="java.util.Properties" import="java.util.Hashtable" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveNoErrorPageBuff.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveNoErrorPageBuff.gf new file mode 100644 index 00000000..5ef1d28a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveNoErrorPageBuff.gf @@ -0,0 +1,6 @@ + +errorpageNoBuff + +This is a test error page + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveSession.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveSession.jsp new file mode 100644 index 00000000..ef223dc9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveSession.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSession + +<% /** Name : positiveSession + Description:Set the value of the session attribute to "true". + Then try to access the implicit session object and + call one of its methods + Result: Returns the output of the method invoked on the + session object +**/ %> + +<%@ page session="true" %> +<% out.println("got "+session.isNew()); %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveSessionDefault.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveSessionDefault.jsp new file mode 100644 index 00000000..378ee86e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/positiveSessionDefault.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveSessionDefault + +<% /** Name : positiveSessionDefault + Description:Do not set the value of the session at all. + Try to invoke a method on the implicit session + object. + Result: Returns the output of the method invoked on the session + object. +**/ %> + +<% out.println("got "+session.isNew()); %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/willNotSee.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/willNotSee.jsp new file mode 100644 index 00000000..64ee6000 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/page/willNotSee.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page isErrorPage="true" %> +This error page must not be displayed since the jsp page +defines an errorPage. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/taglib/WEB-INF/common.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/taglib/WEB-INF/common.tld new file mode 100644 index 00000000..1771242b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/taglib/WEB-INF/common.tld @@ -0,0 +1,35 @@ + + + + + 1.0 + common + + simple + ee.jakarta.tck.pages.common.tags.tck.SimpleTag + JSP + + echo + true + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/taglib/jsp_core_syntx_direct_taglib_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/taglib/jsp_core_syntx_direct_taglib_web.xml new file mode 100644 index 00000000..c8792529 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/taglib/jsp_core_syntx_direct_taglib_web.xml @@ -0,0 +1,31 @@ + + + + + JspCorSynDirctTaglib + + 5 + + + + http://java.sun.com/tck/jsp/common + /WEB-INF/common.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/taglib/positiveTagLib.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/taglib/positiveTagLib.jsp new file mode 100644 index 00000000..6bf233d2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/directives/taglib/positiveTagLib.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +positiveTagLib + +<%@ taglib uri="http://java.sun.com/tck/jsp/common" prefix="common" %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/Errorpage.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/Errorpage.jsp new file mode 100644 index 00000000..823f62c8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/Errorpage.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +checkException + +<%@ page isErrorPage="true" %> + + +Is exception an instance of java.lang.ArithmeticException: <%= exception instanceof java.lang.ArithmeticException %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkApplication.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkApplication.gf new file mode 100644 index 00000000..93b84d15 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkApplication.gf @@ -0,0 +1,10 @@ + +checkApplication Test + + + + +true
          +Value of Context Init parameter param1: bilbo
          + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkApplication.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkApplication.jsp new file mode 100644 index 00000000..4e225840 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkApplication.jsp @@ -0,0 +1,38 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +checkApplication Test + +<% /** Name:checkApplicationTest + Description: Returns true if application + is of type jakarta.servlet.ServletContext + else returns false. Then verify that the + Context init parameter, contextParam1, is + available using the application object. + Result: Returns true if the application object + is the correct object type and print + a non-null value for the context init + parameter. +**/ %> + + +<%= (application instanceof jakarta.servlet.ServletContext) %>
          +Value of Context Init parameter param1: <%= application.getInitParameter( "contextParam1" ) %>
          + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkConfig.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkConfig.gf new file mode 100644 index 00000000..c69121dc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkConfig.gf @@ -0,0 +1,11 @@ + +checkConfig Test + + + +true +
          +Value of param1 is: hobbit
          +Value of param2 is: gollum
          + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkConfig.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkConfig.jsp new file mode 100644 index 00000000..8adf0829 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkConfig.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +checkConfig Test + +<% /** Name:checkConfig + Description: Checks whether configuration information + is being passed to the server page. Verify that the + implicit config object is an instance of + jakarta.servlet.ServletConfig and then print out the + values of two servlet initialization parameters. + Result: Display true and the values of configParam1 and configParam2 +**/ %> + +<%= (config instanceof jakarta.servlet.ServletConfig) %> +
          +Value of param1 is: <%= config.getInitParameter( "configParam1" ) %>
          +Value of param2 is: <%= config.getInitParameter( "configParam2" ) %>
          + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkException.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkException.gf new file mode 100644 index 00000000..24b5ae71 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkException.gf @@ -0,0 +1,9 @@ + +checkException + + + + +Is exception an instance of java.lang.ArithmeticException: true + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkException.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkException.jsp new file mode 100644 index 00000000..61851a80 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkException.jsp @@ -0,0 +1,42 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +checkException Test + +<% /** Name:checkExceptionTest + Description: Cause a java.lang.ArithmeticException by + dividing by zero. The Exception should + be passed to the error page as specified + by the errorPage attribute of the page + directive. The errorpage will verify the + type of exception. + type java.lang.Throwable + Result: Errorpage is called up, where this check is done. + Should return true. +**/ %> + +<%@ page errorPage="Errorpage.jsp" %> + +<% + int i=0; + int j=9; + int k=j/i; +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkOut.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkOut.gf new file mode 100644 index 00000000..18b7fb32 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkOut.gf @@ -0,0 +1,8 @@ + +checkOut + + + +true + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkOut.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkOut.jsp new file mode 100644 index 00000000..5a9a9635 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkOut.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +checkOut + +<% /** Name: checkOut + Description: Checking 'out' is of the type + jakarta.servlet.jsp.JspWriter + Result: true +**/ %> + +<%= (out instanceof jakarta.servlet.jsp.JspWriter ) %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkPage.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkPage.gf new file mode 100644 index 00000000..67f189b1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkPage.gf @@ -0,0 +1,9 @@ + +checkPage + + + +true
          +true
          + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkPage.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkPage.jsp new file mode 100644 index 00000000..beb0dc8d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkPage.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +checkPage + +<% /** Name: checkPage + Description: Validate that the implicit page + object is of type java.lang.Object. + Also verify that this is the same + reference as page. + Result: writes true twice. +**/ %> + +<%= (page instanceof java.lang.Object ) %>
          +<%= ( page == this ) %>
          + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkPageContext.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkPageContext.gf new file mode 100644 index 00000000..374393ff --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkPageContext.gf @@ -0,0 +1,10 @@ + +checkPageContext + + + +true
          +true
          + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkPageContext.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkPageContext.jsp new file mode 100644 index 00000000..1cfddc1f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkPageContext.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +checkPageContext + +<% /** Name:checkPageContext + Description: Verify that implicit object pageContext + is an instance of jakarta.servlet.jsp.PageContext. + Then use PageContext.setAttribute() and + PageContext.getAttribute() to set and retrieve + an attribute from the page. + Result: true should be returned twice. +**/ %> + +<%= (pageContext instanceof jakarta.servlet.jsp.PageContext) %>
          +<% + pageContext.setAttribute( "available", new String( "true" ), PageContext.PAGE_SCOPE ); + String temp = (String) pageContext.findAttribute( "available" ); + out.print( temp ); +%>
          + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkRequest.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkRequest.gf new file mode 100644 index 00000000..fb15c6e2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkRequest.gf @@ -0,0 +1,19 @@ + +checkRequest + + + +true + +
          + +HTTP/1.0 + +
          + + + +2 +
          + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkRequest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkRequest.jsp new file mode 100644 index 00000000..dd2fc56f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkRequest.jsp @@ -0,0 +1,41 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +checkRequest + +<% /** Name:checkRequest + Description: Checks whether 'request' is an instance + of jakarta.servlet.ServletRequest and uses the request + object for getting the protocol and getting parameter + value passing Years. + Result:returns true,HTTP/1.0,2 +**/ %> + +<%= (request instanceof jakarta.servlet.ServletRequest) %> + +
          + +<% out.println(request.getProtocol()); %> +
          + + + +<% out.println(request.getParameter("Years")); %>
          + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkResponse.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkResponse.gf new file mode 100644 index 00000000..034b39ef --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkResponse.gf @@ -0,0 +1,9 @@ + +checkResponse + + + +true
          + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkResponse.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkResponse.jsp new file mode 100644 index 00000000..22782b0c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkResponse.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +checkResponse + +<% /** Name:checkResponse + Description: Checks whether response is an object + of type jakarta.servlet.ServletResponse. Then verify + that a method can be called against the response object. +**/ %> + +<%= (response instanceof jakarta.servlet.ServletResponse) %>
          +<% + response.addHeader("TestHeader", "Method call OK"); +%> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkSession.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkSession.gf new file mode 100644 index 00000000..783042bb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkSession.gf @@ -0,0 +1,12 @@ + +checkSession Test + + + +true +
          +
          + true +
          + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkSession.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkSession.jsp new file mode 100644 index 00000000..f82bb665 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/checkSession.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +checkSession Test + +<% /** Name:checkSession + Description: Checking 'session' is of type jakarta.servlet.HttpSession + and also whether an identifier is assigned to this session + or not. + Result: returns true +**/ %> + +<%= (session instanceof jakarta.servlet.http.HttpSession) %> +
          +
          +<% + if(session.getId()!=null) { +%> true <% } + else { +%> false <% } %> +
          + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/jsp_coresyntx_implicitobjects_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/jsp_coresyntx_implicitobjects_web.xml new file mode 100644 index 00000000..e97d82a5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/implicitobjects/jsp_coresyntx_implicitobjects_web.xml @@ -0,0 +1,46 @@ + + + + + JspCorSynImplicitObj + + contextParam1 + bilbo + + + checkConfigLogicalName + /checkConfig.jsp + + configParam1 + hobbit + + + configParam2 + gollum + + 0 + + + checkConfigLogicalName + /checkConfig + + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/declaration/jsp_coresyntx_script_declaration_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/declaration/jsp_coresyntx_script_declaration_web.xml new file mode 100644 index 00000000..92f8d59a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/declaration/jsp_coresyntx_script_declaration_web.xml @@ -0,0 +1,25 @@ + + + + + JspCorSynScrptDeclar + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/declaration/positiveDeclaration.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/declaration/positiveDeclaration.gf new file mode 100644 index 00000000..6733f750 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/declaration/positiveDeclaration.gf @@ -0,0 +1,10 @@ + +positiveDeclaration + + + + +627 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/declaration/positiveDeclaration.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/declaration/positiveDeclaration.jsp new file mode 100644 index 00000000..0fa1eee8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/declaration/positiveDeclaration.jsp @@ -0,0 +1,71 @@ +<%-- + + The Apache Software License, Version 1.1 + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 1999-2001 The Apache Software Foundation. All rights + reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. The end-user documentation included with the redistribution, if + any, must include the following acknowlegement: + "This product includes software developed by the + Apache Software Foundation (http://www.apache.org/)." + Alternately, this acknowlegement may appear in the software itself, + if and wherever such third-party acknowlegements normally appear. + + 4. The names "The Jakarta Project", "Tomcat", and "Apache Software + Foundation" must not be used to endorse or promote products derived + from this software without prior written permission. For written + permission, please contact apache@apache.org. + + 5. Products derived from this software may not be called "Apache" + nor may "Apache" appear in their names without prior written + permission of the Apache Group. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + ==================================================================== + + This software consists of voluntary contributions made by many + individuals on behalf of the Apache Software Foundation. For more + information on the Apache Software Foundation, please see + . + +--%> + + +positiveDeclaration + +<% /** Name : positiveDeclaration + Description: Create a JSP page with a valid Java + declaration element. Use the declared variable + in the page in a scriptlet. + Result: No error + **/ %> + +<%! int i=627; %> +<% out.println(i); %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/declaration/positiveDeclaration.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/declaration/positiveDeclaration.jspx new file mode 100644 index 00000000..77dd11bb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/declaration/positiveDeclaration.jspx @@ -0,0 +1,27 @@ + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ELTernaryOperatorTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ELTernaryOperatorTest.jsp new file mode 100644 index 00000000..6f3658b9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ELTernaryOperatorTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- + Conditional Operator - A ? B : C + Evaluate B or C, depending on the result of the evaulation of A +--%> + +${'true' ? 'Test PASSED' : 'Test FAILED'} +${'false' ? 'Test FAILED' : 'Test PASSED'} +${1 > 0 ? 'Test PASSED' : 'Test FAILED'} +${2 <= 2 ? 'Test PASSED' : 'Test FAILED'} +${1 > 2 ? 'Test FAILED' : 'Test PASSED'} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElAttributeSearchTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElAttributeSearchTest.jsp new file mode 100644 index 00000000..286d3a50 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElAttributeSearchTest.jsp @@ -0,0 +1,38 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + +<% + pageContext.setAttribute("pageScoped", "page"); + pageContext.setAttribute("requestScoped", "request", PageContext.REQUEST_SCOPE); + pageContext.setAttribute("sessionScoped", "session", PageContext.SESSION_SCOPE); + pageContext.setAttribute("applicationScoped", "application", PageContext.APPLICATION_SCOPE); +%> + + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElBinaryOperators1Test.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElBinaryOperators1Test.jsp new file mode 100644 index 00000000..6f4e9c25 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElBinaryOperators1Test.jsp @@ -0,0 +1,188 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page + import="java.math.BigDecimal,java.math.BigInteger"%> +<%@ page contentType="text/plain"%> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el"%> +<% + pageContext.setAttribute("asdf", "asdf"); + + Float f1 = new Float(1.5f); + Float f2 = new Float(1.5e-4f); + Float f3 = new Float(1.5E+4); + BigDecimal bd1 = new BigDecimal(1.6d); + BigInteger bi1 = new BigInteger("5"); + pageContext.setAttribute("float1", f1); + pageContext.setAttribute("float2", f2); + pageContext.setAttribute("float3", f3); + pageContext.setAttribute("double1", new Double(1.5d)); + pageContext.setAttribute("double2", new Double(1.5e-4d)); + pageContext.setAttribute("double3", new Double(1.5E+4d)); + pageContext.setAttribute("long1", new Long(4)); + pageContext.setAttribute("integer1", new Integer(5)); + pageContext.setAttribute("short1", new Short((short) 6)); + pageContext.setAttribute("string1", "1.5"); + pageContext.setAttribute("string2", "1.5e-4"); + pageContext.setAttribute("string3", "1.5E+4"); + pageContext.setAttribute("bigdecimal1", bd1); + pageContext.setAttribute("biginteger1", bi1); + Double fPlus = new Double(f1.doubleValue() + f2.doubleValue() + + f3.doubleValue()); + Double fMinus = new Double(f1.doubleValue() - f2.doubleValue() + - f3.doubleValue()); + Double fMult = new Double(f1.doubleValue() * f2.doubleValue() + * f3.doubleValue()); + Double dPlus = new Double(1.5d + 1.5e-4d + 1.5E+4d); + Double dMinus = new Double(1.5d - 1.5e-4d - 1.5E+4d); + Double dMult = new Double(1.5d * 1.5e-4d * 1.5E+4d); + Double dMixPlus = new Double(1.5d + 4d); + Double dMixMinus = new Double(1.5d - 5d); + Double dMixMult = new Double(1.5d * 6d); + + BigDecimal bigDecPlus = bd1.add(new BigDecimal(f1.doubleValue())); + BigDecimal bigDecMinus = bd1.subtract(new BigDecimal(bi1)); + BigDecimal bigDecMult = bd1.multiply(new BigDecimal("1.5e-4")); + BigDecimal bigDecPlus1 = bd1.add(new BigDecimal( + new Short((short) 6).doubleValue())); + BigDecimal bigDecMinus1 = bd1.subtract(new BigDecimal( + new Integer(5).doubleValue())); + BigDecimal bigDecMult1 = bd1.multiply(new BigDecimal(new Long(4) + .doubleValue())); + + BigDecimal bigIntPlusFloat = new BigDecimal(bi1) + .add(new BigDecimal(f1.doubleValue())); + BigDecimal bigIntMinusDouble = new BigDecimal(bi1) + .subtract(new BigDecimal("1.5")); + BigDecimal bigIntMultString = new BigDecimal(bi1) + .multiply(new BigDecimal("1.5")); + + BigInteger bigIntPlus = bi1.add(new BigInteger(new Integer(5) + .toString())); + BigInteger bigIntMinus = bi1.subtract(new BigInteger(new Long(4) + .toString())); + BigInteger bigIntMult = bi1.multiply(new BigInteger(new Short( + (short) 6).toString())); + + Long lPlus = new Long(4 + 5); + Long lMinus = new Long(4 - 5); + Long lMult = new Long(4 * 5); + Integer iZero = new Integer(0); +%> +<%-- Validates binary operators +, -, * --%> + +<% + try { +%> +${asdf - 6} Test FAILED. Exception did not occur when trying to evaluate +"'asdf' - 6" using binary operator -. +<% + } catch (Throwable t) { + } +%> + +<% + try { +%> +${asdf * 6} Test FAILED. Exception did not occur when trying to evaluate +"'asdf' * 6" using binary operator *. +<% + } catch (Throwable t) { + } +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElBinaryOperators2Test.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElBinaryOperators2Test.jsp new file mode 100644 index 00000000..b4ce1bee --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElBinaryOperators2Test.jsp @@ -0,0 +1,101 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="java.math.BigDecimal, + java.math.BigInteger"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> +<% + pageContext.setAttribute("asdf", "asdf"); + + Float f1 = new Float(1.5f); + Float f2 = new Float(1.5e-4f); + Float f3 = new Float(1.5E+4); + BigDecimal bd1 = new BigDecimal(1.6d); + BigInteger bi1 = new BigInteger("5"); + Long l1 = new Long(4); + Integer i1 = new Integer(5); + Short s1 = new Short((short) 6); + pageContext.setAttribute("long1", l1); + pageContext.setAttribute("integer1", i1); + pageContext.setAttribute("short1", s1); + pageContext.setAttribute("float1", f1); + pageContext.setAttribute("float2", f2); + pageContext.setAttribute("float3", f3); + pageContext.setAttribute("double1", new Double(1.5d)); + pageContext.setAttribute("double2", new Double(1.5e-4d)); + pageContext.setAttribute("double3", new Double(1.5E+4d)); + pageContext.setAttribute("string1", "1.5"); + pageContext.setAttribute("string2", "1.5e-4"); + pageContext.setAttribute("string3", "1.5E+4"); + pageContext.setAttribute("bigdecimal1", bd1); + pageContext.setAttribute("biginteger1", bi1); + Double fDiv = new Double(f1.doubleValue() / f2.doubleValue() / f3.doubleValue()); + Double dDiv = new Double(1.5d / 1.5e-4 / 1.5E+4); + Integer iZero = new Integer(0); + Double lDiv = new Double(l1.doubleValue() / s1.doubleValue()); + Double iDiv = new Double(i1.doubleValue() / s1.doubleValue()); + BigDecimal bdDiv1 = bd1.divide(new BigDecimal(bi1), BigDecimal.ROUND_HALF_UP); + BigDecimal bdDiv2 = bd1.divide(new BigDecimal(new Double(1.5d).doubleValue()), BigDecimal.ROUND_HALF_UP); + BigDecimal bdDiv3 = new BigDecimal(bi1).divide(new BigDecimal(new Double(1.5d).doubleValue()), BigDecimal.ROUND_HALF_UP); + BigDecimal bdDiv4 = new BigDecimal(bi1).divide(bd1, BigDecimal.ROUND_HALF_UP); + +%> +<%-- Validates binary operators / and div --%> + +<% try { %> + ${asdf / 6} + Test FAILED. Exception did not occur when trying to evaluate + "'asdf' / 6" using binary operator +. +<% } catch (Throwable t) { } %> + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElBinaryOperators3Test.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElBinaryOperators3Test.jsp new file mode 100644 index 00000000..5c595f8a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElBinaryOperators3Test.jsp @@ -0,0 +1,105 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="java.math.BigDecimal, + java.math.BigInteger"%> +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> +<% + pageContext.setAttribute("asdf", "asdf"); + + Float f1 = new Float(1.5f); + Float f2 = new Float(1.5e-4); + Float f3 = new Float(1.5E+4); + BigDecimal bd1 = new BigDecimal(1.6d); + BigInteger bi1 = new BigInteger("5"); + pageContext.setAttribute("bigdecimal1", bd1); + pageContext.setAttribute("biginteger1", bi1); + pageContext.setAttribute("float1", f1); + pageContext.setAttribute("float2", f2); + pageContext.setAttribute("float3", f3); + pageContext.setAttribute("double1", new Double(1.5d)); + pageContext.setAttribute("double2", new Double(1.5e-4d)); + pageContext.setAttribute("double3", new Double(1.5E+4d)); + pageContext.setAttribute("long1", new Long(4)); + pageContext.setAttribute("integer1", new Integer(5)); + pageContext.setAttribute("short1", new Short((short) 6)); + pageContext.setAttribute("string1", "1.5"); + pageContext.setAttribute("string2", "1.5e-4"); + pageContext.setAttribute("string3", "1.5E+4"); + Double fMod = new Double(f1.doubleValue() % f2.doubleValue() % f3.doubleValue()); + Double dMod = new Double(1.5d % 1.5e-4d % 1.5E+4d); + Double dMixMod = new Double(1.5d % 4d); + Double bigDecimal1 = new Double(bd1.doubleValue() % f1.doubleValue()); + Double bigDecimal2 = new Double(bd1.doubleValue() % new Double("1.5").doubleValue()); + Double bigDecimal3 = new Double(bd1.doubleValue() % bi1.doubleValue()); + Double bigDecimal4 = new Double(bd1.doubleValue() % bd1.doubleValue()); + Double bigInteger1 = new Double(1.5d % bi1.doubleValue()); + BigInteger bigInteger2 = bi1.remainder(new BigInteger(new Integer(5).toString())); + + Long lMod = new Long(4 % 5); + Integer iZero = new Integer(0); +%> +<%-- Validates binary operators % and mod --%> + +<% try { %> + ${asdf % 6} + Test FAILED. Exception did not occur when trying to evaluate + "'asdf' % 6" using binary operator +. +<% } catch (Throwable t) { } %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElBinaryOperators4Test.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElBinaryOperators4Test.jsp new file mode 100644 index 00000000..16f27186 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElBinaryOperators4Test.jsp @@ -0,0 +1,47 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + +<% + Boolean True = new Boolean(true); + Boolean False = new Boolean(false); + pageContext.setAttribute("True", True); + pageContext.setAttribute("False", False); +%> + +<%-- validate binary operators &&, and, ||, and or --%> + + + + + + + + + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElBooleanCoercionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElBooleanCoercionTest.jsp new file mode 100644 index 00000000..d198704b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElBooleanCoercionTest.jsp @@ -0,0 +1,45 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain"%> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el"%> + + + +<% + try { +%> + +Test FAILED. Failure didn't occur when attempting to coerce 'TypeBean' +to a Boolean. +<% + } catch (Throwable t) { + } +%> + +<%-- Validate coercions to Boolean --%> + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElBooleanLiteralTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElBooleanLiteralTest.jsp new file mode 100644 index 00000000..fa1ddd4f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElBooleanLiteralTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElCharacterCoercionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElCharacterCoercionTest.jsp new file mode 100644 index 00000000..94f8bc9c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElCharacterCoercionTest.jsp @@ -0,0 +1,69 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + + + +<%-- Validate that if a Boolean or boolean is provided to + an action that accepts a Character, an error occurs --%> +<% try { %> + +Test FAILED. Coercion from boolean to Char didn't result in an error. +<% } catch (Throwable t) { } %> + +<% try { %> + +Test FAILED. Coercion from Boolean to Char didn't result in an error. +<% } catch (Throwable t) { } %> + +<%-- Validate that if any uncoercable type is provided, an error is raised --%> +<% try { %> + +<% } catch (Throwable t) { } %> + +<%-- Validate coercion to Character --%> + + + + + + + + + + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElEcmaBeanAccessTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElEcmaBeanAccessTest.jsp new file mode 100644 index 00000000..4feb17bd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElEcmaBeanAccessTest.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + + + + + +<% try { %> + ${ecma.exception} + Test FAILED. Accessed a bean whose getter method throws an exception, + but the exception wasn't propagated by the EL machinery. +<% } catch (Throwable t) { + out.clearBuffer(); +} %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElEcmaListArrayTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElEcmaListArrayTest.jsp new file mode 100644 index 00000000..da7a7703 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElEcmaListArrayTest.jsp @@ -0,0 +1,54 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ page import="java.util.ArrayList, + java.util.List"%> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + +<% + List list = new ArrayList(); + list.add("element1"); + list.add("element2"); + String[] sArray = new String[] { "value1", "value2" }; + pageContext.setAttribute("tckArray", sArray); + pageContext.setAttribute("tckList", list); +%> + +<%-- validate failure of expr-b coersion to int --%> + +<% try { %> + ${tckList['asdf']} + Test FAILED. Expression 'tckList['asdf']' should not have been evaluated. +<% } catch (Throwable t) { } %> + +<% try { %> + ${tckArray['asdf']} + Test FAILED. Expression 'tckArray['asdf']' should not have been evaluated. +<% } catch (Throwable t) { } %> + + +<%-- Validate return values --%> + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElEcmaMapTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElEcmaMapTest.jsp new file mode 100644 index 00000000..ad959467 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElEcmaMapTest.jsp @@ -0,0 +1,37 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ page import="java.util.HashMap, + java.util.Map"%> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + +<% + Map map = new HashMap(); + map.put("key1", "value1"); + pageContext.setAttribute("tckMap", map); +%> + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElEcmaNullValuesTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElEcmaNullValuesTest.jsp new file mode 100644 index 00000000..01fb5f0a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElEcmaNullValuesTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElEmptyOperatorTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElEmptyOperatorTest.jsp new file mode 100644 index 00000000..0989d884 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElEmptyOperatorTest.jsp @@ -0,0 +1,76 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="java.util.List, + java.util.ArrayList, + java.util.Map, + java.util.HashMap, + java.util.Collection"%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + +<% + List eList = new ArrayList(); + List neList = new ArrayList(); + neList.add("string"); + Collection eCollection = eList; + Collection neCollection = neList; + Map eMap = new HashMap(); + Map neMap = new HashMap(); + neMap.put("key", "value"); + String[] eArray = new String[] { }; + String[] neArray = new String[] { "string" }; + pageContext.setAttribute("emptyList", eList); + pageContext.setAttribute("nonEmptyList", neList); + pageContext.setAttribute("emptyCollection", eCollection); + pageContext.setAttribute("nonEmptyCollection", neCollection); + pageContext.setAttribute("emptyMap", eMap); + pageContext.setAttribute("nonEmptyMap", neMap); + pageContext.setAttribute("emptyArray", eArray); + pageContext.setAttribute("nonEmptyArray", neArray); + pageContext.setAttribute("emptyString", ""); + pageContext.setAttribute("nonEmptyString", "string"); + Boolean False = new Boolean(false); + Boolean True = new Boolean(true); +%> + +<%-- Validate the EL 'empty' operator --%> + + + + + + + + + + + + + + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElFloatingPointLiteralTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElFloatingPointLiteralTest.jsp new file mode 100644 index 00000000..c57c13fe --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElFloatingPointLiteralTest.jsp @@ -0,0 +1,68 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElFunctionInvocationTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElFunctionInvocationTest.jsp new file mode 100644 index 00000000..64721427 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElFunctionInvocationTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> +${el:substring(1,12,'TTest PASSEDD')} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElFunctionNamespaceTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElFunctionNamespaceTest.jsp new file mode 100644 index 00000000..1977023e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElFunctionNamespaceTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitApplicationScopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitApplicationScopeTest.jsp new file mode 100644 index 00000000..eedf4361 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitApplicationScopeTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + +<% pageContext.setAttribute("application", "applicationScope", PageContext.APPLICATION_SCOPE); %> + +<% pageContext.removeAttribute("application", PageContext.APPLICATION_SCOPE); %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitCookieTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitCookieTest.jsp new file mode 100644 index 00000000..2ea5f0db --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitCookieTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitHeaderTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitHeaderTest.jsp new file mode 100644 index 00000000..6f59b3bd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitHeaderTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitHeaderValuesTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitHeaderValuesTest.jsp new file mode 100644 index 00000000..85d168e8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitHeaderValuesTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitInitParamTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitInitParamTest.jsp new file mode 100644 index 00000000..f5c42135 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitInitParamTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitPageContextTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitPageContextTest.jsp new file mode 100644 index 00000000..fd116994 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitPageContextTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitPageScopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitPageScopeTest.jsp new file mode 100644 index 00000000..52800265 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitPageScopeTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + +<% pageContext.setAttribute("page", "pageScope"); %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitParamTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitParamTest.jsp new file mode 100644 index 00000000..a5a70722 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitParamTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitParamValuesTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitParamValuesTest.jsp new file mode 100644 index 00000000..0a6d7775 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitParamValuesTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitRequestScopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitRequestScopeTest.jsp new file mode 100644 index 00000000..f9cfbdfb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitRequestScopeTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + +<% pageContext.setAttribute("request", "requestScope", PageContext.REQUEST_SCOPE); %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitSessionScopeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitSessionScopeTest.jsp new file mode 100644 index 00000000..0ce9b1dd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElImplicitSessionScopeTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + +<% pageContext.setAttribute("session", "sessionScope", PageContext.SESSION_SCOPE); %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElIntegerLiteralTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElIntegerLiteralTest.jsp new file mode 100644 index 00000000..7fa1d7e9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElIntegerLiteralTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElInvocationAndUsageTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElInvocationAndUsageTest.jsp new file mode 100644 index 00000000..4b2511cc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElInvocationAndUsageTest.jsp @@ -0,0 +1,47 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> +<% + pageContext.setAttribute("eval", "Evaluated"); +%> +<%-- + EL is invoked via the construct ${expr} + and must be interpreted by the container + when provided as body content of a custom + action, an attribute of a custom attribute + that accepts rtexpr values or in template + text outside of any action. Expressions will + not be evaluated when provided as body content + to custom actions have a body type of 'tagdependent'. + --%> + +Expression in template text: ${pageScope.eval} +These should not be evaluated: {pageScope.eval}, pageScope.eval}, {pageScope.eval + + + + Expression in body of action: ${pageScope.eval} + + + + Expression in body of tagdependent body content tag: ${pageScope.eval} + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElNonExistingFunctionNameTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElNonExistingFunctionNameTest.jsp new file mode 100644 index 00000000..2da337bc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElNonExistingFunctionNameTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> +${el:noPossibleWayThisFunctionCouldExist()} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElNonMatchingFunctionSignatureTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElNonMatchingFunctionSignatureTest.jsp new file mode 100644 index 00000000..f5c4883b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElNonMatchingFunctionSignatureTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> +${el:substring(1,'TTestPASSED')} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElNonStaticPublicFunctionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElNonStaticPublicFunctionTest.jsp new file mode 100644 index 00000000..f6e8c850 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElNonStaticPublicFunctionTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el/nonstatic" prefix="el" %> +${el:toString()} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElNullLiteralTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElNullLiteralTest.jsp new file mode 100644 index 00000000..84cbaff4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElNullLiteralTest.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElNumberCoercionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElNumberCoercionTest.jsp new file mode 100644 index 00000000..ea2beb64 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElNumberCoercionTest.jsp @@ -0,0 +1,485 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page + import="java.math.BigInteger,java.math.BigDecimal"%> +<%@ page contentType="text/plain"%> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el"%> + + + +<%-- Validate EL Number coercions --%> + +<%-- Validate boolean's cause an error condition --%> +<% + try { +%> + +Test FAILED. Expected an error condition when a number (Byte) type is +required and the EL expression yields a Boolean. +<% + } catch (Throwable t) { + } +%> + +<% + try { +%> + +Test FAILED. Expected an error condition when a number type (Short) is +required and the EL expression yields a Boolean. +<% + } catch (Throwable t) { + } +%> + +<% + try { +%> + +Test FAILED. Expected an error condition when a number type (Integer) is +required and the EL expression yields a Boolean. +<% + } catch (Throwable t) { + } +%> + +<% + try { +%> + +Test FAILED. Expected an error condition when a number type (Long) is +required and the EL expression yields a Boolean. +<% + } catch (Throwable t) { + } +%> + +<% + try { +%> + +Test FAILED. Expected an error condition when a number type (Float) is +required and the EL expression yields a Boolean. +<% + } catch (Throwable t) { + } +%> + +<% + try { +%> + +Test FAILED. Expected an error condition when a number type (Double) is +required and the EL expression yields a Boolean. +<% + } catch (Throwable t) { + } +%> + +<%-- Validate failure in the case where strings can't be converted --%> + +<% + try { +%> + +Test FAILED. Expected an error condition when a number type (Byte) is +required and the EL expression is unable to conver the provided String +expression into a Number type. +<% + } catch (Throwable t) { + } +%> + +<% + try { +%> + +Test FAILED. Expected an error condition when a number type (Short) is +required and the EL expression is unable to conver the provided String +expression into a Number type. +<% + } catch (Throwable t) { + } +%> + +<% + try { +%> + +Test FAILED. Expected an error condition when a number type (Integer) is +required and the EL expression is unable to conver the provided String +expression into a Number type. +<% + } catch (Throwable t) { + } +%> + +<% + try { +%> + +Test FAILED. Expected an error condition when a number type (Long) is +required and the EL expression is unable to conver the provided String +expression into a Number type. +<% + } catch (Throwable t) { + } +%> + +<% + try { +%> + +Test FAILED. Expected an error condition when a number type (Float) is +required and the EL expression is unable to conver the provided String +expression into a Number type. +<% + } catch (Throwable t) { + } +%> + +<% + try { +%> + +Test FAILED. Expected an error condition when a number type (Double) is +required and the EL expression is unable to conver the provided String +expression into a Number type. +<% + } catch (Throwable t) { + } +%> + +<%-- Validate error condition for any other type --%> + +<% + try { +%> + +Test FAILED. Expected an error condition when an Object that can't be +converted to a Number type is provided as a value for an attribute that +only accepts Number types (byte). +<% + } catch (Throwable t) { + } +%> + +<% + try { +%> + +Test FAILED. Expected an error condition when an Object that can't be +converted to a Number type is provided as a value for an attribute that +only accepts Number types (Short). +<% + } catch (Throwable t) { + } +%> + +<% + try { +%> + +Test FAILED. Expected an error condition when an Object that can't be +converted to a Number type is provided as a value for an attribute that +only accepts Number types (Integer). +<% + } catch (Throwable t) { + } +%> + +<% + try { +%> + +Test FAILED. Expected an error condition when an Object that can't be +converted to a Number type is provided as a value for an attribute that +only accepts Number types (Long). +<% + } catch (Throwable t) { + } +%> + +<% + try { +%> + +Test FAILED. Expected an error condition when an Object that can't be +converted to a Number type is provided as a value for an attribute that +only accepts Number types (Float). +<% + } catch (Throwable t) { + } +%> + +<% + try { +%> + +Test FAILED. Expected an error condition when an Object that can't be +converted to a Number type is provided as a value for an attribute that +only accepts Number types (Double). +<% + } catch (Throwable t) { + } +%> + +<%-- Validate Number coercions --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElOtherTypeCoercionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElOtherTypeCoercionTest.jsp new file mode 100644 index 00000000..e3e5a77b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElOtherTypeCoercionTest.jsp @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + + + + +<%-- If the target type has no PropertyEditor, fail --%> +<% try { %> + +<% } catch (Throwable t) { } %> + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElPrimitiveBoxedTypeConversionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElPrimitiveBoxedTypeConversionTest.jsp new file mode 100644 index 00000000..97d2a775 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElPrimitiveBoxedTypeConversionTest.jsp @@ -0,0 +1,47 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + + + +<%-- Validate Boxed types can be properly converted to primitive types + and primitives types can be converted to boxed types. If the + test passes, no visible output will be displayed. If the test + fails, it will be manifest itself as a translation error. --%> + +<%-- boxed to primitive --%> + + + + + + + + + +<%-- primitive to boxed --%> + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElRelationalOperators1Test.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElRelationalOperators1Test.jsp new file mode 100644 index 00000000..00433fa6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElRelationalOperators1Test.jsp @@ -0,0 +1,143 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="java.math.BigDecimal, + java.math.BigInteger"%> +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + +<% + Boolean False = new Boolean(false); + Boolean True = new Boolean(true); + pageContext.setAttribute("float1", new Float(1.5f)); + pageContext.setAttribute("double1", new Double(1.6d)); + pageContext.setAttribute("byte1", new Byte((byte) 1)); + pageContext.setAttribute("short1", new Short((short) 2)); + pageContext.setAttribute("integer1", new Integer(3)); + pageContext.setAttribute("character1", new Character('9')); + pageContext.setAttribute("long1", new Long(4L)); + pageContext.setAttribute("string1", "3"); + pageContext.setAttribute("bigdecimal1", new BigDecimal("5.1")); + pageContext.setAttribute("biginteger1", new BigInteger("6")); + pageContext.setAttribute("double2", new Double(5.1)); + pageContext.setAttribute("integer2", new Integer(6)); +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElRelationalOperators2Test.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElRelationalOperators2Test.jsp new file mode 100644 index 00000000..7a3b759e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElRelationalOperators2Test.jsp @@ -0,0 +1,109 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="java.math.BigDecimal, + java.math.BigInteger"%> +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + +<% + Boolean False = new Boolean(false); + Boolean True = new Boolean(true); + pageContext.setAttribute("True", True); + pageContext.setAttribute("False", False); + pageContext.setAttribute("float1", new Float(1.6f)); + pageContext.setAttribute("double1", new Double(1.6d)); + pageContext.setAttribute("byte1", new Byte((byte) 1)); + pageContext.setAttribute("short1", new Short((short) 2)); + pageContext.setAttribute("integer1", new Integer(3)); + pageContext.setAttribute("character1", new Character('9')); + pageContext.setAttribute("long1", new Long(4L)); + pageContext.setAttribute("string1", "3"); + pageContext.setAttribute("bigdecimal1", new BigDecimal(1.6)); + pageContext.setAttribute("biginteger1", new BigInteger("3")); +%> + +<%-- Validate relation operators '==', '!=', 'eq', 'ne' --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElStaticAttributeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElStaticAttributeTest.jsp new file mode 100644 index 00000000..44b3dc2f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElStaticAttributeTest.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElStringCoercionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElStringCoercionTest.jsp new file mode 100644 index 00000000..e93ce070 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElStringCoercionTest.jsp @@ -0,0 +1,59 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain"%> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el"%> + + + + + + + + + + + + + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElStringLiteralTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElStringLiteralTest.jsp new file mode 100644 index 00000000..3a40601f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElStringLiteralTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + + + + + " + object="${\'\\\'string\\\'\'}" display="true" /> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElUnaryOperators1Test.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElUnaryOperators1Test.jsp new file mode 100644 index 00000000..00bcdb7b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElUnaryOperators1Test.jsp @@ -0,0 +1,79 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="java.math.BigDecimal, + java.math.BigInteger"%> +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + +<%-- Validate the unary minus ('-') operator --%> + +<% + pageContext.setAttribute("float1", new Float(1.5f)); + pageContext.setAttribute("double1", new Double(1.5d)); + pageContext.setAttribute("long1", new Long(4L)); + pageContext.setAttribute("integer1", new Integer(-5)); + pageContext.setAttribute("short1", new Short((short) 6)); + pageContext.setAttribute("byte1", new Byte((byte) 1)); + pageContext.setAttribute("string1", "1.5"); + pageContext.setAttribute("string2", "1.5e-4"); + pageContext.setAttribute("string3", "1.5E+4"); + pageContext.setAttribute("string4", "-15"); + pageContext.setAttribute("bigdecimal1", new BigDecimal("100.5")); + pageContext.setAttribute("biginteger1", new BigInteger("125")); +%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElUnaryOperators2Test.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElUnaryOperators2Test.jsp new file mode 100644 index 00000000..1c268d13 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/ElUnaryOperators2Test.jsp @@ -0,0 +1,38 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/el" prefix="el" %> + +<%-- validate unary operator '!' and 'not' --%> + +<% + Boolean True = new Boolean(true); + Boolean False = new Boolean(false); + pageContext.setAttribute("True", True); + pageContext.setAttribute("False", False); +%> + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/WEB-INF/el.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/WEB-INF/el.tld new file mode 100644 index 00000000..cf059199 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/WEB-INF/el.tld @@ -0,0 +1,234 @@ + + + + + 1.0 + el + + checkObject + ee.jakarta.tck.pages.spec.core_syntax.scripting.el.CheckObjectTag + JSP + + name + false + + + object + true + true + java.lang.Object + + + control + true + true + java.lang.Object + + + + checkLiteral + ee.jakarta.tck.pages.spec.core_syntax.scripting.el.CheckLiteralTag + JSP + + name + false + + + object + true + true + java.lang.Object + + + control + true + true + java.lang.Object + + + display + false + + + + checkEcma + ee.jakarta.tck.pages.spec.core_syntax.scripting.el.CheckECMATag + JSP + + name + false + + + object + true + true + java.lang.Object + + + control + true + true + java.lang.Object + + + display + false + + + + checkOperator + ee.jakarta.tck.pages.spec.core_syntax.scripting.el.CheckOperatorTag + JSP + + name + false + + + object + true + true + java.lang.Object + + + control + true + true + java.lang.Object + + + display + false + + + + checkCoercion + ee.jakarta.tck.pages.spec.core_syntax.scripting.el.CheckCoercionTag + JSP + + name + false + + + object + true + java.lang.Object + + + control + true + true + java.lang.Object + + + byte + true + java.lang.Byte + + + char + true + java.lang.Character + + + short + true + java.lang.Short + + + int + true + java.lang.Integer + + + long + true + java.lang.Long + + + float + true + java.lang.Float + + + double + true + java.lang.Double + + + bigInteger + true + java.math.BigInteger + + + bigDecimal + true + java.math.BigDecimal + + + string + true + + + boolean + true + java.lang.Boolean + + + typeBean + true + ee.jakarta.tck.pages.spec.core_syntax.scripting.el.TypeBean + + + display + false + + + + echo + ee.jakarta.tck.pages.spec.core_syntax.scripting.el.EchoTag + JSP + + echo + false + true + + + + dependent + ee.jakarta.tck.pages.spec.core_syntax.scripting.el.EchoTag + tagdependent + + + static + ee.jakarta.tck.pages.spec.core_syntax.scripting.el.EchoTag + JSP + + static + false + + + + substring + ee.jakarta.tck.pages.spec.core_syntax.scripting.el.ElFunctions + java.lang.String substring(int, int, java.lang.String) + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/WEB-INF/nonstatic.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/WEB-INF/nonstatic.tld new file mode 100644 index 00000000..c24c7778 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/WEB-INF/nonstatic.tld @@ -0,0 +1,31 @@ + + + + + 1.0 + nonstatic + + toString + ee.jakarta.tck.pages.spec.core_syntax.scripting.el.ElFunctions + java.lang.String toString() + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/elBinaryOperatorParenthesesTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/elBinaryOperatorParenthesesTest.jsp new file mode 100644 index 00000000..4c233fa9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/elBinaryOperatorParenthesesTest.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +${true and (true && true)} +${true or (true && false)} +${7 ne (3 + 2)} +${7 eq (3 + 4)} +${7 mod (3 + 2)} +${7 div (3 + 2)} + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/jsp_coresyntx_script_el_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/jsp_coresyntx_script_el_web.xml new file mode 100644 index 00000000..22536921 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/el/jsp_coresyntx_script_el_web.xml @@ -0,0 +1,35 @@ + + + + + JspCorSynScrptEl + + 5 + + + + http://java.sun.com/tck/jsp/el + /WEB-INF/el.tld + + + http://java.sun.com/tck/jsp/el/nonstatic + /WEB-INF/nonstatic.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/escaping/jsp_coresyntx_script_escape_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/escaping/jsp_coresyntx_script_escape_web.xml new file mode 100644 index 00000000..fd81ca1e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/escaping/jsp_coresyntx_script_escape_web.xml @@ -0,0 +1,25 @@ + + + + + JspCorSynScrptEscape + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/escaping/positiveEscapingTest.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/escaping/positiveEscapingTest.gf new file mode 100644 index 00000000..6b2f14fb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/escaping/positiveEscapingTest.gf @@ -0,0 +1,23 @@ + + + + + +positiveEscapingTest + + + +Joe said %> + + + +Joe said "hi!" + + +Joe said <% + + +"Joe said \"hello\"" + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/escaping/positiveEscapingTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/escaping/positiveEscapingTest.jsp new file mode 100644 index 00000000..287c297f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/escaping/positiveEscapingTest.jsp @@ -0,0 +1,39 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%-- Validate recoginition and handling of JSP escape sequences --%> + + +positiveEscapingTest + + + +<%= "Joe said %\>" %> + + +<% String joes_statement = "hi!"; %> +<%= "Joe said \"" + joes_statement + "\"" %> + + +Joe said <\% + + +<%= "\"Joe said \\\"hello\\\"\"" %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/jsp_coresyntx_script_expressions_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/jsp_coresyntx_script_expressions_web.xml new file mode 100644 index 00000000..ed7eeedd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/jsp_coresyntx_script_expressions_web.xml @@ -0,0 +1,25 @@ + + + + + JspCorSynScrptExpress + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/positiveExpr.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/positiveExpr.gf new file mode 100644 index 00000000..6217d141 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/positiveExpr.gf @@ -0,0 +1,10 @@ + +positiveExpr + + + + + +50 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/positiveExpr.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/positiveExpr.jsp new file mode 100644 index 00000000..a01d66ba --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/positiveExpr.jsp @@ -0,0 +1,72 @@ +<%-- + + The Apache Software License, Version 1.1 + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 1999-2001 The Apache Software Foundation. All rights + reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. The end-user documentation included with the redistribution, if + any, must include the following acknowlegement: + "This product includes software developed by the + Apache Software Foundation (http://www.apache.org/)." + Alternately, this acknowlegement may appear in the software itself, + if and wherever such third-party acknowlegements normally appear. + + 4. The names "The Jakarta Project", "Tomcat", and "Apache Software + Foundation" must not be used to endorse or promote products derived + from this software without prior written permission. For written + permission, please contact apache@apache.org. + + 5. Products derived from this software may not be called "Apache" + nor may "Apache" appear in their names without prior written + permission of the Apache Group. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + ==================================================================== + + This software consists of voluntary contributions made by many + individuals on behalf of the Apache Software Foundation. For more + information on the Apache Software Foundation, please see + . + +--%> + + +positiveExpr + +<% /** Name: positiveExpr + Description:Create a valid JSP expression. + Result: The JSP page output with the evaluated + value of expression duly inserted in the + page. +**/ %> + +<%! int i=10,j=5; %> + +<%= i*j %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/positiveExprComment.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/positiveExprComment.gf new file mode 100644 index 00000000..9c612896 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/positiveExprComment.gf @@ -0,0 +1,9 @@ + +positiveExprComment + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/positiveExprComment.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/positiveExprComment.jsp new file mode 100644 index 00000000..22dc5af7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/positiveExprComment.jsp @@ -0,0 +1,71 @@ +<%-- + + The Apache Software License, Version 1.1 + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 1999-2001 The Apache Software Foundation. All rights + reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. The end-user documentation included with the redistribution, if + any, must include the following acknowlegement: + "This product includes software developed by the + Apache Software Foundation (http://www.apache.org/)." + Alternately, this acknowlegement may appear in the software itself, + if and wherever such third-party acknowlegements normally appear. + + 4. The names "The Jakarta Project", "Tomcat", and "Apache Software + Foundation" must not be used to endorse or promote products derived + from this software without prior written permission. For written + permission, please contact apache@apache.org. + + 5. Products derived from this software may not be called "Apache" + nor may "Apache" appear in their names without prior written + permission of the Apache Group. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + ==================================================================== + + This software consists of voluntary contributions made by many + individuals on behalf of the Apache Software Foundation. For more + information on the Apache Software Foundation, please see + . + +--%> + + +positiveExprComment + +<% /** Name:positiveExprComment + Description: Create a JSP page with a JSP + expression inserted into a HTML comment + Result: The HTML should contain the value of the + expression inserted into the comment +**/ %> +<%! int i=10,j=5; %> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/positiveExprWhiteSpace.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/positiveExprWhiteSpace.gf new file mode 100644 index 00000000..73fcc34e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/positiveExprWhiteSpace.gf @@ -0,0 +1,11 @@ + +positiveExprWhiteSpace + + + +100 +100 +100 +100 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/positiveExprWhiteSpace.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/positiveExprWhiteSpace.jsp new file mode 100644 index 00000000..a14cf98d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/expressions/positiveExprWhiteSpace.jsp @@ -0,0 +1,72 @@ +<%-- + + The Apache Software License, Version 1.1 + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 1999-2001 The Apache Software Foundation. All rights + reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. The end-user documentation included with the redistribution, if + any, must include the following acknowlegement: + "This product includes software developed by the + Apache Software Foundation (http://www.apache.org/)." + Alternately, this acknowlegement may appear in the software itself, + if and wherever such third-party acknowlegements normally appear. + + 4. The names "The Jakarta Project", "Tomcat", and "Apache Software + Foundation" must not be used to endorse or promote products derived + from this software without prior written permission. For written + permission, please contact apache@apache.org. + + 5. Products derived from this software may not be called "Apache" + nor may "Apache" appear in their names without prior written + permission of the Apache Group. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + ==================================================================== + + This software consists of voluntary contributions made by many + individuals on behalf of the Apache Software Foundation. For more + information on the Apache Software Foundation, please see + . + +--%> + + +positiveExprWhiteSpace + +<% /** Name:positiveExprWhiteSpace + Description: Create different expressions, varying the whitespace. + Result: Should return the HTML of the page with the evaluated + value of the expression +**/ %> +<%! int i=10; %> +<%=i*i%> +<%= i*i%> +<%=i*i %> +<%= i*i %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/scriptlet/jsp_coresyntx_script_scriptlet_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/scriptlet/jsp_coresyntx_script_scriptlet_web.xml new file mode 100644 index 00000000..47cdaa32 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/scriptlet/jsp_coresyntx_script_scriptlet_web.xml @@ -0,0 +1,25 @@ + + + + + JspCorSynScrptScrptlet + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/scriptlet/positiveScriptlet.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/scriptlet/positiveScriptlet.gf new file mode 100644 index 00000000..d2581568 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/scriptlet/positiveScriptlet.gf @@ -0,0 +1,27 @@ + +positiveScriptlet + + + + + + + + 10 + + + + +10 + + + +10 + + + +ArithmeticException caught! + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/scriptlet/positiveScriptlet.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/scriptlet/positiveScriptlet.jsp new file mode 100644 index 00000000..661b837d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/core_syntax/scripting/scriptlet/positiveScriptlet.jsp @@ -0,0 +1,108 @@ +<%-- + + The Apache Software License, Version 1.1 + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + Copyright (c) 1999-2001 The Apache Software Foundation. All rights + reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. The end-user documentation included with the redistribution, if + any, must include the following acknowlegement: + "This product includes software developed by the + Apache Software Foundation (http://www.apache.org/)." + Alternately, this acknowlegement may appear in the software itself, + if and wherever such third-party acknowlegements normally appear. + + 4. The names "The Jakarta Project", "Tomcat", and "Apache Software + Foundation" must not be used to endorse or promote products derived + from this software without prior written permission. For written + permission, please contact apache@apache.org. + + 5. Products derived from this software may not be called "Apache" + nor may "Apache" appear in their names without prior written + permission of the Apache Group. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + ==================================================================== + + This software consists of voluntary contributions made by many + individuals on behalf of the Apache Software Foundation. For more + information on the Apache Software Foundation, please see + . + +--%> + + +positiveScriptlet + +<% /** Name:positiveScriptlet + Description: Test a series of scriplets. + Result: Output of all the scriplets in the order + they appear. +**/ %> + + +<% +// simple java comments +/* multiline java comments +*/ +%> + + +<% int i=5; + int j=10; + if(j>i){ + %> 10 <% } + else { + %> 5 <% } %> + + +<%! int k=5; %> +<%! int l=10; %> +<% if(l>k){ %>10 <%} else { %> +5 <% } %> + + + +<% + counter.setCounter(10); + out.println(counter.getCounterValue()); +%> + + +<% + int q = 0; + try { + q = ( 9 / 0 ); + } catch ( ArithmeticException ae ) { + out.println( "ArithmeticException caught!" ); + } finally { + q = 0; + } +%> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/AllowedDynamicAttributeValueTypes.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/AllowedDynamicAttributeValueTypes.jsp new file mode 100644 index 00000000..7ded267f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/AllowedDynamicAttributeValueTypes.jsp @@ -0,0 +1,35 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/el_jsp.tld" %> + + + +begin
          +<% + pageContext.setAttribute("dexp", "dollar", PageContext.PAGE_SCOPE); + pageContext.setAttribute("vexp", "value", PageContext.PAGE_SCOPE); + %> + +end
          diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/DynamicAttributeSetterMethod.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/DynamicAttributeSetterMethod.jsp new file mode 100644 index 00000000..83a45372 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/DynamicAttributeSetterMethod.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/el_jsp.tld" %> + +begin
          + +end
          diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredMethodStringLiteral.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredMethodStringLiteral.jsp new file mode 100644 index 00000000..0118a0ee --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredMethodStringLiteral.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/el_jsp.tld" %> + +begin + +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredMethodStringLiteralError1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredMethodStringLiteralError1.jsp new file mode 100644 index 00000000..57d8f3e3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredMethodStringLiteralError1.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/el_jsp.tld" %> + +begin + +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredMethodStringLiteralError2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredMethodStringLiteralError2.jsp new file mode 100644 index 00000000..aa5540c6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredMethodStringLiteralError2.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/el_jsp.tld" %> + +begin + +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredValueCoercion.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredValueCoercion.jsp new file mode 100644 index 00000000..0007100c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/ELDeferredValueCoercion.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/el_jsp.tld" %> +<%@ page language="java" import="com.sun.ts.tests.common.el.spec.Book" %> + +begin
          +<% + Book novel = new Book("Moby Dick", "Herman Melville", "Random House", 1849); + pageContext.setAttribute("book", novel, PageContext.PAGE_SCOPE); + %> + + +end
          diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/ImplicitELImport.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/ImplicitELImport.jsp new file mode 100644 index 00000000..81661192 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/ImplicitELImport.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2024 Contributors to the Eclipse Foundation. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%-- jakarta.servlet.* --%> +${DispatcherType.ASYNC} + +<%-- jakarta.servlet.jsp.* --%> +<%-- No public, concrete classes with public constants --%> + +<%-- jakarta.servlet.http.* --%> +${MappingMatch.CONTEXT_ROOT} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/TagLibraryPoundTranslationError.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/TagLibraryPoundTranslationError.jsp new file mode 100644 index 00000000..3a133bd6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/TagLibraryPoundTranslationError.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/el_jsp.tld" %> + + + +begin
          + +end
          diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/TemplateTextPoundTranslationError.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/TemplateTextPoundTranslationError.jsp new file mode 100644 index 00000000..27b9d461 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/TemplateTextPoundTranslationError.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/el_jsp.tld" %> + + + +begin
          + foo is #{foo} +end
          diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/WEB-INF/el_jsp.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/WEB-INF/el_jsp.tld new file mode 100644 index 00000000..6c2c7e2d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/WEB-INF/el_jsp.tld @@ -0,0 +1,227 @@ + + + + + + 1.0 + el + + ELDeferredValueValue test + ELDeferredValueValueTag + ee.jakarta.tck.pages.spec.el.jsp.ELDeferredValueValueTag + empty + + litExpr + true + + java.lang.String + + + + poundExpr + true + + java.lang.String + + + + + ELDeferredValueCoercion test + ELDeferredValueCoercionTag + ee.jakarta.tck.pages.spec.el.jsp.ELDeferredValueCoercionTag + empty + + intExpr + true + + int + + + + bookExpr + true + + java.lang.String + + + + + ELDeferredMethodValue test + ELDeferredMethodValueTag + ee.jakarta.tck.pages.spec.el.jsp.ELDeferredMethodValueTag + empty + + litExpr + true + + java.lang.String name() + + + + poundExpr + true + + boolean add(Object) + + + + + ELDeferredMethodStringLiteral test + ELDeferredMethodStringLiteralTag + ee.jakarta.tck.pages.spec.el.jsp.ELDeferredMethodStringLiteralTag + empty + + strExpr + true + + java.lang.String name() + + + + dblExpr + true + + double name() + + + + + ELDeferredMethodStringLiteralError test - void return value + ELDeferredMethodStringLiteralError1 + ee.jakarta.tck.pages.spec.el.jsp.ELDeferredMethodStringLiteralTag + empty + + strExpr + true + + void name() + + + + dblExpr + true + + double name() + + + + + ELDeferredMethodStringLiteralError test - non-coerceable return value + ELDeferredMethodStringLiteralError2 + ee.jakarta.tck.pages.spec.el.jsp.ELDeferredMethodStringLiteralTag + empty + + strExpr + true + + int name() + + + + dblExpr + true + + double name() + + + + + TagLibraryPoundTranslationError test + TagLibraryPoundTranslationError + ee.jakarta.tck.pages.spec.el.jsp.ELDeferredValueValueTag + empty + + litExpr + true + + java.lang.String + + + + poundExpr + true + + + + AllowedDynamicAttributeValueTypes + AllowedDynamicAttributeValueTypes + ee.jakarta.tck.pages.spec.el.jsp.AllowedDynamicAttributeValueTypesTag + JSP + + litExpr + true + true + + + scriptExpr + true + true + + + dollarExpr + true + true + + + valueExpr + true + true + + java.lang.Object + + + + methodExpr + true + true + + boolean add(Object) + + + + + DynamicAttributeSetterMethod + DynamicAttributeSetterMethod + ee.jakarta.tck.pages.spec.el.jsp.DynamicAttributeSetterMethodTag + empty + + num + true + true + + + + Substitute tag for jstl c:set + set + ee.jakarta.tck.pages.common.tags.tck.SetTag + empty + + var + true + + + value + true + true + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/jsp_el_jsp_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/jsp_el_jsp_web.xml new file mode 100644 index 00000000..62ffd0d2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/jsp_el_jsp_web.xml @@ -0,0 +1,25 @@ + + + + + JspElJsp + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/negativeELDeferredMethodValue.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/negativeELDeferredMethodValue.jsp new file mode 100644 index 00000000..550f4c62 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/negativeELDeferredMethodValue.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/el_jsp.tld" %> + + + +begin
          + +end
          diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/negativeELDeferredValueValue.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/negativeELDeferredValueValue.jsp new file mode 100644 index 00000000..23405440 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/negativeELDeferredValueValue.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/el_jsp.tld" %> + + + +begin
          + +end
          diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/positiveELDeferredMethodValue.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/positiveELDeferredMethodValue.jsp new file mode 100644 index 00000000..47016713 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/positiveELDeferredMethodValue.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/el_jsp.tld" %> + + + +begin
          + +end
          diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/positiveELDeferredValueValue.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/positiveELDeferredValueValue.jsp new file mode 100644 index 00000000..edc43151 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/jsp/positiveELDeferredValueValue.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/el_jsp.tld" %> + + + +begin
          + +end
          diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/CompositeExprEval1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/CompositeExprEval1.jsp new file mode 100644 index 00000000..1d7015d9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/CompositeExprEval1.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/el_language.tld" %> + +begin + + + + + + result is ${result} +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/CompositeExprEval2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/CompositeExprEval2.jsp new file mode 100644 index 00000000..17441d93 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/CompositeExprEval2.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/el_language.tld" %> +begin + + + num is ${num} + + ${result} +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/DotAndIndexOperatorsSame.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/DotAndIndexOperatorsSame.jsp new file mode 100644 index 00000000..c8bdf87b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/DotAndIndexOperatorsSame.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/el_language.tld" %> + +begin + + + indexExpr is ${indexExpr} + dotExpr is ${dotExpr} + + + ${result} +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/ELSyntaxEscape.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/ELSyntaxEscape.jsp new file mode 100644 index 00000000..911403f0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/ELSyntaxEscape.jsp @@ -0,0 +1,94 @@ +<%-- + + Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + jakarta.el.ValueExpression, + jakarta.el.ELContext"%> +<%@ page contentType="text/plain" %> + +<%! +private static final String ESCAPE_DOLLAR_EXPR = "\\${exprA}"; +private static final String ESCAPE_POUND_EXPR = "\\#{exprB}"; +private static final String EXPECTED_DOLLAR_VALUE = "${exprA}"; +private static final String EXPECTED_POUND_VALUE = "#{exprB}"; +%> + +<% + if (pageContext != null) { + ELContext elContext = pageContext.getELContext(); + + if (elContext != null) { + JspApplicationContext jaContext = + JspFactory.getDefaultFactory().getJspApplicationContext( + pageContext.getServletContext()); + if (jaContext != null) { + + try { + + // parse the value expressions + ValueExpression vexpDollar = + jaContext.getExpressionFactory().createValueExpression( + elContext, ESCAPE_DOLLAR_EXPR, ESCAPE_DOLLAR_EXPR.getClass()); + ValueExpression vexpPound = + jaContext.getExpressionFactory().createValueExpression( + elContext, ESCAPE_POUND_EXPR, ESCAPE_POUND_EXPR.getClass()); + + if (vexpDollar != null && vexpPound != null) { + + Class expectedDollarClass = vexpDollar.getExpectedType(); + Class expectedPoundClass = vexpPound.getExpectedType(); + + if (expectedDollarClass != String.class) { + out.print("Test FAILED. Got type = " + expectedDollarClass.getName() + " "); + out.println("for " + ESCAPE_DOLLAR_EXPR); + return; + } + if (expectedPoundClass != String.class) { + out.print("Test FAILED. Got type = " + expectedPoundClass.getName() + " "); + out.println("for " + ESCAPE_POUND_EXPR); + return; + } + + String literalDollarVal = (String) vexpDollar.getValue(elContext); + if (!literalDollarVal.equals(EXPECTED_DOLLAR_VALUE)) { + out.println("Test FAILED. Got literalDollarValue = " + literalDollarVal); + return; + } + + String literalPoundVal = (String) vexpPound.getValue(elContext); + if (!literalPoundVal.equals(EXPECTED_POUND_VALUE)) { + out.println("Test FAILED. Got literalPoundValue = " + literalPoundVal); + return; + } + out.println("Test PASSED"); + } + else + out.println("Test FAILED. Null value returned for expression."); + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "CreateValueExpressionTest"); + } + } + else + out.println("Test FAILED. Unable to obtain JspApplicationContext"); + } + else + out.println("Test FAILED. Unable to obtain ELContext"); + } + else + out.println("Test FAILED. Unable to obtain PageContext."); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/LiteralExprAsMethodExpr1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/LiteralExprAsMethodExpr1.jsp new file mode 100644 index 00000000..51e090ef --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/LiteralExprAsMethodExpr1.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/el_language.tld" %> + +begin + +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/LiteralExprAsMethodExpr2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/LiteralExprAsMethodExpr2.jsp new file mode 100644 index 00000000..94253bb8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/LiteralExprAsMethodExpr2.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/el_language.tld" %> + +begin + +end diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/LiteralExprEval1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/LiteralExprEval1.jsp new file mode 100644 index 00000000..6f3b1747 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/LiteralExprEval1.jsp @@ -0,0 +1,74 @@ +<%-- + + Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + jakarta.el.ValueExpression, + jakarta.el.ELContext"%> +<%@ page contentType="text/plain" %> + +<%! +private static final String LITERAL_EXPR = "foo"; +private static final String EXPECTED_VALUE = LITERAL_EXPR; +%> + +<% + if (pageContext != null) { + ELContext elContext = pageContext.getELContext(); + + if (elContext != null) { + JspApplicationContext jaContext = + JspFactory.getDefaultFactory().getJspApplicationContext( + pageContext.getServletContext()); + if (jaContext != null) { + + try { + + // parse the value expression + ValueExpression vexp = + jaContext.getExpressionFactory().createValueExpression( + elContext, LITERAL_EXPR, LITERAL_EXPR.getClass()); + + if (vexp != null) { + + Class expectedClass = vexp.getExpectedType(); + if (expectedClass != String.class) { + out.println("Test FAILED. Got type = " + expectedClass.getName()); + return; + } + String literalVal = (String) vexp.getValue(elContext); + if (!literalVal.equals(EXPECTED_VALUE)) { + out.println("Test FAILED. Got literalValue = " + literalVal); + return; + } + out.println("Test PASSED"); + } + else + out.println("Test FAILED. Null value returned for expression."); + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "CreateValueExpressionTest"); + } + } + else + out.println("Test FAILED. Unable to obtain JspApplicationContext"); + } + else + out.println("Test FAILED. Unable to obtain ELContext"); + } + else + out.println("Test FAILED. Unable to obtain PageContext."); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/LiteralExprEval2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/LiteralExprEval2.jsp new file mode 100644 index 00000000..9fbafd19 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/LiteralExprEval2.jsp @@ -0,0 +1,74 @@ +<%-- + + Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + jakarta.el.ValueExpression, + jakarta.el.ELContext"%> +<%@ page contentType="text/plain" %> + +<%! +private static final String LITERAL_EXPR = "true"; +private static final Boolean EXPECTED_VALUE = Boolean.TRUE; +%> + +<% + if (pageContext != null) { + ELContext elContext = pageContext.getELContext(); + + if (elContext != null) { + JspApplicationContext jaContext = + JspFactory.getDefaultFactory().getJspApplicationContext( + pageContext.getServletContext()); + if (jaContext != null) { + + try { + + // parse the value expression + ValueExpression vexp = + jaContext.getExpressionFactory().createValueExpression( + elContext, LITERAL_EXPR, EXPECTED_VALUE.getClass()); + + if (vexp != null) { + + Class expectedClass = vexp.getExpectedType(); + if (expectedClass != Boolean.class) { + out.println("Test FAILED. Got type = " + expectedClass.getName()); + return; + } + Boolean literalVal = (Boolean) vexp.getValue(elContext); + if (!literalVal.equals(EXPECTED_VALUE)) { + out.println("Test FAILED. Got literalValue = " + literalVal); + return; + } + out.println("Test PASSED"); + } + else + out.println("Test FAILED. Null value returned for expression."); + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "CreateValueExpressionTest"); + } + } + else + out.println("Test FAILED. Unable to obtain JspApplicationContext"); + } + else + out.println("Test FAILED. Unable to obtain ELContext"); + } + else + out.println("Test FAILED. Unable to obtain PageContext."); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/ParseOnceEvalMany.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/ParseOnceEvalMany.jsp new file mode 100644 index 00000000..e7dacccd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/ParseOnceEvalMany.jsp @@ -0,0 +1,79 @@ +<%-- + + Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + jakarta.el.ValueExpression, + jakarta.el.ELContext"%> +<%@ page contentType="text/plain" %> + +<%! +private static final String VARIABLE_EXPR = "${foo}"; +private static final String EXPECTED_VALUE = "bar"; +private static final int ITERATIONS = 5; +%> + +<% + if (pageContext != null) { + ELContext elContext = pageContext.getELContext(); + + if (elContext != null) { + JspApplicationContext jaContext = + JspFactory.getDefaultFactory().getJspApplicationContext( + pageContext.getServletContext()); + if (jaContext != null) { + + try { + + // parse the value expression + ValueExpression vexp = + jaContext.getExpressionFactory().createValueExpression( + elContext, VARIABLE_EXPR, VARIABLE_EXPR.getClass()); + + if (vexp != null) { + + // set a value for it and do a sanity check + out.println("Setting value for value expression"); + vexp.setValue(elContext, EXPECTED_VALUE); + for (int i = 1; i <= ITERATIONS; ++i) { + String name = (String) vexp.getValue(elContext); + if (!name.equals(EXPECTED_VALUE)) { + out.println("Test FAILED on iteration " + i); + out.println("Set value = " + EXPECTED_VALUE); + out.println("Got value = " + name); + return; + } + } + + out.println("Test PASSED"); + + } + else + out.println("Test FAILED. Null value returned for expression."); + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "CreateValueExpressionTest"); + } + } + else + out.println("Test FAILED. Unable to obtain JspApplicationContext"); + } + else + out.println("Test FAILED. Unable to obtain ELContext"); + } + else + out.println("Test FAILED. Unable to obtain PageContext."); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/PoundDollarSameMeaning.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/PoundDollarSameMeaning.jsp new file mode 100644 index 00000000..61242bfa --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/PoundDollarSameMeaning.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="test" uri="/WEB-INF/el_language.tld" %> + + + +begin
          + +end
          diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/RValueCoercion1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/RValueCoercion1.jsp new file mode 100644 index 00000000..a2caa431 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/RValueCoercion1.jsp @@ -0,0 +1,76 @@ +<%-- + + Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + jakarta.el.ValueExpression, + jakarta.el.ELContext"%> +<%@ page contentType="text/plain" %> + +<%! +private static final String VARIABLE_EXPR = "${foo}"; +private static final String EXPECTED_VALUE = "bar"; +%> + +<% + if (pageContext != null) { + ELContext elContext = pageContext.getELContext(); + + if (elContext != null) { + JspApplicationContext jaContext = + JspFactory.getDefaultFactory().getJspApplicationContext( + pageContext.getServletContext()); + if (jaContext != null) { + + try { + + // parse the value expression + ValueExpression vexp = + jaContext.getExpressionFactory().createValueExpression( + elContext, VARIABLE_EXPR, VARIABLE_EXPR.getClass()); + + if (vexp != null) { + + // set a value for it + out.println("Setting value for value expression"); + vexp.setValue(elContext, EXPECTED_VALUE); + + Class expectedClass = vexp.getExpectedType(); + Object obj = vexp.getValue(elContext); + + if (!(expectedClass.isInstance(obj))) { + out.println("Test FAILED. Expected type = " + expectedClass.getName()); + out.println("Got type = " + obj.getClass().getName()); + } + + out.println("Test PASSED"); + } + else + out.println("Test FAILED. Null value returned for expression."); + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "CreateValueExpressionTest"); + } + } + else + out.println("Test FAILED. Unable to obtain JspApplicationContext"); + } + else + out.println("Test FAILED. Unable to obtain ELContext"); + } + else + out.println("Test FAILED. Unable to obtain PageContext."); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/RValueCoercion2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/RValueCoercion2.jsp new file mode 100644 index 00000000..a5ff0167 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/RValueCoercion2.jsp @@ -0,0 +1,79 @@ +<%-- + + Copyright (c) 2005, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page import="ee.jakarta.tck.pages.common.util.JspTestUtil, + com.sun.ts.tests.common.el.spec.Book, + jakarta.el.ValueExpression, + jakarta.el.ELContext"%> +<%@ page contentType="text/plain" %> + +<%! +private static final String VARIABLE_EXPR = "${javabook}"; +private static final String EXPECTED_VALUE = "The Java Programming Language"; +%> + +<% + if (pageContext != null) { + ELContext elContext = pageContext.getELContext(); + + if (elContext != null) { + JspApplicationContext jaContext = + JspFactory.getDefaultFactory().getJspApplicationContext( + pageContext.getServletContext()); + if (jaContext != null) { + + try { + + // parse the value expression + ValueExpression vexp = + jaContext.getExpressionFactory().createValueExpression( + elContext, VARIABLE_EXPR, VARIABLE_EXPR.getClass()); + + if (vexp != null) { + + // set a value for it + out.println("Setting value for value expression"); + vexp.setValue(elContext, + new Book(EXPECTED_VALUE, "Arnold and Gosling", + "Addison Wesley", 1996)); + + Class expectedClass = vexp.getExpectedType(); + Object obj = vexp.getValue(elContext); + + if (!(expectedClass.isInstance(obj))) { + out.println("Test FAILED. Expected type = " + expectedClass.getName()); + out.println("Got type = " + obj.getClass().getName()); + } + + out.println("Test PASSED"); + } + else + out.println("Test FAILED. Null value returned for expression."); + } catch (Throwable t) { + JspTestUtil.handleThrowable(t, out, "CreateValueExpressionTest"); + } + } + else + out.println("Test FAILED. Unable to obtain JspApplicationContext"); + } + else + out.println("Test FAILED. Unable to obtain ELContext"); + } + else + out.println("Test FAILED. Unable to obtain PageContext."); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/WEB-INF/el_language.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/WEB-INF/el_language.tld new file mode 100644 index 00000000..aa065051 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/WEB-INF/el_language.tld @@ -0,0 +1,92 @@ + + + + + + 1.0 + Language + + PoundDollarSameMeaning test + PoundDollarSameMeaningTag + ee.jakarta.tck.pages.spec.el.language.PoundDollarSameMeaningTag + empty + + dollarExpr + true + true + java.lang.String + + + poundExpr + true + + java.lang.String + + + + + LiteralExprAsMethodExpr1 test + MethodStringLiteralTag + ee.jakarta.tck.pages.spec.el.language.MethodStringLiteralTag + empty + + literalMethExpr + true + + java.lang.String name() + + + + + LiteralExprAsMethodExpr2 test + MethodIntegerLiteralTag + ee.jakarta.tck.pages.spec.el.language.MethodIntegerLiteralTag + empty + + literalMethExpr + true + + java.lang.Integer name() + + + + + Substitute tag for jstl c:set + set + ee.jakarta.tck.pages.common.tags.tck.SetTag + empty + + var + true + + + value + true + true + + + + count + ee.jakarta.tck.pages.spec.el.language.Count + int count() + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/jsp_el_language_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/jsp_el_language_web.xml new file mode 100644 index 00000000..b8bdf934 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/el/language/jsp_el_language_web.xml @@ -0,0 +1,25 @@ + + + + + JspElLanguage + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NBadTagPageEncoding.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NBadTagPageEncoding.jsp new file mode 100644 index 00000000..3fa628b1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NBadTagPageEncoding.jsp @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NContTypeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NContTypeTest.jsp new file mode 100644 index 00000000..c565e20d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NContTypeTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain; charset=ISO-8859-15" %> + +${'Test PASSED'} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NIncludedContentTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NIncludedContentTest.jsp new file mode 100644 index 00000000..9d815884 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NIncludedContentTest.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page pageEncoding="ISO-8859-1" %> +<% pageContext.setAttribute("testPassed", "Test PASSED"); %> +<%@ page contentType="text/plain" %> +<%@ include file="inclusion_iso.txt" %> +${testPassed} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NIncludedContentTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NIncludedContentTest.jspx new file mode 100644 index 00000000..29cee83b Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NIncludedContentTest.jspx differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NNoPageEncNoContTypeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NNoPageEncNoContTypeTest.jsp new file mode 100644 index 00000000..12f5228b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NNoPageEncNoContTypeTest.jsp @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +${'Test PASSED'} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NPageEncContTypeTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NPageEncContTypeTest.jsp new file mode 100644 index 00000000..0382bfd1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NPageEncContTypeTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page pageEncoding="ISO-8859-15" contentType="text/plain; charset=ISO-8859-1" %> + +${'Test PASSED'} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NPageEncTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NPageEncTest.jsp new file mode 100644 index 00000000..1c9270aa --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NPageEncTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page pageEncoding="ISO-8859-15" %> + +${'Test PASSED'} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NUnsupportedEncodingTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NUnsupportedEncodingTest.jsp new file mode 100644 index 00000000..83ff6d41 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NUnsupportedEncodingTest.jsp @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" pageEncoding="UTF-3.14"%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NUnsupportedEncodingTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NUnsupportedEncodingTest.jspx new file mode 100644 index 00000000..d08e2018 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NUnsupportedEncodingTest.jspx @@ -0,0 +1,21 @@ + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NXmlPrologNonMatchingDirectiveTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NXmlPrologNonMatchingDirectiveTest.jspx new file mode 100644 index 00000000..eedc9bca --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NXmlPrologNonMatchingDirectiveTest.jspx @@ -0,0 +1,23 @@ + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NXmlPrologNonMatchingPropertyGroupTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NXmlPrologNonMatchingPropertyGroupTest.jspx new file mode 100644 index 00000000..d77ba2a2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/I18NXmlPrologNonMatchingPropertyGroupTest.jspx @@ -0,0 +1,21 @@ + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/WEB-INF/tags/BadTagPageEncoding.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/WEB-INF/tags/BadTagPageEncoding.tag new file mode 100644 index 00000000..ef8f438c Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/WEB-INF/tags/BadTagPageEncoding.tag differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF16BE.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF16BE.jsp new file mode 100644 index 00000000..63c1e1ea Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF16BE.jsp differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF16BadPageEncodingAttribute.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF16BadPageEncodingAttribute.jsp new file mode 100644 index 00000000..b44cb540 Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF16BadPageEncodingAttribute.jsp differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF16ConfigElement.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF16ConfigElement.jsp new file mode 100644 index 00000000..63c1e1ea Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF16ConfigElement.jsp differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF16LE.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF16LE.jsp new file mode 100644 index 00000000..044f443e Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF16LE.jsp differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF16PageEncodingAttribute.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF16PageEncodingAttribute.jsp new file mode 100644 index 00000000..f4fa2e24 Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF16PageEncodingAttribute.jsp differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF8.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF8.jsp new file mode 100644 index 00000000..27a9669d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF8.jsp @@ -0,0 +1,18 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> +this is a test diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF8ConfigElement.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF8ConfigElement.jsp new file mode 100644 index 00000000..27a9669d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/bom/UTF8ConfigElement.jsp @@ -0,0 +1,18 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> +this is a test diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/inclusion_iso.txt b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/inclusion_iso.txt new file mode 100644 index 00000000..81f0945b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/inclusion_iso.txt @@ -0,0 +1 @@ +Included Content diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/inclusion_utf-16LE.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/inclusion_utf-16LE.jspx new file mode 100644 index 00000000..dbf1f2a0 Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/inclusion_utf-16LE.jspx differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/jsp_i18n_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/jsp_i18n_web.xml new file mode 100644 index 00000000..9804b5ab --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/jsp_i18n_web.xml @@ -0,0 +1,40 @@ + + + + + JspInternationalization + + 5 + + + + /I18NXmlPrologNonMatchingPropertyGroupTest.jspx + UTF-16 + true + + + /bom/UTF16ConfigElement.jsp + UTF-16 + + + /bom/UTF8ConfigElement.jsp + UTF-16 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/noprolog/I18NContTypeTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/noprolog/I18NContTypeTest.jspx new file mode 100644 index 00000000..07fb89e8 Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/noprolog/I18NContTypeTest.jspx differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/noprolog/I18NNoPageEncNoContTypeTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/noprolog/I18NNoPageEncNoContTypeTest.jspx new file mode 100644 index 00000000..ed80b1c7 Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/noprolog/I18NNoPageEncNoContTypeTest.jspx differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/noprolog/I18NPageEncContTypeTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/noprolog/I18NPageEncContTypeTest.jspx new file mode 100644 index 00000000..0c7e0a09 Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/noprolog/I18NPageEncContTypeTest.jspx differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/noprolog/I18NPageEncTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/noprolog/I18NPageEncTest.jspx new file mode 100644 index 00000000..53841902 Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/noprolog/I18NPageEncTest.jspx differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/prolog/I18NContTypeTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/prolog/I18NContTypeTest.jspx new file mode 100644 index 00000000..70ac1288 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/prolog/I18NContTypeTest.jspx @@ -0,0 +1 @@ +Lo§”“@¥…™¢‰–•~ñKð@…•ƒ–„‰•‡~ÉÂÔø÷ñonLO``@@@Ö—¨™‰‡ˆ£@òððò@⤕@Ô‰ƒ™–¢¨¢£…”¢k@É•ƒK@@Á““@™‰‡ˆ£¢@™…¢…™¥…„K@@@âäÕ@×ÙÖ×ÙÉÅãÁÙèaÃÖÕÆÉÄÅÕãÉÁÓK@@䢅@‰¢@¢¤‚‘…ƒ£@“‰ƒ…•¢…@£…™”¢K``nL™––£@§”“•¢z‘¢—~ˆ££—zaa‘¥K¢¤•Kƒ–”aÑâ×aׇ…n@@@@L‘¢—z„‰™…ƒ£‰¥…K—‡…@ƒ–•£…•£ã¨—…~£…§£a—“‰•^@ƒˆ™¢…£~ÉâÖ`øøõù`ñ@an@@@@L‘¢—z¢ƒ™‰—£“…£n@@@@@@@@LO®ÃÄÁãÁ®—‡…Ö•£…§£K¢…£Á££™‰‚¤£…M£…¢£×¢¢…„k@ã…¢£@×ÁââÅÄ]^žžn@@@@La‘¢—z¢ƒ™‰—£“…£n@@@@L™…¢¤“£n[Ž£…¢£×¢¢…„œLa™…¢¤“£nLa™––£n \ No newline at end of file diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/prolog/I18NNoPageEncNoContTypeTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/prolog/I18NNoPageEncNoContTypeTest.jspx new file mode 100644 index 00000000..7eb3f38e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/prolog/I18NNoPageEncNoContTypeTest.jspx @@ -0,0 +1 @@ +Lo§”“@¥…™¢‰–•~ñKð@…•ƒ–„‰•‡~ÉÂÔõððonLO``@@@Ö—¨™‰‡ˆ£@òððò@⤕@Ô‰ƒ™–¢¨¢£…”¢k@É•ƒK@@Á““@™‰‡ˆ£¢@™…¢…™¥…„K@@@âäÕ@×ÙÖ×ÙÉÅãÁÙèaÃÖÕÆÉÄÅÕãÉÁÓK@@䢅@‰¢@¢¤‚‘…ƒ£@“‰ƒ…•¢…@£…™”¢K``nL™––£n@@@@L‘¢—z¢ƒ™‰—£“…£@§”“•¢z‘¢—~ˆ££—zaa‘¥K¢¤•Kƒ–”aÑâ×aׇ…n@@@@@@@@LOJÃÄÁãÁJ—‡…Ö•£…§£K¢…£Á££™‰‚¤£…M£…¢£×¢¢…„k@ã…¢£@×ÁââÅÄ]^ZZn@@@@La‘¢—z¢ƒ™‰—£“…£n@@@@L™…¢¤“£n[À£…¢£×¢¢…„ÐLa™…¢¤“£nLa™––£n \ No newline at end of file diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/prolog/I18NPageEncContTypeTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/prolog/I18NPageEncContTypeTest.jspx new file mode 100644 index 00000000..b540106c Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/prolog/I18NPageEncContTypeTest.jspx differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/prolog/I18NPageEncTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/prolog/I18NPageEncTest.jspx new file mode 100644 index 00000000..d01eae3d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/i18n/prolog/I18NPageEncTest.jspx @@ -0,0 +1 @@ +Lo§”“@¥…™¢‰–•~ñKð@…•ƒ–„‰•‡~ÉÂÔø÷ñonLO``@@@Ö—¨™‰‡ˆ£@òððò@⤕@Ô‰ƒ™–¢¨¢£…”¢k@É•ƒK@@Á““@™‰‡ˆ£¢@™…¢…™¥…„K@@@âäÕ@×ÙÖ×ÙÉÅãÁÙèaÃÖÕÆÉÄÅÕãÉÁÓK@@䢅@‰¢@¢¤‚‘…ƒ£@“‰ƒ…•¢…@£…™”¢K``nL™––£@§”“•¢z‘¢—~ˆ££—zaa‘¥K¢¤•Kƒ–”aÑâ×aׇ…n@@@@L‘¢—z„‰™…ƒ£‰¥…K—‡…@—‡…Å•ƒ–„‰•‡~ÉÂÔø÷ñ@an@@@@L‘¢—z¢ƒ™‰—£“…£n@@@@@@@@LO®ÃÄÁãÁ®—‡…Ö•£…§£K¢…£Á££™‰‚¤£…M£…¢£×¢¢…„k@ã…¢£@×ÁââÅÄ]^žžn@@@@La‘¢—z¢ƒ™‰—£“…£n@@@@L™…¢¤“£n[Ž£…¢£×¢¢…„œLa™…¢¤“£nLa™––£n \ No newline at end of file diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/directiveIncludeInJspPage.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/directiveIncludeInJspPage.jsp new file mode 100644 index 00000000..8bd66c87 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/directiveIncludeInJspPage.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%-- use jsp:directive.include within a jsp page. +--%> + + + ONE + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/directiveIncludeLocation.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/directiveIncludeLocation.jspx new file mode 100644 index 00000000..b18c6729 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/directiveIncludeLocation.jspx @@ -0,0 +1,33 @@ + + + + + + + +

          + + ONE + + TWO + +

          + +
          diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/directivePageInJspPage.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/directivePageInJspPage.jsp new file mode 100644 index 00000000..12d857ec --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/directivePageInJspPage.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%-- use jsp:directive.page within a jsp page. +--%> + + + + <% + List list = new ArrayList(); + list.add("a"); + list.add("b"); + out.println("listSize" + list.size()); + %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/included.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/included.jsp new file mode 100644 index 00000000..2b9060cb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/included.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%-- included by directiveIncludeInJspPage.jsp +--%> +HELLO diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/included.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/included.jspx new file mode 100644 index 00000000..886fc3b5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/included.jspx @@ -0,0 +1,21 @@ + + + +HELLO diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/jspRootPrefix.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/jspRootPrefix.jspx new file mode 100644 index 00000000..d8311fce --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/jspRootPrefix.jspx @@ -0,0 +1,27 @@ + + + + + + + + Test PASSED. + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/jsp_jspdocument_elements_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/jsp_jspdocument_elements_web.xml new file mode 100644 index 00000000..ccbb8ea1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/jsp_jspdocument_elements_web.xml @@ -0,0 +1,32 @@ + + + + + jsp_jspdocument_elements + + 5 + + + + identify a jsp as not a jsp document + /notJspDocument.jspx + false + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/negativeJspRoot.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/negativeJspRoot.jspx new file mode 100644 index 00000000..7e92e522 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/negativeJspRoot.jspx @@ -0,0 +1,28 @@ + + + + + + + + this is body content + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/notJspDocument.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/notJspDocument.jspx new file mode 100644 index 00000000..04ae124f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/notJspDocument.jspx @@ -0,0 +1,27 @@ + + + + + + + this is body content + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/scripting.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/scripting.jspx new file mode 100644 index 00000000..09ec2dbe --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/scripting.jspx @@ -0,0 +1,36 @@ + + + + + + + + + + + sectionNumber is + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/scriptingInJspPage.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/scriptingInJspPage.jsp new file mode 100644 index 00000000..5ffbe5cc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/elements/scriptingInJspPage.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%-- use jsp:declaration, jsp:scriptlet, and jsp:expression in a jsp page +--%> + + + public String getSectionTitle() { return "JSP637"; } + + + out.println(getSectionTitle()); + + sectionNumber is 100 - 1 + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/WEB-INF/tagdep.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/WEB-INF/tagdep.tld new file mode 100644 index 00000000..2f63a9dc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/WEB-INF/tagdep.tld @@ -0,0 +1,41 @@ + + + + + 1.0 + tagdep + + echo + ee.jakarta.tck.pages.spec.jspdocument.general.EchoTag + tagdependent + + echo + false + true + + + static + false + false + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/identifyByConfig.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/identifyByConfig.jsp new file mode 100644 index 00000000..c9c4f4ab --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/identifyByConfig.jsp @@ -0,0 +1,26 @@ + + + + + + + Test PASSED. + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/identifyByExtension.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/identifyByExtension.jspx new file mode 100644 index 00000000..6515bb5f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/identifyByExtension.jspx @@ -0,0 +1,27 @@ + + + + + + + + Test PASSED. + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/identifyByJspRoot.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/identifyByJspRoot.jsp new file mode 100644 index 00000000..9a7a3992 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/identifyByJspRoot.jsp @@ -0,0 +1,31 @@ + + + + + + + + Test PASSED. + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/invalidPlainURI.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/invalidPlainURI.jsp new file mode 100644 index 00000000..4bf7c5ab --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/invalidPlainURI.jsp @@ -0,0 +1,30 @@ + + + + + + + + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/jsp_jspdocument_general_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/jsp_jspdocument_general_web.xml new file mode 100644 index 00000000..84353015 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/jsp_jspdocument_general_web.xml @@ -0,0 +1,45 @@ + + + + + jsp_jspdocument_general + + identifyByJspRoot + /identifyByJspRoot.jsp + + + 5 + + + + http://java.sun.com/tck/jsp/tagdep + /WEB-INF/tagdep.tld + + + identify a jsp as jsp document + /identifyByConfig.jsp + true + + + group for identifyByExtension.jspx + /identifyByExtension.jspx + UTF-8 + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/negativeDTDValidation.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/negativeDTDValidation.jspx new file mode 100644 index 00000000..9b6dfe85 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/negativeDTDValidation.jspx @@ -0,0 +1,31 @@ + + + + + + + +] > + + + This document is invalid because c is missing + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/negativeWellFormedness.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/negativeWellFormedness.jspx new file mode 100644 index 00000000..a33c2139 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/negativeWellFormedness.jspx @@ -0,0 +1,28 @@ + + + + + + + negativeWellFormedness + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/tagDependentTest.jspx b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/tagDependentTest.jspx new file mode 100644 index 00000000..e968b6f3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/jspdocument/general/tagDependentTest.jspx @@ -0,0 +1,47 @@ + + + + + + + + pageContext.setAttribute("eval", "evaluated", PageContext.PAGE_SCOPE); + + + + START ${pageScope.eval} + out.println("scriptlet"); + + + + use jsp:body + + ${3 * 6} + ATT2 + + START ${pageScope.eval} + out.println("scriptlet"); + + + + + END ${9 * 8} + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/misc/precompilation/jsp_misc_precompilation_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/misc/precompilation/jsp_misc_precompilation_web.xml new file mode 100644 index 00000000..dbc493da --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/misc/precompilation/jsp_misc_precompilation_web.xml @@ -0,0 +1,25 @@ + + + + + JspMiscPrecompile + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/misc/precompilation/precompile.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/misc/precompilation/precompile.jsp new file mode 100644 index 00000000..2adac081 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/misc/precompilation/precompile.jsp @@ -0,0 +1,44 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +Precompilation Test + +<% /** Name:Precompilation + Description: Checks if the request is actually delivered + to this page or not if the request + parameter jsp_precompile is either not set + or set to "true". + + Result: Will send the message "Got The request" + if the jsp_precompile="false" + + +**/ %> + +Got the request....The test parameter is +<%! String test; %> + +<% + test=request.getParameter("test"); + if(test==null) //just to remove the dependency on Java + test="null" ; +%> +<%=test %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/defaultFragment.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/defaultFragment.tag new file mode 100644 index 00000000..8340110d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/defaultFragment.tag @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" required="true" %> +<% + Object o = jspContext.getAttribute("x", PageContext.PAGE_SCOPE); + if(o instanceof jakarta.servlet.jsp.tagext.JspFragment) { + out.println("Test FAILED. attr x is a fragment type."); + } else if(o instanceof java.lang.String) { + out.println("Test PASSED. attr x is of type java.lang.String."); + } else { + out.println("Test FAILED. attr x is " + o); + } +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/defaultRequired.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/defaultRequired.tag new file mode 100644 index 00000000..f2e33237 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/defaultRequired.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" %> +Test PASSED. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/defaultRtexprvalue.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/defaultRtexprvalue.tag new file mode 100644 index 00000000..15c11940 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/defaultRtexprvalue.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" %> +${x} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/defaultType.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/defaultType.tag new file mode 100644 index 00000000..e6650587 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/defaultType.tag @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" %> +<%@ attribute name="y" type="java.lang.Float" %> +<% + Object ox = jspContext.getAttribute("x"); + Object oy = jspContext.getAttribute("y"); + if(ox instanceof java.lang.String) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. x is not of type java.lang.String"); + } + if(oy instanceof java.lang.Float) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. y is not of type java.lang.Float"); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/deferredMethodMinimumJspVersion.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/deferredMethodMinimumJspVersion.tag new file mode 100644 index 00000000..4cc85df4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/deferredMethodMinimumJspVersion.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" deferredMethod="true" %> +<% out.println("Test FAILED:"); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/deferredMethodSignatureMinimumJspVersion.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/deferredMethodSignatureMinimumJspVersion.tag new file mode 100644 index 00000000..8a268d7c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/deferredMethodSignatureMinimumJspVersion.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" deferredMethodSignature="void noop()" %> +<% out.println("Test FAILED:"); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/deferredValueMinimumJspVersion.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/deferredValueMinimumJspVersion.tag new file mode 100644 index 00000000..89a16286 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/deferredValueMinimumJspVersion.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" deferredValue="true" %> +<% out.println("Test FAILED:"); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/deferredValueTypeMinimumJspVersion.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/deferredValueTypeMinimumJspVersion.tag new file mode 100644 index 00000000..7589691d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/deferredValueTypeMinimumJspVersion.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" deferredValueType="java.lang.String" %> +<% out.println("Test FAILED:"); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeFragmentRtexprvalue.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeFragmentRtexprvalue.tag new file mode 100644 index 00000000..2d868b17 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeFragmentRtexprvalue.tag @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" + rtexprvalue="false" + fragment="true" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeFragmentType.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeFragmentType.tag new file mode 100644 index 00000000..7324c7da --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeFragmentType.tag @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" + type="java.lang.Integer" + fragment="true" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName1.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName1.tag new file mode 100644 index 00000000..de4173eb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName1.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" %> +<%@ attribute name="x" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName1Include.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName1Include.tag new file mode 100644 index 00000000..d5ddc8da --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName1Include.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ include file="negativeName1Include.tagf" %> +<%@ attribute name="x" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName1Include.tagf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName1Include.tagf new file mode 100644 index 00000000..42da2e54 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName1Include.tagf @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName2.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName2.tag new file mode 100644 index 00000000..2bae34e2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName2.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" %> +<%@ variable name-given="x" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName2Include.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName2Include.tag new file mode 100644 index 00000000..0a2f159e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName2Include.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ include file="negativeName2Include.tagf" %> +<%@ attribute name="x" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName2Include.tagf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName2Include.tagf new file mode 100644 index 00000000..ba1dec99 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName2Include.tagf @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ variable name-given="x" %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName3.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName3.tag new file mode 100644 index 00000000..e7dd57a1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName3.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" %> +<%@ tag dynamic-attributes="x" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName3Include.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName3Include.tag new file mode 100644 index 00000000..07581642 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName3Include.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ include file="negativeName3Include.tagf" %> +<%@ attribute name="x" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName3Include.tagf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName3Include.tagf new file mode 100644 index 00000000..65d8734b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeName3Include.tagf @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag dynamic-attributes="x" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeType.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeType.tag new file mode 100644 index 00000000..a1a530b9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/WEB-INF/tags/negativeType.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" type="double" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/defaultFragment.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/defaultFragment.jsp new file mode 100644 index 00000000..c5a48661 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/defaultFragment.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<%-- +fragment defaults to fasle. +--%> + + + xvalue + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/defaultRequired.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/defaultRequired.jsp new file mode 100644 index 00000000..e47a4ad6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/defaultRequired.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<%-- +whether this attribute is required or not. Defaults to false +x attribute is not specified. +--%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/defaultRtexprvalue.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/defaultRtexprvalue.jsp new file mode 100644 index 00000000..a6ac304c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/defaultRtexprvalue.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<%! String msg = "Test PASSED."; %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/defaultType.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/defaultType.jsp new file mode 100644 index 00000000..4850051b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/defaultType.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<%-- +type defaults to java.lang.String. y is declared to be java.lang.Float +--%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/deferredMethodMinimumJspVersion.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/deferredMethodMinimumJspVersion.jsp new file mode 100644 index 00000000..47556879 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/deferredMethodMinimumJspVersion.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/deferredMethodSignatureMinimumJspVersion.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/deferredMethodSignatureMinimumJspVersion.jsp new file mode 100644 index 00000000..59c573f2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/deferredMethodSignatureMinimumJspVersion.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/deferredValueMinimumJspVersion.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/deferredValueMinimumJspVersion.jsp new file mode 100644 index 00000000..a2523e4a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/deferredValueMinimumJspVersion.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/deferredValueTypeMinimumJspVersion.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/deferredValueTypeMinimumJspVersion.jsp new file mode 100644 index 00000000..de52b7c3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/deferredValueTypeMinimumJspVersion.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/jsp_tagfile_directives_attribute20_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/jsp_tagfile_directives_attribute20_web.xml new file mode 100644 index 00000000..6ad0aa4c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/jsp_tagfile_directives_attribute20_web.xml @@ -0,0 +1,25 @@ + + + + + JspTagfileDirectivesAttribute20 + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeFragmentRtexprvalue.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeFragmentRtexprvalue.jsp new file mode 100644 index 00000000..76a3e9ce --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeFragmentRtexprvalue.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<%-- + translation error must result if fragment is true and + rtexprvalue is specified. +--%> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeFragmentType.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeFragmentType.jsp new file mode 100644 index 00000000..fd417b6e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeFragmentType.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<%-- +A translation error must result if fragment is true and type is +specified. +--%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeName1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeName1.jsp new file mode 100644 index 00000000..34865956 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeName1.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<%-- + A translation error must result if more than one attribute +directive appears in the same translation unit with the same +name +--%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeName1Include.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeName1Include.jsp new file mode 100644 index 00000000..1160c1b6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeName1Include.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<%-- + A translation error must result if more than one attribute +directive appears in the same translation unit with the same +name +--%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeName2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeName2.jsp new file mode 100644 index 00000000..4cbbf2fa --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeName2.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<%-- + A translation error must result if more than one attribute +directive appears in the same translation unit with the same +name +--%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeName2Include.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeName2Include.jsp new file mode 100644 index 00000000..bd1c54c4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeName2Include.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeName3.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeName3.jsp new file mode 100644 index 00000000..3faf8951 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeName3.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeName3Include.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeName3Include.jsp new file mode 100644 index 00000000..24f501d5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeName3Include.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeType.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeType.jsp new file mode 100644 index 00000000..97fb98ce --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute20/negativeType.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<%-- +It is a translation error to specify a primitive type. +--%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/bothDeferredMethodAndSignature.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/bothDeferredMethodAndSignature.tag new file mode 100644 index 00000000..7978371b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/bothDeferredMethodAndSignature.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" deferredMethod="false" deferredMethodSignature="boolean add(Object)" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/bothDeferredValueTypeAndDeferredValue.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/bothDeferredValueTypeAndDeferredValue.tag new file mode 100644 index 00000000..a19a7bd2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/bothDeferredValueTypeAndDeferredValue.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" deferredValue="false" deferredValueType="java.lang.String" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/defaultDeferredMethod1.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/defaultDeferredMethod1.tag new file mode 100644 index 00000000..ac9d616f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/defaultDeferredMethod1.tag @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag import="jakarta.el.MethodExpression" %> +<%@ attribute name="x" deferredMethodSignature="boolean add(Object)" %> +<% + Object o = jspContext.getAttribute("x"); + if (o instanceof MethodExpression) + out.println("Test PASSED."); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/defaultDeferredMethod2.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/defaultDeferredMethod2.tag new file mode 100644 index 00000000..0c261e30 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/defaultDeferredMethod2.tag @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag import="jakarta.el.MethodExpression" %> +<%@ attribute name="x" %> +<% + Object o = jspContext.getAttribute("x"); + if (o instanceof MethodExpression) + out.println("Test FAILED."); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/defaultDeferredMethodSignature.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/defaultDeferredMethodSignature.tag new file mode 100644 index 00000000..1f94e523 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/defaultDeferredMethodSignature.tag @@ -0,0 +1,54 @@ +<%-- + + Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag import="jakarta.el.ELContext" %> +<%@ tag import="jakarta.el.MethodExpression" %> +<%@ tag import="jakarta.el.MethodInfo" %> + +<%@ attribute name="x" deferredMethod="true" %> +<% + Object o = jspContext.getAttribute("x"); + if (!(o instanceof MethodExpression)) + out.println("Test FAILED. MethodExpression not found."); + else { + ELContext elContext = jspContext.getELContext(); + MethodInfo minfo = ((MethodExpression) o).getMethodInfo(elContext); + + String methodName = minfo.getName(); + if (!"clear".equals(methodName)) { + out.println("Test FAILED. Method name should be clear, "); + out.println("instead found " + methodName); + } else { + String returnType = minfo.getReturnType().getName(); + if (!"void".equals(returnType)) { + out.println("Test FAILED. Return type should be void, "); + out.println("instead found " + returnType); + + } else { + Class[] paramTypes = minfo.getParamTypes(); + int numParams = paramTypes.length; + if (numParams != 0) { + out.println("Test FAILED. Number of parameters should be 0, "); + out.println("instead found " + returnType); + } else { + out.println("Test PASSED."); + } + } + } + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/defaultDeferredValue1.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/defaultDeferredValue1.tag new file mode 100644 index 00000000..093d07f5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/defaultDeferredValue1.tag @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag import="jakarta.el.ValueExpression" %> +<%@ attribute name="x" deferredValueType="java.lang.String" %> +<% + Object o = jspContext.getAttribute("x"); + if (o instanceof ValueExpression) + out.println("Test PASSED."); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/defaultDeferredValue2.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/defaultDeferredValue2.tag new file mode 100644 index 00000000..a6c2e2c1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/defaultDeferredValue2.tag @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag import="jakarta.el.ValueExpression" %> +<%@ attribute name="x" %> +<% + Object o = jspContext.getAttribute("x"); + if (o instanceof ValueExpression) + out.println("Test FAILED."); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/deferredValueTypeNotSpecified.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/deferredValueTypeNotSpecified.tag new file mode 100644 index 00000000..24b1e799 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/deferredValueTypeNotSpecified.tag @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag import="jakarta.el.ELContext" %> +<%@ tag import="jakarta.el.ValueExpression" %> + +<%@ attribute name="x" deferredValue="true" %> +<% + ELContext elContext = jspContext.getELContext(); + ValueExpression vexp = + elContext.getVariableMapper().resolveVariable("x"); + Object o = vexp.getValue(elContext); + out.println("Test PASSED."); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/implicit.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/implicit.tld new file mode 100644 index 00000000..22981b00 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/implicit.tld @@ -0,0 +1,27 @@ + + + + + + 1.0 + implicit + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/onlyOneOfDeferredValueOrDeferredMethod.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/onlyOneOfDeferredValueOrDeferredMethod.tag new file mode 100644 index 00000000..b7d9dbd0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/WEB-INF/tags/onlyOneOfDeferredValueOrDeferredMethod.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" deferredValue="true" deferredMethod="true" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/bothDeferredMethodAndSignature.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/bothDeferredMethodAndSignature.jsp new file mode 100644 index 00000000..056fcfea --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/bothDeferredMethodAndSignature.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<%-- +If the deferredMethodSignature and the deferredMethod attributes +are both present in the same tag, deferredMethod must be true. +--%> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/bothDeferredValueTypeAndDeferredValue.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/bothDeferredValueTypeAndDeferredValue.jsp new file mode 100644 index 00000000..a25cd183 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/bothDeferredValueTypeAndDeferredValue.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<%-- +If the deferredValueType and the deferredValue attributes +are both present in the same tag, deferredValue must be true. +--%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/defaultDeferredMethod1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/defaultDeferredMethod1.jsp new file mode 100644 index 00000000..57ee8d4c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/defaultDeferredMethod1.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/defaultDeferredMethod2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/defaultDeferredMethod2.jsp new file mode 100644 index 00000000..dd489fa5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/defaultDeferredMethod2.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/defaultDeferredMethodSignature.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/defaultDeferredMethodSignature.jsp new file mode 100644 index 00000000..e8bbe542 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/defaultDeferredMethodSignature.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<% + java.util.Vector vect = new java.util.Vector(); + pageContext.setAttribute("vect", vect, pageContext.APPLICATION_SCOPE); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/defaultDeferredValue1.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/defaultDeferredValue1.jsp new file mode 100644 index 00000000..0f722705 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/defaultDeferredValue1.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/defaultDeferredValue2.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/defaultDeferredValue2.jsp new file mode 100644 index 00000000..ee9879e9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/defaultDeferredValue2.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/deferredValueTypeNotSpecified.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/deferredValueTypeNotSpecified.jsp new file mode 100644 index 00000000..5af3a9ac --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/deferredValueTypeNotSpecified.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<% pageContext.setAttribute("foo", "bar", PageContext.APPLICATION_SCOPE); %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/jsp_tagfile_directives_attribute21_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/jsp_tagfile_directives_attribute21_web.xml new file mode 100644 index 00000000..b33abc84 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/jsp_tagfile_directives_attribute21_web.xml @@ -0,0 +1,25 @@ + + + + + JspTagfileDirectivesAttribute + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/onlyOneOfDeferredValueOrDeferredMethod.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/onlyOneOfDeferredValueOrDeferredMethod.jsp new file mode 100644 index 00000000..621462e3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/attribute21/onlyOneOfDeferredValueOrDeferredMethod.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<%-- +Only one of the deferredValue or the deferredMethod attributes +may be true. +--%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/ErrorOnELNotFoundFalse.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/ErrorOnELNotFoundFalse.jsp new file mode 100644 index 00000000..816f5fc3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/ErrorOnELNotFoundFalse.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2021 Contributors to the Eclipse Foundation. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%-- +Set the ErrorOnELNotFound tag directive attribute to false. Verify that +referencing an unknown identifier does not trigger a +PropertyNotFoundException +--%> + +<%-- invoke the tag --%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/ErrorOnELNotFoundTrue.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/ErrorOnELNotFoundTrue.jsp new file mode 100644 index 00000000..905fc6f9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/ErrorOnELNotFoundTrue.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2021 Contributors to the Eclipse Foundation. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%-- +Set the ErrorOnELNotFound tag directive attribute to true. Verify that +referencing an unknown identifier triggers a PropertyNotFoundException +--%> + +<%-- invoke the tag --%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/ErrorOnELNotFoundFalse.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/ErrorOnELNotFoundFalse.tag new file mode 100644 index 00000000..d939d5a4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/ErrorOnELNotFoundFalse.tag @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2021 Contributors to the Eclipse Foundation. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : ErrorOnELNotFOundFalse + Description : Verify that when the ErrorOnELNotFound tag directive + attribute is set to false, referencing an unknown + identifier does not trigger a + ProeprtyNotFoundException +**/ %> + +<%@ tag errorOnELNotFound="false" %> + +${notfound} \ No newline at end of file diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/ErrorOnELNotFoundTrue.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/ErrorOnELNotFoundTrue.tag new file mode 100644 index 00000000..7197bffc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/ErrorOnELNotFoundTrue.tag @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2021 Contributors to the Eclipse Foundation. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : ErrorOnELNotFOundFalse + Description : Verify that when the ErrorOnELNotFound tag directive + attribute is set to true, referencing an unknown + identifier triggers a ProeprtyNotFoundException +**/ %> + +<%@ tag errorOnELNotFound="true" %> + +${notfound} \ No newline at end of file diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/include/negativeInclude.tagf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/include/negativeInclude.tagf new file mode 100644 index 00000000..d2e9ffd3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/include/negativeInclude.tagf @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" required="false" %> +<%@ variable name-given="y" %> +<%@ page language="java" %> +This tag fragment file contains a invalid page directive. + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/include/positiveIncludePageRelative.tagf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/include/positiveIncludePageRelative.tagf new file mode 100644 index 00000000..32918a65 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/include/positiveIncludePageRelative.tagf @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" required="false" %> +<%@ variable name-given="y" %> +Test PASSED. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/invoke/positiveTaglibInvokee.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/invoke/positiveTaglibInvokee.tag new file mode 100644 index 00000000..a8538c4f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/invoke/positiveTaglibInvokee.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" required="true" %> +<%@ variable name-given="y" %> +${x} from invokee diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/negativeInclude.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/negativeInclude.tag new file mode 100644 index 00000000..32a9902b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/negativeInclude.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ include file="include/negativeInclude.tagf" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/negativePageDirective.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/negativePageDirective.tag new file mode 100644 index 00000000..675c4b17 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/negativePageDirective.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page language="java" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/positiveIncludeContextRelative.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/positiveIncludeContextRelative.tag new file mode 100644 index 00000000..1e5eaead --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/positiveIncludeContextRelative.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ include file="/include/positiveIncludeContextRelative.tagf" %> +included a tagf file using context relative path. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/positiveIncludePageRelative.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/positiveIncludePageRelative.tag new file mode 100644 index 00000000..bbca5ee8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/positiveIncludePageRelative.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ include file="include/positiveIncludePageRelative.tagf" %> +included a tagf file using page relative path. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/positiveTaglib.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/positiveTaglib.tag new file mode 100644 index 00000000..72b1d2aa --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/WEB-INF/tags/positiveTaglib.tag @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="my" tagdir="/WEB-INF/tags/invoke" %> +<%@ attribute name="x" required="true" %> +<%@ variable name-given="y" %> + + +invoked another tag file from this tag file + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/include/positiveIncludeContextRelative.tagf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/include/positiveIncludeContextRelative.tagf new file mode 100644 index 00000000..6e80d2cb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/include/positiveIncludeContextRelative.tagf @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="x" required="false" %> +<%@ variable name-given="y" %> +Test PASSED. + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/jsp_tagfile_directives_general_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/jsp_tagfile_directives_general_web.xml new file mode 100644 index 00000000..84142c3d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/jsp_tagfile_directives_general_web.xml @@ -0,0 +1,25 @@ + + + + + JspTagfileDirectivesGeneral + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/negativeAttributeDirective.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/negativeAttributeDirective.jsp new file mode 100644 index 00000000..6ac986f2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/negativeAttributeDirective.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="op1" + type="java.lang.Integer" %> +<%-- +If a attribute directive is used in a jsp page, a translation error +will result. +--%> +page executed. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/negativeInclude.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/negativeInclude.jsp new file mode 100644 index 00000000..7c114dbf --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/negativeInclude.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/negativePageDirective.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/negativePageDirective.jsp new file mode 100644 index 00000000..263a136c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/negativePageDirective.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%-- +If a page directive is used in a tag file, a translation error +will result. +--%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/negativeTagDirective.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/negativeTagDirective.jsp new file mode 100644 index 00000000..15f09bef --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/negativeTagDirective.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag language="java" %> +<%-- +If a tag directive is used in a jsp page, a translation error +will result. +--%> +page executed. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/negativeVariableDirective.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/negativeVariableDirective.jsp new file mode 100644 index 00000000..f01d4abc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/negativeVariableDirective.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ variable name-given="op1" + variable-class="java.lang.Integer" + description="op1" %> +<%-- +If a variable directive is used in a jsp page, a translation error +will result. +--%> +page executed. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/positiveIncludeContextRelative.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/positiveIncludeContextRelative.jsp new file mode 100644 index 00000000..241e3463 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/positiveIncludeContextRelative.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/positiveIncludePageRelative.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/positiveIncludePageRelative.jsp new file mode 100644 index 00000000..73b86f4f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/positiveIncludePageRelative.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/positiveTaglib.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/positiveTaglib.jsp new file mode 100644 index 00000000..dc506a0e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/general/positiveTaglib.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/deferredValueMinimumJspVersion.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/deferredValueMinimumJspVersion.tag new file mode 100644 index 00000000..159fe890 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/deferredValueMinimumJspVersion.tag @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : deferredValueMinimumJspVersion + Description : Verify that when the deferredValue attribute is + used in a 2.0 tag, a translation error results. +**/ %> + +<%@ tag deferredValue="true" %> + +template text diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/dynamicAttributesNoUri.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/dynamicAttributesNoUri.tag new file mode 100644 index 00000000..27200554 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/dynamicAttributesNoUri.tag @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag import="java.util.Map" %> +<%@ tag dynamic-attributes="ds" %> +<% + Map map = (Map) jspContext.getAttribute("ds"); + out.println(map.get("d1")); + if(map.containsKey("d2") || map.containsKey("my:d2")) { + out.println("Test FAILED. dynamic attributes with uri should not be placed into map."); + } else { + out.println("Dynamic attributes with uri are not placed into map."); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/implicitImportHttp.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/implicitImportHttp.tag new file mode 100644 index 00000000..df403f5c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/implicitImportHttp.tag @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2021 Oracle and/or its affiliates and others. + All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag language="java" %> +<% + Cookie ex = new Cookie("name","value"); + if(ex instanceof jakarta.servlet.http.Cookie) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Cookie instance is not instance of jakarta.servlet.http.Cookie"); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/implicitImportJsp.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/implicitImportJsp.tag new file mode 100644 index 00000000..9480ed43 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/implicitImportJsp.tag @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag language="java" %> +<% + JspFactory jfac=JspFactory.getDefaultFactory(); + if(jfac instanceof jakarta.servlet.jsp.JspFactory) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED."); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/implicitImportLang.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/implicitImportLang.tag new file mode 100644 index 00000000..92700df1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/implicitImportLang.tag @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag language="java" %> +<% + Integer num = new Integer(1); + if(num instanceof java.lang.Integer) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. Integer instance is not of type java.lang.Integer"); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/implicitImportServlet.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/implicitImportServlet.tag new file mode 100644 index 00000000..4ddf758f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/implicitImportServlet.tag @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag language="java" %> +<% + ServletException ex = new ServletException(); + if(ex instanceof jakarta.servlet.ServletException) { + out.println("Test PASSED."); + } else { + out.println("Test FAILED. ServletException instance is not of type jakarta.servlet.ServletException"); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeBodyContent.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeBodyContent.tag new file mode 100644 index 00000000..b7910f9a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeBodyContent.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag body-content="JSP" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateBodyContent.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateBodyContent.tag new file mode 100644 index 00000000..5f555e7e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateBodyContent.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag body-content="tagdependent" %> +<%@ tag body-content="empty" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateDescription.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateDescription.tag new file mode 100644 index 00000000..e9495bef --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateDescription.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag description="a test, too" %> +<%@ tag description="a test" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateDisplayName.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateDisplayName.tag new file mode 100644 index 00000000..cf4323db --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateDisplayName.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag display-name="a test" %> +<%@ tag display-name="test" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateDynamicAttributes.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateDynamicAttributes.tag new file mode 100644 index 00000000..239d641c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateDynamicAttributes.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag dynamic-attributes="dmap2" %> +<%@ tag dynamic-attributes="dmap" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateExample.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateExample.tag new file mode 100644 index 00000000..7f450e9f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateExample.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag example="a test, too" %> +<%@ tag example="a test" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateIsELIgnoredFatalTranslationError.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateIsELIgnoredFatalTranslationError.tag new file mode 100644 index 00000000..0ed999af --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateIsELIgnoredFatalTranslationError.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag isELIgnored="false" isELIgnored="true" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateLanguageFatalTranslationError.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateLanguageFatalTranslationError.tag new file mode 100644 index 00000000..fe2e6ff8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateLanguageFatalTranslationError.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag language="perl" language="c" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateLargeIcon.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateLargeIcon.tag new file mode 100644 index 00000000..90a6abbd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateLargeIcon.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag large-icon="/images/32/icon.jpg" %> +<%@ tag large-icon="/images/16/icon.jpg" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateSmallIcon.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateSmallIcon.tag new file mode 100644 index 00000000..f016041f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeDuplicateSmallIcon.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag small-icon="/images/32/icon.jpg" %> +<%@ tag small-icon="/images/16/icon.jpg" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeMultiplePageEncoding.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeMultiplePageEncoding.tag new file mode 100644 index 00000000..86c58dfa --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeMultiplePageEncoding.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag pageEncoding="UTF-8" pageEncoding="ISO-8859-15" %> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeUnrecognizedAttribute.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeUnrecognizedAttribute.tag new file mode 100644 index 00000000..9144f3ac --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/negativeUnrecognizedAttribute.tag @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag id = "test" + short-name="short-name" + lang="java" + body="empty" +%> +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/positiveDuplicateAttributes.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/positiveDuplicateAttributes.tag new file mode 100644 index 00000000..9771e374 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/positiveDuplicateAttributes.tag @@ -0,0 +1,65 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ include file="positiveDuplicateAttributes.tagf" %> +<%@ tag + display-name="positiveDuplicateAttributes" + body-content="empty" + dynamic-attributes="extra" + small-icon="/images/16/icon.jpg" + large-icon="/images/32/icon.jpg" + description="description" + example="example" + language="java" + import="java.util.Date" + isELIgnored="false" + display-name="positiveDuplicateAttributes" + body-content="empty" + dynamic-attributes="extra" + small-icon="/images/16/icon.jpg" + large-icon="/images/32/icon.jpg" + description="description" + example="example" + language="java" + import="java.util.Date" + isELIgnored="false" +%> +<%@ tag + display-name="positiveDuplicateAttributes" + body-content="empty" + dynamic-attributes="extra" + small-icon="/images/16/icon.jpg" + large-icon="/images/32/icon.jpg" + description="description" + example="example" + language="java" + import="java.util.Date" + isELIgnored="false" + display-name="positiveDuplicateAttributes" + body-content="empty" + dynamic-attributes="extra" + small-icon="/images/16/icon.jpg" + large-icon="/images/32/icon.jpg" + description="description" + example="example" + language="java" + import="java.util.Date" + isELIgnored="false" +%> + +tag invoked diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/positiveDuplicateAttributes.tagf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/positiveDuplicateAttributes.tagf new file mode 100644 index 00000000..1f5b6bb3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/positiveDuplicateAttributes.tagf @@ -0,0 +1,64 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag + display-name="positiveDuplicateAttributes" + body-content="empty" + dynamic-attributes="extra" + small-icon="/images/16/icon.jpg" + large-icon="/images/32/icon.jpg" + description="description" + example="example" + language="java" + import="java.util.Date" + isELIgnored="false" + display-name="positiveDuplicateAttributes" + body-content="empty" + dynamic-attributes="extra" + small-icon="/images/16/icon.jpg" + large-icon="/images/32/icon.jpg" + description="description" + example="example" + language="java" + import="java.util.Date" + isELIgnored="false" +%> + +<%@ tag + display-name="positiveDuplicateAttributes" + body-content="empty" + dynamic-attributes="extra" + small-icon="/images/16/icon.jpg" + large-icon="/images/32/icon.jpg" + description="description" + example="example" + language="java" + import="java.util.Date" + isELIgnored="false" + display-name="positiveDuplicateAttributes" + body-content="empty" + dynamic-attributes="extra" + small-icon="/images/16/icon.jpg" + large-icon="/images/32/icon.jpg" + description="description" + example="example" + language="java" + import="java.util.Date" + isELIgnored="false" +%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/positiveImport.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/positiveImport.tag new file mode 100644 index 00000000..3778fa45 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/positiveImport.tag @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag language="java" %> +<%@ tag import="java.util.ArrayList"%> +<% + ArrayList list = new ArrayList(); + list.add("Test PASSED."); + out.println((String) list.get(0)); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/positiveLang.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/positiveLang.tag new file mode 100644 index 00000000..569f05d8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/positiveLang.tag @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag language="java" %> +<% + out.println("Test PASSED."); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/positiveMultipleImport.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/positiveMultipleImport.tag new file mode 100644 index 00000000..9a516d9f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/WEB-INF/tags/positiveMultipleImport.tag @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag language="java" %> +<%@ tag import="java.util.ArrayList" import="java.util.Date" %> +<% + ArrayList list = new ArrayList(); + Date date = new Date(); + out.println("Test PASSED."); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/deferredValueMinimumJspVersion.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/deferredValueMinimumJspVersion.jsp new file mode 100644 index 00000000..340f529c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/deferredValueMinimumJspVersion.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/dynamicAttributesNoUri.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/dynamicAttributesNoUri.jsp new file mode 100644 index 00000000..0e10798b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/dynamicAttributesNoUri.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/images/16/icon.jpg b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/images/16/icon.jpg new file mode 100644 index 00000000..02d864db Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/images/16/icon.jpg differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/images/32/icon.jpg b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/images/32/icon.jpg new file mode 100644 index 00000000..02d864db Binary files /dev/null and b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/images/32/icon.jpg differ diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/implicitImportHttp.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/implicitImportHttp.jsp new file mode 100644 index 00000000..830de36c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/implicitImportHttp.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%-- +Validate that classes from the jakarta.servlet.http package are +implicitly imported by creating and using an instance of HttpUtils. +--%> + +<%-- invoke the tag --%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/implicitImportJsp.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/implicitImportJsp.jsp new file mode 100644 index 00000000..681535b5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/implicitImportJsp.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%-- +Validate that classes from the jakarta.servlet.jsp package are implicitly +imported +--%> + +<%-- invoke the tag --%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/implicitImportLang.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/implicitImportLang.jsp new file mode 100644 index 00000000..2adac109 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/implicitImportLang.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%-- +Validated that java.lang package is implicitly imported +--%> + +<%-- invoke the tag --%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/implicitImportServlet.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/implicitImportServlet.jsp new file mode 100644 index 00000000..410c255b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/implicitImportServlet.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%-- +Validate that classes from the jakarta.servlet package are implicitly +imported +--%> + +<%-- invoke the tag --%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/jsp_tagfile_directives_tag20_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/jsp_tagfile_directives_tag20_web.xml new file mode 100644 index 00000000..4d65be78 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/jsp_tagfile_directives_tag20_web.xml @@ -0,0 +1,25 @@ + + + + + JspTagfileDirectivesTag20 + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeBodyContent.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeBodyContent.jsp new file mode 100644 index 00000000..8eb59c9f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeBodyContent.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%-- +A translation error will result if JSP is used as tag directive +body-content +--%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateBodyContent.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateBodyContent.jsp new file mode 100644 index 00000000..351f45a6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateBodyContent.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +unexpected output. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateDescription.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateDescription.jsp new file mode 100644 index 00000000..b01e6201 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateDescription.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +unexpected output. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateDisplayName.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateDisplayName.jsp new file mode 100644 index 00000000..a28ddd70 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateDisplayName.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +unexpected output. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateDynamicAttributes.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateDynamicAttributes.jsp new file mode 100644 index 00000000..2cc6a566 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateDynamicAttributes.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +unexpected output. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateExample.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateExample.jsp new file mode 100644 index 00000000..cf7a7373 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateExample.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +unexpected output. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateIsELIgnoredFatalTranslationError.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateIsELIgnoredFatalTranslationError.jsp new file mode 100644 index 00000000..43ad5549 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateIsELIgnoredFatalTranslationError.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%-- +invokes a tag file that contains two isELIgnored directives of +different values, resulting a translation error +--%> + +<%-- invoke the tag --%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateLanguageFatalTranslationError.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateLanguageFatalTranslationError.jsp new file mode 100644 index 00000000..118868a9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateLanguageFatalTranslationError.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%-- +invokes a tag file that declares two language directive attributes, +resulting a translation error. +--%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateLargeIcon.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateLargeIcon.jsp new file mode 100644 index 00000000..be215b01 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateLargeIcon.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +unexpected output. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateSmallIcon.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateSmallIcon.jsp new file mode 100644 index 00000000..d398402d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeDuplicateSmallIcon.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +unexpected output. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeMultiplePageEncoding.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeMultiplePageEncoding.jsp new file mode 100644 index 00000000..79a82848 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeMultiplePageEncoding.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%-- +Declare a tag directive with two pageEncoding attributes, resulting +in a translation error. +--%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeUnrecognizedAttribute.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeUnrecognizedAttribute.jsp new file mode 100644 index 00000000..0b520e34 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/negativeUnrecognizedAttribute.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +unexpected output. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/positiveDuplicateAttributes.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/positiveDuplicateAttributes.jsp new file mode 100644 index 00000000..f150179f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/positiveDuplicateAttributes.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +Test PASSED. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/positiveImport.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/positiveImport.jsp new file mode 100644 index 00000000..59a52b18 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/positiveImport.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%-- +Use the import attribute to import 'java.util.ArrayList'. +Validated that a ArrayList object can be created and used. +--%> + +<%-- invoke the tag --%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/positiveLang.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/positiveLang.jsp new file mode 100644 index 00000000..f068d8ae --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/positiveLang.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%-- +validates that the language attribute can be set to java without +an error. +--%> + +<%-- invoke the tag --%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/positiveMultipleImport.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/positiveMultipleImport.jsp new file mode 100644 index 00000000..bd0abddc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag20/positiveMultipleImport.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%-- +Declare a tag directive with two import attributes. +--%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/DeferredSyntaxAllowedAsLiteralFalseAction.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/DeferredSyntaxAllowedAsLiteralFalseAction.jsp new file mode 100644 index 00000000..2bcfd455 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/DeferredSyntaxAllowedAsLiteralFalseAction.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%-- +Set the deferredSyntaxAllowedAsLiteral attribute to false. +Verify that a translation error occurs when '{#' is used +in an action when the jsp version is set to 2.1 or greater +in the implicit.tld file. +--%> + +<%-- invoke the tag --%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/DeferredSyntaxAllowedAsLiteralFalseTemplateText.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/DeferredSyntaxAllowedAsLiteralFalseTemplateText.jsp new file mode 100644 index 00000000..6d8f9b98 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/DeferredSyntaxAllowedAsLiteralFalseTemplateText.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%-- +Set the deferredSyntaxAllowedAsLiteral attribute to false. +Verify that a translation error occurs when '{#' is used +in template text when the jsp version is set to 2.1 or greater +in the implicit.tld file. +--%> + +<%-- invoke the tag --%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/DeferredSyntaxAllowedAsLiteralTrueAction.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/DeferredSyntaxAllowedAsLiteralTrueAction.gf new file mode 100644 index 00000000..bc50afbe --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/DeferredSyntaxAllowedAsLiteralTrueAction.gf @@ -0,0 +1 @@ +#{expr} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/DeferredSyntaxAllowedAsLiteralTrueAction.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/DeferredSyntaxAllowedAsLiteralTrueAction.jsp new file mode 100644 index 00000000..18973afc --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/DeferredSyntaxAllowedAsLiteralTrueAction.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%-- +Set the deferredSyntaxAllowedAsLiteral attribute to true. +Verify that the character sequence '{#' is allowed +in an action when the jsp version is set to 2.1 or greater +in the implicit.tld file. +--%> + +<%-- invoke the tag --%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/DeferredSyntaxAllowedAsLiteralTrueTemplateText.gf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/DeferredSyntaxAllowedAsLiteralTrueTemplateText.gf new file mode 100644 index 00000000..bc50afbe --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/DeferredSyntaxAllowedAsLiteralTrueTemplateText.gf @@ -0,0 +1 @@ +#{expr} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/DeferredSyntaxAllowedAsLiteralTrueTemplateText.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/DeferredSyntaxAllowedAsLiteralTrueTemplateText.jsp new file mode 100644 index 00000000..e3a76321 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/DeferredSyntaxAllowedAsLiteralTrueTemplateText.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%-- +Set the deferredSyntaxAllowedAsLiteral attribute to true. +Verify that the '{#' sequence is allowed as a string literal +when used in template text when the jsp version is set to 2.1 or +greater in the implicit.tld file. +--%> + +<%-- invoke the tag --%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/WEB-INF/tags/DeferredSyntaxAllowedAsLiteralFalseAction.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/WEB-INF/tags/DeferredSyntaxAllowedAsLiteralFalseAction.tag new file mode 100644 index 00000000..e0bee8ad --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/WEB-INF/tags/DeferredSyntaxAllowedAsLiteralFalseAction.tag @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : DeferredSyntaxAllowedAsLiteralFalseAction + Description : Verify that when the DeferredSyntaxAllowedAsLiteral + tag directive attribute is set to false, a + translation error occurs when the '{#' character + sequence is used in an action and the jsp version + is 2.1 or greater. +**/ %> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%@ tag deferredSyntaxAllowedAsLiteral="false" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/WEB-INF/tags/DeferredSyntaxAllowedAsLiteralFalseTemplateText.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/WEB-INF/tags/DeferredSyntaxAllowedAsLiteralFalseTemplateText.tag new file mode 100644 index 00000000..0fec4e81 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/WEB-INF/tags/DeferredSyntaxAllowedAsLiteralFalseTemplateText.tag @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : DeferredSyntaxAllowedAsLiteralFalseTemplateText + Description : Verify that when the DeferredSyntaxAllowedAsLiteral + tag directive attribute is set to false, a + translation error occurs when the '{#' character + sequence is used in template text and the jsp + version is 2.1 or greater. +**/ %> + +<%@ tag deferredSyntaxAllowedAsLiteral="false" %> + +#{expr} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/WEB-INF/tags/DeferredSyntaxAllowedAsLiteralTrueAction.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/WEB-INF/tags/DeferredSyntaxAllowedAsLiteralTrueAction.tag new file mode 100644 index 00000000..65cba26b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/WEB-INF/tags/DeferredSyntaxAllowedAsLiteralTrueAction.tag @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : DeferredSyntaxAllowedAsLiteralTrueAction + Description : Verify that when the DeferredSyntaxAllowedAsLiteral + tag directive attribute is set to true, + the '{#' character sequence is allowed in an + action when the jsp version is 2.1 or greater. +**/ %> + +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%@ tag deferredSyntaxAllowedAsLiteral="true" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/WEB-INF/tags/DeferredSyntaxAllowedAsLiteralTrueTemplateText.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/WEB-INF/tags/DeferredSyntaxAllowedAsLiteralTrueTemplateText.tag new file mode 100644 index 00000000..e3e03f7d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/WEB-INF/tags/DeferredSyntaxAllowedAsLiteralTrueTemplateText.tag @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : DeferredSyntaxAllowedAsLiteralTrueTemplateTextTest + Description : Verify that when the DeferredSyntaxAllowedAsLiteral + tag directive attribute is set to true, the '{#' + sequence is allowed as a string literal when used + in template text and the jsp version is 2.1 or + greater. +**/ %> + +<%@ tag deferredSyntaxAllowedAsLiteral="true" %> + +#{expr} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/WEB-INF/tags/DeferredSyntaxAsLiteral.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/WEB-INF/tags/DeferredSyntaxAsLiteral.tag new file mode 100644 index 00000000..77b543a7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/WEB-INF/tags/DeferredSyntaxAsLiteral.tag @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="literal" %> +<% + Object o = jspContext.getAttribute("literal"); + out.println(o); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/WEB-INF/tags/implicit.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/WEB-INF/tags/implicit.tld new file mode 100644 index 00000000..22981b00 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/WEB-INF/tags/implicit.tld @@ -0,0 +1,27 @@ + + + + + + 1.0 + implicit + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/jsp_tagfile_directives_tag21_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/jsp_tagfile_directives_tag21_web.xml new file mode 100644 index 00000000..7ee13694 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/tag21/jsp_tagfile_directives_tag21_web.xml @@ -0,0 +1,25 @@ + + + + + JspTagfileDirectivesTag21 + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/falseDeclare.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/falseDeclare.tag new file mode 100644 index 00000000..14b27171 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/falseDeclare.tag @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> +<%@ variable name-given="declared" declare="false" scope="AT_END" %> +<%! String declared2; %> + +<% + jspContext.setAttribute("declared", "was declared"); +%> + +<% + out.println(declared2); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/falseDeclare2.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/falseDeclare2.tag new file mode 100644 index 00000000..ce5bdb6e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/falseDeclare2.tag @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ variable name-given="declared2" declare="false" scope="AT_END" %> +<% + jspContext.setAttribute("declared2", "was declared2"); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeAliasAttributeSame.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeAliasAttributeSame.tag new file mode 100644 index 00000000..a75733a0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeAliasAttributeSame.tag @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="result" required="false" rtexprvalue="false"%> +<%@ attribute name="var" required="true" rtexprvalue="false"%> +<%@ variable alias="result" name-from-attribute="var" scope="AT_BEGIN" %> +tag invoked + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeAliasAttributeSameInclude.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeAliasAttributeSameInclude.tag new file mode 100644 index 00000000..28e5f81f --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeAliasAttributeSameInclude.tag @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ include file="negativeAliasAttributeSameInclude.tagf" %> +<%@ attribute name="var" required="true" rtexprvalue="false"%> +<%@ variable alias="result" name-from-attribute="var" scope="AT_BEGIN" %> +tag invoked + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeAliasAttributeSameInclude.tagf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeAliasAttributeSameInclude.tagf new file mode 100644 index 00000000..eec57928 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeAliasAttributeSameInclude.tagf @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="result" required="false" rtexprvalue="false"%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeAliasNameGiven.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeAliasNameGiven.tag new file mode 100644 index 00000000..bf069183 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeAliasNameGiven.tag @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="var" required="true" rtexprvalue="false"%> +<%@ variable alias="result" name-given="y" scope="AT_BEGIN" %> +tag invoked + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeNoAttribute.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeNoAttribute.tag new file mode 100644 index 00000000..403ee575 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeNoAttribute.tag @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="abc" required="true" rtexprvalue="false"%> +<%@ tag dynamic-attributes="x" %> +<%@ variable alias="result" name-from-attribute="var" scope="AT_BEGIN" %> +tag invoked + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeNotRequired.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeNotRequired.tag new file mode 100644 index 00000000..f0945c3a --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeNotRequired.tag @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="var" required="false" rtexprvalue="false"%> +<%@ variable alias="result" name-from-attribute="var" scope="AT_BEGIN" %> +tag invoked + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeNotString.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeNotString.tag new file mode 100644 index 00000000..29d13c93 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeNotString.tag @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="var" type="java.lang.Integer" + required="true" rtexprvalue="false"%> +<%@ variable alias="result" name-from-attribute="var" scope="AT_BEGIN" %> +tag invoked + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeRtexpr.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeRtexpr.tag new file mode 100644 index 00000000..d8d5240d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeRtexpr.tag @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="var" required="true" rtexprvalue="true"%> +<%@ variable alias="result" name-from-attribute="var" scope="AT_BEGIN" %> +tag invoked + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeSame.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeSame.tag new file mode 100644 index 00000000..dceb9064 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeSame.tag @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="var" required="true" rtexprvalue="false"%> +<%@ variable alias="result" name-from-attribute="var" scope="AT_BEGIN" %> +<%@ variable alias="abcdef" name-from-attribute="var" scope="AT_BEGIN" %> +tag invoked + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeSameInclude.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeSameInclude.tag new file mode 100644 index 00000000..60393a86 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeSameInclude.tag @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="var" required="true" rtexprvalue="false"%> +<%@ variable alias="result" name-from-attribute="var" scope="AT_BEGIN" %> +<%@ include file="negativeNameFromAttributeSameInclude.tagf" %> +tag invoked + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeSameInclude.tagf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeSameInclude.tagf new file mode 100644 index 00000000..486400b4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameFromAttributeSameInclude.tagf @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ variable alias="abcdef" name-from-attribute="var" scope="AT_BEGIN" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenBoth.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenBoth.tag new file mode 100644 index 00000000..5b511ec6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenBoth.tag @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="var" required="true" rtexprvalue="false"%> +<%@ variable alias="result" name-from-attribute="var" scope="AT_BEGIN" + name-given="y" %> +tag invoked + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenDynamic.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenDynamic.tag new file mode 100644 index 00000000..b7236163 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenDynamic.tag @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag dynamic-attributes="x" %> +<%@ variable name-given="x" scope="AT_BEGIN" %> +tag invoked + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenDynamicInclude.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenDynamicInclude.tag new file mode 100644 index 00000000..0252f276 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenDynamicInclude.tag @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ include file="negativeNameGivenDynamicInclude.tagf" %> +<%@ variable name-given="x" scope="AT_BEGIN" %> +tag invoked + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenDynamicInclude.tagf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenDynamicInclude.tagf new file mode 100644 index 00000000..65d8734b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenDynamicInclude.tagf @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag dynamic-attributes="x" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenNeither.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenNeither.tag new file mode 100644 index 00000000..427c7a10 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenNeither.tag @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="var" required="true" rtexprvalue="false"%> +<%@ variable alias="result" scope="AT_BEGIN" %> +tag invoked + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenSame.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenSame.tag new file mode 100644 index 00000000..d651f365 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenSame.tag @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ variable name-given="x" scope="AT_BEGIN" %> +<%@ variable name-given="x" scope="AT_BEGIN" %> +tag invoked + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenSameInclude.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenSameInclude.tag new file mode 100644 index 00000000..4e826a46 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenSameInclude.tag @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ include file="negativeNameGivenSameInclude.tagf" %> +<%@ variable name-given="x" scope="AT_BEGIN" %> +tag invoked + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenSameInclude.tagf b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenSameInclude.tagf new file mode 100644 index 00000000..96f7bdec --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/negativeNameGivenSameInclude.tagf @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ variable name-given="x" scope="AT_BEGIN" %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/positiveDeclare.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/positiveDeclare.tag new file mode 100644 index 00000000..4c1bcf38 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/positiveDeclare.tag @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> +<%@ variable name-given="declared" scope="AT_BEGIN" %> +<% + jspContext.setAttribute("declared", "Test PASSED"); +%> + +<% + out.println("declared2:" + declared2); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/positiveDeclare2.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/positiveDeclare2.tag new file mode 100644 index 00000000..c0366974 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/positiveDeclare2.tag @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ variable name-given="declared2" scope="AT_END" %> +<% + jspContext.setAttribute("declared2", "declared2"); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/positiveVariableClass.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/positiveVariableClass.tag new file mode 100644 index 00000000..83f61c26 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/positiveVariableClass.tag @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ variable name-given="y" variable-class="java.lang.Integer" + scope="AT_BEGIN" %> +<% + jspContext.setAttribute("y", new Integer(2)); +%> +tag invoked + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncAtBegin.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncAtBegin.tag new file mode 100644 index 00000000..128e6f7b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncAtBegin.tag @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ variable name-given="x" scope="AT_BEGIN" %> + +<% + if(jspContext.getAttribute("x", PageContext.PAGE_SCOPE) != null) { + out.println("Test FAILED. x is not null in tag file"); + } + jspContext.setAttribute("x", "2"); +%> + +${x} <%-- (x == 2) --%> +<% + jspContext.setAttribute("x", "4"); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncAtBeginNameFromAttribute.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncAtBeginNameFromAttribute.tag new file mode 100644 index 00000000..84bc2af3 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncAtBeginNameFromAttribute.tag @@ -0,0 +1,38 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="var" required="true" rtexprvalue="false" %> +<%@ variable alias="result" name-from-attribute="var" scope="AT_BEGIN" %> + +<% + if(jspContext.getAttribute("x", PageContext.PAGE_SCOPE) != null) { + out.println("Test FAILED. x is not null in tag file"); + } + if(jspContext.getAttribute("result", PageContext.PAGE_SCOPE) != null) { + out.println("Test FAILED. result is not null in tag file"); + } + jspContext.setAttribute("x", "ignoredInCallingPage"); + jspContext.setAttribute("result", "tagFileResult"); +%> + +${x} <%-- (x == 'ignoredInCallingPage') --%> +${result} <%-- (result == 'tagFileResult') --%> +<% + jspContext.setAttribute("x", "stillIgnoredInCallingPage"); + jspContext.setAttribute("result", "4"); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncAtEnd.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncAtEnd.tag new file mode 100644 index 00000000..d0ab0f1e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncAtEnd.tag @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ variable name-given="x" scope="AT_END" %> + +<% + if(jspContext.getAttribute("x", PageContext.PAGE_SCOPE) != null) { + out.println("Test FAILED. x is not null in tag file"); + } + jspContext.setAttribute("x", "2"); +%> + +${x} <%-- (x == 2) --%> +<% + jspContext.setAttribute("x", "4"); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncNested.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncNested.tag new file mode 100644 index 00000000..41918bf8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncNested.tag @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ variable name-given="x" scope="NESTED" %> + +<% + if(jspContext.getAttribute("x", PageContext.PAGE_SCOPE) != null) { + out.println("Test FAILED. x is not null in tag file"); + } + jspContext.setAttribute("x", "2"); +%> + +${x} <%-- (x == 2) --%> +<% + jspContext.setAttribute("x", "4"); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncRemoveAtBegin.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncRemoveAtBegin.tag new file mode 100644 index 00000000..feff6b75 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncRemoveAtBegin.tag @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ variable name-given="x" scope="AT_BEGIN" %> + +<% + if(jspContext.getAttribute("x", PageContext.PAGE_SCOPE) != null) { + out.println("Test FAILED. x is not null in tag file"); + } + jspContext.setAttribute("x", "1"); +%> + +<% + jspContext.removeAttribute("x", PageContext.PAGE_SCOPE); +%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncRemoveAtEnd.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncRemoveAtEnd.tag new file mode 100644 index 00000000..313c0174 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncRemoveAtEnd.tag @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ variable name-given="x" scope="AT_END" %> + +<% + if(jspContext.getAttribute("x", PageContext.PAGE_SCOPE) != null) { + out.println("Test FAILED. x is not null in tag file"); + } + jspContext.setAttribute("x", "1"); +%> + +<% + jspContext.removeAttribute("x", PageContext.PAGE_SCOPE); +%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncRemoveNested.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncRemoveNested.tag new file mode 100644 index 00000000..0fc8cc8d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/WEB-INF/tags/syncRemoveNested.tag @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ variable name-given="x" scope="NESTED" %> + +<% + if(jspContext.getAttribute("x", PageContext.PAGE_SCOPE) != null) { + out.println("Test FAILED. x is not null in tag file"); + } + jspContext.setAttribute("x", "1"); +%> + +<% + jspContext.removeAttribute("x", PageContext.PAGE_SCOPE); +%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/falseDeclareTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/falseDeclareTest.jsp new file mode 100644 index 00000000..72c71321 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/falseDeclareTest.jsp @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> +<%! String declared; %> + + + + +<% + out.println(declared); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/jsp_tagfiles_directives_variable_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/jsp_tagfiles_directives_variable_web.xml new file mode 100644 index 00000000..c84d0bf0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/jsp_tagfiles_directives_variable_web.xml @@ -0,0 +1,25 @@ + + + + + JspTagfileDirectivesVariable + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeAliasAttributeSame.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeAliasAttributeSame.jsp new file mode 100644 index 00000000..6f80acd2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeAliasAttributeSame.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("y", "this is y"); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeAliasAttributeSameInclude.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeAliasAttributeSameInclude.jsp new file mode 100644 index 00000000..b3c100db --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeAliasAttributeSameInclude.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("y", "this is y"); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeAliasNameGiven.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeAliasNameGiven.jsp new file mode 100644 index 00000000..ffd82bdb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeAliasNameGiven.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("y", "this is y"); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameFromAttributeNoAttribute.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameFromAttributeNoAttribute.jsp new file mode 100644 index 00000000..10258feb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameFromAttributeNoAttribute.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("y", "this is y"); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameFromAttributeNotRequired.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameFromAttributeNotRequired.jsp new file mode 100644 index 00000000..c3d9bebb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameFromAttributeNotRequired.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("y", "this is y"); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameFromAttributeNotString.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameFromAttributeNotString.jsp new file mode 100644 index 00000000..e5ffe6d8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameFromAttributeNotString.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameFromAttributeRtexpr.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameFromAttributeRtexpr.jsp new file mode 100644 index 00000000..d0a37571 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameFromAttributeRtexpr.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<%! String s = "y"; %> +<% + pageContext.setAttribute("y", "this is y"); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameFromAttributeSame.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameFromAttributeSame.jsp new file mode 100644 index 00000000..8af16603 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameFromAttributeSame.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("y", "this is y"); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameFromAttributeSameInclude.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameFromAttributeSameInclude.jsp new file mode 100644 index 00000000..8e332e30 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameFromAttributeSameInclude.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("y", "this is y"); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameGivenBoth.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameGivenBoth.jsp new file mode 100644 index 00000000..788eaa2b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameGivenBoth.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("y", "this is y"); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameGivenDynamic.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameGivenDynamic.jsp new file mode 100644 index 00000000..88f016f9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameGivenDynamic.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("x", "this is x"); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameGivenDynamicInclude.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameGivenDynamicInclude.jsp new file mode 100644 index 00000000..6b895d05 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameGivenDynamicInclude.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("x", "this is x"); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameGivenNeither.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameGivenNeither.jsp new file mode 100644 index 00000000..6f705ec6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameGivenNeither.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("y", "this is y"); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameGivenSame.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameGivenSame.jsp new file mode 100644 index 00000000..0ea8b4e8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameGivenSame.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("x", "this is x"); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameGivenSameInclude.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameGivenSameInclude.jsp new file mode 100644 index 00000000..cbfc03ed --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/negativeNameGivenSameInclude.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("x", "this is x"); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/positiveDeclare.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/positiveDeclare.jsp new file mode 100644 index 00000000..23edb131 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/positiveDeclare.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + + + + +<% + out.println("declared variable value:" + declared); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/positiveVariableClass.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/positiveVariableClass.jsp new file mode 100644 index 00000000..45009cb0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/positiveVariableClass.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + + + +<% + Object obj = pageContext.getAttribute("y", PageContext.PAGE_SCOPE); + if(obj instanceof Integer) { + out.println("Test PASSED."); + } else { + out.println("y in calling page is not Integer:" + obj); + } + +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncAtBegin.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncAtBegin.jsp new file mode 100644 index 00000000..b142024d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncAtBegin.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("x", "1"); +%> + +${x} <%-- (x == 1) --%> + + ${x} <%-- (x == 2) --%> + +${x} <%-- (x == 4) --%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncAtBeginNameFromAttribute.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncAtBeginNameFromAttribute.jsp new file mode 100644 index 00000000..8e79e8cd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncAtBeginNameFromAttribute.jsp @@ -0,0 +1,33 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("x", "1"); + pageContext.setAttribute("result", "callingPageResult"); +%> + + + ${x} <%-- (x == tagFileResult) --%> + ${result} <%-- (result == callingPageResult) --%> + +${x} <%-- (x == 4) --%> +${result} <%-- (result == callingPageResult) --%> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncAtEnd.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncAtEnd.jsp new file mode 100644 index 00000000..ee8eb8cd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncAtEnd.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("x", "1"); +%> +${x} <%-- (x == 1) --%> + + + ${x} <%-- (x == 1) --%> + +${x} <%-- (x == 4) --%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncNested.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncNested.jsp new file mode 100644 index 00000000..e7e82a92 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncNested.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("x", "1"); +%> +${x} <%-- (x == 1) --%> + + + ${x} <%-- (x == 2) --%> + +${x} <%-- (x == 1) --%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncRemoveAtBegin.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncRemoveAtBegin.jsp new file mode 100644 index 00000000..2e837d10 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncRemoveAtBegin.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("x", "2"); +%> +${x} + + + '${x}' + +'${x}' diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncRemoveAtEnd.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncRemoveAtEnd.jsp new file mode 100644 index 00000000..00855457 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncRemoveAtEnd.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("x", "2"); +%> +${x} + + + '${x}' + +'${x}' diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncRemoveNested.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncRemoveNested.jsp new file mode 100644 index 00000000..e1125d8c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/directives/variable/syncRemoveNested.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +<% + pageContext.setAttribute("x", "2"); +%> +${x} + + + '${x}' + +${x} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkApplication.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkApplication.tag new file mode 100644 index 00000000..b6ee521c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkApplication.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag body-content="empty" %> +<%= (application instanceof jakarta.servlet.ServletContext) %> +Value of Context Init parameter param1: <%= application.getInitParameter( "contextParam1" ) %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkConfig.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkConfig.tag new file mode 100644 index 00000000..bb7b5eef --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkConfig.tag @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag body-content="empty" %> +<%= (config instanceof jakarta.servlet.ServletConfig) %> +Value of param1 is: <%= config.getInitParameter( "configParam1" ) %> +Value of param2 is: <%= config.getInitParameter( "configParam2" ) %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkJspContext.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkJspContext.tag new file mode 100644 index 00000000..dcdb636b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkJspContext.tag @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag body-content="empty" %> +<%= (jspContext instanceof jakarta.servlet.jsp.JspContext) %> +<% + jspContext.setAttribute( "available", new String( "true" )); + String temp = (String) jspContext.findAttribute( "available" ); + out.print( temp ); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkOut.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkOut.tag new file mode 100644 index 00000000..be3c84fe --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkOut.tag @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag body-content="empty" %> +<%= (out instanceof jakarta.servlet.jsp.JspWriter ) %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkRequest.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkRequest.tag new file mode 100644 index 00000000..30da37be --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkRequest.tag @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag body-content="empty" %> +<%= (request instanceof jakarta.servlet.ServletRequest) %> + +<% out.println(request.getProtocol()); %> +<% out.println(request.getParameter("Years")); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkResponse.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkResponse.tag new file mode 100644 index 00000000..4cf813d4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkResponse.tag @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag body-content="empty" %> +<%= (response instanceof jakarta.servlet.ServletResponse) %> +<% + response.addHeader("TestHeader", "Method call OK"); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkSession.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkSession.tag new file mode 100644 index 00000000..50210ca2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/WEB-INF/tags/checkSession.tag @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag body-content="empty" %> +<%= (session instanceof jakarta.servlet.http.HttpSession) %> +<%= session.getAttribute("name.of.this.test") %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkApplication.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkApplication.jsp new file mode 100644 index 00000000..45b2cce8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkApplication.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkConfig.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkConfig.jsp new file mode 100644 index 00000000..433247bb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkConfig.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkJspContext.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkJspContext.jsp new file mode 100644 index 00000000..3b468ce2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkJspContext.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkOut.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkOut.jsp new file mode 100644 index 00000000..49fac7ac --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkOut.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkRequest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkRequest.jsp new file mode 100644 index 00000000..0bb1b0cb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkRequest.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkResponse.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkResponse.jsp new file mode 100644 index 00000000..ccbe717e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkResponse.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkSession.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkSession.jsp new file mode 100644 index 00000000..39cd38b6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/checkSession.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> +<% + session.setAttribute("name.of.this.test", "checkSession"); +%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/jsp_tagfiles_implicitobjects_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/jsp_tagfiles_implicitobjects_web.xml new file mode 100644 index 00000000..90ec139c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/implicitobjects/jsp_tagfiles_implicitobjects_web.xml @@ -0,0 +1,46 @@ + + + + + JspTagFileImplicitObj + + contextParam1 + bilbo + + + checkConfigLogicalName + /checkConfig.jsp + + configParam1 + hobbit + + + configParam2 + gollum + + 0 + + + checkConfigLogicalName + /checkConfig + + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/IgnoreTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/IgnoreTag.tag new file mode 100644 index 00000000..2a6bbbe5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/IgnoreTag.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% out.println("Test FAILED"); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/ImplicitTldAdditionalElements.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/ImplicitTldAdditionalElements.jsp new file mode 100644 index 00000000..37cc9c98 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/ImplicitTldAdditionalElements.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags/toomanytldelements" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/ImplicitTldDefaultJspVersion.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/ImplicitTldDefaultJspVersion.jsp new file mode 100644 index 00000000..b22999c8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/ImplicitTldDefaultJspVersion.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags/defaultjspversion" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/ImplicitTldMinimumJspVersion.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/ImplicitTldMinimumJspVersion.jsp new file mode 100644 index 00000000..cd92ff92 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/ImplicitTldMinimumJspVersion.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags/badtldversion" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/ImplicitTldReservedName20.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/ImplicitTldReservedName20.jsp new file mode 100644 index 00000000..cb575768 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/ImplicitTldReservedName20.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags/reservedname20" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/ImplicitTldReservedName21.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/ImplicitTldReservedName21.jsp new file mode 100644 index 00000000..62a55f70 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/ImplicitTldReservedName21.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags/reservedname21" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/JspTagFilePackagedJarIgnoredTagTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/JspTagFilePackagedJarIgnoredTagTest.jsp new file mode 100644 index 00000000..702f8026 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/JspTagFilePackagedJarIgnoredTagTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/jartag" prefix="tags" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/JspTagFilePackagedJarTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/JspTagFilePackagedJarTest.jsp new file mode 100644 index 00000000..5ac22ea1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/JspTagFilePackagedJarTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/jartag" prefix="tags" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/JspTagFilePackagedWarTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/JspTagFilePackagedWarTest.jsp new file mode 100644 index 00000000..ef174d1d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/JspTagFilePackagedWarTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags1" %> +<%@ taglib tagdir="/WEB-INF/tags/dir" prefix="tags2" %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/JspTagFilePackagedWarTldTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/JspTagFilePackagedWarTldTest.jsp new file mode 100644 index 00000000..f9d33a0c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/JspTagFilePackagedWarTldTest.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/webtld" prefix="tags1" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/Tag1.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/Tag1.tag new file mode 100644 index 00000000..d130344c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/Tag1.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% out.println("Test PASSED"); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/TldImplicitTldJspVersionNotMatch.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/TldImplicitTldJspVersionNotMatch.jsp new file mode 100644 index 00000000..71075e3c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/TldImplicitTldJspVersionNotMatch.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="tags1" uri="WEB-INF/tag.tld" %> +<%@ taglib tagdir="/WEB-INF/tags/versionnotmatch" prefix="tags2" %> + +<% out.println("Invoking tag through tld, v 2.0"); %> + + +<% out.println("Invoking tag through implicit tld, v.2.1"); %> + + +<% out.println("Test PASSED."); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tag.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tag.tld new file mode 100644 index 00000000..ff5e3bd7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tag.tld @@ -0,0 +1,36 @@ + + + + + webtagtld + 1.0 + webtagtld + http://java.sun.com/tck/jsp/webtld + + webtag + /WEB-INF/tags/WebTag1.tag + + + webtag2 + /WEB-INF/tags/versionnotmatch/WebTag1.tag + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/WebTag1.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/WebTag1.tag new file mode 100644 index 00000000..80741f18 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/WebTag1.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% out.println("Test PASSED1"); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/badtldversion/WebTag1.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/badtldversion/WebTag1.tag new file mode 100644 index 00000000..103f2767 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/badtldversion/WebTag1.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% out.println("Test FAILED:"); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/badtldversion/implicit.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/badtldversion/implicit.tld new file mode 100644 index 00000000..3faf3e23 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/badtldversion/implicit.tld @@ -0,0 +1,27 @@ + + + + + + 1.0 + implicit + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/defaultjspversion/WebTag1.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/defaultjspversion/WebTag1.tag new file mode 100644 index 00000000..da2ae5d2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/defaultjspversion/WebTag1.tag @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +The use of the expression #{expr} here should not +cause a translation error because the default implicit tld jsp +version is 2.0. +<% out.println("Test PASSED"); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/dir/WebTag1.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/dir/WebTag1.tag new file mode 100644 index 00000000..ce1b39ea --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/dir/WebTag1.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% out.println("Test PASSED2"); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/reservedname20/DeferredSyntaxAsLiteral.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/reservedname20/DeferredSyntaxAsLiteral.tag new file mode 100644 index 00000000..77b543a7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/reservedname20/DeferredSyntaxAsLiteral.tag @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="literal" %> +<% + Object o = jspContext.getAttribute("literal"); + out.println(o); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/reservedname20/ImplicitTld20.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/reservedname20/ImplicitTld20.tag new file mode 100644 index 00000000..73fdafe1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/reservedname20/ImplicitTld20.tag @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : ImplicitTld20.tag + Description : Verify that the jsp version of an implicit + tag library is configured by the implicit.tld + file. Use of '#{' in an action should be + allowed when the jsp version is 2.0. +**/ %> + +<%@ taglib tagdir="/WEB-INF/tags/reservedname20" prefix="tags" %> + + +<% out.println("Test PASSED:"); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/reservedname20/implicit.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/reservedname20/implicit.tld new file mode 100644 index 00000000..3ecad8b7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/reservedname20/implicit.tld @@ -0,0 +1,27 @@ + + + + + + 1.0 + implicit + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/reservedname21/DeferredSyntaxAsLiteral.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/reservedname21/DeferredSyntaxAsLiteral.tag new file mode 100644 index 00000000..77b543a7 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/reservedname21/DeferredSyntaxAsLiteral.tag @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="literal" %> +<% + Object o = jspContext.getAttribute("literal"); + out.println(o); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/reservedname21/ImplicitTld21.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/reservedname21/ImplicitTld21.tag new file mode 100644 index 00000000..3c226834 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/reservedname21/ImplicitTld21.tag @@ -0,0 +1,31 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% /** Name : ImplicitTld21.tag + Description : Verify that the jsp version of an implicit + tag library is configured by the implicit.tld + file. Use of '#{' in an action should result + in a translation error when the jsp version + is 2.1 or greater. +**/ %> + +<%@ taglib tagdir="/WEB-INF/tags/reservedname21" prefix="tags" %> +<%@ tag deferredSyntaxAllowedAsLiteral="false" %> + + +<% out.println("Test FAILED:"); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/reservedname21/implicit.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/reservedname21/implicit.tld new file mode 100644 index 00000000..22981b00 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/reservedname21/implicit.tld @@ -0,0 +1,27 @@ + + + + + + 1.0 + implicit + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/toomanytldelements/WebTag1.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/toomanytldelements/WebTag1.tag new file mode 100644 index 00000000..adbfe01b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/toomanytldelements/WebTag1.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% out.println("Test FAILED:"); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/toomanytldelements/implicit.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/toomanytldelements/implicit.tld new file mode 100644 index 00000000..56a6fdb1 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/toomanytldelements/implicit.tld @@ -0,0 +1,32 @@ + + + + + + 1.0 + implicit + + foo + ee.jakarta.tck.pages.common.tags.tck.SetTag + empty + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/versionnotmatch/WebTag1.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/versionnotmatch/WebTag1.tag new file mode 100644 index 00000000..fd51ea8e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/versionnotmatch/WebTag1.tag @@ -0,0 +1,19 @@ +<%-- + + Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% out.println("tag invoked"); %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/versionnotmatch/implicit.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/versionnotmatch/implicit.tld new file mode 100644 index 00000000..22981b00 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/WEB-INF/tags/versionnotmatch/implicit.tld @@ -0,0 +1,27 @@ + + + + + + 1.0 + implicit + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/jartagfile.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/jartagfile.tld new file mode 100644 index 00000000..04614a55 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/jartagfile.tld @@ -0,0 +1,32 @@ + + + + + jartagfile + 1.0 + jartag + http://java.sun.com/tck/jsp/jartag + + tag1 + /META-INF/tags/Tag1.tag + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/jsp_tagfile_pkg_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/jsp_tagfile_pkg_web.xml new file mode 100644 index 00000000..20044dbb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/packaging/jsp_tagfile_pkg_web.xml @@ -0,0 +1,25 @@ + + + + + JspTagfilepackaging + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/JspTagSemanticsAttributeNotSpecifiedTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/JspTagSemanticsAttributeNotSpecifiedTest.jsp new file mode 100644 index 00000000..9965d0db --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/JspTagSemanticsAttributeNotSpecifiedTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<%-- + Validate that if an attribute is declared, but not specified, + that no page scoped variable is created in the JSP Context Wrapper. +--%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/JspTagSemanticsDeclaredAttributesTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/JspTagSemanticsDeclaredAttributesTest.jsp new file mode 100644 index 00000000..fe91098c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/JspTagSemanticsDeclaredAttributesTest.jsp @@ -0,0 +1,32 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<%-- + For each attribute declared and specified, a page-scoped variable + must be created in the page scope of the JSP Context Wrapper. + The name of the variable must be the same as the declared attribute name. + The value of the variable must be the value of the attribute passed in + during invocation. +--%> + + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/JspTagSemanticsDynamicAttributesTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/JspTagSemanticsDynamicAttributesTest.jsp new file mode 100644 index 00000000..cf8d97d5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/JspTagSemanticsDynamicAttributesTest.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/JspTagSemanticsJspContextWrapperTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/JspTagSemanticsJspContextWrapperTest.jsp new file mode 100644 index 00000000..5f16590e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/JspTagSemanticsJspContextWrapperTest.jsp @@ -0,0 +1,34 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> +<%-- + The tag file implementation must create and maintain a second + instance of JspContext called a JSP ontext Wrapper. If the + invoking JSP Context is an instance of PageContext, the JSP Context Wrapper + must also be an instance of PageContext. This wrapper must be returned + when getJspContext() is called. +--%> + +<%-- Store the invoking JSP context in the current request --%> +<% request.setAttribute("INVOKING_CONTEXT", pageContext); %> + +<%-- invoke the tag --%> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/JspTagSemanticsScopesTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/JspTagSemanticsScopesTest.jsp new file mode 100644 index 00000000..ad9861bd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/JspTagSemanticsScopesTest.jsp @@ -0,0 +1,167 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" import="java.io.IOException" %> +<%@ taglib tagdir="/WEB-INF/tags" prefix="tags" %> + +<%! + private void cleanup(PageContext pageContext) { + pageContext.removeAttribute("applicationScopeAttr"); + pageContext.removeAttribute("applAddAttr"); + pageContext.removeAttribute("pageScopeAttr"); + pageContext.removeAttribute("requestScopeAttr"); + pageContext.removeAttribute("sessionScopeAttr"); + pageContext.removeAttribute("applicationScopeAttr"); + pageContext.removeAttribute("pageAddAttr"); + pageContext.removeAttribute("reqAddAttr"); + pageContext.removeAttribute("sessAddAttr"); + pageContext.removeAttribute("applAddAttr"); + } +%> + +<%! + private void initTest(PageContext pageContext) { + pageContext.setAttribute("pageScopeAttr", "pageScope"); + pageContext.setAttribute("pageScopeRem", "pageScopeRem"); + pageContext.setAttribute("requestScopeAttr", "requestScope", PageContext.REQUEST_SCOPE); + pageContext.setAttribute("requestScopeRem", "requestScopeRem", PageContext.REQUEST_SCOPE); + pageContext.setAttribute("sessionScopeAttr", "sessionScope", PageContext.SESSION_SCOPE); + pageContext.setAttribute("sessionScopeRem", "sessionScopeRem", PageContext.SESSION_SCOPE); + pageContext.setAttribute("applicationScopeAttr", "applicationScope", PageContext.APPLICATION_SCOPE); + pageContext.setAttribute("applicationScopeRem", "applicationScopeRem", PageContext.APPLICATION_SCOPE); + } +%> + +<%! + private void validate(PageContext pageContext) throws IOException { + JspWriter out = pageContext.getOut(); + String pageScope = (String) pageContext.getAttribute("pageScopeAttr"); + String reqScope = (String) pageContext.getAttribute("requestScopeAttr", PageContext.REQUEST_SCOPE); + String sessScope = (String) pageContext.getAttribute("sessionScopeAttr", PageContext.SESSION_SCOPE); + String applScope = (String) pageContext.getAttribute("applicationScopeAttr", PageContext.APPLICATION_SCOPE); + String pageAdd = (String) pageContext.getAttribute("pageAddAttr"); + String reqAdd = (String) pageContext.getAttribute("reqAddAttr", PageContext.REQUEST_SCOPE); + String sessAdd = (String) pageContext.getAttribute("sessAddAttr", PageContext.SESSION_SCOPE); + String applAdd = (String) pageContext.getAttribute("applAddAttr", PageContext.APPLICATION_SCOPE); + String pageRem = (String) pageContext.getAttribute("pageScopeRem"); + + if ("pageScope".equals(pageScope)) { + if ("requestScopeMod".equals(reqScope)) { + if ("sessionScopeMod".equals(sessScope)) { + if ("applicationScopeMod".equals(applScope)) { + if (pageContext.getAttribute("requestScopeRem") == null) { + if (pageContext.getAttribute("sessionScoperem") == null) { + if (pageContext.getAttribute("applicationScopeRem") == null) { + if ("pageScopeRem".equals(pageRem)) { + if (pageAdd == null) { + if ("reqAdd".equals(reqAdd)) { + if ("sessAdd".equals(sessAdd)) { + if ("applAdd".equals(applAdd)) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Application scoped " + + "variable added to wrapper not reflected in invoking context."); + } + } else { + out.println("Test FAILED. Session scoped " + + "variable added to wrapper not reflected in invoking context."); + } + } else { + out.println("Test FAILED. Request scoped " + + "variable added to wrapper not reflected in invoking context."); + } + } else { + out.println("Test FAILED. Page scoped variable added to wrapper should not" + + " have been synchronized with the invoking context"); + } + } else { + out.println("Test FAILED. The page scoped variable removed from the wrapper " + + "should not have been removed from the invoking context."); + } + } else { + out.println("Test FAILED. The application scoped variable that was removed from the " + + "wrapper was not removed from the invoking context."); + } + } else { + out.println("Test FAILED. The session scoped variable that was removed from the " + + "wrapper was not removed from the invoking context."); + } + } else { + out.println("Test FAILED. The request scoped variable that was removed from the " + + "wrapper was not removed from the invoking context."); + } + } else { + out.println("Test FAILED. The application scoped variable that was overwritten in the wrapper " + + "was not synchronized with the invoking context. Expected 'applicationScopeMod', received: " + applScope); + } + } else { + out.println("Test FAILED. The session scoped variable that was overwritten in the wrapper " + + "was not synchronized with the invoking context. Expected 'sessionScopeMod', received: " + sessScope); + } + } else { + out.println("Test FAILED. The request scoped variable that was overwritten in the wrapper " + + "was not synchronized with the invoking context. Expected 'requestScopeMod', received: " + reqScope); + } + } else { + out.println("Test FAILED. The page scoped variable originally defined in the invoking context " + + "was modified by a change in the wrapper context."); + } + } +%> + +<%-- + For each invocation to the tag, the JSP Context Wrapper must + present a clean page scope containing no initial elements. + All scopes other than the page scope must be identical to those + in the Invoking JSP Context and must be modified accordingly when updates + are made to those scopes in the JSP Context Wrapper. Any modifications + to the page scope, however, must not affect the Invoking JSP Context. +--%> + +<%-- Init the PageContext scopes --%> +<% + initTest(pageContext); +%> + +<%-- invoke the Tag --%> + + +<%-- post-invocation checks --%> +<% + validate(pageContext); +%> + +<%-- post test cleanup --%> +<% + cleanup(pageContext); +%> + +<%-- Invoke the tag again...no change in behavior should occur --%> +<% + initTest(pageContext); +%> + + + +<% + validate(pageContext); +%> + +<% + cleanup(pageContext); +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/mytags.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/mytags.tld new file mode 100644 index 00000000..c366a80e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/mytags.tld @@ -0,0 +1,41 @@ + + + + + mysimpletag + 1.0 + mysimpletag + http://java.sun.com/tck/jsp/tagfiles/semantics + + mysimpletag + ee.jakarta.tck.pages.spec.tagfiles.semantics.MySimpleTag + empty + false + + + myclassictag + ee.jakarta.tck.pages.spec.tagfiles.semantics.MyClassicTag + empty + false + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/AttributeNotSpecifiedTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/AttributeNotSpecifiedTag.tag new file mode 100644 index 00000000..4f73addd --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/AttributeNotSpecifiedTag.tag @@ -0,0 +1,28 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="attr1" required="false" %> + +<% + if (jspContext.getAttribute("attr1") == null) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. A page scoped variable was incorrectly created" + + " for an attribute that was not specified at invocation time."); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/DeclaredAttributesTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/DeclaredAttributesTag.tag new file mode 100644 index 00000000..4d699f76 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/DeclaredAttributesTag.tag @@ -0,0 +1,36 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ attribute name="attr1" required="true" %> +<%@ attribute name="attr2" required="false" %> + +<% + String attr1Value = (String) jspContext.getAttribute("attr1"); + String attr2Value = (String) jspContext.getAttribute("attr2"); + if ("attrValue".equals(attr1Value)) { + if ("attr2Value".equals(attr2Value)) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. Expected the value of attr2 to be 'attrValue'." + + " Received: " + attr2Value); + } + } else { + out.println("Test FAILED. Expected the value of attr1 to be 'attrValue'." + + " Received: " + attr1Value); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/DynamicAttributesTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/DynamicAttributesTag.tag new file mode 100644 index 00000000..633edcbf --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/DynamicAttributesTag.tag @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag dynamic-attributes="dynMap" import="java.util.Map" %> + +<% + String attr1Value = (String) ((Map) jspContext.getAttribute("dynMap")).get("attr1"); + if ("attr1Value".equals(attr1Value)) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. A page scoped variable was not created" + + " or was the incorrect value for the dynamic attribute passed" + + " in at invocation time. Expected: attr1Value, received: " + attr1Value); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/JspContextWrapperScopesTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/JspContextWrapperScopesTag.tag new file mode 100644 index 00000000..e49098f9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/JspContextWrapperScopesTag.tag @@ -0,0 +1,69 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ tag import="java.util.Enumeration"%> + +<% + // check to make sure the page scope of wrapper context is emtpy. + Enumeration e = jspContext.getAttributeNamesInScope(PageContext.PAGE_SCOPE); + if (e.hasMoreElements()) { + out.println("Test FAILED. The JSP Context Wrapper did not have a clean " + + "page scope."); + out.println("Attribute names found:"); + for (String name = (String) e.nextElement(); + e.hasMoreElements(); + name = (String) e.nextElement()) { + out.println(name); + } + } else { + String reqScope = (String) jspContext.getAttribute("requestScopeAttr", PageContext.REQUEST_SCOPE); + String sessScope = (String) jspContext.getAttribute("sessionScopeAttr", PageContext.SESSION_SCOPE); + String applScope = (String) jspContext.getAttribute("applicationScopeAttr", PageContext.APPLICATION_SCOPE); + if ("requestScope".equals(reqScope)) { + if ("sessionScope".equals(sessScope)) { + if ("applicationScope".equals(applScope)) { + out.println("Wrapper Test PASSED"); + } else { + out.println("Test FAILED. Invoking context application scope not " + + "totally available to the wrapping context. Expected 'applicationScope'," + + " received: " + applScope); + } + } else { + out.println("Test FAILED. Invoking context session scope not " + + "totally available to the wrapping context. Expected 'sessionScope'," + + " received: " + sessScope); + } + } else { + out.println("Test FAILED. Invoking context request scope not " + + "totally available to the wrapping context. Expected 'requestScope'," + + " received: " + reqScope); + } + jspContext.setAttribute("requestScopeAttr", "requestScopeMod", PageContext.REQUEST_SCOPE); + jspContext.setAttribute("sessionScopeAttr", "sessionScopeMod", PageContext.SESSION_SCOPE); + jspContext.setAttribute("applicationScopeAttr", "applicationScopeMod", PageContext.APPLICATION_SCOPE); + jspContext.removeAttribute("requestScopeRem"); + jspContext.removeAttribute("sessionScopeRem"); + jspContext.removeAttribute("applicationScopeRem"); + jspContext.setAttribute("pageScopeRem", "pageScopeRem"); + jspContext.removeAttribute("pageScopeRem"); + jspContext.setAttribute("pageAddAttr", "pageAdd"); + jspContext.setAttribute("reqAddAttr", "reqAdd", PageContext.REQUEST_SCOPE); + jspContext.setAttribute("sessAddAttr", "sessAdd", PageContext.SESSION_SCOPE); + jspContext.setAttribute("applAddAttr", "applAdd", PageContext.APPLICATION_SCOPE); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/JspContextWrapperTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/JspContextWrapperTag.tag new file mode 100644 index 00000000..b1345236 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/JspContextWrapperTag.tag @@ -0,0 +1,53 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<% + JspContext invokingContext = + (JspContext) request.getAttribute("INVOKING_CONTEXT"); + + JspContext tagContext = this.getJspContext(); + + if (invokingContext != null) { + if (tagContext != null) { + if (tagContext instanceof PageContext) { + if (tagContext != invokingContext) { + if (jspContext == tagContext) { + out.println("Test PASSED"); + } else { + out.println("Test FAILED. The jspContext scripting" + + " variable is not the same context as that returned " + + "by getJspContext()"); + } + } else { + out.println("Test FAILED. The JSP Context Wrapper is the " + + "same object as the invoking JSP Context."); + } + } else { + out.println("Test FAILED. The JSP Context Wrapper returned by" + + " getJspContext() should have been an instance of PageContext\n" + + " as the invoking JSP Context is Servlet-based."); + } + } else { + out.println("Test FAILED. The invocation of getJspContext() " + + "returned null."); + } + } else { + out.println("Test FAILED. Unable to find the invoking PageContext in the" + + " request object."); + } +%> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/semanticsInvokeClassicTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/semanticsInvokeClassicTag.tag new file mode 100644 index 00000000..895c96ce --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/semanticsInvokeClassicTag.tag @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="my" uri="http://java.sun.com/tck/jsp/tagfiles/semantics" %> + +endOfTagFile + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/semanticsInvokeSimpleTag.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/semanticsInvokeSimpleTag.tag new file mode 100644 index 00000000..d7d8f88e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/semanticsInvokeSimpleTag.tag @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ taglib prefix="my" uri="http://java.sun.com/tck/jsp/tagfiles/semantics" %> + +Test FAILED. This part of the tag file should not be processed. + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/semanticsJspForward.tag b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/semanticsJspForward.tag new file mode 100644 index 00000000..9d2fb519 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/WEB-INF/tags/semanticsJspForward.tag @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + + +Test FAILED. This part of the tag file should not be processed. + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/jsp_tagfile_semantics_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/jsp_tagfile_semantics_web.xml new file mode 100644 index 00000000..70694980 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/jsp_tagfile_semantics_web.xml @@ -0,0 +1,25 @@ + + + + + JspTagfileSemantics + + 5 + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/semanticsInvokeClassicTag.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/semanticsInvokeClassicTag.jsp new file mode 100644 index 00000000..261fd2c4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/semanticsInvokeClassicTag.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +endOfCallingPage diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/semanticsInvokeSimpleTag.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/semanticsInvokeSimpleTag.jsp new file mode 100644 index 00000000..75cd743c --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/semanticsInvokeSimpleTag.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +Test FAILED. this part of the page should not be processed. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/semanticsJspForward.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/semanticsJspForward.jsp new file mode 100644 index 00000000..b258d81b --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/semanticsJspForward.jsp @@ -0,0 +1,22 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib prefix="my" tagdir="/WEB-INF/tags" %> + +Test FAILED. this part should not be processed. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/semanticsJspForwardTarget.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/semanticsJspForwardTarget.jsp new file mode 100644 index 00000000..41f2e7ec --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tagfiles/semantics/semanticsJspForwardTarget.jsp @@ -0,0 +1,20 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +Test PASSED. The forwarded jsp processed. diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldExplicitWebXmlPrecedenceTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldExplicitWebXmlPrecedenceTest.jsp new file mode 100644 index 00000000..d23241a5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldExplicitWebXmlPrecedenceTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- + Taglibs defined in the web.xml takes precedence over taglibraries + defined in JAR files or in the WEB-INF directory. +--%> + +<%@ taglib uri="http://java.sun.com/tck/jsp/webxmlpres" prefix="webxml" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldResPath11Test.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldResPath11Test.jsp new file mode 100644 index 00000000..705207db --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldResPath11Test.jsp @@ -0,0 +1,29 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%-- + Validate a taglibrary can be detected when packaged + as specified in the JSP 1.1 specification. No + translation error should occur if properly found + by the container and the tag should work as expected. +--%> + +<%@ taglib uri="/WEB-INF/lib/jsp11taglib.jar" prefix="taglib" %> + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldResPathAbsUriNotFoundTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldResPathAbsUriNotFoundTest.jsp new file mode 100644 index 00000000..45a2e8fe --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldResPathAbsUriNotFoundTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- + If the URI provided to the uri attribute is an absolute URI + and the URI is not found in the taglib map, a translation + error must be raised. +--%> + +<%@ taglib uri="http://java.sun.com/tck/jsp/nosuchuriexists" prefix="pre" %> diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldResPathDirectTldReferenceTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldResPathDirectTldReferenceTest.jsp new file mode 100644 index 00000000..1cbf7e6e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldResPathDirectTldReferenceTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- + TLDs can be directly referenced in the uri attribute of the + taglib directive. +--%> + +<%@ taglib uri="/WEB-INF/webxml.tld" prefix="webxml" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldResPathExplicitWebXmlTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldResPathExplicitWebXmlTest.jsp new file mode 100644 index 00000000..71c40341 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldResPathExplicitWebXmlTest.jsp @@ -0,0 +1,25 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%-- + Validate a taglibrary can be used when explicitly + defined within the web.xml descriptor. +--%> +<%@ taglib uri="http://java.sun.com/tck/jsp/webxml" prefix="webxml" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldResPathMultiTldTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldResPathMultiTldTest.jsp new file mode 100644 index 00000000..936958e8 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldResPathMultiTldTest.jsp @@ -0,0 +1,30 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%-- + As of JSP 1.2 multiple TLD's can be packaged within a JAR file. + Validate the container registers the taglibrary based on the URI + specified in the element of the package TLDs. +--%> + +<%@ taglib uri="http://java.sun.com/tck/jsp/multi1" prefix="m1" %> +<%@ taglib uri="http://java.sun.com/tck/jsp/multi2" prefix="m2" %> + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldResPathWebInfUriTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldResPathWebInfUriTest.jsp new file mode 100644 index 00000000..3511036e --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/TldResPathWebInfUriTest.jsp @@ -0,0 +1,27 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%-- + As of JSP 2.0, TLDs with the element, if placed in /WEB-INF + (or some subdirectory thereof) will be processed by the container + and have the URI added to the taglib map. +--%> + +<%@ taglib uri="http://java.sun.com/tck/jsp/uri" prefix="uri" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/WEB-INF/a12.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/WEB-INF/a12.tld new file mode 100644 index 00000000..6f3f5a29 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/WEB-INF/a12.tld @@ -0,0 +1,31 @@ + + + + + + 1.0 + 1.2 + a12 + a12 + + a12 + ee.jakarta.tck.pages.spec.tldres.WebXmlTag + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/WEB-INF/sub/webinfsub.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/WEB-INF/sub/webinfsub.tld new file mode 100644 index 00000000..2873213d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/WEB-INF/sub/webinfsub.tld @@ -0,0 +1,30 @@ + + + + + webinfsub + 1.0 + webinfsub + + ee.jakarta.tck.pages.spec.tldres.HSListenerWebInfSub + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/WEB-INF/tlds/uri.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/WEB-INF/tlds/uri.tld new file mode 100644 index 00000000..616363a2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/WEB-INF/tlds/uri.tld @@ -0,0 +1,33 @@ + + + + + uri + 1.0 + uri + http://java.sun.com/tck/jsp/uri + + uri + ee.jakarta.tck.pages.spec.tldres.UriTag + JSP + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/WEB-INF/webinfpres.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/WEB-INF/webinfpres.tld new file mode 100644 index 00000000..dd571c66 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/WEB-INF/webinfpres.tld @@ -0,0 +1,33 @@ + + + + + webinfpres + 1.0 + webinfpres + http://java.sun.com/tck/jsp/webxmlpres + + webxml + ee.jakarta.tck.pages.spec.tldres.UriTag + JSP + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/WEB-INF/webxml.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/WEB-INF/webxml.tld new file mode 100644 index 00000000..2a437240 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/WEB-INF/webxml.tld @@ -0,0 +1,35 @@ + + + + + webxml + 1.0 + webxml + + ee.jakarta.tck.pages.spec.tldres.HSListenerWebInf + + + webxml + ee.jakarta.tck.pages.spec.tldres.WebXmlTag + JSP + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/jartagpres.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/jartagpres.tld new file mode 100644 index 00000000..56a2ccd0 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/jartagpres.tld @@ -0,0 +1,33 @@ + + + + + jartag + 1.0 + jartag + http://java.sun.com/tck/jsp/webxmlpres + + webxml + ee.jakarta.tck.pages.spec.tldres.Multi1Tag + JSP + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/jsp_tldres_web.xml b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/jsp_tldres_web.xml new file mode 100644 index 00000000..f71cf445 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/jsp_tldres_web.xml @@ -0,0 +1,35 @@ + + + + + JspTldRes + + 5 + + + + http://java.sun.com/tck/jsp/webxml + /WEB-INF/webxml.tld + + + http://java.sun.com/tck/jsp/webxmlpres + /WEB-INF/webxml.tld + + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/listenerTldTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/listenerTldTest.jsp new file mode 100644 index 00000000..1bbaedc5 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/listenerTldTest.jsp @@ -0,0 +1,23 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +${sessionScope["session.created.meta.inf"]} +${sessionScope["session.created.meta.inf.sub"]} +${sessionScope["session.created.web.inf"]} +${sessionScope["session.created.web.inf.sub"]} diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/metainfsub.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/metainfsub.tld new file mode 100644 index 00000000..b1ebda09 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/metainfsub.tld @@ -0,0 +1,31 @@ + + + + + metainfsub + 1.0 + metainfsub + http://java.sun.com/tck/jsp/metainfsub + + ee.jakarta.tck.pages.spec.tldres.HSListenerMetaInfSub + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/multi1.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/multi1.tld new file mode 100644 index 00000000..6da9d3c6 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/multi1.tld @@ -0,0 +1,36 @@ + + + + + multi1 + 1.0 + multi1 + http://java.sun.com/tck/jsp/multi1 + + ee.jakarta.tck.pages.spec.tldres.HSListenerMetaInf + + + multi1 + ee.jakarta.tck.pages.spec.tldres.Multi1Tag + JSP + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/multi2.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/multi2.tld new file mode 100644 index 00000000..41e7512d --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/multi2.tld @@ -0,0 +1,33 @@ + + + + + multi2 + 1.0 + multi2 + http://java.sun.com/tck/jsp/multi2 + + multi2 + ee.jakarta.tck.pages.spec.tldres.Multi2Tag + JSP + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/negativeJSPPrefix.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/negativeJSPPrefix.jsp new file mode 100644 index 00000000..b2829fad --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/negativeJSPPrefix.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- +use jsp prefix for an element that is not a standard action +--%> + +<%@ taglib uri="/WEB-INF/webxml.tld" prefix="jsp" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/negativeTaglibAfterActionTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/negativeTaglibAfterActionTest.jsp new file mode 100644 index 00000000..47cde5d2 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/negativeTaglibAfterActionTest.jsp @@ -0,0 +1,24 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + + + +<%@ taglib uri="/WEB-INF/webxml.tld" prefix="webxml" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/path/TldResPathRelativeUriTest.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/path/TldResPathRelativeUriTest.jsp new file mode 100644 index 00000000..a20361fb --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/path/TldResPathRelativeUriTest.jsp @@ -0,0 +1,21 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> +<%@ taglib uri="../WEB-INF/webxml.tld" prefix="webxml" %> + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/taglib.tld b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/taglib.tld new file mode 100644 index 00000000..070fded4 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/taglib.tld @@ -0,0 +1,32 @@ + + + + + taglib.tld + 1.0 + tld11 + + tld11 + ee.jakarta.tck.pages.spec.tldres.Tld11Tag + JSP + + diff --git a/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/tld12DefaultBodyContent.jsp b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/tld12DefaultBodyContent.jsp new file mode 100644 index 00000000..8ae7bdb9 --- /dev/null +++ b/tck/src/main/resources/ee/jakarta/tck/pages/spec/tldres/tld12DefaultBodyContent.jsp @@ -0,0 +1,26 @@ +<%-- + + Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + + This program and the accompanying materials are made available under the + terms of the Eclipse Public License v. 2.0, which is available at + http://www.eclipse.org/legal/epl-2.0. + + This Source Code may also be made available under the following Secondary + Licenses when the conditions for such availability set forth in the + Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + version 2 with the GNU Classpath Exception, which is available at + https://www.gnu.org/software/classpath/license.html. + + SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + +--%> + +<%@ page contentType="text/plain" %> + +<%-- +omit body-content in a 1.2 style tld and a container is required to apply default JSP. +--%> + +<%@ taglib uri="/WEB-INF/a12.tld" prefix="a12" %> + diff --git a/tck/src/main/resources/jakarta.servlet.jsp.sig_3.1 b/tck/src/main/resources/jakarta.servlet.jsp.sig_3.1 new file mode 100644 index 00000000..f11597b6 --- /dev/null +++ b/tck/src/main/resources/jakarta.servlet.jsp.sig_3.1 @@ -0,0 +1,663 @@ +#Signature file v4.1 +#Version 3.1 + +CLSS public abstract jakarta.el.ELResolver +cons public init() +fld public final static java.lang.String RESOLVABLE_AT_DESIGN_TIME = "resolvableAtDesignTime" +fld public final static java.lang.String TYPE = "type" +meth public <%0 extends java.lang.Object> {%%0} convertToType(jakarta.el.ELContext,java.lang.Object,java.lang.Class<{%%0}>) +meth public abstract boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public abstract java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public abstract java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public abstract java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public abstract void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +meth public java.lang.Object invoke(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Class[],java.lang.Object[]) +meth public java.util.Iterator getFeatureDescriptors(jakarta.el.ELContext,java.lang.Object) + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="5.0") +supr java.lang.Object + +CLSS public abstract interface jakarta.servlet.Servlet +meth public abstract jakarta.servlet.ServletConfig getServletConfig() +meth public abstract java.lang.String getServletInfo() +meth public abstract void destroy() +meth public abstract void init(jakarta.servlet.ServletConfig) throws jakarta.servlet.ServletException +meth public abstract void service(jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse) throws jakarta.servlet.ServletException,java.io.IOException + +CLSS public final jakarta.servlet.jsp.ErrorData +cons public init(java.lang.Throwable,int,java.lang.String,java.lang.String) +meth public int getStatusCode() +meth public java.lang.String getRequestURI() +meth public java.lang.String getServletName() +meth public java.lang.Throwable getThrowable() +supr java.lang.Object +hfds servletName,statusCode,throwable,uri + +CLSS public abstract interface jakarta.servlet.jsp.HttpJspPage +intf jakarta.servlet.jsp.JspPage +meth public abstract void _jspService(jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse) throws jakarta.servlet.ServletException,java.io.IOException + +CLSS public abstract interface jakarta.servlet.jsp.JspApplicationContext +meth public abstract jakarta.el.ExpressionFactory getExpressionFactory() +meth public abstract void addELContextListener(jakarta.el.ELContextListener) +meth public abstract void addELResolver(jakarta.el.ELResolver) + +CLSS public abstract jakarta.servlet.jsp.JspContext +cons public init() +meth public abstract int getAttributesScope(java.lang.String) +meth public abstract jakarta.el.ELContext getELContext() +meth public abstract jakarta.servlet.jsp.JspWriter getOut() +meth public abstract jakarta.servlet.jsp.el.ExpressionEvaluator getExpressionEvaluator() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +meth public abstract jakarta.servlet.jsp.el.VariableResolver getVariableResolver() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +meth public abstract java.lang.Object findAttribute(java.lang.String) +meth public abstract java.lang.Object getAttribute(java.lang.String) +meth public abstract java.lang.Object getAttribute(java.lang.String,int) +meth public abstract java.util.Enumeration getAttributeNamesInScope(int) +meth public abstract void removeAttribute(java.lang.String) +meth public abstract void removeAttribute(java.lang.String,int) +meth public abstract void setAttribute(java.lang.String,java.lang.Object) +meth public abstract void setAttribute(java.lang.String,java.lang.Object,int) +meth public jakarta.servlet.jsp.JspWriter popBody() +meth public jakarta.servlet.jsp.JspWriter pushBody(java.io.Writer) +supr java.lang.Object + +CLSS public abstract jakarta.servlet.jsp.JspEngineInfo +cons public init() +meth public abstract java.lang.String getSpecificationVersion() +supr java.lang.Object + +CLSS public jakarta.servlet.jsp.JspException +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +meth public java.lang.Throwable getRootCause() + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +supr java.lang.Exception +hfds serialVersionUID + +CLSS public abstract jakarta.servlet.jsp.JspFactory +cons public init() +meth public abstract jakarta.servlet.jsp.JspApplicationContext getJspApplicationContext(jakarta.servlet.ServletContext) +meth public abstract jakarta.servlet.jsp.JspEngineInfo getEngineInfo() +meth public abstract jakarta.servlet.jsp.PageContext getPageContext(jakarta.servlet.Servlet,jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse,java.lang.String,boolean,int,boolean) +meth public abstract void releasePageContext(jakarta.servlet.jsp.PageContext) +meth public static jakarta.servlet.jsp.JspFactory getDefaultFactory() +meth public static void setDefaultFactory(jakarta.servlet.jsp.JspFactory) +supr java.lang.Object +hfds deflt + +CLSS public abstract interface jakarta.servlet.jsp.JspPage +intf jakarta.servlet.Servlet +meth public abstract void jspDestroy() +meth public abstract void jspInit() + +CLSS public jakarta.servlet.jsp.JspTagException +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +supr jakarta.servlet.jsp.JspException +hfds serialVersionUID + +CLSS public abstract jakarta.servlet.jsp.JspWriter +cons protected init(int,boolean) +fld protected boolean autoFlush +fld protected int bufferSize +fld public final static int DEFAULT_BUFFER = -1 +fld public final static int NO_BUFFER = 0 +fld public final static int UNBOUNDED_BUFFER = -2 +meth public abstract int getRemaining() +meth public abstract void clear() throws java.io.IOException +meth public abstract void clearBuffer() throws java.io.IOException +meth public abstract void close() throws java.io.IOException +meth public abstract void flush() throws java.io.IOException +meth public abstract void newLine() throws java.io.IOException +meth public abstract void print(boolean) throws java.io.IOException +meth public abstract void print(char) throws java.io.IOException +meth public abstract void print(char[]) throws java.io.IOException +meth public abstract void print(double) throws java.io.IOException +meth public abstract void print(float) throws java.io.IOException +meth public abstract void print(int) throws java.io.IOException +meth public abstract void print(java.lang.Object) throws java.io.IOException +meth public abstract void print(java.lang.String) throws java.io.IOException +meth public abstract void print(long) throws java.io.IOException +meth public abstract void println() throws java.io.IOException +meth public abstract void println(boolean) throws java.io.IOException +meth public abstract void println(char) throws java.io.IOException +meth public abstract void println(char[]) throws java.io.IOException +meth public abstract void println(double) throws java.io.IOException +meth public abstract void println(float) throws java.io.IOException +meth public abstract void println(int) throws java.io.IOException +meth public abstract void println(java.lang.Object) throws java.io.IOException +meth public abstract void println(java.lang.String) throws java.io.IOException +meth public abstract void println(long) throws java.io.IOException +meth public boolean isAutoFlush() +meth public int getBufferSize() +supr java.io.Writer + +CLSS public abstract jakarta.servlet.jsp.PageContext +cons public init() +fld public final static int APPLICATION_SCOPE = 4 +fld public final static int PAGE_SCOPE = 1 +fld public final static int REQUEST_SCOPE = 2 +fld public final static int SESSION_SCOPE = 3 +fld public final static java.lang.String APPLICATION = "jakarta.servlet.jsp.jspApplication" +fld public final static java.lang.String CONFIG = "jakarta.servlet.jsp.jspConfig" +fld public final static java.lang.String EXCEPTION = "jakarta.servlet.jsp.jspException" +fld public final static java.lang.String OUT = "jakarta.servlet.jsp.jspOut" +fld public final static java.lang.String PAGE = "jakarta.servlet.jsp.jspPage" +fld public final static java.lang.String PAGECONTEXT = "jakarta.servlet.jsp.jspPageContext" +fld public final static java.lang.String REQUEST = "jakarta.servlet.jsp.jspRequest" +fld public final static java.lang.String RESPONSE = "jakarta.servlet.jsp.jspResponse" +fld public final static java.lang.String SESSION = "jakarta.servlet.jsp.jspSession" +meth public abstract jakarta.servlet.ServletConfig getServletConfig() +meth public abstract jakarta.servlet.ServletContext getServletContext() +meth public abstract jakarta.servlet.ServletRequest getRequest() +meth public abstract jakarta.servlet.ServletResponse getResponse() +meth public abstract jakarta.servlet.http.HttpSession getSession() +meth public abstract java.lang.Exception getException() +meth public abstract java.lang.Object getPage() +meth public abstract void forward(java.lang.String) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void handlePageException(java.lang.Exception) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void handlePageException(java.lang.Throwable) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void include(java.lang.String) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void include(java.lang.String,boolean) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void initialize(jakarta.servlet.Servlet,jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse,java.lang.String,boolean,int,boolean) throws java.io.IOException +meth public abstract void release() +meth public jakarta.servlet.jsp.ErrorData getErrorData() +meth public jakarta.servlet.jsp.tagext.BodyContent pushBody() +supr jakarta.servlet.jsp.JspContext + +CLSS public jakarta.servlet.jsp.SkipPageException +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +supr jakarta.servlet.jsp.JspException +hfds serialVersionUID + +CLSS public jakarta.servlet.jsp.el.ELException + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +meth public java.lang.Throwable getRootCause() +supr java.lang.Exception +hfds mRootCause,serialVersionUID + +CLSS public jakarta.servlet.jsp.el.ELParseException + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +cons public init() +cons public init(java.lang.String) +supr jakarta.servlet.jsp.el.ELException +hfds serialVersionUID + +CLSS public abstract jakarta.servlet.jsp.el.Expression + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +cons public init() +meth public abstract java.lang.Object evaluate(jakarta.servlet.jsp.el.VariableResolver) throws jakarta.servlet.jsp.el.ELException +supr java.lang.Object + +CLSS public abstract jakarta.servlet.jsp.el.ExpressionEvaluator + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +cons public init() +meth public abstract jakarta.servlet.jsp.el.Expression parseExpression(java.lang.String,java.lang.Class,jakarta.servlet.jsp.el.FunctionMapper) throws jakarta.servlet.jsp.el.ELException +meth public abstract java.lang.Object evaluate(java.lang.String,java.lang.Class,jakarta.servlet.jsp.el.VariableResolver,jakarta.servlet.jsp.el.FunctionMapper) throws jakarta.servlet.jsp.el.ELException +supr java.lang.Object + +CLSS public abstract interface jakarta.servlet.jsp.el.FunctionMapper + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +meth public abstract java.lang.reflect.Method resolveFunction(java.lang.String,java.lang.String) + +CLSS public jakarta.servlet.jsp.el.ImplicitObjectELResolver +cons public init() +meth public boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.util.Iterator getFeatureDescriptors(jakarta.el.ELContext,java.lang.Object) + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="JSP 3.1") +meth public void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +supr jakarta.el.ELResolver +hcls EnumeratedMap,ImplicitObjects + +CLSS public jakarta.servlet.jsp.el.ImportELResolver +cons public init() +meth public boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +supr jakarta.el.ELResolver + +CLSS public jakarta.servlet.jsp.el.NotFoundELResolver +cons public init() +meth public boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +supr jakarta.el.ELResolver +hfds LSTRING_FILE,lStrings + +CLSS public jakarta.servlet.jsp.el.ScopedAttributeELResolver +cons public init() +meth public boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.util.Iterator getFeatureDescriptors(jakarta.el.ELContext,java.lang.Object) + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="JSP 3.1") +meth public void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +supr jakarta.el.ELResolver + +CLSS public abstract interface jakarta.servlet.jsp.el.VariableResolver + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +meth public abstract java.lang.Object resolveVariable(java.lang.String) throws jakarta.servlet.jsp.el.ELException + +CLSS public abstract jakarta.servlet.jsp.tagext.BodyContent +cons protected init(jakarta.servlet.jsp.JspWriter) +meth public abstract java.io.Reader getReader() +meth public abstract java.lang.String getString() +meth public abstract void writeOut(java.io.Writer) throws java.io.IOException +meth public jakarta.servlet.jsp.JspWriter getEnclosingWriter() +meth public void clearBody() +meth public void flush() throws java.io.IOException +supr jakarta.servlet.jsp.JspWriter +hfds enclosingWriter + +CLSS public abstract interface jakarta.servlet.jsp.tagext.BodyTag +fld public final static int EVAL_BODY_BUFFERED = 2 +fld public final static int EVAL_BODY_TAG = 2 + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="") +intf jakarta.servlet.jsp.tagext.IterationTag +meth public abstract void doInitBody() throws jakarta.servlet.jsp.JspException +meth public abstract void setBodyContent(jakarta.servlet.jsp.tagext.BodyContent) + +CLSS public jakarta.servlet.jsp.tagext.BodyTagSupport +cons public init() +fld protected jakarta.servlet.jsp.tagext.BodyContent bodyContent +intf jakarta.servlet.jsp.tagext.BodyTag +meth public int doAfterBody() throws jakarta.servlet.jsp.JspException +meth public int doEndTag() throws jakarta.servlet.jsp.JspException +meth public int doStartTag() throws jakarta.servlet.jsp.JspException +meth public jakarta.servlet.jsp.JspWriter getPreviousOut() +meth public jakarta.servlet.jsp.tagext.BodyContent getBodyContent() +meth public void doInitBody() throws jakarta.servlet.jsp.JspException +meth public void release() +meth public void setBodyContent(jakarta.servlet.jsp.tagext.BodyContent) +supr jakarta.servlet.jsp.tagext.TagSupport +hfds serialVersionUID + +CLSS public abstract interface jakarta.servlet.jsp.tagext.DynamicAttributes +meth public abstract void setDynamicAttribute(java.lang.String,java.lang.String,java.lang.Object) throws jakarta.servlet.jsp.JspException + +CLSS public jakarta.servlet.jsp.tagext.FunctionInfo +cons public init(java.lang.String,java.lang.String,java.lang.String) +meth public java.lang.String getFunctionClass() +meth public java.lang.String getFunctionSignature() +meth public java.lang.String getName() +supr java.lang.Object +hfds functionClass,functionSignature,name + +CLSS public abstract interface jakarta.servlet.jsp.tagext.IterationTag +fld public final static int EVAL_BODY_AGAIN = 2 +intf jakarta.servlet.jsp.tagext.Tag +meth public abstract int doAfterBody() throws jakarta.servlet.jsp.JspException + +CLSS public abstract jakarta.servlet.jsp.tagext.JspFragment +cons public init() +meth public abstract jakarta.servlet.jsp.JspContext getJspContext() +meth public abstract void invoke(java.io.Writer) throws jakarta.servlet.jsp.JspException,java.io.IOException +supr java.lang.Object + +CLSS public abstract interface jakarta.servlet.jsp.tagext.JspIdConsumer +meth public abstract void setJspId(java.lang.String) + +CLSS public abstract interface jakarta.servlet.jsp.tagext.JspTag + +CLSS public abstract jakarta.servlet.jsp.tagext.PageData +cons public init() +meth public abstract java.io.InputStream getInputStream() +supr java.lang.Object + +CLSS public abstract interface jakarta.servlet.jsp.tagext.SimpleTag +intf jakarta.servlet.jsp.tagext.JspTag +meth public abstract jakarta.servlet.jsp.tagext.JspTag getParent() +meth public abstract void doTag() throws jakarta.servlet.jsp.JspException,java.io.IOException +meth public abstract void setJspBody(jakarta.servlet.jsp.tagext.JspFragment) +meth public abstract void setJspContext(jakarta.servlet.jsp.JspContext) +meth public abstract void setParent(jakarta.servlet.jsp.tagext.JspTag) + +CLSS public jakarta.servlet.jsp.tagext.SimpleTagSupport +cons public init() +intf jakarta.servlet.jsp.tagext.SimpleTag +meth protected jakarta.servlet.jsp.JspContext getJspContext() +meth protected jakarta.servlet.jsp.tagext.JspFragment getJspBody() +meth public final static jakarta.servlet.jsp.tagext.JspTag findAncestorWithClass(jakarta.servlet.jsp.tagext.JspTag,java.lang.Class) +meth public jakarta.servlet.jsp.tagext.JspTag getParent() +meth public void doTag() throws jakarta.servlet.jsp.JspException,java.io.IOException +meth public void setJspBody(jakarta.servlet.jsp.tagext.JspFragment) +meth public void setJspContext(jakarta.servlet.jsp.JspContext) +meth public void setParent(jakarta.servlet.jsp.tagext.JspTag) +supr java.lang.Object +hfds jspBody,jspContext,parentTag + +CLSS public abstract interface jakarta.servlet.jsp.tagext.Tag +fld public final static int EVAL_BODY_INCLUDE = 1 +fld public final static int EVAL_PAGE = 6 +fld public final static int SKIP_BODY = 0 +fld public final static int SKIP_PAGE = 5 +intf jakarta.servlet.jsp.tagext.JspTag +meth public abstract int doEndTag() throws jakarta.servlet.jsp.JspException +meth public abstract int doStartTag() throws jakarta.servlet.jsp.JspException +meth public abstract jakarta.servlet.jsp.tagext.Tag getParent() +meth public abstract void release() +meth public abstract void setPageContext(jakarta.servlet.jsp.PageContext) +meth public abstract void setParent(jakarta.servlet.jsp.tagext.Tag) + +CLSS public jakarta.servlet.jsp.tagext.TagAdapter +cons public init(jakarta.servlet.jsp.tagext.SimpleTag) +intf jakarta.servlet.jsp.tagext.Tag +meth public int doEndTag() throws jakarta.servlet.jsp.JspException +meth public int doStartTag() throws jakarta.servlet.jsp.JspException +meth public jakarta.servlet.jsp.tagext.JspTag getAdaptee() +meth public jakarta.servlet.jsp.tagext.Tag getParent() +meth public void release() +meth public void setPageContext(jakarta.servlet.jsp.PageContext) +meth public void setParent(jakarta.servlet.jsp.tagext.Tag) +supr java.lang.Object +hfds parent,parentDetermined,simpleTagAdaptee + +CLSS public jakarta.servlet.jsp.tagext.TagAttributeInfo +cons public init(java.lang.String,boolean,java.lang.String,boolean) +cons public init(java.lang.String,boolean,java.lang.String,boolean,boolean) +cons public init(java.lang.String,boolean,java.lang.String,boolean,boolean,java.lang.String,boolean,boolean,java.lang.String,java.lang.String) +fld public final static java.lang.String ID = "id" +meth public boolean canBeRequestTime() +meth public boolean isDeferredMethod() +meth public boolean isDeferredValue() +meth public boolean isFragment() +meth public boolean isRequired() +meth public java.lang.String getDescription() +meth public java.lang.String getExpectedTypeName() +meth public java.lang.String getMethodSignature() +meth public java.lang.String getName() +meth public java.lang.String getTypeName() +meth public java.lang.String toString() +meth public static jakarta.servlet.jsp.tagext.TagAttributeInfo getIdAttribute(jakarta.servlet.jsp.tagext.TagAttributeInfo[]) +supr java.lang.Object +hfds deferredMethod,deferredValue,description,expectedTypeName,fragment,methodSignature,name,reqTime,required,type + +CLSS public jakarta.servlet.jsp.tagext.TagData +cons public init(java.lang.Object[][]) +cons public init(java.util.Hashtable) +fld public final static java.lang.Object REQUEST_TIME_VALUE +intf java.lang.Cloneable +meth public java.lang.Object getAttribute(java.lang.String) +meth public java.lang.String getAttributeString(java.lang.String) +meth public java.lang.String getId() +meth public java.util.Enumeration getAttributes() +meth public void setAttribute(java.lang.String,java.lang.Object) +supr java.lang.Object +hfds attributes + +CLSS public abstract jakarta.servlet.jsp.tagext.TagExtraInfo +cons public init() +meth public boolean isValid(jakarta.servlet.jsp.tagext.TagData) +meth public final jakarta.servlet.jsp.tagext.TagInfo getTagInfo() +meth public final void setTagInfo(jakarta.servlet.jsp.tagext.TagInfo) +meth public jakarta.servlet.jsp.tagext.ValidationMessage[] validate(jakarta.servlet.jsp.tagext.TagData) +meth public jakarta.servlet.jsp.tagext.VariableInfo[] getVariableInfo(jakarta.servlet.jsp.tagext.TagData) +supr java.lang.Object +hfds ZERO_VARIABLE_INFO,tagInfo + +CLSS public jakarta.servlet.jsp.tagext.TagFileInfo +cons public init(java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagInfo) +meth public jakarta.servlet.jsp.tagext.TagInfo getTagInfo() +meth public java.lang.String getName() +meth public java.lang.String getPath() +supr java.lang.Object +hfds name,path,tagInfo + +CLSS public jakarta.servlet.jsp.tagext.TagInfo +cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagLibraryInfo,jakarta.servlet.jsp.tagext.TagExtraInfo,jakarta.servlet.jsp.tagext.TagAttributeInfo[]) +cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagLibraryInfo,jakarta.servlet.jsp.tagext.TagExtraInfo,jakarta.servlet.jsp.tagext.TagAttributeInfo[],java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagVariableInfo[]) +cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagLibraryInfo,jakarta.servlet.jsp.tagext.TagExtraInfo,jakarta.servlet.jsp.tagext.TagAttributeInfo[],java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagVariableInfo[],boolean) +fld public final static java.lang.String BODY_CONTENT_EMPTY = "empty" +fld public final static java.lang.String BODY_CONTENT_JSP = "JSP" +fld public final static java.lang.String BODY_CONTENT_SCRIPTLESS = "scriptless" +fld public final static java.lang.String BODY_CONTENT_TAG_DEPENDENT = "tagdependent" +meth public boolean hasDynamicAttributes() +meth public boolean isValid(jakarta.servlet.jsp.tagext.TagData) +meth public jakarta.servlet.jsp.tagext.TagAttributeInfo[] getAttributes() +meth public jakarta.servlet.jsp.tagext.TagExtraInfo getTagExtraInfo() +meth public jakarta.servlet.jsp.tagext.TagLibraryInfo getTagLibrary() +meth public jakarta.servlet.jsp.tagext.TagVariableInfo[] getTagVariableInfos() +meth public jakarta.servlet.jsp.tagext.ValidationMessage[] validate(jakarta.servlet.jsp.tagext.TagData) +meth public jakarta.servlet.jsp.tagext.VariableInfo[] getVariableInfo(jakarta.servlet.jsp.tagext.TagData) +meth public java.lang.String getBodyContent() +meth public java.lang.String getDisplayName() +meth public java.lang.String getInfoString() +meth public java.lang.String getLargeIcon() +meth public java.lang.String getSmallIcon() +meth public java.lang.String getTagClassName() +meth public java.lang.String getTagName() +meth public void setTagExtraInfo(jakarta.servlet.jsp.tagext.TagExtraInfo) +meth public void setTagLibrary(jakarta.servlet.jsp.tagext.TagLibraryInfo) +supr java.lang.Object +hfds attributeInfo,bodyContent,displayName,dynamicAttributes,infoString,largeIcon,smallIcon,tagClassName,tagExtraInfo,tagLibrary,tagName,tagVariableInfo + +CLSS public abstract jakarta.servlet.jsp.tagext.TagLibraryInfo +cons protected init(java.lang.String,java.lang.String) +fld protected jakarta.servlet.jsp.tagext.FunctionInfo[] functions +fld protected jakarta.servlet.jsp.tagext.TagFileInfo[] tagFiles +fld protected jakarta.servlet.jsp.tagext.TagInfo[] tags +fld protected java.lang.String info +fld protected java.lang.String jspversion +fld protected java.lang.String prefix +fld protected java.lang.String shortname +fld protected java.lang.String tlibversion +fld protected java.lang.String uri +fld protected java.lang.String urn +meth public abstract jakarta.servlet.jsp.tagext.TagLibraryInfo[] getTagLibraryInfos() +meth public jakarta.servlet.jsp.tagext.FunctionInfo getFunction(java.lang.String) +meth public jakarta.servlet.jsp.tagext.FunctionInfo[] getFunctions() +meth public jakarta.servlet.jsp.tagext.TagFileInfo getTagFile(java.lang.String) +meth public jakarta.servlet.jsp.tagext.TagFileInfo[] getTagFiles() +meth public jakarta.servlet.jsp.tagext.TagInfo getTag(java.lang.String) +meth public jakarta.servlet.jsp.tagext.TagInfo[] getTags() +meth public java.lang.String getInfoString() +meth public java.lang.String getPrefixString() +meth public java.lang.String getReliableURN() +meth public java.lang.String getRequiredVersion() +meth public java.lang.String getShortName() +meth public java.lang.String getURI() +supr java.lang.Object + +CLSS public abstract jakarta.servlet.jsp.tagext.TagLibraryValidator +cons public init() +meth public jakarta.servlet.jsp.tagext.ValidationMessage[] validate(java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.PageData) +meth public java.util.Map getInitParameters() +meth public void release() +meth public void setInitParameters(java.util.Map) +supr java.lang.Object +hfds initParameters + +CLSS public jakarta.servlet.jsp.tagext.TagSupport +cons public init() +fld protected jakarta.servlet.jsp.PageContext pageContext +fld protected java.lang.String id +intf jakarta.servlet.jsp.tagext.IterationTag +intf java.io.Serializable +meth public final static jakarta.servlet.jsp.tagext.Tag findAncestorWithClass(jakarta.servlet.jsp.tagext.Tag,java.lang.Class) +meth public int doAfterBody() throws jakarta.servlet.jsp.JspException +meth public int doEndTag() throws jakarta.servlet.jsp.JspException +meth public int doStartTag() throws jakarta.servlet.jsp.JspException +meth public jakarta.servlet.jsp.tagext.Tag getParent() +meth public java.lang.Object getValue(java.lang.String) +meth public java.lang.String getId() +meth public java.util.Enumeration getValues() +meth public void release() +meth public void removeValue(java.lang.String) +meth public void setId(java.lang.String) +meth public void setPageContext(jakarta.servlet.jsp.PageContext) +meth public void setParent(jakarta.servlet.jsp.tagext.Tag) +meth public void setValue(java.lang.String,java.lang.Object) +supr java.lang.Object +hfds parent,serialVersionUID,values + +CLSS public jakarta.servlet.jsp.tagext.TagVariableInfo +cons public init(java.lang.String,java.lang.String,java.lang.String,boolean,int) +meth public boolean getDeclare() +meth public int getScope() +meth public java.lang.String getClassName() +meth public java.lang.String getNameFromAttribute() +meth public java.lang.String getNameGiven() +supr java.lang.Object +hfds className,declare,nameFromAttribute,nameGiven,scope + +CLSS public abstract interface jakarta.servlet.jsp.tagext.TryCatchFinally +meth public abstract void doCatch(java.lang.Throwable) throws java.lang.Throwable +meth public abstract void doFinally() + +CLSS public jakarta.servlet.jsp.tagext.ValidationMessage +cons public init(java.lang.String,java.lang.String) +meth public java.lang.String getId() +meth public java.lang.String getMessage() +supr java.lang.Object +hfds id,message + +CLSS public jakarta.servlet.jsp.tagext.VariableInfo +cons public init(java.lang.String,java.lang.String,boolean,int) +fld public final static int AT_BEGIN = 1 +fld public final static int AT_END = 2 +fld public final static int NESTED = 0 +meth public boolean getDeclare() +meth public int getScope() +meth public java.lang.String getClassName() +meth public java.lang.String getVarName() +supr java.lang.Object +hfds className,declare,scope,varName + +CLSS public abstract interface java.io.Closeable +intf java.lang.AutoCloseable +meth public abstract void close() throws java.io.IOException + +CLSS public abstract interface java.io.Flushable +meth public abstract void flush() throws java.io.IOException + +CLSS public abstract interface java.io.Serializable + +CLSS public abstract java.io.Writer +cons protected init() +cons protected init(java.lang.Object) +fld protected java.lang.Object lock +intf java.io.Closeable +intf java.io.Flushable +intf java.lang.Appendable +meth public abstract void close() throws java.io.IOException +meth public abstract void flush() throws java.io.IOException +meth public abstract void write(char[],int,int) throws java.io.IOException +meth public java.io.Writer append(char) throws java.io.IOException +meth public java.io.Writer append(java.lang.CharSequence) throws java.io.IOException +meth public java.io.Writer append(java.lang.CharSequence,int,int) throws java.io.IOException +meth public static java.io.Writer nullWriter() +meth public void write(char[]) throws java.io.IOException +meth public void write(int) throws java.io.IOException +meth public void write(java.lang.String) throws java.io.IOException +meth public void write(java.lang.String,int,int) throws java.io.IOException +supr java.lang.Object + +CLSS public abstract interface java.lang.Appendable +meth public abstract java.lang.Appendable append(char) throws java.io.IOException +meth public abstract java.lang.Appendable append(java.lang.CharSequence) throws java.io.IOException +meth public abstract java.lang.Appendable append(java.lang.CharSequence,int,int) throws java.io.IOException + +CLSS public abstract interface java.lang.AutoCloseable +meth public abstract void close() throws java.lang.Exception + +CLSS public abstract interface java.lang.Cloneable + +CLSS public abstract interface !annotation java.lang.Deprecated + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, PACKAGE, MODULE, PARAMETER, TYPE]) +intf java.lang.annotation.Annotation +meth public abstract !hasdefault boolean forRemoval() +meth public abstract !hasdefault java.lang.String since() + +CLSS public java.lang.Exception +cons protected init(java.lang.String,java.lang.Throwable,boolean,boolean) +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +supr java.lang.Throwable + +CLSS public java.lang.Object +cons public init() +meth protected java.lang.Object clone() throws java.lang.CloneNotSupportedException +meth protected void finalize() throws java.lang.Throwable + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="9") +meth public boolean equals(java.lang.Object) +meth public final java.lang.Class getClass() +meth public final void notify() +meth public final void notifyAll() +meth public final void wait() throws java.lang.InterruptedException +meth public final void wait(long) throws java.lang.InterruptedException +meth public final void wait(long,int) throws java.lang.InterruptedException +meth public int hashCode() +meth public java.lang.String toString() + +CLSS public java.lang.Throwable +cons protected init(java.lang.String,java.lang.Throwable,boolean,boolean) +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +intf java.io.Serializable +meth public final java.lang.Throwable[] getSuppressed() +meth public final void addSuppressed(java.lang.Throwable) +meth public java.lang.StackTraceElement[] getStackTrace() +meth public java.lang.String getLocalizedMessage() +meth public java.lang.String getMessage() +meth public java.lang.String toString() +meth public java.lang.Throwable fillInStackTrace() +meth public java.lang.Throwable getCause() +meth public java.lang.Throwable initCause(java.lang.Throwable) +meth public void printStackTrace() +meth public void printStackTrace(java.io.PrintStream) +meth public void printStackTrace(java.io.PrintWriter) +meth public void setStackTrace(java.lang.StackTraceElement[]) +supr java.lang.Object + +CLSS public abstract interface java.lang.annotation.Annotation +meth public abstract boolean equals(java.lang.Object) +meth public abstract int hashCode() +meth public abstract java.lang.Class annotationType() +meth public abstract java.lang.String toString() + +CLSS public abstract interface !annotation java.lang.annotation.Documented + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation + +CLSS public abstract interface !annotation java.lang.annotation.Retention + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.annotation.RetentionPolicy value() + +CLSS public abstract interface !annotation java.lang.annotation.Target + anno 0 java.lang.annotation.Documented() + anno 0 java.lang.annotation.Retention(java.lang.annotation.RetentionPolicy value=RUNTIME) + anno 0 java.lang.annotation.Target(java.lang.annotation.ElementType[] value=[ANNOTATION_TYPE]) +intf java.lang.annotation.Annotation +meth public abstract java.lang.annotation.ElementType[] value() + diff --git a/tck/src/main/resources/jakarta.servlet.jsp.sig_4.0 b/tck/src/main/resources/jakarta.servlet.jsp.sig_4.0 new file mode 100644 index 00000000..16bf437b --- /dev/null +++ b/tck/src/main/resources/jakarta.servlet.jsp.sig_4.0 @@ -0,0 +1,583 @@ +#Signature file v4.1 +#Version 4.0.0 + +CLSS public abstract jakarta.el.ELResolver +cons public init() +meth public <%0 extends java.lang.Object> {%%0} convertToType(jakarta.el.ELContext,java.lang.Object,java.lang.Class<{%%0}>) +meth public abstract boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public abstract java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public abstract java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public abstract java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public abstract void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +meth public java.lang.Object invoke(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Class[],java.lang.Object[]) +supr java.lang.Object + +CLSS public abstract interface jakarta.servlet.Servlet +meth public abstract jakarta.servlet.ServletConfig getServletConfig() +meth public abstract java.lang.String getServletInfo() +meth public abstract void destroy() +meth public abstract void init(jakarta.servlet.ServletConfig) throws jakarta.servlet.ServletException +meth public abstract void service(jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse) throws jakarta.servlet.ServletException,java.io.IOException + +CLSS public final jakarta.servlet.jsp.ErrorData +cons public init(java.lang.Throwable,int,java.lang.String,java.lang.String) + anno 0 java.lang.Deprecated(boolean forRemoval=true, java.lang.String since="4.0") +cons public init(java.lang.Throwable,int,java.lang.String,java.lang.String,java.lang.String,java.lang.String) +meth public int getStatusCode() +meth public java.lang.String getMethod() +meth public java.lang.String getQueryString() +meth public java.lang.String getRequestURI() +meth public java.lang.String getServletName() +meth public java.lang.Throwable getThrowable() +supr java.lang.Object +hfds method,queryString,servletName,statusCode,throwable,uri + +CLSS public abstract interface jakarta.servlet.jsp.HttpJspPage +intf jakarta.servlet.jsp.JspPage +meth public abstract void _jspService(jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse) throws jakarta.servlet.ServletException,java.io.IOException + +CLSS public abstract interface jakarta.servlet.jsp.JspApplicationContext +meth public abstract jakarta.el.ExpressionFactory getExpressionFactory() +meth public abstract void addELContextListener(jakarta.el.ELContextListener) +meth public abstract void addELResolver(jakarta.el.ELResolver) + +CLSS public abstract jakarta.servlet.jsp.JspContext +cons public init() +meth public abstract int getAttributesScope(java.lang.String) +meth public abstract jakarta.el.ELContext getELContext() +meth public abstract jakarta.servlet.jsp.JspWriter getOut() +meth public abstract java.lang.Object findAttribute(java.lang.String) +meth public abstract java.lang.Object getAttribute(java.lang.String) +meth public abstract java.lang.Object getAttribute(java.lang.String,int) +meth public abstract java.util.Enumeration getAttributeNamesInScope(int) +meth public abstract void removeAttribute(java.lang.String) +meth public abstract void removeAttribute(java.lang.String,int) +meth public abstract void setAttribute(java.lang.String,java.lang.Object) +meth public abstract void setAttribute(java.lang.String,java.lang.Object,int) +meth public jakarta.servlet.jsp.JspWriter popBody() +meth public jakarta.servlet.jsp.JspWriter pushBody(java.io.Writer) +supr java.lang.Object + +CLSS public abstract jakarta.servlet.jsp.JspEngineInfo +cons public init() +meth public abstract java.lang.String getSpecificationVersion() +supr java.lang.Object + +CLSS public jakarta.servlet.jsp.JspException +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +supr java.lang.Exception +hfds serialVersionUID + +CLSS public abstract jakarta.servlet.jsp.JspFactory +cons public init() +meth public abstract jakarta.servlet.jsp.JspApplicationContext getJspApplicationContext(jakarta.servlet.ServletContext) +meth public abstract jakarta.servlet.jsp.JspEngineInfo getEngineInfo() +meth public abstract jakarta.servlet.jsp.PageContext getPageContext(jakarta.servlet.Servlet,jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse,java.lang.String,boolean,int,boolean) +meth public abstract void releasePageContext(jakarta.servlet.jsp.PageContext) +meth public static jakarta.servlet.jsp.JspFactory getDefaultFactory() +meth public static void setDefaultFactory(jakarta.servlet.jsp.JspFactory) +supr java.lang.Object +hfds deflt + +CLSS public abstract interface jakarta.servlet.jsp.JspPage +intf jakarta.servlet.Servlet +meth public abstract void jspDestroy() +meth public abstract void jspInit() + +CLSS public jakarta.servlet.jsp.JspTagException +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +supr jakarta.servlet.jsp.JspException +hfds serialVersionUID + +CLSS public abstract jakarta.servlet.jsp.JspWriter +cons protected init(int,boolean) +fld protected boolean autoFlush +fld protected int bufferSize +fld public final static int DEFAULT_BUFFER = -1 +fld public final static int NO_BUFFER = 0 +fld public final static int UNBOUNDED_BUFFER = -2 +meth public abstract int getRemaining() +meth public abstract void clear() throws java.io.IOException +meth public abstract void clearBuffer() throws java.io.IOException +meth public abstract void close() throws java.io.IOException +meth public abstract void flush() throws java.io.IOException +meth public abstract void newLine() throws java.io.IOException +meth public abstract void print(boolean) throws java.io.IOException +meth public abstract void print(char) throws java.io.IOException +meth public abstract void print(char[]) throws java.io.IOException +meth public abstract void print(double) throws java.io.IOException +meth public abstract void print(float) throws java.io.IOException +meth public abstract void print(int) throws java.io.IOException +meth public abstract void print(java.lang.Object) throws java.io.IOException +meth public abstract void print(java.lang.String) throws java.io.IOException +meth public abstract void print(long) throws java.io.IOException +meth public abstract void println() throws java.io.IOException +meth public abstract void println(boolean) throws java.io.IOException +meth public abstract void println(char) throws java.io.IOException +meth public abstract void println(char[]) throws java.io.IOException +meth public abstract void println(double) throws java.io.IOException +meth public abstract void println(float) throws java.io.IOException +meth public abstract void println(int) throws java.io.IOException +meth public abstract void println(java.lang.Object) throws java.io.IOException +meth public abstract void println(java.lang.String) throws java.io.IOException +meth public abstract void println(long) throws java.io.IOException +meth public boolean isAutoFlush() +meth public int getBufferSize() +supr java.io.Writer + +CLSS public abstract jakarta.servlet.jsp.PageContext +cons public init() +fld public final static int APPLICATION_SCOPE = 4 +fld public final static int PAGE_SCOPE = 1 +fld public final static int REQUEST_SCOPE = 2 +fld public final static int SESSION_SCOPE = 3 +fld public final static java.lang.String APPLICATION = "jakarta.servlet.jsp.jspApplication" +fld public final static java.lang.String CONFIG = "jakarta.servlet.jsp.jspConfig" +fld public final static java.lang.String EXCEPTION = "jakarta.servlet.jsp.jspException" +fld public final static java.lang.String OUT = "jakarta.servlet.jsp.jspOut" +fld public final static java.lang.String PAGE = "jakarta.servlet.jsp.jspPage" +fld public final static java.lang.String PAGECONTEXT = "jakarta.servlet.jsp.jspPageContext" +fld public final static java.lang.String REQUEST = "jakarta.servlet.jsp.jspRequest" +fld public final static java.lang.String RESPONSE = "jakarta.servlet.jsp.jspResponse" +fld public final static java.lang.String SESSION = "jakarta.servlet.jsp.jspSession" +meth public abstract jakarta.servlet.ServletConfig getServletConfig() +meth public abstract jakarta.servlet.ServletContext getServletContext() +meth public abstract jakarta.servlet.ServletRequest getRequest() +meth public abstract jakarta.servlet.ServletResponse getResponse() +meth public abstract jakarta.servlet.http.HttpSession getSession() +meth public abstract java.lang.Exception getException() +meth public abstract java.lang.Object getPage() +meth public abstract void forward(java.lang.String) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void handlePageException(java.lang.Exception) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void handlePageException(java.lang.Throwable) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void include(java.lang.String) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void include(java.lang.String,boolean) throws jakarta.servlet.ServletException,java.io.IOException +meth public abstract void initialize(jakarta.servlet.Servlet,jakarta.servlet.ServletRequest,jakarta.servlet.ServletResponse,java.lang.String,boolean,int,boolean) throws java.io.IOException +meth public abstract void release() +meth public jakarta.servlet.jsp.ErrorData getErrorData() +meth public jakarta.servlet.jsp.tagext.BodyContent pushBody() +supr jakarta.servlet.jsp.JspContext + +CLSS public jakarta.servlet.jsp.SkipPageException +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +supr jakarta.servlet.jsp.JspException +hfds serialVersionUID + +CLSS public jakarta.servlet.jsp.el.ImplicitObjectELResolver +cons public init() +meth public boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +supr jakarta.el.ELResolver +hcls EnumeratedMap,ImplicitObjects + +CLSS public jakarta.servlet.jsp.el.ImportELResolver +cons public init() +meth public boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +supr jakarta.el.ELResolver + +CLSS public jakarta.servlet.jsp.el.NotFoundELResolver +cons public init() +meth public boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +supr jakarta.el.ELResolver +hfds LSTRING_FILE,lStrings + +CLSS public jakarta.servlet.jsp.el.ScopedAttributeELResolver +cons public init() +meth public boolean isReadOnly(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getType(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public java.lang.Class getCommonPropertyType(jakarta.el.ELContext,java.lang.Object) +meth public java.lang.Object getValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object) +meth public void setValue(jakarta.el.ELContext,java.lang.Object,java.lang.Object,java.lang.Object) +supr jakarta.el.ELResolver + +CLSS public abstract jakarta.servlet.jsp.tagext.BodyContent +cons protected init(jakarta.servlet.jsp.JspWriter) +meth public abstract java.io.Reader getReader() +meth public abstract java.lang.String getString() +meth public abstract void writeOut(java.io.Writer) throws java.io.IOException +meth public jakarta.servlet.jsp.JspWriter getEnclosingWriter() +meth public void clearBody() +meth public void flush() throws java.io.IOException +supr jakarta.servlet.jsp.JspWriter +hfds enclosingWriter + +CLSS public abstract interface jakarta.servlet.jsp.tagext.BodyTag +fld public final static int EVAL_BODY_BUFFERED = 2 +intf jakarta.servlet.jsp.tagext.IterationTag +meth public abstract void doInitBody() throws jakarta.servlet.jsp.JspException +meth public abstract void setBodyContent(jakarta.servlet.jsp.tagext.BodyContent) + +CLSS public jakarta.servlet.jsp.tagext.BodyTagSupport +cons public init() +fld protected jakarta.servlet.jsp.tagext.BodyContent bodyContent +intf jakarta.servlet.jsp.tagext.BodyTag +meth public int doAfterBody() throws jakarta.servlet.jsp.JspException +meth public int doEndTag() throws jakarta.servlet.jsp.JspException +meth public int doStartTag() throws jakarta.servlet.jsp.JspException +meth public jakarta.servlet.jsp.JspWriter getPreviousOut() +meth public jakarta.servlet.jsp.tagext.BodyContent getBodyContent() +meth public void doInitBody() throws jakarta.servlet.jsp.JspException +meth public void release() +meth public void setBodyContent(jakarta.servlet.jsp.tagext.BodyContent) +supr jakarta.servlet.jsp.tagext.TagSupport +hfds serialVersionUID + +CLSS public abstract interface jakarta.servlet.jsp.tagext.DynamicAttributes +meth public abstract void setDynamicAttribute(java.lang.String,java.lang.String,java.lang.Object) throws jakarta.servlet.jsp.JspException + +CLSS public jakarta.servlet.jsp.tagext.FunctionInfo +cons public init(java.lang.String,java.lang.String,java.lang.String) +meth public java.lang.String getFunctionClass() +meth public java.lang.String getFunctionSignature() +meth public java.lang.String getName() +supr java.lang.Object +hfds functionClass,functionSignature,name + +CLSS public abstract interface jakarta.servlet.jsp.tagext.IterationTag +fld public final static int EVAL_BODY_AGAIN = 2 +intf jakarta.servlet.jsp.tagext.Tag +meth public abstract int doAfterBody() throws jakarta.servlet.jsp.JspException + +CLSS public abstract jakarta.servlet.jsp.tagext.JspFragment +cons public init() +meth public abstract jakarta.servlet.jsp.JspContext getJspContext() +meth public abstract void invoke(java.io.Writer) throws jakarta.servlet.jsp.JspException,java.io.IOException +supr java.lang.Object + +CLSS public abstract interface jakarta.servlet.jsp.tagext.JspIdConsumer +meth public abstract void setJspId(java.lang.String) + +CLSS public abstract interface jakarta.servlet.jsp.tagext.JspTag + +CLSS public abstract jakarta.servlet.jsp.tagext.PageData +cons public init() +meth public abstract java.io.InputStream getInputStream() +supr java.lang.Object + +CLSS public abstract interface jakarta.servlet.jsp.tagext.SimpleTag +intf jakarta.servlet.jsp.tagext.JspTag +meth public abstract jakarta.servlet.jsp.tagext.JspTag getParent() +meth public abstract void doTag() throws jakarta.servlet.jsp.JspException,java.io.IOException +meth public abstract void setJspBody(jakarta.servlet.jsp.tagext.JspFragment) +meth public abstract void setJspContext(jakarta.servlet.jsp.JspContext) +meth public abstract void setParent(jakarta.servlet.jsp.tagext.JspTag) + +CLSS public jakarta.servlet.jsp.tagext.SimpleTagSupport +cons public init() +intf jakarta.servlet.jsp.tagext.SimpleTag +meth protected jakarta.servlet.jsp.JspContext getJspContext() +meth protected jakarta.servlet.jsp.tagext.JspFragment getJspBody() +meth public final static jakarta.servlet.jsp.tagext.JspTag findAncestorWithClass(jakarta.servlet.jsp.tagext.JspTag,java.lang.Class) +meth public jakarta.servlet.jsp.tagext.JspTag getParent() +meth public void doTag() throws jakarta.servlet.jsp.JspException,java.io.IOException +meth public void setJspBody(jakarta.servlet.jsp.tagext.JspFragment) +meth public void setJspContext(jakarta.servlet.jsp.JspContext) +meth public void setParent(jakarta.servlet.jsp.tagext.JspTag) +supr java.lang.Object +hfds jspBody,jspContext,parentTag + +CLSS public abstract interface jakarta.servlet.jsp.tagext.Tag +fld public final static int EVAL_BODY_INCLUDE = 1 +fld public final static int EVAL_PAGE = 6 +fld public final static int SKIP_BODY = 0 +fld public final static int SKIP_PAGE = 5 +intf jakarta.servlet.jsp.tagext.JspTag +meth public abstract int doEndTag() throws jakarta.servlet.jsp.JspException +meth public abstract int doStartTag() throws jakarta.servlet.jsp.JspException +meth public abstract jakarta.servlet.jsp.tagext.Tag getParent() +meth public abstract void release() +meth public abstract void setPageContext(jakarta.servlet.jsp.PageContext) +meth public abstract void setParent(jakarta.servlet.jsp.tagext.Tag) + +CLSS public jakarta.servlet.jsp.tagext.TagAdapter +cons public init(jakarta.servlet.jsp.tagext.SimpleTag) +intf jakarta.servlet.jsp.tagext.Tag +meth public int doEndTag() throws jakarta.servlet.jsp.JspException +meth public int doStartTag() throws jakarta.servlet.jsp.JspException +meth public jakarta.servlet.jsp.tagext.JspTag getAdaptee() +meth public jakarta.servlet.jsp.tagext.Tag getParent() +meth public void release() +meth public void setPageContext(jakarta.servlet.jsp.PageContext) +meth public void setParent(jakarta.servlet.jsp.tagext.Tag) +supr java.lang.Object +hfds parent,parentDetermined,simpleTagAdaptee + +CLSS public jakarta.servlet.jsp.tagext.TagAttributeInfo +cons public init(java.lang.String,boolean,java.lang.String,boolean) +cons public init(java.lang.String,boolean,java.lang.String,boolean,boolean) +cons public init(java.lang.String,boolean,java.lang.String,boolean,boolean,java.lang.String,boolean,boolean,java.lang.String,java.lang.String) +fld public final static java.lang.String ID = "id" +meth public boolean canBeRequestTime() +meth public boolean isDeferredMethod() +meth public boolean isDeferredValue() +meth public boolean isFragment() +meth public boolean isRequired() +meth public java.lang.String getDescription() +meth public java.lang.String getExpectedTypeName() +meth public java.lang.String getMethodSignature() +meth public java.lang.String getName() +meth public java.lang.String getTypeName() +meth public java.lang.String toString() +meth public static jakarta.servlet.jsp.tagext.TagAttributeInfo getIdAttribute(jakarta.servlet.jsp.tagext.TagAttributeInfo[]) +supr java.lang.Object +hfds deferredMethod,deferredValue,description,expectedTypeName,fragment,methodSignature,name,reqTime,required,type + +CLSS public jakarta.servlet.jsp.tagext.TagData +cons public init(java.lang.Object[][]) +cons public init(java.util.Hashtable) +fld public final static java.lang.Object REQUEST_TIME_VALUE +intf java.lang.Cloneable +meth public java.lang.Object getAttribute(java.lang.String) +meth public java.lang.String getAttributeString(java.lang.String) +meth public java.lang.String getId() +meth public java.util.Enumeration getAttributes() +meth public void setAttribute(java.lang.String,java.lang.Object) +supr java.lang.Object +hfds attributes + +CLSS public abstract jakarta.servlet.jsp.tagext.TagExtraInfo +cons public init() +meth public boolean isValid(jakarta.servlet.jsp.tagext.TagData) +meth public final jakarta.servlet.jsp.tagext.TagInfo getTagInfo() +meth public final void setTagInfo(jakarta.servlet.jsp.tagext.TagInfo) +meth public jakarta.servlet.jsp.tagext.ValidationMessage[] validate(jakarta.servlet.jsp.tagext.TagData) +meth public jakarta.servlet.jsp.tagext.VariableInfo[] getVariableInfo(jakarta.servlet.jsp.tagext.TagData) +supr java.lang.Object +hfds ZERO_VARIABLE_INFO,tagInfo + +CLSS public jakarta.servlet.jsp.tagext.TagFileInfo +cons public init(java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagInfo) +meth public jakarta.servlet.jsp.tagext.TagInfo getTagInfo() +meth public java.lang.String getName() +meth public java.lang.String getPath() +supr java.lang.Object +hfds name,path,tagInfo + +CLSS public jakarta.servlet.jsp.tagext.TagInfo +cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagLibraryInfo,jakarta.servlet.jsp.tagext.TagExtraInfo,jakarta.servlet.jsp.tagext.TagAttributeInfo[]) +cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagLibraryInfo,jakarta.servlet.jsp.tagext.TagExtraInfo,jakarta.servlet.jsp.tagext.TagAttributeInfo[],java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagVariableInfo[]) +cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagLibraryInfo,jakarta.servlet.jsp.tagext.TagExtraInfo,jakarta.servlet.jsp.tagext.TagAttributeInfo[],java.lang.String,java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.TagVariableInfo[],boolean) +fld public final static java.lang.String BODY_CONTENT_EMPTY = "empty" +fld public final static java.lang.String BODY_CONTENT_JSP = "JSP" +fld public final static java.lang.String BODY_CONTENT_SCRIPTLESS = "scriptless" +fld public final static java.lang.String BODY_CONTENT_TAG_DEPENDENT = "tagdependent" +meth public boolean hasDynamicAttributes() +meth public boolean isValid(jakarta.servlet.jsp.tagext.TagData) +meth public jakarta.servlet.jsp.tagext.TagAttributeInfo[] getAttributes() +meth public jakarta.servlet.jsp.tagext.TagExtraInfo getTagExtraInfo() +meth public jakarta.servlet.jsp.tagext.TagLibraryInfo getTagLibrary() +meth public jakarta.servlet.jsp.tagext.TagVariableInfo[] getTagVariableInfos() +meth public jakarta.servlet.jsp.tagext.ValidationMessage[] validate(jakarta.servlet.jsp.tagext.TagData) +meth public jakarta.servlet.jsp.tagext.VariableInfo[] getVariableInfo(jakarta.servlet.jsp.tagext.TagData) +meth public java.lang.String getBodyContent() +meth public java.lang.String getDisplayName() +meth public java.lang.String getInfoString() +meth public java.lang.String getLargeIcon() +meth public java.lang.String getSmallIcon() +meth public java.lang.String getTagClassName() +meth public java.lang.String getTagName() +meth public void setTagExtraInfo(jakarta.servlet.jsp.tagext.TagExtraInfo) +meth public void setTagLibrary(jakarta.servlet.jsp.tagext.TagLibraryInfo) +supr java.lang.Object +hfds attributeInfo,bodyContent,displayName,dynamicAttributes,infoString,largeIcon,smallIcon,tagClassName,tagExtraInfo,tagLibrary,tagName,tagVariableInfo + +CLSS public abstract jakarta.servlet.jsp.tagext.TagLibraryInfo +cons protected init(java.lang.String,java.lang.String) +fld protected jakarta.servlet.jsp.tagext.FunctionInfo[] functions +fld protected jakarta.servlet.jsp.tagext.TagFileInfo[] tagFiles +fld protected jakarta.servlet.jsp.tagext.TagInfo[] tags +fld protected java.lang.String info +fld protected java.lang.String jspversion +fld protected java.lang.String prefix +fld protected java.lang.String shortname +fld protected java.lang.String tlibversion +fld protected java.lang.String uri +fld protected java.lang.String urn +meth public abstract jakarta.servlet.jsp.tagext.TagLibraryInfo[] getTagLibraryInfos() +meth public jakarta.servlet.jsp.tagext.FunctionInfo getFunction(java.lang.String) +meth public jakarta.servlet.jsp.tagext.FunctionInfo[] getFunctions() +meth public jakarta.servlet.jsp.tagext.TagFileInfo getTagFile(java.lang.String) +meth public jakarta.servlet.jsp.tagext.TagFileInfo[] getTagFiles() +meth public jakarta.servlet.jsp.tagext.TagInfo getTag(java.lang.String) +meth public jakarta.servlet.jsp.tagext.TagInfo[] getTags() +meth public java.lang.String getInfoString() +meth public java.lang.String getPrefixString() +meth public java.lang.String getReliableURN() +meth public java.lang.String getRequiredVersion() +meth public java.lang.String getShortName() +meth public java.lang.String getURI() +supr java.lang.Object + +CLSS public abstract jakarta.servlet.jsp.tagext.TagLibraryValidator +cons public init() +meth public jakarta.servlet.jsp.tagext.ValidationMessage[] validate(java.lang.String,java.lang.String,jakarta.servlet.jsp.tagext.PageData) +meth public java.util.Map getInitParameters() +meth public void release() +meth public void setInitParameters(java.util.Map) +supr java.lang.Object +hfds initParameters + +CLSS public jakarta.servlet.jsp.tagext.TagSupport +cons public init() +fld protected jakarta.servlet.jsp.PageContext pageContext +fld protected java.lang.String id +intf jakarta.servlet.jsp.tagext.IterationTag +intf java.io.Serializable +meth public final static jakarta.servlet.jsp.tagext.Tag findAncestorWithClass(jakarta.servlet.jsp.tagext.Tag,java.lang.Class) +meth public int doAfterBody() throws jakarta.servlet.jsp.JspException +meth public int doEndTag() throws jakarta.servlet.jsp.JspException +meth public int doStartTag() throws jakarta.servlet.jsp.JspException +meth public jakarta.servlet.jsp.tagext.Tag getParent() +meth public java.lang.Object getValue(java.lang.String) +meth public java.lang.String getId() +meth public java.util.Enumeration getValues() +meth public void release() +meth public void removeValue(java.lang.String) +meth public void setId(java.lang.String) +meth public void setPageContext(jakarta.servlet.jsp.PageContext) +meth public void setParent(jakarta.servlet.jsp.tagext.Tag) +meth public void setValue(java.lang.String,java.lang.Object) +supr java.lang.Object +hfds parent,serialVersionUID,values + +CLSS public jakarta.servlet.jsp.tagext.TagVariableInfo +cons public init(java.lang.String,java.lang.String,java.lang.String,boolean,int) +meth public boolean getDeclare() +meth public int getScope() +meth public java.lang.String getClassName() +meth public java.lang.String getNameFromAttribute() +meth public java.lang.String getNameGiven() +supr java.lang.Object +hfds className,declare,nameFromAttribute,nameGiven,scope + +CLSS public abstract interface jakarta.servlet.jsp.tagext.TryCatchFinally +meth public abstract void doCatch(java.lang.Throwable) throws java.lang.Throwable +meth public abstract void doFinally() + +CLSS public jakarta.servlet.jsp.tagext.ValidationMessage +cons public init(java.lang.String,java.lang.String) +meth public java.lang.String getId() +meth public java.lang.String getMessage() +supr java.lang.Object +hfds id,message + +CLSS public jakarta.servlet.jsp.tagext.VariableInfo +cons public init(java.lang.String,java.lang.String,boolean,int) +fld public final static int AT_BEGIN = 1 +fld public final static int AT_END = 2 +fld public final static int NESTED = 0 +meth public boolean getDeclare() +meth public int getScope() +meth public java.lang.String getClassName() +meth public java.lang.String getVarName() +supr java.lang.Object +hfds className,declare,scope,varName + +CLSS public abstract interface java.io.Closeable +intf java.lang.AutoCloseable +meth public abstract void close() throws java.io.IOException + +CLSS public abstract interface java.io.Flushable +meth public abstract void flush() throws java.io.IOException + +CLSS public abstract interface java.io.Serializable + +CLSS public abstract java.io.Writer +cons protected init() +cons protected init(java.lang.Object) +fld protected java.lang.Object lock +intf java.io.Closeable +intf java.io.Flushable +intf java.lang.Appendable +meth public abstract void close() throws java.io.IOException +meth public abstract void flush() throws java.io.IOException +meth public abstract void write(char[],int,int) throws java.io.IOException +meth public java.io.Writer append(char) throws java.io.IOException +meth public java.io.Writer append(java.lang.CharSequence) throws java.io.IOException +meth public java.io.Writer append(java.lang.CharSequence,int,int) throws java.io.IOException +meth public static java.io.Writer nullWriter() +meth public void write(char[]) throws java.io.IOException +meth public void write(int) throws java.io.IOException +meth public void write(java.lang.String) throws java.io.IOException +meth public void write(java.lang.String,int,int) throws java.io.IOException +supr java.lang.Object +hfds WRITE_BUFFER_SIZE,writeBuffer + +CLSS public abstract interface java.lang.Appendable +meth public abstract java.lang.Appendable append(char) throws java.io.IOException +meth public abstract java.lang.Appendable append(java.lang.CharSequence) throws java.io.IOException +meth public abstract java.lang.Appendable append(java.lang.CharSequence,int,int) throws java.io.IOException + +CLSS public abstract interface java.lang.AutoCloseable +meth public abstract void close() throws java.lang.Exception + +CLSS public abstract interface java.lang.Cloneable + +CLSS public java.lang.Exception +cons protected init(java.lang.String,java.lang.Throwable,boolean,boolean) +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +supr java.lang.Throwable +hfds serialVersionUID + +CLSS public java.lang.Object +cons public init() +meth protected java.lang.Object clone() throws java.lang.CloneNotSupportedException +meth protected void finalize() throws java.lang.Throwable + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="9") +meth public boolean equals(java.lang.Object) +meth public final java.lang.Class getClass() +meth public final void notify() +meth public final void notifyAll() +meth public final void wait() throws java.lang.InterruptedException +meth public final void wait(long) throws java.lang.InterruptedException +meth public final void wait(long,int) throws java.lang.InterruptedException +meth public int hashCode() +meth public java.lang.String toString() + +CLSS public java.lang.Throwable +cons protected init(java.lang.String,java.lang.Throwable,boolean,boolean) +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.Throwable) +cons public init(java.lang.Throwable) +intf java.io.Serializable +meth public final java.lang.Throwable[] getSuppressed() +meth public final void addSuppressed(java.lang.Throwable) +meth public java.lang.StackTraceElement[] getStackTrace() +meth public java.lang.String getLocalizedMessage() +meth public java.lang.String getMessage() +meth public java.lang.String toString() +meth public java.lang.Throwable fillInStackTrace() +meth public java.lang.Throwable getCause() +meth public java.lang.Throwable initCause(java.lang.Throwable) +meth public void printStackTrace() +meth public void printStackTrace(java.io.PrintStream) +meth public void printStackTrace(java.io.PrintWriter) +meth public void setStackTrace(java.lang.StackTraceElement[]) +supr java.lang.Object +hfds CAUSE_CAPTION,EMPTY_THROWABLE_ARRAY,NULL_CAUSE_MESSAGE,SELF_SUPPRESSION_MESSAGE,SUPPRESSED_CAPTION,SUPPRESSED_SENTINEL,UNASSIGNED_STACK,backtrace,cause,depth,detailMessage,serialVersionUID,stackTrace,suppressedExceptions +hcls PrintStreamOrWriter,SentinelHolder,WrappedPrintStream,WrappedPrintWriter +