Using EL variable in struts bean:message tag(not struts EL tag)

Is there any work around to use an EL variable inside struts bean:message tag as key:
I have like this:
<bean:message key="${bean.keyName}"/>
which is throwing error , I know this can be resolved by using struts-el tags but i cannot use them for specific reasons.
I dont want to use bean:define tag to define my 'bean' and then use like this:
<bean:message key="<%=bean.getKeyName%>"/> (this actually works, but i want to use EL variable)
Is there any work around to use EL variable and make the message display on the jsp.
i tried multiple ways like scriplets and jsp:useBean but nothing worked, Please let me know..
Thanks in advance

Im pretty sure that EL does not work in the normal struts tag unless its struts-el tag.Have you tried it?
As I said, in a properly configured JSP2.0 container you can use EL expressions anywhere you could traditionally use a standard runtime expression <%= expr %>.
What server are you using? What JSP version?
The Struts-el tags were written so that you could use EL with struts in JSP1.2 containers.
The c_rt tags were written so you could use runtime expressions with JSTL tags in JSP1.2 containers. Their use was discouraged even then. Now I consider their use absolutely unnecessary.
Please read this thread: http://forum.java.sun.com/thread.jspa?threadID=629437&tstart=0
Cheers,
evnafets

Similar Messages

  • Metadata for namespace '/WEB-INF/tld/struts-bean.tld' is not loaded.

    What does this : "Metadata for namespace '/WEB-INF/tld/struts-bean.tld' is not loaded." mean? The message comes from a jsp and is displayed in the structure window.
    Anyone know how to restore the default layout to JDeveloper? Applications window has gone full screen width and I can not seem to get it bak to default Any ideas?
    Thanks
    Richard

    Metadata for namespace '/WEB-INF/tld/struts-bean.tld' is not loaded
    1. Add the struts.jar to the WEB-INF/lib directory.
    2. Add the struts-bean.tld to the WEB-INF directory.
    3. In the web.xml add
    <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    4. To the JSP add
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

  • Struts bean:message encoding help

    Hello, i am using Struts framework and have problems with resource files.
    I have two files for english and lithuanian.
    jsp file:
    <%@ page contentType="text/html; charset=Cp1257" pageEncoding="Cp1257"%>
    Developed by: <bean:message key="developer.name"/>
    So its echo bad string.
    Any ideas?

    I have had same problem but I have resolve it by both changing the encoding property of IDE(mine is NetBeans 3.6) to UTF-8 and
    put the line
    <%@page pageEncoding="UTF-8"  contentType="text/html; charset=UTF-8" %>on the top of jsp pages.
    But now I having some problems with formbean I hope I resolve it.
    You can follow it from here
    http://forum.java.sun.com/thread.jspa?threadID=698855

  • When trying to use App Store I get a message "could not sign in an unknown error has occurred." I reset our connection and turned off iPad. Any suggestions?

    When trying to use the App Store, I get a message "could not sign in, an unknown error has occurred,  any suggestions what is wrong?  I reset our Internet and turned off the iPad. 

    Sign out of your account, restart the iPad and then sign in again.
    Settings>iTunes & App Store>Apple ID. Tap your ID and sign out. Restart the iPad by holding down on the sleep button until the red slider appears and then slide to shut off. To power up hold the sleep button until the Apple logo appears and let go of the button.
    Go back to Settings>iTunes & App Store>Sign in and then try again.

  • When using home sharing sometimes getting a message computer not authorized.

    When using home sharing, sometimes getting a message that it's not an authorized computer.

    You need to authorise the computer you sync with your wife's Apple ID. Then you can copy the app from her itunes to your own by using home sharing
    Understanding home sharing
    Setting up Home Sharing
    You can then sync it to your iPod

  • I have an HP Deskjet D4200 series printer that ised with my iBook G4.  I would like to use it with my new MacBook Pro that I just purchased.  Is there anyway to do this?  When I try to install the driver using the CD, I get the message, "can not open the

    I have a HP Deskjet D4200 series printer that I used with my iBook G4 and I recently purchased a new MacBook Pro 13.5" and I would like to use this printer with my new lap top.  When I use the disc to try to install the printer driver, I get a message that "I can't open the application HP Installer because the Power PC applications are no longer supported.  I am not sure what all that means but is there any way to use this printer with my new computer?
    Thanks

    It would help to post this in a more proper form. This is for the iTunes family of stores.

  • Problem with display tags (not accepting inner tags)

    Hi guys ,
    I am using display tags which is fine but i had a problem with anchor tag and the jsp display tag.
    <display:column title="Row_Id" >
    ' target="-blank" onclick=""><c:out value="${row_rowNum}"/>
    </display:column>
    here i got the exception:
    The value of attribute "href" associated with an element type "a" must not contain the '<' character.
    here if jstl is not used then how to put my value in anchor tag
    please help me.

    Can you use EL directly:
    <a href="example.jsp?id=${row.id"/"></a>

  • bean:message/ tag is not working in tiles:insertAttribute/

    I have a bean:message tag inside my tiles:insertAttribute as shown below.
    <tiles:insertAttribute name='<bean:message="user.menu"/>'/>But <bean:message/> is not getting the value from resource bundle, my resource bundle is in correct place. If i hard code the value then it s working fine.
    How to make it work? Any help?

    sunish_jose wrote:
    <tiles:insertAttribute><bean:message="user.menu"/></tiles:insertAttribute>this way it s not working. Could you pls tell how solve it by using EL. I was not able to find a similar sample evenafter searching for some time.
    thanks in advance.I did say that I don't know if it will or not, I was just giving a sample of how it would work if the tag allowed the value for 'name' to be put in the body.
    I'm not very familiar with the Struts bean tags and in any case, I believe you should use the JSTL tags where ever possible. So you'd pick the <fmt:message> tag from there. I don't think the <bean:message> tag allows you to get the value in to a variable.
    <fmt:message var="tilesAttributeNameValue" key="user.menu" />
    //create an EL variable named tilesAttributeNameValue with the value from the resource bundle
    <tiles:insertAttribute name="${tilesAttributeNameValue}"></tiles:insertAttribute>
    //use EL to put the valueTake a look here [1] for a JSTL introduction:
    [1] http://www.ibm.com/developerworks/java/library/j-jstl0415/

  • Dynamic key in bean:message

    hi,
    i would like to use a <bean:message> in my page but with a dynamic key:
    <logic:iterate id="vSendMode" name="SvGetCommandRavelForm" property="recSendModeList">
    <bean:message key="sendMode.agence${vSendMode.idSmod} .modeead${vSendMode.idAgency}" />
    </logic:iterate>
    only it tells me that the key sendMode.agence${vSendMode.idSmod} .modeead${vSendMode.idAgency} doesn't exist. which is true but for example sendMode.agence0 .modeead0 exists...
    how can i do that ?
    thanks :-)

    Yes you can use runtime expressions with the bean:message tag.
    However your container has to recognise the ${expr} as a runtime expression.
    1 - You need a JSP2.0 container (eg Tomcat 5)
    2 - your web.xml file needs to declare itself as version 2.4
    ie:<?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
        version="2.4">
    ...If you just put ${vSendMod.idSmod} on the page does it print the appropriate value?
    If EL is working, then try this:
    <c:set var="myKey" value="sendMode.agence${vSendMode.idSmod} .modeead${vSendMode.idAgency}" />
    <bean:message key="${myKey}"/>
    If you only have a JSP1.2 container, take a look at the struts-el taglib, or use a <%= expr %> instead of EL.
    Cheers,
    evnafets

  • [svn:fx-4.x] 14570: Using method in AutomationManager to trace messages

    Revision: 14570
    Revision: 14570
    Author:   [email protected]
    Date:     2010-03-03 22:02:16 -0800 (Wed, 03 Mar 2010)
    Log Message:
    Using method in AutomationManager to trace messages
    QE notes: All trace messages in delegates that showed up while debugging should show class and method name in addition to actual message
    Doc notes:
    Bugs:
    Reviewer:
    Tests run: checkintests
    Is noteworthy for integration: No
    Modified Paths:
        flex/sdk/branches/4.x/frameworks/projects/automation/src/mx/automation/codec/AutomationOb jectPropertyCodec.as
        flex/sdk/branches/4.x/frameworks/projects/automation/src/mx/automation/codec/RendererProp ertyCodec.as
        flex/sdk/branches/4.x/frameworks/projects/automation/src/mx/automation/delegates/TextFiel dAutomationHelper.as
        flex/sdk/branches/4.x/frameworks/projects/automation/src/mx/automation/delegates/controls /SWFLoaderAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation/src/mx/automation/delegates/core/UIC omponentAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation/src/mx/automation/delegates/core/UIT extFieldAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation/src/mx/automation/tabularData/OLAPDa taGridTabularData.as
        flex/sdk/branches/4.x/frameworks/projects/automation_air/src/mx/automation/delegates/cont rols/FlexNativeMenuAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_dmv/src/mx/automation/delegates/adva ncedDataGrid/AdvancedDataGridAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/mx/automation/delegates/co re/UIFTETextFieldAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/supportClasses/SparkDropDownListBaseAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/delegates /components/supportClasses/SparkListBaseAutomationImpl.as
        flex/sdk/branches/4.x/frameworks/projects/automation_spark/src/spark/automation/tabularDa ta/SparkListBaseTabularData.as

    Thanks Balusc!!
    I have made use of your code to display PDF files in an IFRAME tag too!!! I just dint believe that this would be possible. Please just take a look at my JSP page.
    <h:form id="CaseLookUp">
         <%
         String path = request.getContextPath()+"";
         out.print(path);
         %>
    <iframe scrolling="auto" src="<%=path%>/imageServlet?file=D:\70-229 V5.pdf" width="80%" height="600" ></iframe>
         </h:form>

  • Does Oracle E-business suite R12 use bind variables?

    Hello,
    We have Oracle E-business suite R12 and database 10.2.0.3.
    I was just wondering does E-business suite R12 use bind variables?
    We have recently purchased Toad and Spotlight, in Spotlight we keep getting an alarm raised for Parse SQL requests (Library cache latches alert) When I've researched into this the recommendation is to try to improve the use of bind variables within your application.
    Please could someone help me answer this?
    Thank you
    Sarah

    Hi,
    I was just wondering does E-business suite R12 use bind variables? Yes it uses bind variables. You can trace a concurrent program and get the tkprof to check it.
    We have recently purchased Toad and Spotlight, in Spotlight we keep getting an alarm raised for Parse SQL requests (Library cache latches alert) When I've researched into this the recommendation is to try to improve the use of bind variables within your application.You can not make every conc. program or sql use bind variables. Some times it is not possible so.
    Thanks

  • SBWP: The content of message is not display

    Hi,
    The user use SBWP inbox. There the message is not display the content of the message.
    There I uninstalled and install again the SAP GUI and Windows, but there has been the same. Only the head of message is displayed.
    There can only print the content of message.
    What I have to do to display the content?
    Regards,
    Betta

    nyet wrote:
    Sir,
    When forwarding SMS as email, the content of the SMS is stored as an attachment called <primary_text.txt> file, it's double pain since the receiving person can not read the attachment via Z10 since the device can not open *.txt> file extension.
    If it's possible, please restore this functionality back to the way of OS 6/7, which put the content of the SMS in the body of email, since I do rely on this feature heavily.
    Leo 
    How exactly are you trying to forward an SMS as an email?
    You can forward the SMS to an email address of your choice and that`s when your SMS will be converted to MMS, and sent to the email address of your choice . The recepient should get your message as "[email protected] carrier.com   
    Another way of doing it is to select "Share" instead of forward. Then a list of options will open that includes your email address. Select your email address and the selected text message will be added as "body.txt" and after this, you just have to enter the recepient email address and subject line (optional).
    The recepient will receive the email with a "body.txt" attachment that can be downloaded and open in or with the "Notepad" on PC

  • Popup message is not showing from vbs file - SCCM 2012 Package

    Hi,
    I am deploying a package that needs the outlook should be closed prior to install. For that, we have included popup message in the vbs script(setup.vbs) file. When deploying the package via SCCM(using package deployment method), the popup message is not appearing
    but it is working when we run the script file manually. i have modified SCCM program setting but no luck.
    Could you advise what setting needs to be changed in SCCM Program & deployment?

    Running it with user rights might cause an issue with installing it, as the user might not have the appropriate permissions. You should be able to run it with administrative rights and select
    Allow users to interact with this program. That way the user should still be able to interact with the program messages.
    My Blog: http://www.petervanderwoude.nl/
    Follow me on twitter: pvanderwoude

  • IMessage in Mavericks "Your message has not been sent"

    After downloading Mavericks, i can use iMessage normaly.
    But ""your message could not be sent, click try again to send this message"
    this error message appears always, even if it works.
    Any solutions ? Thanks.

    Hi,
    The Apple ID on the iPhone has to be removed and not just trying to isolate it as a Send and Receive Address.
    The Pic also looks a little odd.
    If you read older info about the iChat App it refers to Chats  (AIM, Jabber, Bonjour and Yahoo) on the type of accounts that have Buddy lists.
    Whether you display Buddy List in Messages is optional.
    If you read info on iMessages (which is mostly iOS device based admittedly) the documents tend to take about Conversations.
    Whilst the alert is somewhat see though it only appears to have the Pink Panther pic (possibly a Top Cat character) behind it and I can't tell if it is sending an iMessage or not.
    8:12 pm      Thursday; July 17, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • TDP tag-switching - "tag not in FIB"

    Afternoon all,
    Some guidance would be appreciated. I am supporting a small EU MPLS network - 3 P routers linked by ATM PVCs to 17 PE routers. The P routers are the route reflectors and the IGP is OSPF - most routers 7206VXR/NPE300. IOS = 12.2(7). TDP being used.
    I have a customer requirement to break the traditional PE link to a P router directly by a PVC or FE if on same site.
    I have attempted to link 3 PE routers in a chain, hanging off another PE router (see diagram). Basically this would result in "Top-PE" linking the chain with the rest of the EU network. Connecting "Second-PE" directly to the P router is not an option sadly. All router tag-switching interfaces and loopbacks are part of OSPF area 0 and all loopbacks can be contacted perfectly. All routers VPNV4 peer with the 3 RRs. The chain of PEs in the yellow box are all tag-switching perfectly and VPNs are working perfectly - just not beyond "Second-PE". When I run "tag-switching ip" on "Top-PE", it does not create any forwarding tags to "Second-PE" as you can see below (tag not in FIB):
    top-PE# sh ip cef vrf XYZ 194.13.125.78
    194.13.125.64/28, version 13780
    0 packets, 0 bytes
    Flow: AS 0, mask 28
    tag information set
    local tag: VPN-route-head
    fast tag rewrite with
    Recursive rewrite via tag not in FIB , tags imposed {116}
    via 20.63.4.133, 0 dependencies, recursive
    next hop 20.63.38.114, Ethernet6/2.2706 via 20.63.4.133/32
    valid punt adjacency
    tag rewrite with
    Recursive rewrite via tag not in FIB , tags imposed {116}
    top-PE# sh tag-switching int
    Interface IP Tunnel Operational
    FastEthernet1/1 Yes No Yes ! to P router
    Ethernet6/2.2706 Yes No Yes ! to "Second-PE"
    "sh tag forwarding-table" does not show any tags for Interface Ethernet6/2.2706
    Everything works fine on "Second-PE" as follows:
    Second-PE# sh ip cef vrf XYZ 194.13.125.46
    194.13.125.32/28, version 318, epoch 0, cached adjacency 20.63.38.113
    0 packets, 0 bytes
    tag information set
    local tag: VPN-route-head
    fast tag rewrite with Fa0/1.2706, 20.63.38.113, tags imposed: {159 147}
    via 20.63.4.131, 0 dependencies, recursive
    next hop 20.63.38.113, FastEthernet0/1.2706 via 20.63.4.131/32
    valid cached adjacency
    tag rewrite with Fa0/1.2706, 20.63.38.113, tags imposed: {159 147}
    Q1) Can PE routers simply onward tag-switch packets that are not destined for them, just as P routers do.
    Q2) Can PE routers act as a P router and PE router at the same time - so have some interfaces running VRFs, and some tag-switching?
    Q3) If answers to above state this "should" work, is it likely to be an IOS bug? I can find nothing on CCO about "tag not in FIB"
    Q4) should the design (although not ideal in any way) shown in diagram work?
    Many thanks for any assistance anybody can provide,
    best regards
    Neil

    A1) yes.
    A2) yes.
    A3) "Recursive rewrite via tag not in FIB" means that there is no label in the fib for the loopback address of the egress PE (20.63.4.133).
    Could you please provide a "show ip route 20.63.4.133", "show ip cef 20.63.4.133" and "show mpls ldp bind 20.63.4.133 32" from the "top PE".
    A4) It should definitely work.
    Hope this helps,

Maybe you are looking for

  • Urgent  help in backup

    hai all i am using oracle 9.0.1.1.1 in windows, i have two tablespace & two datafile, tablespace name is Comm1,Comm2. each tablespace have ten tables. In comm1 tablespace one table name in employee_master. it have 100 rows. i have backup, after that

  • Can't see video of windows XP user

    i'm trying to video chat with a windows xp user (they are using AIM 5.9). I'm on an IMAC G5 using latest version of ichat. Windows user has turned off all firewalls. We can both send and accept video invitation. But i cannot see the video of my windo

  • Database error -2146824582

    Hello, I write you because I have a problem to communicate between my "Access" database and my program on labview 2012 after a relocation of my department (from Swiss to France) (excuse me for my english language!!!!! I hope that you're understand) I

  • CONVERTING DATE FORMAT

    HI FRNDS,        i have a problem with converting my DATE format from my flat file to the BW system the date in the flat files may be in these formats                         '12-jan-1992'                           '12/01/1992'                       

  • Error in Park doc WF

    Hi Friends, There is an error in workflow for posting Park document. when i have checked the error log then there is a message at Posting Step that Object does not exist. Does any one have any idea what can be the reasons for this? Regards Dev