facebook

Tiles configuration in web.xml

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #259683 Reply

    Bobby
    Member

    Hi:

    I am using Weblogic 8.1. My application uses Struts and I want to include Tiles capability into it.

    My question is:

    Is it always required to use “<!– <jsp-config>
    <taglib>
    <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
    </taglib>
    </jsp-config> –>”
    in the web.xml for using Tiles?

    I read tutorials online on how to make your application Tiles ready, and most of them suggest including the above configuration to the web.xml.

    I first included it and it worked. I also tried not including it and it still works fine.

    I need to know why is it so?

    Thanks in advance.

    #259748 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev

    That is a commented out block of code, so it does nothing, that’s why it doesn’t matter.

    #259761 Reply

    Bobby
    Member

    @support-rkalla wrote:

    Moving to OT > Soft Dev

    That is a commented out block of code, so it does nothing, that’s why it doesn’t matter.

    Actually I sent it in comment block by-mistake, the actual tag definition is as is without being in a comment block, and it still works.

    It also works even if I do not include the definition.

    Thanks,
    Bhavin

    #259864 Reply

    Riyad Kalla
    Member

    Bhavin,
    Your struts TLDs are actually shipping inside the META-INF dir of your struts.jar file, which according to the JEE spec is a valid place for resolving tag libs, that might be why it’s still working. MyEclipse does require, in that case, that you use the default URI for the taglib, which you can find by expanding the JAR, then the META-INF dir then looking in the TLD you want, like struts-beans.tld, and checking about the 5th tag down, should be <uri>blahblah</uri> where blahblah is the default URI. You then use this in your JSP:
    <%@ taglib uri=”blahblah” prefix=”bean”>

    or something like that.

    #259958 Reply

    Bobby
    Member

    Thanks,
    Bhavin

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Tiles configuration in web.xml

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