facebook

Editting .jhtml files

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #229692 Reply

    jjv411
    Member

    I have been scouring the net looking for a way to get MyEclipse to support syntax highlighting in .jhtml files. I have yet to find anything that tells me definitively if it is supported and if so, how to go about doing it. Opening a JHTML file will kick off the MyEclipse HTML editor but it gets confused by the JHTML tags. Has anyone got this to work? Something obvious I am missing? URLs? Thanks.

    #229736 Reply

    Riyad Kalla
    Member

    If you have already assigned the MyEclipse HTML Editor to handle JHTML files then that is all I can suggest, if there is a custom format to JHTML files (e.g. velocity templates or other scripting constructs) then obviously that won’t work as the HTML parser will be severly confused by any custom constructs.

    However if JHTML is mostly HTML with custom attributes to denote special information (like Tapestry) then it should be working fine. Maybe post a sample JHTML page for us to take a look at?

    #229817 Reply

    jjv411
    Member
    
    <IMPORTBEAN BEAN="/atg/dynamo/droplet/IsNull">
    <IMPORTBEAN BEAN="/atg/dynamo/droplet/IsEmpty">
    
    <JAVA>
      String my_string = "This section contains native java code";
      String whatever = "There can be any number of lines of Java code here";
    
      // enclosed in backticks below is also native java code
    </JAVA>
    
    <HTML>
      <HEAD>
        <TITLE>My Title: <VALUEOF PARAM="title"/>
      </HEAD>
    
    
      <DROPLET BEAN="IsEmpty">
         <PARAM NAME="value" VALUE="`my_string`">
         <OPARAM NAME="false">
            The value of my java variable is not empty.  Instead it's:
            <JAVA>out.println(my_string);</JAVA>
         </OPARAM>
      </DROPLET>
    
    <JAVA>
        // below "input" is an input parameter
    </JAVA>
    
      <DROPLET BEAN="IsNull">
         <PARAM NAME="value" VALUE="param:input">
         <OPARAM NAME="false">
            The parameter named input is NOT null and has a value of
            <VALUEOF PARAM="input"/>
         </OPARAM>
      </DROPLET>
    
    </HTML>
    
    
    #229818 Reply

    Riyad Kalla
    Member

    I can see what this doesn’t work… none of these are valid HTML tags.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Editting .jhtml files

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