facebook

ME JSP Editor Questions

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #205371 Reply

    Hi,

    We use taglibs extensively (stuts-el in particular) on our JSP pages. These taglibs are defined in the web.xml. However, sometimes when we open a jsp page with using the ME JSP editor, we see two problems.

    First, the type ahead (or whatever is the correct name of the feature) doesn’t pick up the tag. Normally, this does work, but sometimes it doesn’t and we are not sure what we are doing differently. Here is an example of the tag definition on the jsp page:

    
        <%@ taglib uri="struts-html-el" prefix="html-el"%>
    

    and how it is defined in web.xml:

    
        <taglib>
            <taglib-uri>struts-html-el</taglib-uri>
            <taglib-location>/WEB-INF/tlds/struts-html-el.tld</taglib-location>
        </taglib>
    

    We have duplicate environments on several machines (including ME). For the lastest incarnation of this problem, we are seeing it work correctly on one machine and not on another. So obviously, something must be different (despite our best efforts 👿 )

    The second question that we are seeing has to do with character coding. When we have a JSP function which uses the less than sign (“<“), the rest of the characters on the page turn red – unless there is a function with a matching greater than sign (“>”). I assume that this is a matching issue, but it does make working on that page less than desirable (in fact, a colleague is threatening switching over to DreamWeaver just to get around this issue – slight overkill, but it demonstrates how the issue affects his daily work). Is there anything that we can do to help with this situation?

    Thanks,

    James

    System Setup ——————————-
    Operating System and version: Windows XP
    Eclipse version: 2.12
    Eclipse build id: 200311030802
    Fresh Eclipse install (y/n): n
    If not, was it upgraded to its current version using the update manager? y
    Other installed external plugins:
    Number of plugins in the <eclipse>/plugins directory that begin with org.eclipse.pde.*:
    MyEclipse version: 2.72 GA
    Eclipse JDK version: 1.4
    Application Server JDK version: 1.4
    Are there any exceptions in the Eclipse log file? no

    – Message Body ——————————-

    #205376 Reply

    No Operation
    Member

    How do you use the ‘<‘ sign?
    In Java code?
    In arguments?
    In Java script?

    NOP

    #205410 Reply

    Here is an example of how it is used. Everything after the “<” is in red in the JSP Editor. Do you think that this could be affecting the tag lib prompting, too?

    
    
    <script language="javascript">
    
       function foo()
       {
           for (var i = 0; i < myArray.length; i++) {
              optionElement = document.createElement("OPTION");
              mySelect.options.add(optionElement);
              optionElement.innerText = myArray[i][1];
              optionElement.value = myArray[i][0];
            }
       }
    </script>
    
    
    #205423 Reply

    No Operation
    Member

    my advice is still the same: Use HTML comments:

    
    <script language="javascript">
    <!--
       function foo()
       {
           for (var i = 0; i < myArray.length; i++) {
              optionElement = document.createElement("OPTION");
              mySelect.options.add(optionElement);
              optionElement.innerText = myArray[i][1];
              optionElement.value = myArray[i][0];
            }
       }
    -->
    </script> 

    NOP

    #205463 Reply

    I have been coding in javascript/DHTML for a few years but have not used HTML comments up until this point. Are there are any issues or side affects of putting the javascript functions into comments? Does it affect debugging?

    Thanks,
    James

    #205465 Reply

    Riyad Kalla
    Member

    James,
    I would comment that for now you should use comments and its also useful to protect old/broken browsers against barfing on the script code; but we know that most editors don’t require the comment flags for correct parsing so we are looking at relaxing this requirement in the future as well.

    Thank you for being patient.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: ME JSP Editor Questions

You must be logged in to post in the forum log in