facebook

web.xml and Java core taglib issues [Closed]

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #206115 Reply

    Guy Tuberson
    Member

    I have two issues which I have not been able to resolve.

    The first issue is with the following XML text in the web.xml file:

    <!– Standard error pages –>
    <error-page>
    <error-code>500</error-code>
    <location>/error.jsp</location>
    </error-page>
    <error-page>
    <error-code>400</error-code>
    <location>/index.jsp</location>
    </error-page>
    <error-page>
    <error-code>403</error-code>
    <location>/403.jsp</location>
    </error-page>
    <error-page>
    <error-code>404</error-code>
    <location>/404.jsp</location>
    </error-page>

    is causing MyEclipse to report the following error:

    “The content of element type “web-app” must match “(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)”.”.

    If I comment out the block of text the error goes away. As far as I can tell the <error-page> is valid element for the Web deployment descriptor file and it is in the error message.

    The second issue is with the Sun’s java core taglib located in the standard.jar library:

    <%@ taglib uri=”http://java.sun.com/jstl/core&#8221; prefix=”c” %>

    When I try to use the <c:forEach> tag MyEclipse will generate the following error message:

    “cannot load class: org.apache.taglibs.standard.tag.el.core.ForEach”

    When I try to use the <c:if> tag MyEclipse will generate the following error message:

    “cannot load class: org.apache.taglibs.standard.tag.el.core.IfTag”

    The <c:set> or <c:url> tags seem to work ok. The standard.jar file is in the /WEB-INF/lib directory and I can browse the jar from eclipse and I can see the ForEach and IfTag classess in the jar.

    Any help on these two issue would be highly appreciated.

    My operating environment:
    os – Windows XP home
    eclipse ver 2.1.3
    MyEclipse ver 2.7
    Tomcat 5.0.19

    #206119 Reply

    Riyad Kalla
    Member

    <snip>
    <error-code>404</error-code>
    <location>/404.jsp</location>
    </error-page>

    is causing MyEclipse to report the following error:
    <snip>

    The order of the elements in your web.xml file are just as important as the elements themselves. If you look at that error message closely, and then match the order of the elements to your file, you may find that your <error-page> tags need to be moved up or down above or below another set of tags.

    The second issue is with the Sun’s java core taglib located in the standard.jar library:

    You need both standard.jar and jstl.jar in your WEB-INF/lib folder and added to your project build properties.

    Please let us know if that didn’t work.

    #206123 Reply

    Guy Tuberson
    Member

    Thank you for your help. As you can tell I’m new to developing web application.

    #206124 Reply

    Riyad Kalla
    Member

    Thank you for your help.

    You are welcome, I hope it helped.

    As you can tell I’m new to developing web application.

    No problem, its a pretty hairy thing to get good at.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: web.xml and Java core taglib issues [Closed]

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