tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rashmi Rubdi" <rashmi....@gmail.com>
Subject Re: I18N Tag Library
Date Thu, 03 May 2007 20:03:47 GMT
On 5/3/07, Vikram Reddy <vikramreddy1977@gmail.com> wrote:
> Sure, I am making my application I18n complinat, reading all the labels from
> the resources, I am using I18n tag libary from jakartha,
>
> I am replacing all of my labels with i18n tag like <i18n:message key="
> label.name">, <i18n:message key="label.age"> etc, it is working fine.
>
> But I have some labels which are hardcoded in the Backend (Java file) and
> and they are displayed on the UI I am struck how to use this tag in the back
> end java class.

Ok, now the problem is a little clear to me. It would be more clear if
you could illustrate with sample code. It is difficult to know what's
the problem without all the information.

>From what I know, tag libs are only meant to be used on JSP or other
front end technologies, they cannot be used directly inside Java
classes.

If you want to access data from Backend or middle application layer
into the JSP then it can be done with the jsp:useBean and
jsp:getProperty tag, as long as the Java class is a valid JavaBean
that means it should follow the JavaBean notation strictly.

You would use the MVC/ Front Controller pattern which uses Servlets to
control JSPs, inside the JSP get the JavaBean from request scope.

> I read the documennation, nothing was mentioned about this. let me know if
> you have any questions.

The documentation only covers JSPs/ Front end as it should.

>
> V

Regards
Rashmi

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message