Results 1 to 2 of 2
  1. #1
    Albert is offline Senior Member
    Join Date
    Jun 2007
    Posts
    114
    Rep Power
    0

    Default Help with TLD template

    Hello, I am creating a template for my JSP. Here is the code i'm using that I got from
    JSP templates - Java World.

    What is the template.tld file? How do i create that?

    index.jsp:
    Java Code:
    <%@ taglib uri='/WEB-INF/tlds/template.tld' prefix='template' %>
    <template:insert template='/indextTemplate.jsp'>
      <template:put name='title' content='Templates' direct='true'/>
      <template:put name='header' content='/header.html' />
      <template:put name='sidebar' content='/sidebar.jsp' />
      <template:put name='content' content='/introduction.html'/>
      <template:put name='footer' content='/footer.html' />
    </template:insert>
    indextTemplate.jsp
    Java Code:
    <%@ taglib uri='/WEB-INF/tlds/template.tld' prefix='template' %>
    <html><head><title><template:get name='title'/></title></head>
    <body background='graphics/background.jpg'>
    <table>
       <tr valign='top'><td><template:get name='sidebar'/></td>
          <td><table>
                <tr><td><template:get name='header'/></td></tr>
                <tr><td><template:get name='content'/></td></tr>
                <tr><td><template:get name='footer'/></td></tr>
             </table>
          </td>
       </tr>
    </table>
    </body></html>
    Thanks
    Albert:rolleyes:

  2. #2
    susan is offline Member
    Join Date
    Jul 2007
    Posts
    44
    Rep Power
    0

Similar Threads

  1. Replies: 0
    Last Post: 04-01-2008, 10:17 AM
  2. Template for System.out.println
    By eva in forum Eclipse
    Replies: 3
    Last Post: 01-05-2008, 12:46 PM
  3. SWT code template
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-30-2007, 12:18 PM
  4. Replies: 2
    Last Post: 12-10-2007, 05:17 AM
  5. Replies: 0
    Last Post: 09-28-2007, 12:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •