Uploaded image for project: 'Grouper'
  1. Grouper
  2. GRP-131

JSP Tile definition exception if no insertFragment in pageContext

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 1.3.1
    • 1.3.0
    • UI
    • None
    • Windoze/Tomcat 5.5/Oracle10g
      RedHat/Apache2.2.x/Tomcat 5.5/Oracle10g

    Description

      Using Grouper 1.3.0 from the head, the Subject Search page in Brown's sources file configuration generates a jsp tile error that prevents the header and left navigation from displaying properly by default. We suspect our configuration is pretty standard, so I'll offer up a code patch to the affected jsp. The problem seems to be that after the list of available sources displays, there's an additional tile that displays if the pageContext.getAttribute("insertFragment") doesn't match a particular string regular expression. In our case, however, the pattern matches, but the insertFragment is actually an emtpy string, so the jsp barfs trying to retrieve the tile named ''. the specific page output is:

      <tr id="advancedSubjectSearch5" style="display:none;visibility:hidden;" ><td class="formTableLeft"> </td><td><table class="formSubtable" style="margin-left: 30px"><span class="jspError">Error!</span>
      < ! – JspException:Error - Tag Insert : Can't get definition ''. Check if this name exist in definitions factory. - - >

      And we worked around the problem by adding a string length check on insertFragment before we display the tile. this is out ui/webapp/WEB-INF/jsp/subjectSearchFragmetn.jsp line 76:

      if ((pageContext.getAttribute("insertFragment").toString().length() > 0) && (!pageContext.getAttribute("insertFragment").toString().matches("^\\?
      ?.*"))) {

      Attachments

        1. populateSearchSubjectsBug.jpg
          110 kB
          James Cramton
        2. populateSearchSubjectsSpecifyDS.jpg
          168 kB
          James Cramton

        Activity

          People

            tom.barton.2@at.internet2.edu Tom Barton (internet2.edu)
            jcramton James Cramton (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: