/** * Set the context's root and current URL if not present * @param context * @throws JellyTagException */ protected void setContextURLs(JellyContext context) throws JellyTagException { if ((context.getCurrentURL() == null || context.getRootURL() == null) && scriptURL != null) { if (context.getRootURL() == null) context.setRootURL(scriptURL); if (context.getCurrentURL() == null) context.setCurrentURL(scriptURL); } }
/** * Set the context's root and current URL if not present * @param context * @throws JellyTagException */ protected void setContextURLs(JellyContext context) throws JellyTagException { if(scriptURL == null) return; if(context.getRootURL()==null) { context.setRootURL(scriptURL); } context.setCurrentURL(scriptURL); }
/** * Set the context's root and current URL if not present * @param context * @throws JellyTagException */ protected void setContextURLs(JellyContext context) throws JellyTagException { if(scriptURL == null) return; if(context.getRootURL()==null) { context.setRootURL(scriptURL); } context.setCurrentURL(scriptURL); }
/** * Set the context's root and current URL if not present * @param context * @throws JellyTagException */ protected void setContextURLs(JellyContext context) throws JellyTagException { if(scriptURL == null) return; if(context.getRootURL()==null) { context.setRootURL(scriptURL); } context.setCurrentURL(scriptURL); }
URL rootURL = context.getRootURL(); URL currentURL = context.getCurrentURL(); final Object oldParent=context.getVariables().get(PARENT_TAG);
URL rootURL = context.getRootURL(); URL currentURL = context.getCurrentURL(); try {
URL rootURL = context.getRootURL(); URL currentURL = context.getCurrentURL();
URL rootURL = context.getRootURL(); URL currentURL = context.getCurrentURL(); try {
URL rootURL = context.getRootURL(); URL currentURL = context.getCurrentURL(); if ( ! context.isCacheTags() ) {
URL rootURL = context.getRootURL(); URL currentURL = context.getCurrentURL(); if ( ! context.isCacheTags() ) {
URL rootURL = context.getRootURL(); URL currentURL = context.getCurrentURL(); try {
URL rootURL = context.getRootURL(); URL currentURL = context.getCurrentURL(); try {
/** * Run a jelly script. * * @param scriptInputStream Script input stream. * @param systemId the system identifier to help resolve relative URLs * @param rootUrl Root explicit context of the script. * @param context Jelly context. * @param output Output sink. * @throws Exception If an error occurs while locating, compiling or * executing the script. */ public static void runScript( InputStream scriptInputStream, String systemId, URL rootUrl, JellyContext context, XMLOutput output ) throws Exception { URL oldRoot = context.getRootURL(); URL oldCurrent = context.getCurrentURL(); if ( rootUrl != null ) { context.setRootURL( rootUrl ); context.setCurrentURL( rootUrl ); } Script script = compileScript( scriptInputStream, systemId, context ); script.run( context, output ); context.setRootURL( oldRoot ); context.setCurrentURL( oldCurrent ); }