Package org.apache.jasper

Examples of org.apache.jasper.Options


        String servletName = null;

        ServletConfig servletConfig = (ServletConfig) context.findChild("jsp");
        if (servletConfig != null) {
            ServletContext sctx = context.getServletContext();
            Options opt = new EmbeddedServletOptions(servletConfig, sctx);
            JspRuntimeContext jrctx = new JspRuntimeContext(sctx, opt);
            JspCompilationContext jcctx = createJspCompilationContext(jspName, false, opt, sctx, jrctx, null);
            servletName = jcctx.getServletJavaFileName();
        } else {
            logger.error("Context " + context.getName() + " does not have \"jsp\" servlet");
View Full Code Here


        ServletConfig servletConfig = (ServletConfig) context.findChild("jsp");
        if (servletConfig != null) {
            if (summary != null) {
                synchronized (servletConfig) {
                    ServletContext sctx = context.getServletContext();
                    Options opt = new EmbeddedServletOptions(servletConfig, sctx);

                    JspRuntimeContext jrctx = new JspRuntimeContext(sctx, opt);
                    try {
                        //
                        // we need to pass context classloader here, so the jsps can reference /WEB-INF/classes and
View Full Code Here

    public void listContextJsps(Context context, Summary summary, boolean compile) throws Exception {
        ServletConfig servletConfig = (ServletConfig) context.findChild("jsp");
        if (servletConfig != null) {
            synchronized (servletConfig) {
                ServletContext sctx = context.getServletContext();
                Options opt = new EmbeddedServletOptions(servletConfig, sctx);

                JspRuntimeContext jrctx = new JspRuntimeContext(sctx, opt);
                try {
                    if (summary.getItems() == null) {
                        summary.setItems(new HashMap());
View Full Code Here

                                         HttpServletRequest request, HttpServletResponse response) throws Exception {

        String jspName = ServletRequestUtils.getStringParameter(request, "source", null);
        ServletContext sctx = context.getServletContext();
        ServletConfig scfg = (ServletConfig) context.findChild("jsp");
        Options opt = new EmbeddedServletOptions(scfg, sctx);
        String encoding = opt.getJavaEncoding();
        String content = null;

        if (jspName != null) {
            String servletName = getContainerWrapper().getTomcatContainer().getServletFileNameForJsp(context, jspName);
            if (servletName != null) {
View Full Code Here

                if (jsp != null) {

                    ServletContext sctx = context.getServletContext();
                    ServletConfig scfg = (ServletConfig) context.findChild("jsp");
                    Options opt = new EmbeddedServletOptions(scfg, sctx);
                    String descriptorPageEncoding = opt.getJspConfig().findJspProperty(jspName).getPageEncoding();

                    if (descriptorPageEncoding != null && descriptorPageEncoding.length() > 0) {
                        item.setEncoding(descriptorPageEncoding);
                    } else {
View Full Code Here

                + " does not exist", new File(info.getJspSource()).exists());
        PrintWriter logWriter = new PrintWriter(new StringWriter());
        URL baseUrl = new File(info.getWebRoot()).toURL();
        ServletContext sContext = new JspCServletContext(logWriter, baseUrl);
        ServletConfig sConfig = new MockServletConfig(sContext);
        Options options = createOptions(sContext, sConfig, info);
        JspRuntimeContext rtContext = new JspRuntimeContext(sContext, options);
        JspServletWrapper sWrapper = makeWrapper(sContext, options, rtContext);
        JspCompilationContext cContext = createJspCompilationContext(info, sContext, options,
                rtContext, sWrapper, new StringWriter());
        logCompilation(info.getJspSource(), info.getClassOutputDir());
View Full Code Here

                tagInfo, jspRuntimeContext, tagFileJarUrl);
        return wrapper;
    }

    private Options createOptions(ServletContext ctx, ServletConfig cfg, JspCompilationInfo info) {
        Options options = new EmbeddedServletOptions(cfg, ctx);
        return new MockOptions(options, ctx, info);
    }
View Full Code Here

                        log.log( "javac not found using container loader");
                }
            }

      try {
    Options options=new JasperOptionsImpl(args);
    JspCompilationContext ctxt=createCompilationContext(req,
                    jspFile,
                    options,
                    mangler);
    jsp2java( mangler, ctxt );
View Full Code Here

    }

    public static void concatenate(Compiler compiler, Node.Nodes page)
            throws JasperException {

        Options options = compiler.getCompilationContext().getOptions();
        PageInfo pageInfo = compiler.getPageInfo();
        boolean trim =
            options.getTrimSpaces() || pageInfo.isTrimDirectiveWhitespaces();

        if (trim) {
            TextCatVisitor v = new TextCatVisitor(true, trim);
            page.visit(v);
            v.collectText();
View Full Code Here

        this.engine = ServletEngine.getServletEngine(serverInfo);
       
        if (engine == null)
            Constants.message("jsp.error.bad-servlet-engine", Constants.FATAL_ERRORS);
        else {
            options = new Options(config, context);

            parentClassLoader = (ClassLoader) context.getAttribute(Constants.SERVLET_CLASS_LOADER);
            if (parentClassLoader == null)
                parentClassLoader = this.getClass().getClassLoader();
           
View Full Code Here

TOP

Related Classes of org.apache.jasper.Options

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.