You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by "Kumar, Kiran" <kk...@kheaa.com> on 2003/06/25 19:07:46 UTC
RE:pageEncoding in JSP
Iam getting an error when I use pageEncoding in my jsp page
<%@ page
language="java"
contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"
%>
this is what I want to use with pageEncoding feature
<bean:message key="error.db.connection"></bean:message> <BR>
please let me know where I have to rectify
Thanks in advance
KiranKumar (Raj)
ext 7203
-----Original Message-----
From: Fredrik Westermarck [mailto:fredrik.westermarck@mdh.se]
Sent: Wednesday, June 25, 2003 1:04 PM
To: Tag Libraries Users List
Subject: [standard] Accessing current ResourceBundle
Hi!
I'm using jakarta-standard-taglib-1.0.3 mainly because of the i18n
capabilities on my JSP-pages. Since I also have some custom tags that
needs to present information based from the same ResourceBundles.
Is it possible to retrive the ResourceBundle that is beeing used
(defined by fmt:setBundle in pagescope) in the JSTL-tags in a
standardized and portable way?
Currently my tags gets the ResourceBundle to use from the requestscope,
set by the Servlet that handles the incoming request. That requires some
extra error handling in the Servlet since it has to retrive the bundle.
It would be much more simpler to use and minimizing the risk to forget
setting the ResourceBundle in the Servlet.
Is it the 'javax.servlet.jsp.jstl.fmt.localizationContext' that holds
the current LocalizationContext-object, from which I can get the current
ResourceBundle if it's available?
Regards,
Fredrik Westermarck
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
Re: JSTL and isUserInRole
Posted by Serge Knystautas <se...@lokitech.com>.
Jim Kennedy wrote:
> Has anyone tried this using pure JSTL or Struts. No rt.
>
> I need to do something like this in JSP's
>
> <c:if test="${pageContext.request.userInRole('foo') == true}" >
EL doesn't support method evaluation, so yeah that won't work.
You can just create a simple tag on your own to do this. As part of our
company's core taglib we have.
<loki:inrole role="foo">
</loki:inrole>
So it only evaluates that if the user has that role. You can then
extend it as you need. Maybe the next release of the JSTL will add a
taglib that addresses security, but for right now, you're free to build
it however you want.
--
Serge Knystautas
President
Lokitech >> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
JSTL and isUserInRole
Posted by Jim Kennedy <ji...@gigaheads.com>.
Has anyone tried this using pure JSTL or Struts. No rt.
I need to do something like this in JSP's
<c:if test="${pageContext.request.userInRole('foo') == true}" >
...
</c:if>
The above does not work. How can I do this? isUserInRole(String) is the
method I need to call. Or maybe there is another way around this. I want
to be able to show content conditionally on the j2ee role.
Jim Kennedy
IT Consultant
---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org