Example usage for javax.servlet.jsp JspWriter print

List of usage examples for javax.servlet.jsp JspWriter print

Introduction

In this page you can find the example usage for javax.servlet.jsp JspWriter print.

Prototype


abstract public void print(Object obj) throws IOException;

Source Link

Document

Print an object.

Usage

From source file:org.dspace.app.webui.jsptag.ItemListTag.java

public int doStartTag() throws JspException {
    JspWriter out = pageContext.getOut();
    HttpServletRequest hrq = (HttpServletRequest) pageContext.getRequest();

    boolean emphasiseDate = false;
    boolean emphasiseTitle = false;

    if (emphColumn != null) {
        emphasiseDate = emphColumn.equalsIgnoreCase("date");
        emphasiseTitle = emphColumn.equalsIgnoreCase("title");
    }/*from w w w  .  ja  v a  2  s  .co  m*/

    // get the elements to display
    String configLine = null;
    String widthLine = null;

    if (sortOption != null) {
        if (configLine == null) {
            configLine = ConfigurationManager
                    .getProperty("webui.itemlist.sort." + sortOption.getName() + ".columns");
            widthLine = ConfigurationManager
                    .getProperty("webui.itemlist.sort." + sortOption.getName() + ".widths");
        }

        if (configLine == null) {
            configLine = ConfigurationManager
                    .getProperty("webui.itemlist." + sortOption.getName() + ".columns");
            widthLine = ConfigurationManager.getProperty("webui.itemlist." + sortOption.getName() + ".widths");
        }
    }

    if (configLine == null) {
        configLine = ConfigurationManager.getProperty("webui.itemlist.columns");
        widthLine = ConfigurationManager.getProperty("webui.itemlist.widths");
    }

    // Have we read a field configration from dspace.cfg?
    if (configLine != null) {
        // If thumbnails are disabled, strip out any thumbnail column from the configuration
        if (!showThumbs && configLine.contains("thumbnail")) {
            // Ensure we haven't got any nulls
            configLine = configLine == null ? "" : configLine;
            widthLine = widthLine == null ? "" : widthLine;

            // Tokenize the field and width lines
            StringTokenizer llt = new StringTokenizer(configLine, ",");
            StringTokenizer wlt = new StringTokenizer(widthLine, ",");

            StringBuilder newLLine = new StringBuilder();
            StringBuilder newWLine = new StringBuilder();
            while (llt.hasMoreTokens() || wlt.hasMoreTokens()) {
                String listTok = llt.hasMoreTokens() ? llt.nextToken() : null;
                String widthTok = wlt.hasMoreTokens() ? wlt.nextToken() : null;

                // Only use the Field and Width tokens, if the field isn't 'thumbnail'
                if (listTok == null || !listTok.trim().equals("thumbnail")) {
                    if (listTok != null) {
                        if (newLLine.length() > 0) {
                            newLLine.append(",");
                        }

                        newLLine.append(listTok);
                    }

                    if (widthTok != null) {
                        if (newWLine.length() > 0) {
                            newWLine.append(",");
                        }

                        newWLine.append(widthTok);
                    }
                }
            }

            // Use the newly built configuration file
            configLine = newLLine.toString();
            widthLine = newWLine.toString();
        }
    } else {
        configLine = DEFAULT_LIST_FIELDS;
        widthLine = DEFAULT_LIST_WIDTHS;
    }

    // Arrays used to hold the information we will require when outputting each row
    String[] fieldArr = configLine == null ? new String[0] : configLine.split("\\s*,\\s*");
    String[] widthArr = widthLine == null ? new String[0] : widthLine.split("\\s*,\\s*");
    boolean isDate[] = new boolean[fieldArr.length];
    boolean emph[] = new boolean[fieldArr.length];
    boolean isAuthor[] = new boolean[fieldArr.length];
    boolean viewFull[] = new boolean[fieldArr.length];
    String[] browseType = new String[fieldArr.length];
    String[] cOddOrEven = new String[fieldArr.length];

    try {
        // Get the interlinking configuration too
        CrossLinks cl = new CrossLinks();

        // Get a width for the table
        String tablewidth = ConfigurationManager.getProperty("webui.itemlist.tablewidth");

        // If we have column widths, output a fixed layout table - faster for browsers to render
        // but not if we have to add an 'edit item' button - we can't know how big it will be
        if (widthArr.length > 0 && widthArr.length == fieldArr.length && !linkToEdit) {
            // If the table width has been specified, we can make this a fixed layout
            if (!StringUtils.isEmpty(tablewidth)) {
                out.println("<table style=\"width: " + tablewidth
                        + "; table-layout: fixed;\" align=\"center\" class=\"miscTable\" summary=\"This table browses all dspace content\">");
            } else {
                // Otherwise, don't constrain the width
                out.println(
                        "<table align=\"center\" class=\"miscTable\" summary=\"This table browses all dspace content\">");
            }

            // Output the known column widths
            out.print("<colgroup>");

            for (int w = 0; w < widthArr.length; w++) {
                out.print("<col width=\"");

                // For a thumbnail column of width '*', use the configured max width for thumbnails
                if (fieldArr[w].equals("thumbnail") && widthArr[w].equals("*")) {
                    out.print(thumbItemListMaxWidth);
                } else {
                    out.print(StringUtils.isEmpty(widthArr[w]) ? "*" : widthArr[w]);
                }

                out.print("\" />");
            }

            out.println("</colgroup>");
        } else if (!StringUtils.isEmpty(tablewidth)) {
            out.println("<table width=\"" + tablewidth
                    + "\" align=\"center\" class=\"miscTable\" summary=\"This table browses all dspace content\">");
        } else {
            out.println(
                    "<table align=\"center\" class=\"miscTable\" summary=\"This table browses all dspace content\">");
        }

        // Output the table headers
        out.println("<tr>");

        for (int colIdx = 0; colIdx < fieldArr.length; colIdx++) {
            String field = fieldArr[colIdx].toLowerCase().trim();
            cOddOrEven[colIdx] = (((colIdx + 1) % 2) == 0 ? "Odd" : "Even");

            // find out if the field is a date
            if (field.indexOf("(date)") > 0) {
                field = field.replaceAll("\\(date\\)", "");
                isDate[colIdx] = true;
            }

            // Cache any modifications to field
            fieldArr[colIdx] = field;

            // find out if this is the author column
            if (field.equals(authorField)) {
                isAuthor[colIdx] = true;
            }

            // find out if this field needs to link out to other browse views
            if (cl.hasLink(field)) {
                browseType[colIdx] = cl.getLinkType(field);
                viewFull[colIdx] = BrowseIndex.getBrowseIndex(browseType[colIdx]).isItemIndex();
            }

            // find out if we are emphasising this field
            if (field.equals(emphColumn)) {
                emph[colIdx] = true;
            } else if ((field.equals(dateField) && emphasiseDate)
                    || (field.equals(titleField) && emphasiseTitle)) {
                emph[colIdx] = true;
            }

            // prepare the strings for the header
            String id = "t" + Integer.toString(colIdx + 1);
            String css = "oddRow" + cOddOrEven[colIdx] + "Col";
            String message = "itemlist." + field;

            // output the header
            out.print("<th id=\"" + id + "\" class=\"" + css + "\">" + (emph[colIdx] ? "<strong>" : "")
                    + LocaleSupport.getLocalizedMessage(pageContext, message)
                    + (emph[colIdx] ? "</strong>" : "") + "</th>");
        }

        if (linkToEdit) {
            String id = "t" + Integer.toString(cOddOrEven.length + 1);
            String css = "oddRow" + cOddOrEven[cOddOrEven.length - 2] + "Col";

            // output the header
            out.print("<th id=\"" + id + "\" class=\"" + css + "\">" + (emph[emph.length - 2] ? "<strong>" : "")
                    + "&nbsp;" //LocaleSupport.getLocalizedMessage(pageContext, message)
                    + (emph[emph.length - 2] ? "</strong>" : "") + "</th>");
        }

        out.print("</tr>");

        // now output each item row
        for (int i = 0; i < items.length; i++) {
            // now prepare the XHTML frag for this division
            out.print("<tr>");
            String rOddOrEven;
            if (i == highlightRow) {
                rOddOrEven = "highlight";
            } else {
                rOddOrEven = ((i & 1) == 1 ? "odd" : "even");
            }

            for (int colIdx = 0; colIdx < fieldArr.length; colIdx++) {
                String field = fieldArr[colIdx];

                // get the schema and the element qualifier pair
                // (Note, the schema is not used for anything yet)
                // (second note, I hate this bit of code.  There must be
                // a much more elegant way of doing this.  Tomcat has
                // some weird problems with variations on this code that
                // I tried, which is why it has ended up the way it is)
                StringTokenizer eq = new StringTokenizer(field, ".");

                String[] tokens = { "", "", "" };
                int k = 0;
                while (eq.hasMoreTokens()) {
                    tokens[k] = eq.nextToken().toLowerCase().trim();
                    k++;
                }
                String schema = tokens[0];
                String element = tokens[1];
                String qualifier = tokens[2];

                // first get hold of the relevant metadata for this column
                DCValue[] metadataArray;
                if (qualifier.equals("*")) {
                    metadataArray = items[i].getMetadata(schema, element, Item.ANY, Item.ANY);
                } else if (qualifier.equals("")) {
                    metadataArray = items[i].getMetadata(schema, element, null, Item.ANY);
                } else {
                    metadataArray = items[i].getMetadata(schema, element, qualifier, Item.ANY);
                }

                // save on a null check which would make the code untidy
                if (metadataArray == null) {
                    metadataArray = new DCValue[0];
                }

                // now prepare the content of the table division
                String metadata = "-";
                if (field.equals("thumbnail")) {
                    metadata = getThumbMarkup(hrq, items[i]);
                }
                if (metadataArray.length > 0) {
                    // format the date field correctly
                    if (isDate[colIdx]) {
                        DCDate dd = new DCDate(metadataArray[0].value);
                        metadata = UIUtil.displayDate(dd, false, false, hrq);
                    }
                    // format the title field correctly for withdrawn items (ie. don't link)
                    else if (field.equals(titleField) && items[i].isWithdrawn()) {
                        metadata = Utils.addEntities(metadataArray[0].value);
                    }
                    // format the title field correctly
                    else if (field.equals(titleField)) {
                        metadata = "<a href=\"" + hrq.getContextPath() + "/handle/" + items[i].getHandle()
                                + "\">" + Utils.addEntities(metadataArray[0].value) + "</a>";
                    }
                    // format all other fields
                    else {
                        // limit the number of records if this is the author field (if
                        // -1, then the limit is the full list)
                        boolean truncated = false;
                        int loopLimit = metadataArray.length;
                        if (isAuthor[colIdx]) {
                            int fieldMax = (authorLimit > 0 ? authorLimit : metadataArray.length);
                            loopLimit = (fieldMax > metadataArray.length ? metadataArray.length : fieldMax);
                            truncated = (fieldMax < metadataArray.length);
                            log.debug("Limiting output of field " + field + " to " + Integer.toString(loopLimit)
                                    + " from an original " + Integer.toString(metadataArray.length));
                        }

                        StringBuffer sb = new StringBuffer();
                        for (int j = 0; j < loopLimit; j++) {
                            String startLink = "";
                            String endLink = "";
                            if (!StringUtils.isEmpty(browseType[colIdx]) && !disableCrossLinks) {
                                String argument;
                                String value;
                                if (metadataArray[j].authority != null
                                        && metadataArray[j].confidence >= MetadataAuthorityManager.getManager()
                                                .getMinConfidence(metadataArray[j].schema,
                                                        metadataArray[j].element, metadataArray[j].qualifier)) {
                                    argument = "authority";
                                    value = metadataArray[j].authority;
                                } else {
                                    argument = "value";
                                    value = metadataArray[j].value;
                                }
                                if (viewFull[colIdx]) {
                                    argument = "vfocus";
                                }
                                startLink = "<a href=\"" + hrq.getContextPath() + "/browse?type="
                                        + browseType[colIdx] + "&amp;" + argument + "="
                                        + URLEncoder.encode(value, "UTF-8");

                                if (metadataArray[j].language != null) {
                                    startLink = startLink + "&amp;" + argument + "_lang="
                                            + URLEncoder.encode(metadataArray[j].language, "UTF-8");
                                }

                                if ("authority".equals(argument)) {
                                    startLink += "\" class=\"authority " + browseType[colIdx] + "\">";
                                } else {
                                    startLink = startLink + "\">";
                                }
                                endLink = "</a>";
                            }
                            sb.append(startLink);
                            sb.append(Utils.addEntities(metadataArray[j].value));
                            sb.append(endLink);
                            if (j < (loopLimit - 1)) {
                                sb.append("; ");
                            }
                        }
                        if (truncated) {
                            String etal = LocaleSupport.getLocalizedMessage(pageContext, "itemlist.et-al");
                            sb.append(", ").append(etal);
                        }
                        metadata = "<em>" + sb.toString() + "</em>";
                    }
                }

                // prepare extra special layout requirements for dates
                String extras = "";
                if (isDate[colIdx]) {
                    extras = "nowrap=\"nowrap\" align=\"right\"";
                }

                String id = "t" + Integer.toString(colIdx + 1);
                out.print("<td headers=\"" + id + "\" class=\"" + rOddOrEven + "Row" + cOddOrEven[colIdx]
                        + "Col\" " + extras + ">" + (emph[colIdx] ? "<strong>" : "") + metadata
                        + (emph[colIdx] ? "</strong>" : "") + "</td>");
            }

            // Add column for 'edit item' links
            if (linkToEdit) {
                String id = "t" + Integer.toString(cOddOrEven.length + 1);

                out.print("<td headers=\"" + id + "\" class=\"" + rOddOrEven + "Row"
                        + cOddOrEven[cOddOrEven.length - 2] + "Col\" nowrap>" + "<form method=\"get\" action=\""
                        + hrq.getContextPath() + "/tools/edit-item\">"
                        + "<input type=\"hidden\" name=\"handle\" value=\"" + items[i].getHandle() + "\" />"
                        + "<input type=\"submit\" value=\"Edit Item\" /></form>" + "</td>");
            }

            out.println("</tr>");
        }

        // close the table
        out.println("</table>");
    } catch (IOException ie) {
        throw new JspException(ie);
    } catch (BrowseException e) {
        throw new JspException(e);
    }

    return SKIP_BODY;
}

From source file:gov.nih.nci.rembrandt.web.taglib.PCAPlotTag.java

public int doStartTag() {
    chart = null;/*from   w w w  .  j a  v a2s . co  m*/
    pcaResults = null;
    pcaData.clear();

    ServletRequest request = pageContext.getRequest();
    HttpSession session = pageContext.getSession();
    Object o = request.getAttribute(beanName);
    JspWriter out = pageContext.getOut();
    ServletResponse response = pageContext.getResponse();

    try {
        //retrieve the Finding from cache and build the list of PCAData points
        PrincipalComponentAnalysisFinding principalComponentAnalysisFinding = (PrincipalComponentAnalysisFinding) businessTierCache
                .getSessionFinding(session.getId(), taskId);

        Collection<ClinicalFactorType> clinicalFactors = new ArrayList<ClinicalFactorType>();
        List<String> sampleIds = new ArrayList<String>();
        Map<String, PCAresultEntry> pcaResultMap = new HashMap<String, PCAresultEntry>();
        if (principalComponentAnalysisFinding != null) {
            pcaResults = principalComponentAnalysisFinding.getResultEntries();
            for (PCAresultEntry pcaEntry : pcaResults) {
                sampleIds.add(pcaEntry.getSampleId());
                pcaResultMap.put(pcaEntry.getSampleId(), pcaEntry);
            }

            Collection<SampleResultset> validatedSampleResultset = ClinicalDataValidator
                    .getValidatedSampleResultsetsFromSampleIDs(sampleIds, clinicalFactors);

            if (validatedSampleResultset != null) {
                String id;
                PCAresultEntry entry;

                for (SampleResultset rs : validatedSampleResultset) {
                    id = rs.getBiospecimen().getSpecimenName();
                    entry = pcaResultMap.get(id);
                    PrincipalComponentAnalysisDataPoint pcaPoint = new PrincipalComponentAnalysisDataPoint(id,
                            entry.getPc1(), entry.getPc2(), entry.getPc3());
                    String diseaseName = rs.getDisease().getValueObject();
                    if (diseaseName != null) {
                        pcaPoint.setDiseaseName(diseaseName);
                    } else {
                        pcaPoint.setDiseaseName(DiseaseType.NON_TUMOR.name());
                    }
                    GenderDE genderDE = rs.getGenderCode();
                    if (genderDE != null && genderDE.getValue() != null) {
                        String gt = genderDE.getValueObject().trim();
                        if (gt != null) {
                            GenderType genderType = GenderType.valueOf(gt);
                            if (genderType != null) {
                                pcaPoint.setGender(genderType);
                            }
                        }
                    }
                    Long survivalLength = rs.getSurvivalLength();
                    if (survivalLength != null) {
                        //survival length is stored in days in the DB so divide by 30 to get the 
                        //approx survival in months
                        double survivalInMonths = survivalLength.doubleValue() / 30.0;
                        pcaPoint.setSurvivalInMonths(survivalInMonths);
                    }
                    pcaData.add(pcaPoint);
                }
            }

            PCAcomponent pone = PCAcomponent.PC1;
            PCAcomponent ptwo = PCAcomponent.PC2;
            //check the components to see which graph to get
            if (components.equalsIgnoreCase("PC1vsPC2")) {
                pone = PCAcomponent.PC2;
                ptwo = PCAcomponent.PC1;
                //chart = (JFreeChart) CaIntegratorChartFactory.getPrincipalComponentAnalysisGraph(pcaData,PCAcomponent.PC2,PCAcomponent.PC1,PCAcolorByType.valueOf(PCAcolorByType.class,colorBy));
            }
            if (components.equalsIgnoreCase("PC1vsPC3")) {
                pone = PCAcomponent.PC3;
                ptwo = PCAcomponent.PC1;
                //chart = (JFreeChart) CaIntegratorChartFactory.getPrincipalComponentAnalysisGraph(pcaData,PCAcomponent.PC3,PCAcomponent.PC1,PCAcolorByType.valueOf(PCAcolorByType.class,colorBy));
            }
            if (components.equalsIgnoreCase("PC2vsPC3")) {
                pone = PCAcomponent.PC2;
                ptwo = PCAcomponent.PC3;
                //chart = (JFreeChart) CaIntegratorChartFactory.getPrincipalComponentAnalysisGraph(pcaData,PCAcomponent.PC3,PCAcomponent.PC2,PCAcolorByType.valueOf(PCAcolorByType.class,colorBy));
            }

            PrincipalComponentAnalysisPlot plot = new RBTPrincipalComponentAnalysisPlot(pcaData, pone, ptwo,
                    PCAcolorByType.valueOf(PCAcolorByType.class, colorBy));
            if (plot != null) {
                chart = (JFreeChart) plot.getChart();
            }

            RembrandtImageFileHandler imageHandler = new RembrandtImageFileHandler(session.getId(), "png", 650,
                    600);
            //The final complete path to be used by the webapplication
            String finalPath = imageHandler.getSessionTempFolder();
            String finalURLpath = imageHandler.getFinalURLPath();
            /*
             * Create the actual charts, writing it to the session temp folder
            */
            ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection());
            String mapName = imageHandler.createUniqueMapName();
            //PrintWriter writer = new PrintWriter(new FileWriter(mapName));
            ChartUtilities.writeChartAsPNG(new FileOutputStream(finalPath), chart, 650, 600, info);
            //ImageMapUtil.writeBoundingRectImageMap(writer,"PCAimageMap",info,true);
            //writer.close();

            /*   This is here to put the thread into a loop while it waits for the
             *   image to be available.  It has an unsophisticated timer but at 
             *   least it is something to avoid an endless loop.
             **/
            boolean imageReady = false;
            int timeout = 1000;
            FileInputStream inputStream = null;
            while (!imageReady) {
                timeout--;
                try {
                    inputStream = new FileInputStream(finalPath);
                    inputStream.available();
                    imageReady = true;
                    inputStream.close();
                } catch (IOException ioe) {
                    imageReady = false;
                    if (inputStream != null) {
                        inputStream.close();
                    }
                }
                if (timeout <= 1) {

                    break;
                }
            }

            out.print(ImageMapUtil.getBoundingRectImageMapTag(mapName, false, info));
            finalURLpath = finalURLpath.replace("\\", "/");
            long randomness = System.currentTimeMillis(); //prevent image caching
            out.print("<img id=\"geneChart\" name=\"geneChart\" alt=\"geneChart\" src=\"" + finalURLpath + "?"
                    + randomness + "\" usemap=\"#" + mapName + "\" border=\"0\" />");

            //(imageHandler.getImageTag(mapFileName));
        }
    } catch (IOException e) {
        logger.error(e);
    } catch (Exception e) {
        logger.error(e);
    } catch (Throwable t) {
        logger.error(t);
    }

    return EVAL_BODY_INCLUDE;
}

From source file:gov.nih.nci.ispy.web.taglib.PCAPlotTag.java

public int doStartTag() {
    chart = null;//w  w w  . java  2s.c  om
    pcaResults = null;
    pcaData.clear();

    ServletRequest request = pageContext.getRequest();
    HttpSession session = pageContext.getSession();
    Object o = request.getAttribute(beanName);
    JspWriter out = pageContext.getOut();
    ServletResponse response = pageContext.getResponse();

    try {
        //retrieve the Finding from cache and build the list of PCAData points
        PrincipalComponentAnalysisFinding principalComponentAnalysisFinding = (PrincipalComponentAnalysisFinding) businessTierCache
                .getSessionFinding(session.getId(), taskId);

        Collection<ClinicalFactorType> clinicalFactors = new ArrayList<ClinicalFactorType>();
        List<String> sampleIds = new ArrayList<String>();
        Map<String, PCAresultEntry> pcaResultMap = new HashMap<String, PCAresultEntry>();

        pcaResults = principalComponentAnalysisFinding.getResultEntries();
        for (PCAresultEntry pcaEntry : pcaResults) {
            sampleIds.add(pcaEntry.getSampleId());
            pcaResultMap.put(pcaEntry.getSampleId(), pcaEntry);
        }

        //Get the clinical data for the sampleIds
        ClinicalDataService cqs = ClinicalDataServiceFactory.getInstance();
        IdMapperFileBasedService idMapper = IdMapperFileBasedService.getInstance();
        //Map<String, ClinicalData> clinicalDataMap = cqs.getClinicalDataMapForLabtrackIds(sampleIds);              

        PCAresultEntry entry;
        //ClinicalData clinData;
        //PatientData patientData;
        SampleInfo si;
        TimepointType timepoint;
        for (String id : sampleIds) {

            entry = pcaResultMap.get(id);
            ISPYPCADataPoint pcaPoint = new ISPYPCADataPoint(id, entry.getPc1(), entry.getPc2(),
                    entry.getPc3());

            si = idMapper.getSampleInfoForLabtrackId(id);

            //clinData = cqs.getClinicalDataForPatientDID(si.getRegistrantId(), si.getTimepoint());
            //patientData = cqs.getPatientDataForPatientDID(si.getISPYId());
            Set<String> ispyIds = new HashSet<String>();
            ispyIds.add(si.getISPYId());
            ISPYclinicalDataQueryDTO dto = new ISPYclinicalDataQueryDTO();
            dto.setRestrainingSamples(ispyIds);
            Set<PatientData> pdSet = cqs.getClinicalData(dto);
            for (PatientData patientData : pdSet) {
                pcaPoint.setISPY_ID(si.getISPYId());
                timepoint = si.getTimepoint();

                pcaPoint.setTimepoint(timepoint);

                if (patientData != null) {
                    pcaPoint.setClinicalStage(patientData.getClinicalStage());

                    int clinRespVal;
                    Double mriPctChange = null;
                    if (timepoint == TimepointType.T1) {
                        pcaPoint.setClinicalResponse(ClinicalResponseType.NA);
                        pcaPoint.setTumorMRIpctChange(null);
                    } else if (timepoint == TimepointType.T2) {
                        clinRespVal = PatientData.parseValue(patientData.getClinRespT1_T2());
                        //set the clinical respoinse to the T1_T2
                        pcaPoint.setClinicalResponse(ClinicalResponseType.getTypeForValue(clinRespVal));
                        pcaPoint.setTumorMRIpctChange(patientData.getMriPctChangeT1_T2());
                    } else if (timepoint == TimepointType.T3) {
                        //set the clinical response to T1_T3
                        clinRespVal = PatientData.parseValue(patientData.getClinRespT1_T3());
                        pcaPoint.setClinicalResponse(ClinicalResponseType.getTypeForValue(clinRespVal));
                        pcaPoint.setTumorMRIpctChange(patientData.getMriPctChangeT1_T3());
                    } else if (timepoint == TimepointType.T4) {
                        //set the clinical response to T1_T4
                        clinRespVal = PatientData.parseValue(patientData.getClinRespT1_T4());
                        pcaPoint.setClinicalResponse(ClinicalResponseType.getTypeForValue(clinRespVal));
                        pcaPoint.setTumorMRIpctChange(patientData.getMriPctChangeT1_T4());
                    } else {
                        pcaPoint.setClinicalResponse(ClinicalResponseType.UNKNOWN);
                        pcaPoint.setTumorMRIpctChange(null);
                    }
                }

                pcaData.add(pcaPoint);
            }
        }

        //check the components to see which graph to get
        if (components.equalsIgnoreCase("PC1vsPC2")) {
            ISPYPrincipalComponentAnalysisPlot plot = new ISPYPrincipalComponentAnalysisPlot(pcaData,
                    PCAcomponent.PC2, PCAcomponent.PC1,
                    ColorByType.valueOf(ColorByType.class, colorBy.toUpperCase()));
            chart = plot.getChart();
        }
        if (components.equalsIgnoreCase("PC1vsPC3")) {
            ISPYPrincipalComponentAnalysisPlot plot = new ISPYPrincipalComponentAnalysisPlot(pcaData,
                    PCAcomponent.PC3, PCAcomponent.PC1,
                    ColorByType.valueOf(ColorByType.class, colorBy.toUpperCase()));
            chart = plot.getChart();
        }
        if (components.equalsIgnoreCase("PC2vsPC3")) {
            ISPYPrincipalComponentAnalysisPlot plot = new ISPYPrincipalComponentAnalysisPlot(pcaData,
                    PCAcomponent.PC3, PCAcomponent.PC2,
                    ColorByType.valueOf(ColorByType.class, colorBy.toUpperCase()));
            chart = plot.getChart();
        }

        ISPYImageFileHandler imageHandler = new ISPYImageFileHandler(session.getId(), "png", 650, 600);
        //The final complete path to be used by the webapplication
        String finalPath = imageHandler.getSessionTempFolder();
        String finalURLpath = imageHandler.getFinalURLPath();
        /*
         * Create the actual charts, writing it to the session temp folder
        */
        ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection());
        String mapName = imageHandler.createUniqueMapName();
        //PrintWriter writer = new PrintWriter(new FileWriter(mapName));
        ChartUtilities.writeChartAsPNG(new FileOutputStream(finalPath), chart, 650, 600, info);
        //ImageMapUtil.writeBoundingRectImageMap(writer,"PCAimageMap",info,true);
        //writer.close();

        /*   This is here to put the thread into a loop while it waits for the
         *   image to be available.  It has an unsophisticated timer but at 
         *   least it is something to avoid an endless loop.
         **/
        boolean imageReady = false;
        int timeout = 1000;
        FileInputStream inputStream = null;
        while (!imageReady) {
            timeout--;
            try {
                inputStream = new FileInputStream(finalPath);
                inputStream.available();
                imageReady = true;
                inputStream.close();
            } catch (IOException ioe) {
                imageReady = false;
                if (inputStream != null) {
                    inputStream.close();
                }
            }
            if (timeout <= 1) {

                break;
            }
        }

        out.print(ImageMapUtil.getBoundingRectImageMapTag(mapName, false, info));
        finalURLpath = finalURLpath.replace("\\", "/");
        long randomness = System.currentTimeMillis(); //prevent image caching
        out.print("<img id=\"geneChart\" name=\"geneChart\" src=\"" + finalURLpath + "?" + randomness
                + "\" usemap=\"#" + mapName + "\" border=\"0\" />");

        //(imageHandler.getImageTag(mapFileName));

    } catch (IOException e) {
        logger.error(e);
    } catch (Exception e) {
        logger.error(e);
    } catch (Throwable t) {
        logger.error(t);
    }

    return EVAL_BODY_INCLUDE;
}

From source file:org.dspace.app.webui.jsptag.BrowseListTag.java

public int doStartTag() throws JspException {
    JspWriter out = pageContext.getOut();
    HttpServletRequest hrq = (HttpServletRequest) pageContext.getRequest();

    /* just leave this out now
    boolean emphasiseDate = false;//from  w  w  w.  j a  v a 2s. co  m
    boolean emphasiseTitle = false;
            
    if (emphColumn != null)
    {
    emphasiseDate = emphColumn.equalsIgnoreCase("date");
    emphasiseTitle = emphColumn.equalsIgnoreCase("title");
    }
    */

    // get the elements to display
    String browseListLine = null;
    String browseWidthLine = null;

    // As different indexes / sort options may require different columns to be displayed
    // try to obtain a custom configuration based for the browse that has been performed
    if (browseInfo != null) {
        SortOption so = browseInfo.getSortOption();
        BrowseIndex bix = browseInfo.getBrowseIndex();

        // We have obtained the index that was used for this browse
        if (bix != null) {
            // First, try to get a configuration for this browse and sort option combined
            if (so != null && browseListLine == null) {
                browseListLine = ConfigurationManager.getProperty(
                        "webui.itemlist.browse." + bix.getName() + ".sort." + so.getName() + ".columns");
                browseWidthLine = ConfigurationManager.getProperty(
                        "webui.itemlist.browse." + bix.getName() + ".sort." + so.getName() + ".widths");
            }

            // We haven't got a sort option defined, so get one for the index
            // - it may be required later
            if (so == null) {
                so = bix.getSortOption();
            }
        }

        // If no config found, attempt to get one for this sort option
        if (so != null && browseListLine == null) {
            browseListLine = ConfigurationManager
                    .getProperty("webui.itemlist.sort." + so.getName() + ".columns");
            browseWidthLine = ConfigurationManager
                    .getProperty("webui.itemlist.sort." + so.getName() + ".widths");
        }

        // If no config found, attempt to get one for this browse index
        if (bix != null && browseListLine == null) {
            browseListLine = ConfigurationManager
                    .getProperty("webui.itemlist.browse." + bix.getName() + ".columns");
            browseWidthLine = ConfigurationManager
                    .getProperty("webui.itemlist.browse." + bix.getName() + ".widths");
        }

        // If no config found, attempt to get a general one, using the sort name
        if (so != null && browseListLine == null) {
            browseListLine = ConfigurationManager.getProperty("webui.itemlist." + so.getName() + ".columns");
            browseWidthLine = ConfigurationManager.getProperty("webui.itemlist." + so.getName() + ".widths");
        }

        // If no config found, attempt to get a general one, using the index name
        if (bix != null && browseListLine == null) {
            browseListLine = ConfigurationManager.getProperty("webui.itemlist." + bix.getName() + ".columns");
            browseWidthLine = ConfigurationManager.getProperty("webui.itemlist." + bix.getName() + ".widths");
        }
    }

    if (browseListLine == null) {
        browseListLine = ConfigurationManager.getProperty("webui.itemlist.columns");
        browseWidthLine = ConfigurationManager.getProperty("webui.itemlist.widths");
    }

    // Have we read a field configration from dspace.cfg?
    if (browseListLine != null) {
        // If thumbnails are disabled, strip out any thumbnail column from the configuration
        if (!showThumbs && browseListLine.contains("thumbnail")) {
            // Ensure we haven't got any nulls
            browseListLine = browseListLine == null ? "" : browseListLine;
            browseWidthLine = browseWidthLine == null ? "" : browseWidthLine;

            // Tokenize the field and width lines
            StringTokenizer bllt = new StringTokenizer(browseListLine, ",");
            StringTokenizer bwlt = new StringTokenizer(browseWidthLine, ",");

            StringBuilder newBLLine = new StringBuilder();
            StringBuilder newBWLine = new StringBuilder();
            while (bllt.hasMoreTokens() || bwlt.hasMoreTokens()) {
                String browseListTok = bllt.hasMoreTokens() ? bllt.nextToken() : null;
                String browseWidthTok = bwlt.hasMoreTokens() ? bwlt.nextToken() : null;

                // Only use the Field and Width tokens, if the field isn't 'thumbnail'
                if (browseListTok == null || !browseListTok.trim().equals("thumbnail")) {
                    if (browseListTok != null) {
                        if (newBLLine.length() > 0) {
                            newBLLine.append(",");
                        }

                        newBLLine.append(browseListTok);
                    }

                    if (browseWidthTok != null) {
                        if (newBWLine.length() > 0) {
                            newBWLine.append(",");
                        }

                        newBWLine.append(browseWidthTok);
                    }
                }
            }

            // Use the newly built configuration file
            browseListLine = newBLLine.toString();
            browseWidthLine = newBWLine.toString();
        }
    } else {
        browseListLine = DEFAULT_LIST_FIELDS;
        browseWidthLine = DEFAULT_LIST_WIDTHS;
    }

    // Arrays used to hold the information we will require when outputting each row
    String[] fieldArr = browseListLine == null ? new String[0] : browseListLine.split("\\s*,\\s*");
    String[] widthArr = browseWidthLine == null ? new String[0] : browseWidthLine.split("\\s*,\\s*");
    boolean isDate[] = new boolean[fieldArr.length];
    boolean emph[] = new boolean[fieldArr.length];
    boolean isAuthor[] = new boolean[fieldArr.length];
    boolean viewFull[] = new boolean[fieldArr.length];
    String[] browseType = new String[fieldArr.length];
    String[] cOddOrEven = new String[fieldArr.length];

    try {
        // Get the interlinking configuration too
        CrossLinks cl = new CrossLinks();

        // Get a width for the table
        String tablewidth = ConfigurationManager.getProperty("webui.itemlist.tablewidth");

        // If we have column widths, try to use a fixed layout table - faster for browsers to render
        // but not if we have to add an 'edit item' button - we can't know how big it will be
        if (widthArr.length > 0 && widthArr.length == fieldArr.length && !linkToEdit) {
            // If the table width has been specified, we can make this a fixed layout
            if (!StringUtils.isEmpty(tablewidth)) {
                out.println("<table style=\"width: " + tablewidth
                        + "; table-layout: fixed;\" align=\"center\" class=\"miscTable\" summary=\"This table browses all dspace content\">");
            } else {
                // Otherwise, don't constrain the width
                out.println(
                        "<table align=\"center\" class=\"miscTable\" summary=\"This table browses all dspace content\">");
            }

            // Output the known column widths
            out.print("<colgroup>");

            for (int w = 0; w < widthArr.length; w++) {
                out.print("<col width=\"");

                // For a thumbnail column of width '*', use the configured max width for thumbnails
                if (fieldArr[w].equals("thumbnail") && widthArr[w].equals("*")) {
                    out.print(thumbItemListMaxWidth);
                } else {
                    out.print(StringUtils.isEmpty(widthArr[w]) ? "*" : widthArr[w]);
                }

                out.print("\" />");
            }

            out.println("</colgroup>");
        } else if (!StringUtils.isEmpty(tablewidth)) {
            out.println("<table width=\"" + tablewidth
                    + "\" align=\"center\" class=\"miscTable\" summary=\"This table browses all dspace content\">");
        } else {
            out.println(
                    "<table align=\"center\" class=\"miscTable\" summary=\"This table browses all dspace content\">");
        }

        // Output the table headers
        out.println("<tr>");

        for (int colIdx = 0; colIdx < fieldArr.length; colIdx++) {
            String field = fieldArr[colIdx].toLowerCase().trim();
            cOddOrEven[colIdx] = (((colIdx + 1) % 2) == 0 ? "Odd" : "Even");

            // find out if the field is a date
            if (field.indexOf("(date)") > 0) {
                field = field.replaceAll("\\(date\\)", "");
                isDate[colIdx] = true;
            }

            // Cache any modifications to field
            fieldArr[colIdx] = field;

            // find out if this is the author column
            if (field.equals(authorField)) {
                isAuthor[colIdx] = true;
            }

            // find out if this field needs to link out to other browse views
            if (cl.hasLink(field)) {
                browseType[colIdx] = cl.getLinkType(field);
                viewFull[colIdx] = BrowseIndex.getBrowseIndex(browseType[colIdx]).isItemIndex();
            }

            // find out if we are emphasising this field
            /*
            if ((field.equals(dateField) && emphasiseDate) ||
                (field.equals(titleField) && emphasiseTitle))
            {
            emph[colIdx] = true;
            }
            */
            if (field.equals(emphColumn)) {
                emph[colIdx] = true;
            }

            // prepare the strings for the header
            String id = "t" + Integer.toString(colIdx + 1);
            String css = "oddRow" + cOddOrEven[colIdx] + "Col";
            String message = "itemlist." + field;

            // output the header
            out.print("<th id=\"" + id + "\" class=\"" + css + "\">" + (emph[colIdx] ? "<strong>" : "")
                    + LocaleSupport.getLocalizedMessage(pageContext, message)
                    + (emph[colIdx] ? "</strong>" : "") + "</th>");
        }

        if (linkToEdit) {
            String id = "t" + Integer.toString(cOddOrEven.length + 1);
            String css = "oddRow" + cOddOrEven[cOddOrEven.length - 2] + "Col";

            // output the header
            out.print("<th id=\"" + id + "\" class=\"" + css + "\">" + (emph[emph.length - 2] ? "<strong>" : "")
                    + "&nbsp;" //LocaleSupport.getLocalizedMessage(pageContext, message)
                    + (emph[emph.length - 2] ? "</strong>" : "") + "</th>");
        }

        out.print("</tr>");

        // now output each item row
        for (int i = 0; i < items.length; i++) {
            out.print("<tr>");
            // now prepare the XHTML frag for this division
            String rOddOrEven;
            if (i == highlightRow) {
                rOddOrEven = "highlight";
            } else {
                rOddOrEven = ((i & 1) == 1 ? "odd" : "even");
            }

            for (int colIdx = 0; colIdx < fieldArr.length; colIdx++) {
                String field = fieldArr[colIdx];

                // get the schema and the element qualifier pair
                // (Note, the schema is not used for anything yet)
                // (second note, I hate this bit of code.  There must be
                // a much more elegant way of doing this.  Tomcat has
                // some weird problems with variations on this code that
                // I tried, which is why it has ended up the way it is)
                StringTokenizer eq = new StringTokenizer(field, ".");

                String[] tokens = { "", "", "" };
                int k = 0;
                while (eq.hasMoreTokens()) {
                    tokens[k] = eq.nextToken().toLowerCase().trim();
                    k++;
                }
                String schema = tokens[0];
                String element = tokens[1];
                String qualifier = tokens[2];

                // first get hold of the relevant metadata for this column
                DCValue[] metadataArray;
                if (qualifier.equals("*")) {
                    metadataArray = items[i].getMetadata(schema, element, Item.ANY, Item.ANY);
                } else if (qualifier.equals("")) {
                    metadataArray = items[i].getMetadata(schema, element, null, Item.ANY);
                } else {
                    metadataArray = items[i].getMetadata(schema, element, qualifier, Item.ANY);
                }

                // save on a null check which would make the code untidy
                if (metadataArray == null) {
                    metadataArray = new DCValue[0];
                }

                // now prepare the content of the table division
                String metadata = "-";
                if (field.equals("thumbnail")) {
                    metadata = getThumbMarkup(hrq, items[i]);
                } else if (metadataArray.length > 0) {
                    // format the date field correctly
                    if (isDate[colIdx]) {
                        DCDate dd = new DCDate(metadataArray[0].value);
                        metadata = UIUtil.displayDate(dd, false, false, hrq);
                    }
                    // format the title field correctly for withdrawn items (ie. don't link)
                    else if (field.equals(titleField) && items[i].isWithdrawn()) {
                        metadata = Utils.addEntities(metadataArray[0].value);
                    }
                    // format the title field correctly (as long as the item isn't withdrawn, link to it)
                    else if (field.equals(titleField)) {
                        metadata = "<a href=\"" + hrq.getContextPath() + "/handle/" + items[i].getHandle()
                                + "\">" + Utils.addEntities(metadataArray[0].value) + "</a>";
                    }
                    // format all other fields
                    else {
                        // limit the number of records if this is the author field (if
                        // -1, then the limit is the full list)
                        boolean truncated = false;
                        int loopLimit = metadataArray.length;
                        if (isAuthor[colIdx]) {
                            int fieldMax = (authorLimit == -1 ? metadataArray.length : authorLimit);
                            loopLimit = (fieldMax > metadataArray.length ? metadataArray.length : fieldMax);
                            truncated = (fieldMax < metadataArray.length);
                            log.debug("Limiting output of field " + field + " to " + Integer.toString(loopLimit)
                                    + " from an original " + Integer.toString(metadataArray.length));
                        }

                        StringBuffer sb = new StringBuffer();
                        for (int j = 0; j < loopLimit; j++) {
                            String startLink = "";
                            String endLink = "";
                            if (!StringUtils.isEmpty(browseType[colIdx]) && !disableCrossLinks) {
                                String argument;
                                String value;
                                if (metadataArray[j].authority != null
                                        && metadataArray[j].confidence >= MetadataAuthorityManager.getManager()
                                                .getMinConfidence(metadataArray[j].schema,
                                                        metadataArray[j].element, metadataArray[j].qualifier)) {
                                    argument = "authority";
                                    value = metadataArray[j].authority;
                                } else {
                                    argument = "value";
                                    value = metadataArray[j].value;
                                }
                                if (viewFull[colIdx]) {
                                    argument = "vfocus";
                                }
                                startLink = "<a href=\"" + hrq.getContextPath() + "/browse?type="
                                        + browseType[colIdx] + "&amp;" + argument + "="
                                        + URLEncoder.encode(value, "UTF-8");

                                if (metadataArray[j].language != null) {
                                    startLink = startLink + "&amp;" + argument + "_lang="
                                            + URLEncoder.encode(metadataArray[j].language, "UTF-8");
                                }

                                if ("authority".equals(argument)) {
                                    startLink += "\" class=\"authority " + browseType[colIdx] + "\">";
                                } else {
                                    startLink = startLink + "\">";
                                }
                                endLink = "</a>";
                            }
                            sb.append(startLink);
                            sb.append(Utils.addEntities(metadataArray[j].value));
                            sb.append(endLink);
                            if (j < (loopLimit - 1)) {
                                sb.append("; ");
                            }
                        }
                        if (truncated) {
                            String etal = LocaleSupport.getLocalizedMessage(pageContext, "itemlist.et-al");
                            sb.append(", ").append(etal);
                        }
                        metadata = "<em>" + sb.toString() + "</em>";
                    }
                }

                // prepare extra special layout requirements for dates
                String extras = "";
                if (isDate[colIdx]) {
                    extras = "nowrap=\"nowrap\" align=\"right\"";
                }

                String id = "t" + Integer.toString(colIdx + 1);
                out.print("<td headers=\"" + id + "\" class=\"" + rOddOrEven + "Row" + cOddOrEven[colIdx]
                        + "Col\" " + extras + ">" + (emph[colIdx] ? "<strong>" : "") + metadata
                        + (emph[colIdx] ? "</strong>" : "") + "</td>");
            }

            // Add column for 'edit item' links
            if (linkToEdit) {
                String id = "t" + Integer.toString(cOddOrEven.length + 1);

                out.print("<td headers=\"" + id + "\" class=\"" + rOddOrEven + "Row"
                        + cOddOrEven[cOddOrEven.length - 2] + "Col\" nowrap>" + "<form method=\"get\" action=\""
                        + hrq.getContextPath() + "/tools/edit-item\">"
                        + "<input type=\"hidden\" name=\"handle\" value=\"" + items[i].getHandle() + "\" />"
                        + "<input type=\"submit\" value=\"Edit Item\" /></form>" + "</td>");
            }

            out.println("</tr>");
        }

        // close the table
        out.println("</table>");
    } catch (IOException ie) {
        throw new JspException(ie);
    } catch (SQLException e) {
        throw new JspException(e);
    } catch (BrowseException e) {
        throw new JspException(e);
    }

    return SKIP_BODY;
}

