From 601c7e98edf9cf2f19f209bae4e5aa859ac25f99 Mon Sep 17 00:00:00 2001 From: michaeloffner Date: Tue, 12 Mar 2024 10:17:09 +0100 Subject: [PATCH] remove references to "javax" that can be avoided --- core/pom.xml | 6 ++++++ .../src/main/java/coldfusion/image/Image.java | 3 +-- .../java/lucee/commons/color/ColorCaster.java | 4 +--- .../java/lucee/runtime/ComponentPageImpl.java | 7 +++---- .../java/lucee/runtime/PageContextImpl.java | 10 ++++++--- .../lucee/runtime/config/CFConfigImport.java | 12 ++--------- .../lucee/runtime/engine/CFMLEngineImpl.java | 3 +-- .../lucee/runtime/ext/tag/BodyTagImpl.java | 7 ++++--- .../java/lucee/runtime/ext/tag/TagImpl.java | 6 +++--- .../net/http/HttpServletRequestDummy.java | 13 ++++++------ .../net/http/RequestDispatcherDummy.java | 9 ++++---- .../runtime/net/http/ServletContextDummy.java | 9 ++++---- .../main/java/lucee/runtime/tag/Calendar.java | 5 ++--- .../main/java/lucee/runtime/tag/Logout.java | 5 ++--- .../main/java/lucee/runtime/tag/Silent.java | 5 ++--- .../java/lucee/runtime/tag/StoredProc.java | 4 +--- .../main/java/lucee/runtime/tag/Textarea.java | 5 ++--- .../java/lucee/runtime/tag/Transaction.java | 4 +--- .../java/lucee/servlet/pic/PicServlet.java | 3 +-- .../taglibs/datetime/CurrentTimeTag.java | 8 ++++--- .../apache/taglibs/datetime/FormatTag.java | 21 ++++++++++--------- 21 files changed, 69 insertions(+), 80 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index d62cc55689..7bfa2002f8 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -355,6 +355,12 @@ ulid-creator 5.2.3 + +jakarta.platform +jakarta.jakartaee-api +10.0.0 +provided + diff --git a/core/src/main/java/coldfusion/image/Image.java b/core/src/main/java/coldfusion/image/Image.java index 540af4ff6f..9a2e06e679 100644 --- a/core/src/main/java/coldfusion/image/Image.java +++ b/core/src/main/java/coldfusion/image/Image.java @@ -23,8 +23,7 @@ import java.awt.RenderingHints.Key; import java.awt.image.BufferedImage; -import javax.servlet.jsp.PageContext; - +import lucee.runtime.PageContext; import lucee.runtime.type.Struct; public interface Image { diff --git a/core/src/main/java/lucee/commons/color/ColorCaster.java b/core/src/main/java/lucee/commons/color/ColorCaster.java index 264eb83b82..705193a82e 100644 --- a/core/src/main/java/lucee/commons/color/ColorCaster.java +++ b/core/src/main/java/lucee/commons/color/ColorCaster.java @@ -20,8 +20,6 @@ import java.awt.Color; -import javax.servlet.ServletException; - import lucee.commons.lang.NumberUtil; import lucee.commons.lang.StringUtil; import lucee.runtime.exp.ExpressionException; @@ -38,7 +36,7 @@ public final class ColorCaster { * @return an int between 0 (badest) and 510 (best) * @throws ServletException */ - public static int contrast(Color left, Color right) throws ServletException { + public static int contrast(Color left, Color right) { return (Math.max(left.getRed(), right.getRed()) - Math.min(left.getRed(), right.getRed())) + (Math.max(left.getGreen(), right.getGreen()) - Math.min(left.getGreen(), right.getGreen())) + (Math.max(left.getBlue(), right.getBlue()) - Math.max(left.getBlue(), right.getBlue())); diff --git a/core/src/main/java/lucee/runtime/ComponentPageImpl.java b/core/src/main/java/lucee/runtime/ComponentPageImpl.java index bda538d5f3..13ba5ef4a2 100755 --- a/core/src/main/java/lucee/runtime/ComponentPageImpl.java +++ b/core/src/main/java/lucee/runtime/ComponentPageImpl.java @@ -22,13 +22,12 @@ import java.io.InputStream; import java.io.OutputStream; import java.nio.charset.Charset; -import java.util.Arrays; import java.util.ArrayList; +import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.Map.Entry; -import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -1043,7 +1042,7 @@ private Charset getCharset(PageContext pc) { return cs; } - private void callWSDL(PageContext pc, Component component) throws ServletException, IOException, PageException { + private void callWSDL(PageContext pc, Component component) throws IOException, PageException { // take wsdl file defined by user String wsdl = component.getWSDLFile(); if (!StringUtil.isEmpty(wsdl)) { @@ -1068,7 +1067,7 @@ private void callWSDL(PageContext pc, Component component) throws ServletExcepti } } - private void callWebservice(PageContext pc, Component component) throws IOException, ServletException, PageException { + private void callWebservice(PageContext pc, Component component) throws IOException, PageException { ((ConfigWebPro) ThreadLocalPageContext.getConfig(pc)).getWSHandler().getWSServer(pc).doPost(pc, pc.getHttpServletRequest(), pc.getHttpServletResponse(), component); } diff --git a/core/src/main/java/lucee/runtime/PageContextImpl.java b/core/src/main/java/lucee/runtime/PageContextImpl.java index f5f953e56e..5b549b6f7e 100755 --- a/core/src/main/java/lucee/runtime/PageContextImpl.java +++ b/core/src/main/java/lucee/runtime/PageContextImpl.java @@ -49,7 +49,6 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import javax.servlet.jsp.JspException; import javax.servlet.jsp.JspWriter; import javax.servlet.jsp.el.ExpressionEvaluator; import javax.servlet.jsp.el.VariableResolver; @@ -3133,10 +3132,15 @@ public void reuse(Tag tag, String tagBundleName, String tagBundleVersion) { } @Override - public void initBody(BodyTag bodyTag, int state) throws JspException { + public void initBody(BodyTag bodyTag, int state) throws PageException { if (state != Tag.EVAL_BODY_INCLUDE) { bodyTag.setBodyContent(pushBody()); - bodyTag.doInitBody(); + try { + bodyTag.doInitBody(); + } + catch (Exception e) { + throw Caster.toPageException(e); + } } } diff --git a/core/src/main/java/lucee/runtime/config/CFConfigImport.java b/core/src/main/java/lucee/runtime/config/CFConfigImport.java index 7f749cecae..3d28f91839 100644 --- a/core/src/main/java/lucee/runtime/config/CFConfigImport.java +++ b/core/src/main/java/lucee/runtime/config/CFConfigImport.java @@ -11,7 +11,6 @@ import java.util.zip.ZipInputStream; import javax.servlet.http.Cookie; -import javax.servlet.jsp.JspException; import org.apache.logging.log4j.core.layout.HtmlLayout; import org.apache.logging.log4j.core.layout.PatternLayout; @@ -70,7 +69,7 @@ public class CFConfigImport { private final boolean setPasswordIfNecessary; private final boolean validatePassword; private final boolean flushExistingData; - private JspException exd = null; + private PageException exd = null; public CFConfigImport(Config config, Resource file, Charset charset, String password, String type, Struct placeHolderData, boolean setPasswordIfNecessary, boolean validatePassword, boolean flushExistingData) throws PageException { @@ -186,18 +185,11 @@ public Struct execute(boolean throwException) throws PageException { pc.getConfig().getFactory().releaseLuceePageContext(pc, true); } } - if (throwException && exd != null) throw Caster.toPageException(exd); + if (throwException && exd != null) throw exd; return json; } - private void handleException(PageContext pc, Throwable t) { - ExceptionUtil.rethrowIfNecessary(t); - LogUtil.log(pc, "deploy", t); - if (t instanceof JspException) exd = (JspException) t; - else exd = Caster.toPageException(t); - } - private static void replacePlaceHolder(Collection coll, Struct placeHolderData) { // ${MAILSERVER_HOST:smtp.sendgrid.net} Iterator> it = coll.entryIterator(); diff --git a/core/src/main/java/lucee/runtime/engine/CFMLEngineImpl.java b/core/src/main/java/lucee/runtime/engine/CFMLEngineImpl.java index cde0cf955a..b46298386d 100644 --- a/core/src/main/java/lucee/runtime/engine/CFMLEngineImpl.java +++ b/core/src/main/java/lucee/runtime/engine/CFMLEngineImpl.java @@ -60,7 +60,6 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javax.servlet.jsp.JspException; import org.apache.felix.framework.Felix; import org.osgi.framework.BundleContext; @@ -1610,7 +1609,7 @@ public ControllerState getControllerState() { } @Override - public void cli(Map config, ServletConfig servletConfig) throws IOException, JspException, ServletException { + public void cli(Map config, ServletConfig servletConfig) throws IOException, ServletException, PageException { ServletContext servletContext = servletConfig.getServletContext(); HTTPServletImpl servlet = new HTTPServletImpl(servletConfig, servletContext, servletConfig.getServletName()); diff --git a/core/src/main/java/lucee/runtime/ext/tag/BodyTagImpl.java b/core/src/main/java/lucee/runtime/ext/tag/BodyTagImpl.java index 0f68474eb2..204c8b54d1 100644 --- a/core/src/main/java/lucee/runtime/ext/tag/BodyTagImpl.java +++ b/core/src/main/java/lucee/runtime/ext/tag/BodyTagImpl.java @@ -18,10 +18,11 @@ **/ package lucee.runtime.ext.tag; -import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.BodyContent; import javax.servlet.jsp.tagext.BodyTag; +import lucee.runtime.exp.PageException; + /** * Implementation of the BodyTag */ @@ -35,12 +36,12 @@ public void setBodyContent(BodyContent bodyContent) { } @Override - public void doInitBody() throws JspException { + public void doInitBody() throws PageException { } @Override - public int doAfterBody() throws JspException { + public int doAfterBody() throws PageException { return SKIP_BODY; } diff --git a/core/src/main/java/lucee/runtime/ext/tag/TagImpl.java b/core/src/main/java/lucee/runtime/ext/tag/TagImpl.java index a2d86d9abd..7165e75703 100644 --- a/core/src/main/java/lucee/runtime/ext/tag/TagImpl.java +++ b/core/src/main/java/lucee/runtime/ext/tag/TagImpl.java @@ -18,12 +18,12 @@ **/ package lucee.runtime.ext.tag; -import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.Tag; import lucee.commons.lang.StringUtil; import lucee.runtime.PageContext; import lucee.runtime.exp.ApplicationException; +import lucee.runtime.exp.PageException; /** * Implementation of the Tag @@ -63,12 +63,12 @@ public Tag getParent() { } @Override - public int doStartTag() throws JspException { + public int doStartTag() throws PageException { return SKIP_BODY; } @Override - public int doEndTag() throws JspException { + public int doEndTag() throws PageException { return EVAL_PAGE; } diff --git a/core/src/main/java/lucee/runtime/net/http/HttpServletRequestDummy.java b/core/src/main/java/lucee/runtime/net/http/HttpServletRequestDummy.java index 3e26ee127b..75758b2cbc 100644 --- a/core/src/main/java/lucee/runtime/net/http/HttpServletRequestDummy.java +++ b/core/src/main/java/lucee/runtime/net/http/HttpServletRequestDummy.java @@ -37,7 +37,6 @@ import javax.servlet.DispatcherType; import javax.servlet.RequestDispatcher; import javax.servlet.ServletContext; -import javax.servlet.ServletException; import javax.servlet.ServletInputStream; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; @@ -800,7 +799,7 @@ public AsyncContext startAsync(ServletRequest arg0, ServletResponse arg1) throws } @Override - public boolean authenticate(HttpServletResponse arg0) throws IOException, ServletException { + public boolean authenticate(HttpServletResponse arg0) throws IOException { throw new RuntimeException("not supported!"); } @@ -810,27 +809,27 @@ public String changeSessionId() { } @Override - public Part getPart(String arg0) throws IOException, ServletException { + public Part getPart(String arg0) throws IOException { throw new RuntimeException("not supported!"); } @Override - public Collection getParts() throws IOException, ServletException { + public Collection getParts() throws IOException { throw new RuntimeException("not supported!"); } @Override - public void login(String arg0, String arg1) throws ServletException { + public void login(String arg0, String arg1) { throw new RuntimeException("not supported!"); } @Override - public void logout() throws ServletException { + public void logout() { throw new RuntimeException("not supported!"); } @Override - public T upgrade(Class arg0) throws IOException, ServletException { + public T upgrade(Class arg0) throws IOException { throw new RuntimeException("not supported!"); } diff --git a/core/src/main/java/lucee/runtime/net/http/RequestDispatcherDummy.java b/core/src/main/java/lucee/runtime/net/http/RequestDispatcherDummy.java index 697c004afd..bc79dc5015 100644 --- a/core/src/main/java/lucee/runtime/net/http/RequestDispatcherDummy.java +++ b/core/src/main/java/lucee/runtime/net/http/RequestDispatcherDummy.java @@ -21,7 +21,6 @@ import java.io.IOException; import javax.servlet.RequestDispatcher; -import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; @@ -31,14 +30,14 @@ public RequestDispatcherDummy(HttpServletRequestDummy dummy) { } @Override - public void forward(ServletRequest arg0, ServletResponse arg1) throws ServletException, IOException { - throw new ServletException("operation not supported"); + public void forward(ServletRequest arg0, ServletResponse arg1) throws IOException { + throw new IOException("operation not supported"); // TODO impl } @Override - public void include(ServletRequest arg0, ServletResponse arg1) throws ServletException, IOException { - throw new ServletException("operation not supported"); + public void include(ServletRequest arg0, ServletResponse arg1) throws IOException { + throw new IOException("operation not supported"); // TODO impl } diff --git a/core/src/main/java/lucee/runtime/net/http/ServletContextDummy.java b/core/src/main/java/lucee/runtime/net/http/ServletContextDummy.java index 599a4bd93d..0f4a4a9888 100644 --- a/core/src/main/java/lucee/runtime/net/http/ServletContextDummy.java +++ b/core/src/main/java/lucee/runtime/net/http/ServletContextDummy.java @@ -34,7 +34,6 @@ import javax.servlet.RequestDispatcher; import javax.servlet.Servlet; import javax.servlet.ServletContext; -import javax.servlet.ServletException; import javax.servlet.ServletRegistration; import javax.servlet.SessionCookieConfig; import javax.servlet.SessionTrackingMode; @@ -194,7 +193,7 @@ public String getServerInfo() { } @Override - public Servlet getServlet(String arg0) throws ServletException { + public Servlet getServlet(String arg0) { throw new RuntimeException("not supported"); } @@ -256,17 +255,17 @@ public javax.servlet.ServletRegistration.Dynamic addServlet(String arg0, Class T createFilter(Class arg0) throws ServletException { + public T createFilter(Class arg0) { throw new RuntimeException("not supported"); } @Override - public T createListener(Class arg0) throws ServletException { + public T createListener(Class arg0) { throw new RuntimeException("not supported"); } @Override - public T createServlet(Class arg0) throws ServletException { + public T createServlet(Class arg0) { throw new RuntimeException("not supported"); } diff --git a/core/src/main/java/lucee/runtime/tag/Calendar.java b/core/src/main/java/lucee/runtime/tag/Calendar.java index 6d6f2575ef..c8fb8a36b0 100755 --- a/core/src/main/java/lucee/runtime/tag/Calendar.java +++ b/core/src/main/java/lucee/runtime/tag/Calendar.java @@ -18,9 +18,8 @@ **/ package lucee.runtime.tag; -import javax.servlet.jsp.JspException; - import lucee.runtime.exp.ApplicationException; +import lucee.runtime.exp.PageException; import lucee.runtime.exp.TagNotSupported; import lucee.runtime.ext.tag.TagImpl; import lucee.runtime.type.dt.DateTime; @@ -81,7 +80,7 @@ public void release() { } @Override - public int doStartTag() throws JspException { + public int doStartTag() throws PageException { return super.doStartTag(); } diff --git a/core/src/main/java/lucee/runtime/tag/Logout.java b/core/src/main/java/lucee/runtime/tag/Logout.java index 5993e2cd05..4cee1ef365 100755 --- a/core/src/main/java/lucee/runtime/tag/Logout.java +++ b/core/src/main/java/lucee/runtime/tag/Logout.java @@ -18,8 +18,7 @@ **/ package lucee.runtime.tag; -import javax.servlet.jsp.JspException; - +import lucee.runtime.exp.PageException; import lucee.runtime.ext.tag.TagImpl; /** @@ -28,7 +27,7 @@ public final class Logout extends TagImpl { @Override - public int doStartTag() throws JspException { + public int doStartTag() throws PageException { pageContext.clearRemoteUser(); return SKIP_BODY; } diff --git a/core/src/main/java/lucee/runtime/tag/Silent.java b/core/src/main/java/lucee/runtime/tag/Silent.java index cd1f482966..08076cc17c 100755 --- a/core/src/main/java/lucee/runtime/tag/Silent.java +++ b/core/src/main/java/lucee/runtime/tag/Silent.java @@ -20,9 +20,8 @@ import java.io.IOException; -import javax.servlet.jsp.JspException; - import lucee.commons.lang.ExceptionUtil; +import lucee.runtime.exp.PageException; import lucee.runtime.ext.tag.BodyTagTryCatchFinallyImpl; import lucee.runtime.listener.ApplicationContextSupport; import lucee.runtime.writer.BodyContentImpl; @@ -41,7 +40,7 @@ public void setBufferoutput(boolean bufferOutput) { } @Override - public int doStartTag() throws JspException { + public int doStartTag() throws PageException { if (bufferOutput == null) bufferOutput = ((ApplicationContextSupport) pageContext.getApplicationContext()).getBufferOutput() ? Boolean.TRUE : Boolean.FALSE; if (bufferOutput.booleanValue()) bc = (BodyContentImpl) pageContext.pushBody(); diff --git a/core/src/main/java/lucee/runtime/tag/StoredProc.java b/core/src/main/java/lucee/runtime/tag/StoredProc.java index c217c8f79b..9d2c5fe98c 100755 --- a/core/src/main/java/lucee/runtime/tag/StoredProc.java +++ b/core/src/main/java/lucee/runtime/tag/StoredProc.java @@ -34,8 +34,6 @@ import java.util.Map.Entry; import java.util.stream.Collectors; -import javax.servlet.jsp.JspException; - import lucee.commons.io.IOUtil; import lucee.commons.io.log.Log; import lucee.commons.lang.ExceptionUtil; @@ -268,7 +266,7 @@ public void addProcResult(ProcResultBean result) { } @Override - public int doStartTag() throws JspException { + public int doStartTag() throws PageException { // cache within if (StringUtil.isEmpty(cachedWithin)) { diff --git a/core/src/main/java/lucee/runtime/tag/Textarea.java b/core/src/main/java/lucee/runtime/tag/Textarea.java index 18ec1c32e2..f8671dc085 100755 --- a/core/src/main/java/lucee/runtime/tag/Textarea.java +++ b/core/src/main/java/lucee/runtime/tag/Textarea.java @@ -22,7 +22,6 @@ import java.util.Iterator; import java.util.Map.Entry; -import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.BodyContent; import javax.servlet.jsp.tagext.BodyTag; @@ -205,11 +204,11 @@ public void setBodyContent(BodyContent bodyContent) { } @Override - public void doInitBody() throws JspException { + public void doInitBody() throws PageException { } @Override - public int doAfterBody() throws JspException { + public int doAfterBody() throws PageException { return SKIP_BODY; } diff --git a/core/src/main/java/lucee/runtime/tag/Transaction.java b/core/src/main/java/lucee/runtime/tag/Transaction.java index 30e226551f..04c64251d6 100755 --- a/core/src/main/java/lucee/runtime/tag/Transaction.java +++ b/core/src/main/java/lucee/runtime/tag/Transaction.java @@ -20,8 +20,6 @@ import java.sql.Connection; -import javax.servlet.jsp.JspException; - import lucee.commons.lang.ExceptionUtil; import lucee.commons.lang.StringUtil; import lucee.runtime.db.DataSourceManager; @@ -176,7 +174,7 @@ public void doFinally() { } @Override - public int doAfterBody() throws JspException { + public int doAfterBody() throws PageException { if (!ignore && !innerTag) { pageContext.getDataSourceManager().commit(); diff --git a/core/src/main/java/lucee/servlet/pic/PicServlet.java b/core/src/main/java/lucee/servlet/pic/PicServlet.java index bac731b96f..1a4520c0dd 100644 --- a/core/src/main/java/lucee/servlet/pic/PicServlet.java +++ b/core/src/main/java/lucee/servlet/pic/PicServlet.java @@ -23,7 +23,6 @@ import java.io.InputStream; import java.io.OutputStream; -import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -51,7 +50,7 @@ public final class PicServlet extends HttpServlet { * javax.servlet.http.HttpServletResponse) */ @Override - protected void service(HttpServletRequest req, HttpServletResponse rsp) throws ServletException, IOException { + protected void service(HttpServletRequest req, HttpServletResponse rsp) throws IOException { // get out Stream // pic diff --git a/core/src/main/java/org/apache/taglibs/datetime/CurrentTimeTag.java b/core/src/main/java/org/apache/taglibs/datetime/CurrentTimeTag.java index ae0a313a27..4ef7033ff7 100644 --- a/core/src/main/java/org/apache/taglibs/datetime/CurrentTimeTag.java +++ b/core/src/main/java/org/apache/taglibs/datetime/CurrentTimeTag.java @@ -20,22 +20,24 @@ import java.util.Date; -import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.TagSupport; +import lucee.runtime.exp.ApplicationException; +import lucee.runtime.exp.PageException; + public final class CurrentTimeTag extends TagSupport { public CurrentTimeTag() { } @Override - public final int doEndTag() throws JspException { + public final int doEndTag() throws PageException { Date date = new Date(); try { super.pageContext.getOut().write("" + date.getTime()); } catch (Exception e) { - throw new JspException("IO Error: " + e.getMessage()); + throw new ApplicationException("IO Error: " + e.getMessage()); } return 6; } diff --git a/core/src/main/java/org/apache/taglibs/datetime/FormatTag.java b/core/src/main/java/org/apache/taglibs/datetime/FormatTag.java index c9e084807f..de3e5b0cad 100644 --- a/core/src/main/java/org/apache/taglibs/datetime/FormatTag.java +++ b/core/src/main/java/org/apache/taglibs/datetime/FormatTag.java @@ -24,12 +24,13 @@ import java.util.Locale; import java.util.TimeZone; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.JspTagException; -import javax.servlet.jsp.PageContext; import javax.servlet.jsp.tagext.BodyContent; import javax.servlet.jsp.tagext.BodyTagSupport; +import lucee.runtime.PageContext; +import lucee.runtime.exp.ApplicationException; +import lucee.runtime.exp.PageException; + public final class FormatTag extends BodyTagSupport { // format tag attributes @@ -64,7 +65,7 @@ public final class FormatTag extends BodyTagSupport { * @return EVAL_BODY_TAG */ @Override - public final int doStartTag() throws JspException { + public final int doStartTag() throws PageException { output_date = date; return EVAL_BODY_TAG; } @@ -75,7 +76,7 @@ public final int doStartTag() throws JspException { * @return SKIP_BODY */ @Override - public final int doAfterBody() throws JspException { + public final int doAfterBody() throws PageException { // Use the body of the tag as input for the date BodyContent body = getBodyContent(); String s = body.getString().trim(); @@ -100,7 +101,7 @@ public final int doAfterBody() throws JspException { * @return EVAL_PAGE */ @Override - public final int doEndTag() throws JspException { + public final int doEndTag() throws PageException { String date_formatted = default_text; if (output_date != null) { @@ -122,7 +123,7 @@ public final int doEndTag() throws JspException { if (symbolsRef != null) { symbols = (DateFormatSymbols) pageContext.findAttribute(symbolsRef); if (symbols == null) { - throw new JspException("datetime format tag could not find dateFormatSymbols for symbolsRef \"" + symbolsRef + "\"."); + throw new ApplicationException("datetime format tag could not find dateFormatSymbols for symbolsRef \"" + symbolsRef + "\"."); } } @@ -130,7 +131,7 @@ public final int doEndTag() throws JspException { if (localeRef != null) { Locale locale = (Locale) pageContext.findAttribute(localeRef); if (locale == null) { - throw new JspException("datetime format tag could not find locale for localeRef \"" + localeRef + "\"."); + throw new ApplicationException("datetime format tag could not find locale for localeRef \"" + localeRef + "\"."); } sdf = new SimpleDateFormat(pat, locale); @@ -149,7 +150,7 @@ else if (symbols != null) { if (timeZone_string != null) { TimeZone timeZone = (TimeZone) pageContext.getAttribute(timeZone_string, PageContext.SESSION_SCOPE); if (timeZone == null) { - throw new JspTagException("Datetime format tag timeZone " + "script variable \"" + timeZone_string + " \" does not exist"); + throw new ApplicationException("Datetime format tag timeZone " + "script variable \"" + timeZone_string + " \" does not exist"); } sdf.setTimeZone(timeZone); } @@ -162,7 +163,7 @@ else if (symbols != null) { pageContext.getOut().write(date_formatted); } catch (Exception e) { - throw new JspException("IO Error: " + e.getMessage()); + throw new ApplicationException("IO Error: " + e.getMessage()); } return EVAL_PAGE;