facebook

Code assists in JSP

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

    Hi,

    When I press Ctrl+Space in the JSP editor, I see a list of all the valid HTML tags. Is this how it is supposed to work? I was expecting only the list of tags that is valid in the current context for example, If I am within <tr></tr>, I was expecting only <td> and <th> (this is what JBuilder does). Further, I do not see any of the tags from other tag libraries.

    Is this is the normal behavior or Is this a bug?

    I am using eclipse 3.0M8/MyEclipse 3.72. I have tried this on both w2k and solaris systems.

    Thanks
    Anand

    #206331 Reply

    Riyad Kalla
    Member

    Currently seeing a complete list is normal behavior. The autocomplete is not context sensitive, but it is completion sensative (meaning if you type <tabl, and hit complete, you will only see “<table” as a completion.

    In order to see tag completions, you need to add @taglib directives to the top of your page appropriately AND have the proper TLDs in your project, proper JARs added to your build path and/or proper entries in your web.xml so the autocomplete can resolve the types and parameters for the tags.

    #206365 Reply

    Hi Riyad

    Thanks for the reply.

    In order to see tag completions, you need to add @taglib directives to the top of your page appropriately AND have the proper TLDs in your project, proper JARs added to your build path and/or proper entries in your web.xml so the autocomplete can resolve the types and parameters for the tags.

    I have the proper JAR files added to the build path and proper entries are added in the web.xml file. I have the @taglib directives in the JSP file.
    What did you mean by “have property TLDs in your project”. How can I add the TLDs to the project.

    Anand

    #206370 Reply

    Riyad Kalla
    Member

    Anand,
    I guess I should ask first what you are trying to complete, if its Struts stuff then if you used the wizard to “Add Struts Capabilities” should have done everything for you, and then all you need to do is add @taglib directives.

    If its a custom taglib that you are developing, then you need your proper web.xml entries for the taglibs, and then have your TLDs under WEB-INF and the classes accessible on the build path. Does the page compile properly if you use the taglib? Do you get an error like it can’t resolve the class? Are you SURE you are using the MyEclipse editor? (right click on JSP file, Open With -> MyEclipse JSP Editor). Sometimes people will be using Lomboz and not know it.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Code assists in JSP

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