From source file:gov.nih.nci.rembrandt.web.taglib.ClinicalPlotTag.java

public int doStartTag() {
    chart = null;//from w w  w  .  ja  v  a2s .  co  m
    clinicalData.clear();

    ServletRequest request = pageContext.getRequest();
    HttpSession session = pageContext.getSession();
    Object o = request.getAttribute(beanName);
    JspWriter out = pageContext.getOut();
    ServletResponse response = pageContext.getResponse();

    try {

        //
        //retrieve the Finding from cache and build the list of  Clinical Data points
        //ClinicalFinding clinicalFinding = (ClinicalFinding)businessTierCache.getSessionFinding(session.getId(),taskId);
        ReportBean clincalReportBean = presentationTierCache.getReportBean(session.getId(), taskId);
        Resultant clinicalResultant = clincalReportBean.getResultant();
        ResultsContainer resultsContainer = clinicalResultant.getResultsContainer();
        SampleViewResultsContainer sampleViewContainer = null;
        if (resultsContainer instanceof DimensionalViewContainer) {
            DimensionalViewContainer dimensionalViewContainer = (DimensionalViewContainer) resultsContainer;
            sampleViewContainer = dimensionalViewContainer.getSampleViewResultsContainer();
        }
        if (sampleViewContainer != null) {
            Collection<ClinicalFactorType> clinicalFactors = new ArrayList<ClinicalFactorType>();
            clinicalFactors.add(ClinicalFactorType.AgeAtDx);
            //clinicalFactors.add(ClinicalFactorType.Survival);
            Collection<SampleResultset> samples = sampleViewContainer.getSampleResultsets();

            if (samples != null) {
                int numDxvsKa = 0;
                int numDxvsSl = 0;
                for (SampleResultset rs : samples) {
                    //String id = rs.getBiospecimen().getValueObject();
                    String id = rs.getSampleIDDE().getValueObject();
                    ClinicalDataPoint clinicalDataPoint = new ClinicalDataPoint(id);

                    String diseaseName = rs.getDisease().getValueObject();
                    if (diseaseName != null) {
                        clinicalDataPoint.setDiseaseName(diseaseName);
                    } else {
                        clinicalDataPoint.setDiseaseName(DiseaseType.NON_TUMOR.name());
                    }

                    Long sl = rs.getSurvivalLength();
                    double survivalDays = -1.0;
                    double survivalMonths = -1.0;
                    if (sl != null) {
                        survivalDays = sl.doubleValue();
                        survivalMonths = survivalDays / 30.0;
                        //if ((survivalMonths > 0.0)&&(survivalMonths < 1000.0)) {
                        clinicalDataPoint.setSurvival(survivalDays);
                        //}
                    }

                    Long dxAge = rs.getAge();
                    if (dxAge != null) {
                        clinicalDataPoint.setAgeAtDx(dxAge.doubleValue());
                    }

                    KarnofskyClinicalEvalDE ka = rs.getKarnofskyClinicalEvalDE();
                    if (ka != null) {
                        String kaStr = ka.getValueObject();
                        if (kaStr != null) {
                            if (kaStr.contains("|")) {
                                kaStr = kaStr.trim();
                                String[] kaStrArray = kaStr.split("\\|");
                                for (int i = 0; i < kaStrArray.length; i++) {
                                    if (i == 0) {
                                        //first score is baseline just use this for now
                                        //later we will need to use all score in a series for each patient
                                        double kaVal = Double.parseDouble(kaStrArray[i].trim());
                                        clinicalDataPoint.setKarnofskyScore(kaVal);
                                    }
                                }
                            } else {
                                double kaVal = Double.parseDouble(kaStr);
                                clinicalDataPoint.setKarnofskyScore(kaVal);
                            }

                        }
                    }

                    if ((dxAge != null) && (ka != null)) {
                        numDxvsKa++;
                    }

                    if ((dxAge != null) && (sl != null)) {
                        numDxvsSl++;
                    }

                    //                        Object dx = rs.getAgeGroup();
                    //                            if(sl !=null && dx !=null){
                    //                                clinicalDataPoint.setSurvival(new Double(sl.toString()));
                    //                                clinicalDataPoint.setAgeAtDx(new Double(dx.toString()));
                    //                            }
                    //                        Object ks = rs.getKarnofskyClinicalEvalDE();
                    //                        Object dx = rs.getAgeGroup();
                    //                            if(ks !=null && dx !=null){
                    //                                clinicalDataPoint.setNeurologicalAssessment(new Double(ks.toString()));
                    //                                clinicalDataPoint.setAgeAtDx(new Double(dx.toString()));
                    //                            }

                    clinicalData.add(clinicalDataPoint);
                }
            }
        }

        System.out.println("Done creating points!");

        //-------------------------------------------------------------
        //GET THE CLINICAL DATA AND POPULATE THE clinicalData list
        //Note the ClinicalFinding is currently an empty class
        //----------------------------------------------------------

        //check the components to see which graph to get
        if (components.equalsIgnoreCase("SurvivalvsAgeAtDx")) {
            chart = (JFreeChart) CaIntegratorChartFactory.getClinicalGraph(clinicalData,
                    ClinicalFactorType.SurvivalLength, "Survival Length (Months)", ClinicalFactorType.AgeAtDx,
                    "Age At Diagnosis (Years)");
        }
        if (components.equalsIgnoreCase("KarnofskyScorevsAgeAtDx")) {
            chart = (JFreeChart) CaIntegratorChartFactory.getClinicalGraph(clinicalData,
                    ClinicalFactorType.KarnofskyAssessment, "Karnofsky Score", ClinicalFactorType.AgeAtDx,
                    "Age At Diagnosis (Years)");
        }

        RembrandtImageFileHandler imageHandler = new RembrandtImageFileHandler(session.getId(), "png", 600,
                500);
        //The final complete path to be used by the webapplication
        String finalPath = imageHandler.getSessionTempFolder();
        String finalURLpath = imageHandler.getFinalURLPath();
        /*
         * Create the actual charts, writing it to the session temp folder
        */
        ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection());
        String mapName = imageHandler.createUniqueMapName();

        ChartUtilities.writeChartAsPNG(new FileOutputStream(finalPath), chart, 600, 500, info);

        /*   This is here to put the thread into a loop while it waits for the
         *   image to be available.  It has an unsophisticated timer but at 
         *   least it is something to avoid an endless loop.
         **/
        boolean imageReady = false;
        int timeout = 1000;
        FileInputStream inputStream = null;
        while (!imageReady) {
            timeout--;
            try {
                inputStream = new FileInputStream(finalPath);
                inputStream.available();
                imageReady = true;
                inputStream.close();
            } catch (IOException ioe) {
                imageReady = false;
                if (inputStream != null) {
                    inputStream.close();
                }
            }
            if (timeout <= 1) {

                break;
            }
        }

        out.print(ImageMapUtil.getBoundingRectImageMapTag(mapName, false, info));
        //finalURLpath = finalURLpath.replace("\\", "/");
        finalURLpath = finalURLpath.replace("\\", "/");
        long randomness = System.currentTimeMillis(); //prevent image caching
        out.print("<img id=\"geneChart\" alt=\"geneChart\" name=\"geneChart\" src=\"" + finalURLpath + "?"
                + randomness + "\" usemap=\"#" + mapName + "\" border=\"0\" />");

        //out.print("<img id=\"geneChart\" name=\"geneChart\" src=\""+finalURLpath+"\" usemap=\"#"+mapName + "\" border=\"0\" />");

    } catch (IOException e) {
        logger.error(e);
    } catch (Exception e) {
        logger.error(e);
    } catch (Throwable t) {
        logger.error(t);
    }

    return EVAL_BODY_INCLUDE;
}

From source file:org.apache.jsp.decorators.panel_002dadmin_jsp.java

public void _jspService(final javax.servlet.http.HttpServletRequest request,
        final javax.servlet.http.HttpServletResponse response)
        throws java.io.IOException, javax.servlet.ServletException {

    final javax.servlet.jsp.PageContext pageContext;
    javax.servlet.http.HttpSession session = null;
    final javax.servlet.ServletContext application;
    final javax.servlet.ServletConfig config;
    javax.servlet.jsp.JspWriter out = null;
    final java.lang.Object page = this;
    javax.servlet.jsp.JspWriter _jspx_out = null;
    javax.servlet.jsp.PageContext _jspx_page_context = null;

    try {// ww w . j  a v a2 s .  c om
        response.setContentType("text/html");
        pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
        _jspx_page_context = pageContext;
        application = pageContext.getServletContext();
        config = pageContext.getServletConfig();
        session = pageContext.getSession();
        out = pageContext.getOut();
        _jspx_out = out;

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        //  decorator:usePage
        com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag _jspx_th_decorator_005fusePage_005f0 = (com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag) _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                .get(com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag.class);
        _jspx_th_decorator_005fusePage_005f0.setPageContext(_jspx_page_context);
        _jspx_th_decorator_005fusePage_005f0.setParent(null);
        // /decorators/panel-admin.jsp(17,0) name = id type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_decorator_005fusePage_005f0.setId("configPage");
        int _jspx_eval_decorator_005fusePage_005f0 = _jspx_th_decorator_005fusePage_005f0.doStartTag();
        if (_jspx_th_decorator_005fusePage_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                    .reuse(_jspx_th_decorator_005fusePage_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                .reuse(_jspx_th_decorator_005fusePage_005f0);
        com.opensymphony.module.sitemesh.Page configPage = null;
        configPage = (com.opensymphony.module.sitemesh.Page) _jspx_page_context.findAttribute("configPage");
        out.write('\n');

        {
            final ComponentFactory factory = ComponentAccessor.getComponentOfType(ComponentFactory.class);
            final AdminDecoratorHelper helper = factory.createObject(AdminDecoratorHelper.class);

            helper.setCurrentSection(configPage.getProperty("meta.admin.active.section"));
            helper.setCurrentTab(configPage.getProperty("meta.admin.active.tab"));
            helper.setProject(configPage.getProperty("meta.projectKey"));

            request.setAttribute("adminHelper", helper);
            request.setAttribute("jira.admin.mode", true);
            request.setAttribute("jira.selected.section", helper.getSelectedMenuSection()); // Determine what tab should be active

            // Plugins 2.5 allows us to perform context-based resource inclusion. This defines the context "atl.admin"
            final WebResourceManager adminWebResourceManager = ComponentAccessor.getWebResourceManager();
            adminWebResourceManager.requireResourcesForContext("atl.admin");
            adminWebResourceManager.requireResourcesForContext("jira.admin");

            final KeyboardShortcutManager adminKeyboardShortcutManager = ComponentAccessor
                    .getComponentOfType(KeyboardShortcutManager.class);
            adminKeyboardShortcutManager.requireShortcutsForContext(KeyboardShortcutManager.Context.admin);
        }

        out.write("\n");
        out.write("<!DOCTYPE html>\n");
        out.write("<html>\n");
        out.write("<head>\n");
        out.write("    ");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        //  decorator:usePage
        com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag _jspx_th_decorator_005fusePage_005f1 = (com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag) _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                .get(com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag.class);
        _jspx_th_decorator_005fusePage_005f1.setPageContext(_jspx_page_context);
        _jspx_th_decorator_005fusePage_005f1.setParent(null);
        // /includes/decorators/aui-layout/head-common.jsp(5,0) name = id type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_decorator_005fusePage_005f1.setId("originalPage");
        int _jspx_eval_decorator_005fusePage_005f1 = _jspx_th_decorator_005fusePage_005f1.doStartTag();
        if (_jspx_th_decorator_005fusePage_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                    .reuse(_jspx_th_decorator_005fusePage_005f1);
            return;
        }
        _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                .reuse(_jspx_th_decorator_005fusePage_005f1);
        com.opensymphony.module.sitemesh.Page originalPage = null;
        originalPage = (com.opensymphony.module.sitemesh.Page) _jspx_page_context.findAttribute("originalPage");
        out.write('\n');

        //
        // IDEA gives you a warning below because it cant resolve JspWriter.  I don't know why but its harmless
        //
        HeaderFooterRendering headerFooterRendering = getComponent(HeaderFooterRendering.class);

        out.write("\n");
        out.write("\n");
        out.write("<meta charset=\"utf-8\">\n");
        out.write("\n");
        out.write("<meta http-equiv=\"X-UA-Compatible\" content=\"");
        out.print(headerFooterRendering.getXUACompatible(originalPage));
        out.write("\"/>\n");
        out.write("<title>");
        out.print(headerFooterRendering.getPageTitle(originalPage));
        out.write("</title>\n");

        // include version meta information
        headerFooterRendering.includeVersionMetaTags(out);

        // writes the <meta> tags into the page head
        headerFooterRendering.includeMetadata(out);

        // include web panels
        headerFooterRendering.includeWebPanels(out, "atl.header");

        out.write('\n');
        out.write('\n');
        out.write('\n');

        XsrfTokenGenerator xsrfTokenGenerator = (XsrfTokenGenerator) ComponentManager
                .getComponentInstanceOfType(XsrfTokenGenerator.class);

        out.write("    \n");
        out.write("<meta id=\"atlassian-token\" name=\"atlassian-token\" content=\"");
        out.print(xsrfTokenGenerator.generateToken(request));
        out.write("\">\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("<link rel=\"shortcut icon\" href=\"");
        out.print(headerFooterRendering.getRelativeResourcePrefix());
        out.write("/favicon.ico\">\n");
        out.write("<link rel=\"search\" type=\"application/opensearchdescription+xml\" href=\"");
        out.print(request.getContextPath());
        out.write("/osd.jsp\" title=\"");
        out.print(headerFooterRendering.getPageTitle(originalPage));
        out.write("\"/>\n");
        out.write("\n");
        out.write("    ");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("<!--[if IE]><![endif]-->");
        out.write("\n");
        out.write("<script type=\"text/javascript\">var contextPath = '");
        out.print(request.getContextPath());
        out.write("';</script>\n");

        //
        // IDEA gives you a warning below because it cant resolve JspWriter.  I don't know why but its harmless
        //
        HeaderFooterRendering headerAndFooter = ComponentAccessor.getComponent(HeaderFooterRendering.class);

        headerAndFooter.includeHeadResources(out);

        out.write("\n");
        out.write("<script type=\"text/javascript\" src=\"");
        out.print(headerAndFooter.getKeyboardShortCutScript(request));
        out.write("\"></script>\n");

        headerAndFooter.includeWebPanels(out, "atl.header.after.scripts");

        out.write('\n');
        out.write("\n");
        out.write("    ");
        if (_jspx_meth_decorator_005fhead_005f0(_jspx_page_context))
            return;
        out.write("\n");
        out.write("</head>\n");
        out.write("<body id=\"jira\" class=\"aui-layout aui-theme-default page-type-admin ");
        if (_jspx_meth_decorator_005fgetProperty_005f0(_jspx_page_context))
            return;
        out.write('"');
        out.write(' ');
        out.print(ComponentAccessor.getComponent(ProductVersionDataBeanProvider.class).get()
                .getBodyHtmlAttributes());
        out.write(">\n");
        out.write("<div id=\"page\">\n");
        out.write("    <header id=\"header\" role=\"banner\">\n");
        out.write("        ");
        out.write('\n');
        out.write('\n');
        out.write('\n');
        out.write("\n");
        out.write("    ");
        out.write("\n");
        out.write("        ");
        out.write("\n");
        out.write("            ");
        out.write("\n");
        out.write("        ");
        out.write("\n");
        out.write("    ");
        out.write('\n');
        out.write('\n');
        out.write('\n');
        out.write('\n');
        out.write('\n');

        final User loggedInUser = ComponentManager.getInstance().getJiraAuthenticationContext()
                .getLoggedInUser();
        if (loggedInUser != null) {

            final InternalWebSudoManager websudoManager = ComponentManager
                    .getComponentInstanceOfType(InternalWebSudoManager.class);

            if (websudoManager.isEnabled() && websudoManager.hasValidSession(session)) {
                request.setAttribute("helpUtil", HelpUtil.getInstance());

                out.write("\n");
                out.write("<div class=\"aui-message warning\" id=\"websudo-banner\">\n");

                if (websudoManager.isWebSudoRequest(request)) {

                    out.write("\n");
                    out.write("    <p>\n");
                    out.write("        <span class=\"aui-icon aui-icon-warning\"></span>\n");
                    out.write("        ");
                    if (_jspx_meth_ww_005ftext_005f0(_jspx_page_context))
                        return;
                    out.write("\n");
                    out.write("    </p>\n");

                } else {

                    out.write("\n");
                    out.write("    <p>\n");
                    out.write("        <span class=\"aui-icon aui-icon-warning\"></span>\n");
                    out.write("        ");
                    if (_jspx_meth_ww_005ftext_005f1(_jspx_page_context))
                        return;
                    out.write("\n");
                    out.write("    </p>\n");

                }

                out.write("\n");
                out.write("</div>\n");

            }
        }

        out.write('\n');
        out.write('\n');
        out.write("\n");
        out.write("        ");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");

        ReindexMessageManager reindexMessageManager = ComponentAccessor
                .getComponentOfType(ReindexMessageManager.class);
        JiraAuthenticationContext authenticationContext = ComponentAccessor
                .getComponentOfType(JiraAuthenticationContext.class);
        final boolean isAdmin = ComponentAccessor.getComponentOfType(PermissionManager.class)
                .hasPermission(Permissions.ADMINISTER, authenticationContext.getUser());
        final String message = reindexMessageManager.getMessage(authenticationContext.getLoggedInUser());
        if (isAdmin && !StringUtils.isBlank(message)) {

            out.write('\n');
            //  aui:component
            webwork.view.taglib.ui.ComponentTag _jspx_th_aui_005fcomponent_005f0 = (webwork.view.taglib.ui.ComponentTag) _005fjspx_005ftagPool_005faui_005fcomponent_0026_005ftheme_005ftemplate
                    .get(webwork.view.taglib.ui.ComponentTag.class);
            _jspx_th_aui_005fcomponent_005f0.setPageContext(_jspx_page_context);
            _jspx_th_aui_005fcomponent_005f0.setParent(null);
            // /includes/admin/admin-info-notifications.jsp(17,0) name = template type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
            _jspx_th_aui_005fcomponent_005f0.setTemplate("auimessage.jsp");
            // /includes/admin/admin-info-notifications.jsp(17,0) name = theme type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
            _jspx_th_aui_005fcomponent_005f0.setTheme("'aui'");
            int _jspx_eval_aui_005fcomponent_005f0 = _jspx_th_aui_005fcomponent_005f0.doStartTag();
            if (_jspx_eval_aui_005fcomponent_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                if (_jspx_eval_aui_005fcomponent_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                    out = _jspx_page_context.pushBody();
                    _jspx_th_aui_005fcomponent_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                    _jspx_th_aui_005fcomponent_005f0.doInitBody();
                }
                do {
                    out.write("\n");
                    out.write("    ");
                    if (_jspx_meth_aui_005fparam_005f0(_jspx_th_aui_005fcomponent_005f0, _jspx_page_context))
                        return;
                    out.write("\n");
                    out.write("    ");
                    //  aui:param
                    webwork.view.taglib.ParamTag _jspx_th_aui_005fparam_005f1 = (webwork.view.taglib.ParamTag) _005fjspx_005ftagPool_005faui_005fparam_0026_005fname
                            .get(webwork.view.taglib.ParamTag.class);
                    _jspx_th_aui_005fparam_005f1.setPageContext(_jspx_page_context);
                    _jspx_th_aui_005fparam_005f1
                            .setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_aui_005fcomponent_005f0);
                    // /includes/admin/admin-info-notifications.jsp(19,4) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                    _jspx_th_aui_005fparam_005f1.setName("'messageHtml'");
                    int _jspx_eval_aui_005fparam_005f1 = _jspx_th_aui_005fparam_005f1.doStartTag();
                    if (_jspx_eval_aui_005fparam_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                        if (_jspx_eval_aui_005fparam_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                            out = _jspx_page_context.pushBody();
                            _jspx_th_aui_005fparam_005f1
                                    .setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                            _jspx_th_aui_005fparam_005f1.doInitBody();
                        }
                        do {
                            out.print(message);
                            int evalDoAfterBody = _jspx_th_aui_005fparam_005f1.doAfterBody();
                            if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                                break;
                        } while (true);
                        if (_jspx_eval_aui_005fparam_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                            out = _jspx_page_context.popBody();
                        }
                    }
                    if (_jspx_th_aui_005fparam_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                        _005fjspx_005ftagPool_005faui_005fparam_0026_005fname
                                .reuse(_jspx_th_aui_005fparam_005f1);
                        return;
                    }
                    _005fjspx_005ftagPool_005faui_005fparam_0026_005fname.reuse(_jspx_th_aui_005fparam_005f1);
                    out.write('\n');
                    int evalDoAfterBody = _jspx_th_aui_005fcomponent_005f0.doAfterBody();
                    if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                        break;
                } while (true);
                if (_jspx_eval_aui_005fcomponent_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                    out = _jspx_page_context.popBody();
                }
            }
            if (_jspx_th_aui_005fcomponent_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                _005fjspx_005ftagPool_005faui_005fcomponent_0026_005ftheme_005ftemplate
                        .reuse(_jspx_th_aui_005fcomponent_005f0);
                return;
            }
            _005fjspx_005ftagPool_005faui_005fcomponent_0026_005ftheme_005ftemplate
                    .reuse(_jspx_th_aui_005fcomponent_005f0);
            out.write('\n');

        }

        UserUtil userUtil = ComponentAccessor.getComponentOfType(UserUtil.class);
        if (isAdmin && userUtil.hasExceededUserLimit()) {

            out.write('\n');
            //  aui:component
            webwork.view.taglib.ui.ComponentTag _jspx_th_aui_005fcomponent_005f1 = (webwork.view.taglib.ui.ComponentTag) _005fjspx_005ftagPool_005faui_005fcomponent_0026_005ftheme_005ftemplate_005fid
                    .get(webwork.view.taglib.ui.ComponentTag.class);
            _jspx_th_aui_005fcomponent_005f1.setPageContext(_jspx_page_context);
            _jspx_th_aui_005fcomponent_005f1.setParent(null);
            // /includes/admin/admin-info-notifications.jsp(28,0) name = id type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
            _jspx_th_aui_005fcomponent_005f1.setId("'adminMessages2'");
            // /includes/admin/admin-info-notifications.jsp(28,0) name = template type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
            _jspx_th_aui_005fcomponent_005f1.setTemplate("auimessage.jsp");
            // /includes/admin/admin-info-notifications.jsp(28,0) name = theme type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
            _jspx_th_aui_005fcomponent_005f1.setTheme("'aui'");
            int _jspx_eval_aui_005fcomponent_005f1 = _jspx_th_aui_005fcomponent_005f1.doStartTag();
            if (_jspx_eval_aui_005fcomponent_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                if (_jspx_eval_aui_005fcomponent_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                    out = _jspx_page_context.pushBody();
                    _jspx_th_aui_005fcomponent_005f1.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                    _jspx_th_aui_005fcomponent_005f1.doInitBody();
                }
                do {
                    out.write("\n");
                    out.write("    ");
                    if (_jspx_meth_aui_005fparam_005f2(_jspx_th_aui_005fcomponent_005f1, _jspx_page_context))
                        return;
                    out.write("\n");
                    out.write("    ");
                    //  aui:param
                    webwork.view.taglib.ParamTag _jspx_th_aui_005fparam_005f3 = (webwork.view.taglib.ParamTag) _005fjspx_005ftagPool_005faui_005fparam_0026_005fname
                            .get(webwork.view.taglib.ParamTag.class);
                    _jspx_th_aui_005fparam_005f3.setPageContext(_jspx_page_context);
                    _jspx_th_aui_005fparam_005f3
                            .setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_aui_005fcomponent_005f1);
                    // /includes/admin/admin-info-notifications.jsp(30,4) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                    _jspx_th_aui_005fparam_005f3.setName("'messageHtml'");
                    int _jspx_eval_aui_005fparam_005f3 = _jspx_th_aui_005fparam_005f3.doStartTag();
                    if (_jspx_eval_aui_005fparam_005f3 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                        if (_jspx_eval_aui_005fparam_005f3 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                            out = _jspx_page_context.pushBody();
                            _jspx_th_aui_005fparam_005f3
                                    .setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                            _jspx_th_aui_005fparam_005f3.doInitBody();
                        }
                        do {
                            out.write("\n");
                            out.write("        ");
                            //  ww:text
                            com.atlassian.jira.web.tags.TextTag _jspx_th_ww_005ftext_005f2 = (com.atlassian.jira.web.tags.TextTag) _005fjspx_005ftagPool_005fww_005ftext_0026_005fname
                                    .get(com.atlassian.jira.web.tags.TextTag.class);
                            _jspx_th_ww_005ftext_005f2.setPageContext(_jspx_page_context);
                            _jspx_th_ww_005ftext_005f2
                                    .setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_aui_005fparam_005f3);
                            // /includes/admin/admin-info-notifications.jsp(31,8) name = name type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                            _jspx_th_ww_005ftext_005f2.setName("'admin.globalpermissions.user.limit.warning'");
                            int _jspx_eval_ww_005ftext_005f2 = _jspx_th_ww_005ftext_005f2.doStartTag();
                            if (_jspx_eval_ww_005ftext_005f2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                                if (_jspx_eval_ww_005ftext_005f2 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                                    out = _jspx_page_context.pushBody();
                                    _jspx_th_ww_005ftext_005f2
                                            .setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                                    _jspx_th_ww_005ftext_005f2.doInitBody();
                                }
                                do {
                                    out.write("\n");
                                    out.write("            ");
                                    //  ww:param
                                    webwork.view.taglib.ParamTag _jspx_th_ww_005fparam_005f8 = (webwork.view.taglib.ParamTag) _005fjspx_005ftagPool_005fww_005fparam_0026_005fname
                                            .get(webwork.view.taglib.ParamTag.class);
                                    _jspx_th_ww_005fparam_005f8.setPageContext(_jspx_page_context);
                                    _jspx_th_ww_005fparam_005f8.setParent(
                                            (javax.servlet.jsp.tagext.Tag) _jspx_th_ww_005ftext_005f2);
                                    // /includes/admin/admin-info-notifications.jsp(32,12) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                                    _jspx_th_ww_005fparam_005f8.setName("'value0'");
                                    int _jspx_eval_ww_005fparam_005f8 = _jspx_th_ww_005fparam_005f8
                                            .doStartTag();
                                    if (_jspx_eval_ww_005fparam_005f8 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                                        if (_jspx_eval_ww_005fparam_005f8 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                                            out = _jspx_page_context.pushBody();
                                            _jspx_th_ww_005fparam_005f8
                                                    .setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                                            _jspx_th_ww_005fparam_005f8.doInitBody();
                                        }
                                        do {
                                            out.write("<a href=\"");
                                            out.print(request.getContextPath());
                                            out.write("/secure/admin/ViewLicense!default.jspa\">");
                                            int evalDoAfterBody = _jspx_th_ww_005fparam_005f8.doAfterBody();
                                            if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                                                break;
                                        } while (true);
                                        if (_jspx_eval_ww_005fparam_005f8 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                                            out = _jspx_page_context.popBody();
                                        }
                                    }
                                    if (_jspx_th_ww_005fparam_005f8
                                            .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                                        _005fjspx_005ftagPool_005fww_005fparam_0026_005fname
                                                .reuse(_jspx_th_ww_005fparam_005f8);
                                        return;
                                    }
                                    _005fjspx_005ftagPool_005fww_005fparam_0026_005fname
                                            .reuse(_jspx_th_ww_005fparam_005f8);
                                    out.write("\n");
                                    out.write("            ");
                                    if (_jspx_meth_ww_005fparam_005f9(_jspx_th_ww_005ftext_005f2,
                                            _jspx_page_context))
                                        return;
                                    out.write("\n");
                                    out.write("        ");
                                    int evalDoAfterBody = _jspx_th_ww_005ftext_005f2.doAfterBody();
                                    if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                                        break;
                                } while (true);
                                if (_jspx_eval_ww_005ftext_005f2 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                                    out = _jspx_page_context.popBody();
                                }
                            }
                            if (_jspx_th_ww_005ftext_005f2
                                    .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                                _005fjspx_005ftagPool_005fww_005ftext_0026_005fname
                                        .reuse(_jspx_th_ww_005ftext_005f2);
                                return;
                            }
                            _005fjspx_005ftagPool_005fww_005ftext_0026_005fname
                                    .reuse(_jspx_th_ww_005ftext_005f2);
                            out.write("\n");
                            out.write("    ");
                            int evalDoAfterBody = _jspx_th_aui_005fparam_005f3.doAfterBody();
                            if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                                break;
                        } while (true);
                        if (_jspx_eval_aui_005fparam_005f3 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                            out = _jspx_page_context.popBody();
                        }
                    }
                    if (_jspx_th_aui_005fparam_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                        _005fjspx_005ftagPool_005faui_005fparam_0026_005fname
                                .reuse(_jspx_th_aui_005fparam_005f3);
                        return;
                    }
                    _005fjspx_005ftagPool_005faui_005fparam_0026_005fname.reuse(_jspx_th_aui_005fparam_005f3);
                    out.write('\n');
                    int evalDoAfterBody = _jspx_th_aui_005fcomponent_005f1.doAfterBody();
                    if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                        break;
                } while (true);
                if (_jspx_eval_aui_005fcomponent_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                    out = _jspx_page_context.popBody();
                }
            }
            if (_jspx_th_aui_005fcomponent_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                _005fjspx_005ftagPool_005faui_005fcomponent_0026_005ftheme_005ftemplate_005fid
                        .reuse(_jspx_th_aui_005fcomponent_005f1);
                return;
            }
            _005fjspx_005ftagPool_005faui_005fcomponent_0026_005ftheme_005ftemplate_005fid
                    .reuse(_jspx_th_aui_005fcomponent_005f1);
            out.write('\n');

        }

        out.write("\n");
        out.write("        ");
        out.write('\n');
        out.write('\n');
        if (_jspx_meth_ww_005fbean_005f0(_jspx_page_context))
            return;
        out.write('\n');
        out.write('\n');
        out.write('\n');

        final UnsupportedBrowserManager browserManager = ComponentManager
                .getComponentInstanceOfType(UnsupportedBrowserManager.class);
        if (browserManager.isCheckEnabled() && !browserManager.isHandledCookiePresent(request)
                && browserManager.isUnsupportedBrowser(request)) {
            request.setAttribute("messageKey", browserManager.getMessageKey(request));

            out.write('\n');
            if (_jspx_meth_aui_005fcomponent_005f2(_jspx_page_context))
                return;
            out.write('\n');
        }
        out.write("\n");
        out.write("        ");
        out.write('\n');
        out.write('\n');
        //  decorator:usePage
        com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag _jspx_th_decorator_005fusePage_005f2 = (com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag) _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                .get(com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag.class);
        _jspx_th_decorator_005fusePage_005f2.setPageContext(_jspx_page_context);
        _jspx_th_decorator_005fusePage_005f2.setParent(null);
        // /includes/decorators/aui-layout/header.jsp(3,0) name = id type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_decorator_005fusePage_005f2.setId("p");
        int _jspx_eval_decorator_005fusePage_005f2 = _jspx_th_decorator_005fusePage_005f2.doStartTag();
        if (_jspx_th_decorator_005fusePage_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                    .reuse(_jspx_th_decorator_005fusePage_005f2);
            return;
        }
        _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                .reuse(_jspx_th_decorator_005fusePage_005f2);
        com.opensymphony.module.sitemesh.Page p = null;
        p = (com.opensymphony.module.sitemesh.Page) _jspx_page_context.findAttribute("p");
        out.write('\n');

        //
        // IDEA gives you a warning below because it cant resolve JspWriter.  I don't know why but its harmless
        //
        ComponentAccessor.getComponent(HeaderFooterRendering.class).includeTopNavigation(out, request, p);

        out.write("\n");
        out.write("    </header>\n");
        out.write("    ");
        out.write('\n');
        out.write('\n');

        AnnouncementBanner banner = ComponentAccessor.getComponentOfType(AnnouncementBanner.class);
        if (banner.isDisplay()) {

            out.write("\n");
            out.write("<div id=\"announcement-banner\" class=\"alertHeader\">\n");
            out.write("    ");
            out.print(banner.getViewHtml());
            out.write("\n");
            out.write("</div>\n");

        }

        out.write('\n');
        out.write("\n");
        out.write("    <section id=\"content\" role=\"main\">\n");
        out.write("        ");
        if (_jspx_meth_ui_005fsoy_005f0(_jspx_page_context))
            return;
        out.write("\n");
        out.write("    </section>\n");
        out.write("    <footer id=\"footer\" role=\"contentinfo\">\n");
        out.write("        ");
        out.write('\n');
        out.write('\n');

        //
        // IDEA gives you a warning below because it cant resolve JspWriter.  I don't know why but its harmless
        //
        getComponent(HeaderFooterRendering.class).includeFooters(out, request);

        out.write('\n');
        org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response,
                "/includes/decorators/global-translations.jsp", out, false);
        out.write("\n");
        out.write("    </footer>\n");
        out.write("</div>\n");
        out.write("</body>\n");
        out.write("</html>\n");
    } catch (java.lang.Throwable t) {
        if (!(t instanceof javax.servlet.jsp.SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    out.clearBuffer();
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
            else
                throw new ServletException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}

From source file:org.apache.jsp.html.common.referer_005fjs_jsp.java

public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    PageContext pageContext = null;//from ww  w .j av  a  2  s .co  m
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
        response.setContentType("text/html; charset=UTF-8");
        pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
        _jspx_page_context = pageContext;
        application = pageContext.getServletContext();
        config = pageContext.getServletConfig();
        session = pageContext.getSession();
        out = pageContext.getOut();
        _jspx_out = out;

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library 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 Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library 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 Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library 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 Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        //  liferay-theme:defineObjects
        com.liferay.taglib.theme.DefineObjectsTag _jspx_th_liferay_002dtheme_005fdefineObjects_005f0 = (com.liferay.taglib.theme.DefineObjectsTag) _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody
                .get(com.liferay.taglib.theme.DefineObjectsTag.class);
        _jspx_th_liferay_002dtheme_005fdefineObjects_005f0.setPageContext(_jspx_page_context);
        _jspx_th_liferay_002dtheme_005fdefineObjects_005f0.setParent(null);
        int _jspx_eval_liferay_002dtheme_005fdefineObjects_005f0 = _jspx_th_liferay_002dtheme_005fdefineObjects_005f0
                .doStartTag();
        if (_jspx_th_liferay_002dtheme_005fdefineObjects_005f0
                .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody
                    .reuse(_jspx_th_liferay_002dtheme_005fdefineObjects_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody
                .reuse(_jspx_th_liferay_002dtheme_005fdefineObjects_005f0);
        com.liferay.portal.theme.ThemeDisplay themeDisplay = null;
        com.liferay.portal.model.Company company = null;
        com.liferay.portal.model.Account account = null;
        com.liferay.portal.model.User user = null;
        com.liferay.portal.model.User realUser = null;
        com.liferay.portal.model.Contact contact = null;
        com.liferay.portal.model.Layout layout = null;
        java.util.List layouts = null;
        java.lang.Long plid = null;
        com.liferay.portal.model.LayoutTypePortlet layoutTypePortlet = null;
        java.lang.Long scopeGroupId = null;
        com.liferay.portal.security.permission.PermissionChecker permissionChecker = null;
        java.util.Locale locale = null;
        java.util.TimeZone timeZone = null;
        com.liferay.portal.model.Theme theme = null;
        com.liferay.portal.model.ColorScheme colorScheme = null;
        com.liferay.portal.theme.PortletDisplay portletDisplay = null;
        java.lang.Long portletGroupId = null;
        themeDisplay = (com.liferay.portal.theme.ThemeDisplay) _jspx_page_context.findAttribute("themeDisplay");
        company = (com.liferay.portal.model.Company) _jspx_page_context.findAttribute("company");
        account = (com.liferay.portal.model.Account) _jspx_page_context.findAttribute("account");
        user = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("user");
        realUser = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("realUser");
        contact = (com.liferay.portal.model.Contact) _jspx_page_context.findAttribute("contact");
        layout = (com.liferay.portal.model.Layout) _jspx_page_context.findAttribute("layout");
        layouts = (java.util.List) _jspx_page_context.findAttribute("layouts");
        plid = (java.lang.Long) _jspx_page_context.findAttribute("plid");
        layoutTypePortlet = (com.liferay.portal.model.LayoutTypePortlet) _jspx_page_context
                .findAttribute("layoutTypePortlet");
        scopeGroupId = (java.lang.Long) _jspx_page_context.findAttribute("scopeGroupId");
        permissionChecker = (com.liferay.portal.security.permission.PermissionChecker) _jspx_page_context
                .findAttribute("permissionChecker");
        locale = (java.util.Locale) _jspx_page_context.findAttribute("locale");
        timeZone = (java.util.TimeZone) _jspx_page_context.findAttribute("timeZone");
        theme = (com.liferay.portal.model.Theme) _jspx_page_context.findAttribute("theme");
        colorScheme = (com.liferay.portal.model.ColorScheme) _jspx_page_context.findAttribute("colorScheme");
        portletDisplay = (com.liferay.portal.theme.PortletDisplay) _jspx_page_context
                .findAttribute("portletDisplay");
        portletGroupId = (java.lang.Long) _jspx_page_context.findAttribute("portletGroupId");
        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library 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 Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        String referer = null;

        String refererParam = PortalUtil.escapeRedirect(request.getParameter(WebKeys.REFERER));
        String refererRequest = (String) request.getAttribute(WebKeys.REFERER);
        String refererSession = (String) session.getAttribute(WebKeys.REFERER);

        if ((refererParam != null) && (!refererParam.equals(StringPool.NULL))
                && (!refererParam.equals(StringPool.BLANK))) {
            referer = refererParam;
        } else if ((refererRequest != null) && (!refererRequest.equals(StringPool.NULL))
                && (!refererRequest.equals(StringPool.BLANK))) {
            referer = refererRequest;
        } else if ((refererSession != null) && (!refererSession.equals(StringPool.NULL))
                && (!refererSession.equals(StringPool.BLANK))) {
            referer = refererSession;
        } else if (themeDisplay != null) {
            referer = themeDisplay.getPathMain();
        } else {
            referer = PortalUtil.getPathMain();
        }

        out.write("\n");
        out.write("\n");
        out.write("<script type=\"text/javascript\">\n");
        out.write("\tlocation.href = '");
        out.print(HtmlUtil.escapeJS(referer));
        out.write("';\n");
        out.write("</script>");
    } catch (Throwable t) {
        if (!(t instanceof SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    out.clearBuffer();
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}

From source file:org.apache.jsp.html.portal.layout.view.article_jsp.java

public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    PageContext pageContext = null;/*from   w  w w  . j  a v  a 2s.  c  om*/
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
        response.setContentType("text/html; charset=UTF-8");
        pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
        _jspx_page_context = pageContext;
        application = pageContext.getServletContext();
        config = pageContext.getServletConfig();
        session = pageContext.getSession();
        out = pageContext.getOut();
        _jspx_out = out;

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library 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 Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library 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 Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library 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 Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        //  liferay-theme:defineObjects
        com.liferay.taglib.theme.DefineObjectsTag _jspx_th_liferay_002dtheme_005fdefineObjects_005f0 = (com.liferay.taglib.theme.DefineObjectsTag) _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody
                .get(com.liferay.taglib.theme.DefineObjectsTag.class);
        _jspx_th_liferay_002dtheme_005fdefineObjects_005f0.setPageContext(_jspx_page_context);
        _jspx_th_liferay_002dtheme_005fdefineObjects_005f0.setParent(null);
        int _jspx_eval_liferay_002dtheme_005fdefineObjects_005f0 = _jspx_th_liferay_002dtheme_005fdefineObjects_005f0
                .doStartTag();
        if (_jspx_th_liferay_002dtheme_005fdefineObjects_005f0
                .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody
                    .reuse(_jspx_th_liferay_002dtheme_005fdefineObjects_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody
                .reuse(_jspx_th_liferay_002dtheme_005fdefineObjects_005f0);
        com.liferay.portal.theme.ThemeDisplay themeDisplay = null;
        com.liferay.portal.model.Company company = null;
        com.liferay.portal.model.Account account = null;
        com.liferay.portal.model.User user = null;
        com.liferay.portal.model.User realUser = null;
        com.liferay.portal.model.Contact contact = null;
        com.liferay.portal.model.Layout layout = null;
        java.util.List layouts = null;
        java.lang.Long plid = null;
        com.liferay.portal.model.LayoutTypePortlet layoutTypePortlet = null;
        java.lang.Long scopeGroupId = null;
        com.liferay.portal.security.permission.PermissionChecker permissionChecker = null;
        java.util.Locale locale = null;
        java.util.TimeZone timeZone = null;
        com.liferay.portal.model.Theme theme = null;
        com.liferay.portal.model.ColorScheme colorScheme = null;
        com.liferay.portal.theme.PortletDisplay portletDisplay = null;
        java.lang.Long portletGroupId = null;
        themeDisplay = (com.liferay.portal.theme.ThemeDisplay) _jspx_page_context.findAttribute("themeDisplay");
        company = (com.liferay.portal.model.Company) _jspx_page_context.findAttribute("company");
        account = (com.liferay.portal.model.Account) _jspx_page_context.findAttribute("account");
        user = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("user");
        realUser = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("realUser");
        contact = (com.liferay.portal.model.Contact) _jspx_page_context.findAttribute("contact");
        layout = (com.liferay.portal.model.Layout) _jspx_page_context.findAttribute("layout");
        layouts = (java.util.List) _jspx_page_context.findAttribute("layouts");
        plid = (java.lang.Long) _jspx_page_context.findAttribute("plid");
        layoutTypePortlet = (com.liferay.portal.model.LayoutTypePortlet) _jspx_page_context
                .findAttribute("layoutTypePortlet");
        scopeGroupId = (java.lang.Long) _jspx_page_context.findAttribute("scopeGroupId");
        permissionChecker = (com.liferay.portal.security.permission.PermissionChecker) _jspx_page_context
                .findAttribute("permissionChecker");
        locale = (java.util.Locale) _jspx_page_context.findAttribute("locale");
        timeZone = (java.util.TimeZone) _jspx_page_context.findAttribute("timeZone");
        theme = (com.liferay.portal.model.Theme) _jspx_page_context.findAttribute("theme");
        colorScheme = (com.liferay.portal.model.ColorScheme) _jspx_page_context.findAttribute("colorScheme");
        portletDisplay = (com.liferay.portal.theme.PortletDisplay) _jspx_page_context
                .findAttribute("portletDisplay");
        portletGroupId = (java.lang.Long) _jspx_page_context.findAttribute("portletGroupId");
        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library 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 Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write('\n');
        out.write('\n');

        String articleId = layout.getTypeSettingsProperties().getProperty("article-id");
        String languageId = LanguageUtil.getLanguageId(request);

        String content = JournalContentUtil.getContent(scopeGroupId, articleId, null, languageId, themeDisplay);

        out.write("\n");
        out.write("\n");
        out.write("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n");
        out.write("<tr>\n");
        out.write("\t<td>\n");
        out.write("\t\t");
        out.print(content);
        out.write("\n");
        out.write("\t</td>\n");
        out.write("</tr>\n");
        out.write("</table>\n");
        out.write("\n");

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library 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 Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');
        //  c:if
        org.apache.taglibs.standard.tag.rt.core.IfTag _jspx_th_c_005fif_005f0 = (org.apache.taglibs.standard.tag.rt.core.IfTag) _005fjspx_005ftagPool_005fc_005fif_0026_005ftest
                .get(org.apache.taglibs.standard.tag.rt.core.IfTag.class);
        _jspx_th_c_005fif_005f0.setPageContext(_jspx_page_context);
        _jspx_th_c_005fif_005f0.setParent(null);
        // /html/portal/layout/view/common.jspf(17,0) name = test type = boolean reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_c_005fif_005f0.setTest(PropsValues.WEB_SERVER_DISPLAY_NODE);
        int _jspx_eval_c_005fif_005f0 = _jspx_th_c_005fif_005f0.doStartTag();
        if (_jspx_eval_c_005fif_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            do {
                out.write("\n");
                out.write("\t<div class=\"portlet-msg-info\">\n");
                out.write("\t\t");
                if (_jspx_meth_liferay_002dui_005fmessage_005f0(_jspx_th_c_005fif_005f0, _jspx_page_context))
                    return;
                out.write(':');
                out.write(' ');
                out.print(PortalUtil.getComputerName().toLowerCase());
                out.write("\n");
                out.write("\t</div>\n");
                int evalDoAfterBody = _jspx_th_c_005fif_005f0.doAfterBody();
                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                    break;
            } while (true);
        }
        if (_jspx_th_c_005fif_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fc_005fif_0026_005ftest.reuse(_jspx_th_c_005fif_005f0);
        out.write("\n");
        out.write("\n");
        out.write("<form action=\"\" id=\"hrefFm\" method=\"post\" name=\"hrefFm\"></form>");
    } catch (Throwable t) {
        if (!(t instanceof SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    out.clearBuffer();
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}

From source file:org.apache.jsp.html.taglib.ui.section.start_jsp.java

public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    PageContext pageContext = null;//from   www. ja  v  a  2 s .  co  m
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
        response.setContentType("text/html; charset=UTF-8");
        pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
        _jspx_page_context = pageContext;
        application = pageContext.getServletContext();
        config = pageContext.getServletConfig();
        session = pageContext.getSession();
        out = pageContext.getOut();
        _jspx_out = out;

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library 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 Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library 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 Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library 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 Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        //  liferay-theme:defineObjects
        com.liferay.taglib.theme.DefineObjectsTag _jspx_th_liferay_002dtheme_005fdefineObjects_005f0 = (com.liferay.taglib.theme.DefineObjectsTag) _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody
                .get(com.liferay.taglib.theme.DefineObjectsTag.class);
        _jspx_th_liferay_002dtheme_005fdefineObjects_005f0.setPageContext(_jspx_page_context);
        _jspx_th_liferay_002dtheme_005fdefineObjects_005f0.setParent(null);
        int _jspx_eval_liferay_002dtheme_005fdefineObjects_005f0 = _jspx_th_liferay_002dtheme_005fdefineObjects_005f0
                .doStartTag();
        if (_jspx_th_liferay_002dtheme_005fdefineObjects_005f0
                .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody
                    .reuse(_jspx_th_liferay_002dtheme_005fdefineObjects_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody
                .reuse(_jspx_th_liferay_002dtheme_005fdefineObjects_005f0);
        com.liferay.portal.theme.ThemeDisplay themeDisplay = null;
        com.liferay.portal.model.Company company = null;
        com.liferay.portal.model.Account account = null;
        com.liferay.portal.model.User user = null;
        com.liferay.portal.model.User realUser = null;
        com.liferay.portal.model.Contact contact = null;
        com.liferay.portal.model.Layout layout = null;
        java.util.List layouts = null;
        java.lang.Long plid = null;
        com.liferay.portal.model.LayoutTypePortlet layoutTypePortlet = null;
        java.lang.Long scopeGroupId = null;
        com.liferay.portal.security.permission.PermissionChecker permissionChecker = null;
        java.util.Locale locale = null;
        java.util.TimeZone timeZone = null;
        com.liferay.portal.model.Theme theme = null;
        com.liferay.portal.model.ColorScheme colorScheme = null;
        com.liferay.portal.theme.PortletDisplay portletDisplay = null;
        java.lang.Long portletGroupId = null;
        themeDisplay = (com.liferay.portal.theme.ThemeDisplay) _jspx_page_context.findAttribute("themeDisplay");
        company = (com.liferay.portal.model.Company) _jspx_page_context.findAttribute("company");
        account = (com.liferay.portal.model.Account) _jspx_page_context.findAttribute("account");
        user = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("user");
        realUser = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("realUser");
        contact = (com.liferay.portal.model.Contact) _jspx_page_context.findAttribute("contact");
        layout = (com.liferay.portal.model.Layout) _jspx_page_context.findAttribute("layout");
        layouts = (java.util.List) _jspx_page_context.findAttribute("layouts");
        plid = (java.lang.Long) _jspx_page_context.findAttribute("plid");
        layoutTypePortlet = (com.liferay.portal.model.LayoutTypePortlet) _jspx_page_context
                .findAttribute("layoutTypePortlet");
        scopeGroupId = (java.lang.Long) _jspx_page_context.findAttribute("scopeGroupId");
        permissionChecker = (com.liferay.portal.security.permission.PermissionChecker) _jspx_page_context
                .findAttribute("permissionChecker");
        locale = (java.util.Locale) _jspx_page_context.findAttribute("locale");
        timeZone = (java.util.TimeZone) _jspx_page_context.findAttribute("timeZone");
        theme = (com.liferay.portal.model.Theme) _jspx_page_context.findAttribute("theme");
        colorScheme = (com.liferay.portal.model.ColorScheme) _jspx_page_context.findAttribute("colorScheme");
        portletDisplay = (com.liferay.portal.theme.PortletDisplay) _jspx_page_context
                .findAttribute("portletDisplay");
        portletGroupId = (java.lang.Long) _jspx_page_context.findAttribute("portletGroupId");
        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library 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 Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        PortletRequest portletRequest = (PortletRequest) request
                .getAttribute(JavaConstants.JAVAX_PORTLET_REQUEST);

        PortletResponse portletResponse = (PortletResponse) request
                .getAttribute(JavaConstants.JAVAX_PORTLET_RESPONSE);

        String namespace = StringPool.BLANK;

        boolean useNamespace = GetterUtil.getBoolean((String) request.getAttribute("aui:form:useNamespace"),
                true);

        if ((portletResponse != null) && useNamespace) {
            namespace = portletResponse.getNamespace();
        }

        String currentURL = PortalUtil.getCurrentURL(request);

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library 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 Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');
        out.write('\n');
        out.write('\n');

        String param = (String) request.getAttribute("liferay-ui:section:param");
        String name = (String) request.getAttribute("liferay-ui:section:name");

        out.write("\n");
        out.write("\n");
        out.write("<div class=\"aui-helper-hidden\" id=\"");
        out.print(namespace);
        out.print(param);
        out.print(name);
        out.write("TabsSection\">");
    } catch (Throwable t) {
        if (!(t instanceof SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    out.clearBuffer();
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}

From source file:org.apache.jsp.html.taglib.ui.icon_005fhelp.page_jsp.java

public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    PageContext pageContext = null;/*from  w w w.  ja v a 2 s . c  o m*/
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
        response.setContentType("text/html; charset=UTF-8");
        pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
        _jspx_page_context = pageContext;
        application = pageContext.getServletContext();
        config = pageContext.getServletConfig();
        session = pageContext.getSession();
        out = pageContext.getOut();
        _jspx_out = out;

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library 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 Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library 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 Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library 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 Lesser General Public License for more
         * details.
         */

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        //  liferay-theme:defineObjects
        com.liferay.taglib.theme.DefineObjectsTag _jspx_th_liferay_002dtheme_005fdefineObjects_005f0 = (com.liferay.taglib.theme.DefineObjectsTag) _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody
                .get(com.liferay.taglib.theme.DefineObjectsTag.class);
        _jspx_th_liferay_002dtheme_005fdefineObjects_005f0.setPageContext(_jspx_page_context);
        _jspx_th_liferay_002dtheme_005fdefineObjects_005f0.setParent(null);
        int _jspx_eval_liferay_002dtheme_005fdefineObjects_005f0 = _jspx_th_liferay_002dtheme_005fdefineObjects_005f0
                .doStartTag();
        if (_jspx_th_liferay_002dtheme_005fdefineObjects_005f0
                .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody
                    .reuse(_jspx_th_liferay_002dtheme_005fdefineObjects_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fliferay_002dtheme_005fdefineObjects_005fnobody
                .reuse(_jspx_th_liferay_002dtheme_005fdefineObjects_005f0);
        com.liferay.portal.theme.ThemeDisplay themeDisplay = null;
        com.liferay.portal.model.Company company = null;
        com.liferay.portal.model.Account account = null;
        com.liferay.portal.model.User user = null;
        com.liferay.portal.model.User realUser = null;
        com.liferay.portal.model.Contact contact = null;
        com.liferay.portal.model.Layout layout = null;
        java.util.List layouts = null;
        java.lang.Long plid = null;
        com.liferay.portal.model.LayoutTypePortlet layoutTypePortlet = null;
        java.lang.Long scopeGroupId = null;
        com.liferay.portal.security.permission.PermissionChecker permissionChecker = null;
        java.util.Locale locale = null;
        java.util.TimeZone timeZone = null;
        com.liferay.portal.model.Theme theme = null;
        com.liferay.portal.model.ColorScheme colorScheme = null;
        com.liferay.portal.theme.PortletDisplay portletDisplay = null;
        java.lang.Long portletGroupId = null;
        themeDisplay = (com.liferay.portal.theme.ThemeDisplay) _jspx_page_context.findAttribute("themeDisplay");
        company = (com.liferay.portal.model.Company) _jspx_page_context.findAttribute("company");
        account = (com.liferay.portal.model.Account) _jspx_page_context.findAttribute("account");
        user = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("user");
        realUser = (com.liferay.portal.model.User) _jspx_page_context.findAttribute("realUser");
        contact = (com.liferay.portal.model.Contact) _jspx_page_context.findAttribute("contact");
        layout = (com.liferay.portal.model.Layout) _jspx_page_context.findAttribute("layout");
        layouts = (java.util.List) _jspx_page_context.findAttribute("layouts");
        plid = (java.lang.Long) _jspx_page_context.findAttribute("plid");
        layoutTypePortlet = (com.liferay.portal.model.LayoutTypePortlet) _jspx_page_context
                .findAttribute("layoutTypePortlet");
        scopeGroupId = (java.lang.Long) _jspx_page_context.findAttribute("scopeGroupId");
        permissionChecker = (com.liferay.portal.security.permission.PermissionChecker) _jspx_page_context
                .findAttribute("permissionChecker");
        locale = (java.util.Locale) _jspx_page_context.findAttribute("locale");
        timeZone = (java.util.TimeZone) _jspx_page_context.findAttribute("timeZone");
        theme = (com.liferay.portal.model.Theme) _jspx_page_context.findAttribute("theme");
        colorScheme = (com.liferay.portal.model.ColorScheme) _jspx_page_context.findAttribute("colorScheme");
        portletDisplay = (com.liferay.portal.theme.PortletDisplay) _jspx_page_context
                .findAttribute("portletDisplay");
        portletGroupId = (java.lang.Long) _jspx_page_context.findAttribute("portletGroupId");
        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library 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 Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');

        PortletRequest portletRequest = (PortletRequest) request
                .getAttribute(JavaConstants.JAVAX_PORTLET_REQUEST);

        PortletResponse portletResponse = (PortletResponse) request
                .getAttribute(JavaConstants.JAVAX_PORTLET_RESPONSE);

        String namespace = StringPool.BLANK;

        boolean useNamespace = GetterUtil.getBoolean((String) request.getAttribute("aui:form:useNamespace"),
                true);

        if ((portletResponse != null) && useNamespace) {
            namespace = portletResponse.getNamespace();
        }

        String currentURL = PortalUtil.getCurrentURL(request);

        out.write('\n');
        out.write('\n');

        /**
         * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
         *
         * This library is free software; you can redistribute it and/or modify it under
         * the terms of the GNU Lesser General Public License as published by the Free
         * Software Foundation; either version 2.1 of the License, or (at your option)
         * any later version.
         *
         * This library 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 Lesser General Public License for more
         * details.
         */

        out.write('\n');
        out.write('\n');
        out.write('\n');
        out.write('\n');

        String message = (String) request.getAttribute("liferay-ui:icon:message");

        out.write("\n");
        out.write("\n");
        out.write("<span class=\"taglib-icon-help\">\n");
        out.write("\t<img alt=\"\" onMouseOver=\"Liferay.Portal.ToolTip.show(this, '");
        out.print(UnicodeLanguageUtil.get(pageContext, message));
        out.write("');\" src=\"");
        out.print(themeDisplay.getPathThemeImages());
        out.write("/portlet/help.png\" />\n");
        out.write("\n");
        out.write("\t<span class=\"aui-helper-hidden-accessible\">");
        //  liferay-ui:message
        com.liferay.taglib.ui.MessageTag _jspx_th_liferay_002dui_005fmessage_005f0 = (com.liferay.taglib.ui.MessageTag) _005fjspx_005ftagPool_005fliferay_002dui_005fmessage_0026_005fkey_005fnobody
                .get(com.liferay.taglib.ui.MessageTag.class);
        _jspx_th_liferay_002dui_005fmessage_005f0.setPageContext(_jspx_page_context);
        _jspx_th_liferay_002dui_005fmessage_005f0.setParent(null);
        // /html/taglib/ui/icon_help/page.jsp(26,44) name = key type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_liferay_002dui_005fmessage_005f0.setKey(message);
        int _jspx_eval_liferay_002dui_005fmessage_005f0 = _jspx_th_liferay_002dui_005fmessage_005f0
                .doStartTag();
        if (_jspx_th_liferay_002dui_005fmessage_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fliferay_002dui_005fmessage_0026_005fkey_005fnobody
                    .reuse(_jspx_th_liferay_002dui_005fmessage_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fliferay_002dui_005fmessage_0026_005fkey_005fnobody
                .reuse(_jspx_th_liferay_002dui_005fmessage_005f0);
        out.write("</span>\n");
        out.write("</span>");
    } catch (Throwable t) {
        if (!(t instanceof SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    out.clearBuffer();
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}