Or, to make your page coding easier, you could place the bundle lookup in the
taglib.
Then, have an additional attribute for your taglib like 'parameterkey'.

So then your pages would look something like this:

<sampletag:permission parameterkey = "menu.CREATE_OTHER_USER" >

Pete

Peter Alfors wrote:

> try
>
> <sampletag:permission parameter = "<%=
> messages.getMessage('menu.CREATE_OTHER_USER') %>" >
>
> Pete
>
> "Nanduri, Amarnath" wrote:
>
> > Hi everybody,
> >
> >   I am writing a couple of my own tags. I am facing a problem..I have
> > included the stack trace also.
> >
> > Below is the declaration in the .tld file
> >
> >  <tag>
> >     <name>permission</name>
> >     <tagclass>tags.PermissionTag</tagclass>
> >     <bodycontent>JSP</bodycontent>
> >     <info>
> >       Checks for the permissions to display a hyperlink
> >     </info>
> >     <attribute>
> >       <name>parameter</name>
> >       <required>true</required>
> >       <rtexprvalue>true</rtexprvalue>
> >     </attribute>
> >   </tag>
> >
> > Here is the tag call in the jsp page...
> >
> > <sampletag:permission parameter = <%=
> > messages.getMessage("menu.CREATE_OTHER_USER") %> >   (fails)
> > <sampletag:permission parameter = "<%=
> > messages.getMessage("menu.CREATE_OTHER_USER") %>"  >   (fails)
> >
> > Th above calls fails with the exception. But when i change the parameter to
> > take a constant value it works...
> >
> > <onboard:permission parameter = "createuser" >  (works)
> >
> > PermissionTag extends TagSupport. Can the experts tell me where i am going
> > wrong ?
> >
> > <Apr 20, 2001 9:49:17 AM EDT> <Error> <HTTP>
> > <[WebAppServletContext(1219491,menu)] Servlet failed with Exception
> > weblogic.servlet.jsp.JspException: (line 18): Non-matching extension tags
> >         at weblogic.servlet.jsp.JspLexer.jspException(JspLexer.java:619)
> >         at
> > weblogic.servlet.jsp.JspLexer.mCLOSE_EXTENSION_TAG(JspLexer.java:2054)
> >         at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1654)
> >         at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1530)
> >         at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:884)
> >         at weblogic.servlet.jsp.JspLexer.parseJspCode(JspLexer.java:1085)
> >         at weblogic.servlet.jsp.JspLexer.parseJspCode(JspLexer.java:1065)
> >         at weblogic.servlet.jsp.JspLexer.parseJspCode(JspLexer.java:1058)
> >         at weblogic.servlet.jsp.JspLexer.buildTimeInclude(JspLexer.java:855)
> >         at
> > weblogic.servlet.jsp.JspLexer.mINCLUDE_DIRECTIVE(JspLexer.java:3733)
> >         at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:3506)
> >         at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:1807)
> >         at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1648)
> >         at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1530)
> >         at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:884)
> >         at weblogic.servlet.jsp.JspParser.doit(JspParser.java:74)
> >         at weblogic.servlet.jsp.JspParser.parse(JspParser.java:121)
> >         at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:100)
> >         at
> > weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:253)
> >         at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:267)
> >         at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:181)
> >         at
> > weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:29
> > 5)
> >         at
> > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> > :204)
> >         at
> > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> > :244)
> >         at
> > weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
> > l.java:149)
> >         at
> > org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja
> > va:1727)
> >         at
> > org.apache.struts.action.ActionServlet.process(ActionServlet.java:1564)
> >         at
> > org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> >         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> >         at
> > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
> > :208)
> >         at
> > weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
> > ntext.java:1127)
> >         at
> > weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
> > :1529)
> >         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
> >         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
> > >
begin:vcard 
n:;
x-mozilla-html:FALSE
org:<BR><IMG SRC="http://www.irista.com/logo/irista.gif"><BR><BR><FONT Color=#000080><FONT SIZE=2><B>Bringing Vision to Your Supply Chain
adr:;;;;;;
version:2.1
end:vcard

Reply via email to