You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Raintung Li (JIRA)" <ji...@apache.org> on 2006/10/26 10:23:03 UTC

[jira] Created: (WW-1482) How to define tags-lib in structs 2.0?

How to define tags-lib in structs 2.0?
--------------------------------------

                 Key: WW-1482
                 URL: http://issues.apache.org/struts/browse/WW-1482
             Project: Struts 2
          Issue Type: Temp
          Components: Views
    Affects Versions: 2.0.0
         Environment: Normal
            Reporter: Raintung Li
            Priority: Minor


I run showcase in my web server. It work normal.
My small issue is I can't find how to define <%@ taglib prefix="s" uri="/struts-tags" %>. 
I check web.xml and so on, which file do it? Could you give me a hand? 

Regards
Raintung Li

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (WW-1482) How to define tags-lib in structs 2.0?

Posted by "Ted Husted (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/WW-1482?page=all ]

Ted Husted resolved WW-1482.
----------------------------

    Resolution: Not A Problem

> How to define tags-lib in structs 2.0?
> --------------------------------------
>
>                 Key: WW-1482
>                 URL: http://issues.apache.org/struts/browse/WW-1482
>             Project: Struts 2
>          Issue Type: Temp
>          Components: Views
>    Affects Versions: 2.0.0
>         Environment: Normal
>            Reporter: Raintung Li
>            Priority: Minor
>
> I run showcase in my web server. It work normal.
> My small issue is I can't find how to define <%@ taglib prefix="s" uri="/struts-tags" %>. 
> I check web.xml and so on, which file do it? Could you give me a hand? 
> Regards
> Raintung Li

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WW-1482) How to define tags-lib in structs 2.0?

Posted by "Philip Luppens (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/WW-1482?page=comments#action_38490 ] 
            
Philip Luppens commented on WW-1482:
------------------------------------

Quoted from http://www.onjava.com/pub/a/onjava/2001/10/10/jsp.html?page=2:
"
Auto-Discovery of Tag Libraries

In JSP 1.1, you could refer to a tag library by letting the taglib directive's uri attribute specify either the real path to the tag library or a symbolic name. If you used a symbolic name, you also had to map the name to the real path with the <taglib> element in the web.xml file for the application. JSP 1.2 adds a third, more powerful alternative: just drop the tag library JAR file in the WEB-INF/lib directory and use the library's standard URI in the taglib directive.

Here's how it works. The Tag Library Descriptor (TLD) includes a <uri> element that you use to define the standard URI for the library:

<taglib> 
  ... 
  <uri>/demo</uri> 
  ... 
</taglib>

When the Web application is started, the container scans through the WEB-INF directory structure for files ending with the extension .tld and all JAR files that contain files with the .tld extension in their META-INF directory. In other words, all TLD files. For each TLD, the container looks for the <uri> element and creates a map from the URI to the TLD that contains it. In your JSP page, you just have to place a taglib directive with a uri attribute value matching the URI in the TLD:

<%@ taglib uri="/demo" prefix="demo" %>

That's it! No more messing around with real paths (which may change, for instance, when you upgrade the library) in the JSP pages or web.xml tag library declaration woes.
"

> How to define tags-lib in structs 2.0?
> --------------------------------------
>
>                 Key: WW-1482
>                 URL: http://issues.apache.org/struts/browse/WW-1482
>             Project: Struts 2
>          Issue Type: Temp
>          Components: Views
>    Affects Versions: 2.0.0
>         Environment: Normal
>            Reporter: Raintung Li
>            Priority: Minor
>
> I run showcase in my web server. It work normal.
> My small issue is I can't find how to define <%@ taglib prefix="s" uri="/struts-tags" %>. 
> I check web.xml and so on, which file do it? Could you give me a hand? 
> Regards
> Raintung Li

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WW-1482) How to define tags-lib in structs 2.0?

Posted by "Philip Luppens (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/WW-1482?page=comments#action_38488 ] 
            
Philip Luppens commented on WW-1482:
------------------------------------

Do not use the _bug_ tracker for user _questions_.

You no longer need to register tld's in your web.xml. Do a google search for 'autodiscovery tld'.

> How to define tags-lib in structs 2.0?
> --------------------------------------
>
>                 Key: WW-1482
>                 URL: http://issues.apache.org/struts/browse/WW-1482
>             Project: Struts 2
>          Issue Type: Temp
>          Components: Views
>    Affects Versions: 2.0.0
>         Environment: Normal
>            Reporter: Raintung Li
>            Priority: Minor
>
> I run showcase in my web server. It work normal.
> My small issue is I can't find how to define <%@ taglib prefix="s" uri="/struts-tags" %>. 
> I check web.xml and so on, which file do it? Could you give me a hand? 
> Regards
> Raintung Li

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (WW-1482) How to define tags-lib in structs 2.0?

Posted by "Raintung Li (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/struts/browse/WW-1482?page=comments#action_38489 ] 
            
Raintung Li commented on WW-1482:
---------------------------------

Philip,

How to rise my questions? I don't find it anywhere, so I create it.

Regards

> How to define tags-lib in structs 2.0?
> --------------------------------------
>
>                 Key: WW-1482
>                 URL: http://issues.apache.org/struts/browse/WW-1482
>             Project: Struts 2
>          Issue Type: Temp
>          Components: Views
>    Affects Versions: 2.0.0
>         Environment: Normal
>            Reporter: Raintung Li
>            Priority: Minor
>
> I run showcase in my web server. It work normal.
> My small issue is I can't find how to define <%@ taglib prefix="s" uri="/struts-tags" %>. 
> I check web.xml and so on, which file do it? Could you give me a hand? 
> Regards
> Raintung Li

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira