facebook

JSP editor – unknown tags [Closed]

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #222736 Reply

    I’m getting validation errors (i.e. Unknown tag(html:hidden)) on every single tag that is related to both struts and our own tag libraries. I found some information regarding this at http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-5078-highlight-unknown+tag+tld.html

    However even after making the suggested changes I still get the validation errors/warnings. These pages compile and run fine.

    I believe I have Web capabilities added, but not sure how to check other than the fact that the MyEclipse menu has that function disabled. It is possible that after I enabled web capabilities I re-loaded my project before committing the changes, but I’m not sure how to check on that. I did a Project -> Clean on that project, but the warnings are still there.

    I also get the error “System error, insert “}” to complete ClassBody (in file…” on about half of my JSPs. I’m not sure if this is related or not – let me know if I should open a new topic for this.

    From my web.xml: (files are in the actual location specified by the <taglib-location> tag)

    <taglib>
    <taglib-uri>/tags/struts-beans</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-html</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-logic</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-template</taglib-uri>
    <taglib-location>/WEB-INF/struts-template.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-nested</taglib-uri>
    <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-tiles</taglib-uri>
    <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/portal</taglib-uri>
    <taglib-location>/WEB-INF/portal.tld</taglib-location>
    </taglib>

    Snippet from my JSP:

    <%@ taglib uri=”/tags/struts-bean” prefix=”bean” %>
    <%@ taglib uri=”/tags/arch-taglib” prefix=”arch” %>
    <%@ taglib uri=”/tags/struts-html” prefix=”html” %>
    <%@ taglib uri=”/tags/portal” prefix=”portal” %>
    <%@ taglib uri=”/tags/struts-logic” prefix=”logic” %>

    <html:hidden property=”projectId”/>
    <html:hidden property=”testPlanId” />
    <html:hidden property=”title” />
    <html:hidden property=”testingStatusComment” />
    <html:hidden property=”testManagerId” />
    <html:hidden property=”leadTesterId” />
    <html:hidden property=”requirementSave” />
    <html:hidden property=”vclIdForRequirement” />

    Configuration:
    OS – WIN XP SP1

    Eclipse Platform
    Version: 3.0.1
    Build id: 200409161125

    MyEclipse Web Development Tooling
    Version: 3.8.2
    Build id: 200409171200-3.8.2

    Clean install
    Other plugins: – Sysdeo Tomcat
    JDK – 1.5.0
    App Server: Tomcat 4.1.31
    [url][/url]

    #222746 Reply

    Riyad Kalla
    Member

    Everything looks pretty good, are you sure you have struts.jar in your Build Path so the tags can be resolved? Can you post a screenshot of the problem or post the exact error? Also you can tell if you have a web project by right clicking on the project root, you should see a lot of MyEclipse-XXXX preferences, most notably the MyEclipse-Web preferences. If you don’t see this, you will need to add web capabilities to this project by selecting the root and adding them.

    Please also let me know what your webroot is set to, and how it is laid out.

    #222756 Reply

    1) I am in the process of retrofitting this project from WSAD to Eclipse/MyEclipse. The project is a functioning struts application (in production 2 years). I can’t figure out how to get a screenshot pasted in here, but I did verify that the struts.jar file is listed with all of my other jar files (hibernate2, log4j, etc.).

    2) The exact text of the error (actually a warning – 110 of them like this on this one JSP alone 🙁 which obviously makes it tough to separate the real problems) is as follows:

    Unknown tag(html:text)

    I’m also getting similar errors for our own custom tags.

    3) Checking the properties of the project I DO have the MyEclipse-Web preferences.

    4) The Web-root folder is set to /WebRoot which is definitely not a valid directory for my project. For development it appears as if the project runs out of the following directory:
    C:\eclipse\workspace\CETPortal\Web Content

    In production it runs out of the tomcat4\hosts directory.

    I’ll try to change the Web-root entry to see if that helps.

    Thanks!

    #222757 Reply

    I started to look at what it takes to change the Webroot and I must admit I’m getting very confused by this. Is there anyplace I can find a help file that explains all of this?

    1) I don’t believe my project is an ‘official’ J2EE project so I’m confused by the MyEclipse-Web properties instructions since they seem to be implying that you are using the J2EE deployment methodology. At the moment we deploy by using the export function from the context menu of the project.

    (Instructions from the MyEclipse-Web properties tab)
    Context-root changes only apply to exploded and packaged WAR deployments of this project.

    To update the context-root of this project when deployed as a module of an enterprise project select the enterprise project. From the context menu (i.e., right-click) choose MyEclipse > Add/Remove Module dialog. From this dialog remove the web-project from the enterprise project. Then re-add the web-project to the enterprise project while specifying the new context-root.

    Smart Deployment –
    Jar referenced Java projects for packaged deployments.
    Merge into the ‘classes’ directory for exploded deployments

    2) How does this relate to the ‘missing tags’? Is the JSP validator trying to find these files in my tomcat directory instead of my workspace? If that were the case that might explain a few things since my tomcat directory in my development environment (my machine) doesn’t have any of the project files – they are all in this directory: C:\eclipse\workspace\CETPortal\Web Content

    3) Like I said if there is any place you can show me where this is documented I’ll be more than happy to take the time to read the documentation.

    Thanks

    #222762 Reply

    Riyad Kalla
    Member

    I started to look at what it takes to change the Webroot and I must admit I’m getting very confused by this. Is there anyplace I can find a help file that explains all of this?

    You need to switch to the Navigator view and edit your .mymetadata and change the “webrootdir” attribute to the name of your directory where the root of your web project lives, this alone can influence proper autocomplete and validation drastically. If ME can’t find the resources it needs to tell if your JSP pages are valid, it freaks out (like you are seeing now).

    1) THere are two things, web context root (the dir that the project is deployed to in your app server, like /myWebApp or /shoppingCart) and there is the web root, this is the directory IN your project that represents the root directory of your web application, where the index.jsp file would live and it would contain the WEB-INF dir. Once you tell MYEclipse where the web root is, it can resolve all remaining resources automaitcally (web.xml under WEB-INF, classes under WEB-INF/classes, libraries under WEB-INF/lib, etc. etc.).

    2) If your webroot is not setup correctly (Forget about Tomcat for a minute) MyEclipse has no idea what is valid and what isn’t, so it goes nuts marking everything as invalid because it can’t resolve any of the resources you are referencing.

    3) It might be a good idea to read through a few ‘getting started’ docs here: http://www.myeclipseide.com/ContentExpress-display-ceid-67.html, not because you don’t know what to do, but because it would give you an idea (in the simplest cases) how MyEclipse works, then you can map those simple situations onto your complex project and get it setup more effectively.

    #222792 Reply

    OK, now I’ve got it! 🙂 Sorry it took so long for me to reply, but I ended up needing to rebuild my project after a few things got hopelessly snarled. The fact that the WebRoot was not standard (Web Content) and the web project not configured properly was the issue. Since I ended up deleting and reloading the project I was able to use the wizard to rebuild the project and set the webroot properly this time. I now see the following entry in my .mymetadata file which seems to have fixed the problem quite nicely.

    <attributes>
    <attribute name=”webrootdir” value=”Web Content” />
    </attributes>

    I hadn’t realized the function of the my .mymetadata file before, but now in hindsight it is clear.

    Thanks for the help!

    #222798 Reply

    Riyad Kalla
    Member

    Glad to hear it is working now.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: JSP editor – unknown tags [Closed]

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