Help writing javascript with c:out tag

Hi
I'm having trouble mixing javascript and jstl and could use some pointers!
I need to write a flash object tag on the fly using javascript, and to also use <c:out> to define the flashvars parameter.
So for example, at the top of my page I do something like this:
<c:set var="thispage" value="home" scope="request"/>
and then later, in javascript I have something like this:
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0','width','1017','height','712','id','index','align','middle','src','index', 'quality','high','bgcolor','#E9E8EB','name','index','allowscriptaccess','sameDomain', 'pluginspage', 'http://www.macromedia.com/go/getflashplayer', 'movie','index','flashVars','page=<c:out value=${\22thispage\22}/>' ); //end AC code
</script>
NOTE: the relevant part of this script is this area:
'flashVars','page=<c:out value=${\22thispage\22}/>'
The issue isn't the javascript; this all works fine and content is getting pulled into flash. The problem is that the content getting pulled in is literally "<c:out value..." blah blah..., not the variable that I had earlier assigned to it.
In another thread I read that I need to request the variable from the app/session scope, but I'm not 100% sure of how this all works out. I have tried several things and it's either my jstl or encoding issues that keep causing failures. Assistance for a noob is appreciated!

Certainly it is possible to do I18n with both struts and JSTL.
With struts bean:message tag, you need to declare the application properties file in your struts-config.xml
<message-resources null="false" parameter="com.locale.equipment"/>
What is your properties file called?
Where have you put it?

Similar Messages

  • EL expressions with c:out tags?

    Hi,
    If EL expressions are normally evaluated and displayed on a page, what is the purpose of enclosing them in <c:out> tags?
    Take the following snippet for example:
    <img src="<c:out value='${initParam.categoryImagePath}${category.name}.jpg'/>"The same snippet without the <c:out> tag produces the same output in a browser:
    <img src="${initParam.categoryImagePath}${category.name}.jpg"I understand that <c:out> also enables you to escape XML content, but if this isn't required, should the <c:out> tag be used? Are there any 'best practice' concerns involved?
    Many thanks for any replies!

    It is for historical reasons.
    The Expression Language EL was originally only available as part of the JSTL tags, ie you could only use it with a <c:out> tag or similar.
    That was JSTL1.0
    As of Servlet2.4/JSP2.0 (eg Tomcat 5) EL expressions became part of the JSP specification, and containers had to evaluate them as runtime expressions.
    That was one of the major changes with JSTL1.1
    By all means if the value doesn't have to be escaped for HTML purposes, then I would say use the expression without the tag.
    BTW your example leads to repetition. Maybe that should be made into a custom tag? <my:img image="${category.name}"/>
    cheers,
    evnafets

  • Help. I have a Google Hangout in 40mins and my sound seems to have vanished. I went to Sys Prefs and it came up with Digital Out....and the Internal Speakers option is no longer there. How do I reboot, or fix this please?

    help. I have a Google Hangout in 40mins and my sound seems to have vanished. I went to Sys Prefs and it came up with Digital Out....and the Internal Speakers option is no longer there. How do I reboot, or fix this please?

    There are many possible causes for this issue. Take each of the following steps that you haven't already tried. Some may not apply to your model. Back up all data before making any changes.
    1. Start with the steps recommended in this support article. Don't skip any of the steps. It's the starting point for further efforts to solve the problem.
    2. Make sure you have a fully up-to-date installation of OS X.
    3. If you've installed an application called "Memory Clean" or any other third-party software that is supposed to "clean" or "purge" memory automatically, remove it according to the developer's instructions and restart. You should do that even if the software is not causing the problem, because it's useless.
    4. Other third-party software that has been reported to interfere with sound output includes "Boom" and "Samsung Kies." If applicable, uninstall according to the developer's instructions (not by dragging something to the Trash.)
    5. If an AirPlay device is selected for sound output from iTunes (or from other applications via third-party software such as "Airfoil"), deselect it.
    6. Launch the application "Audio MIDI Setup" by entering the first few letters of its name in a Spotlight search and selecting it in the results (it should be at the top.) Select Built-in Output from the list on the left. If the Mute boxes are checked, uncheck them.
    7. If a red light is visible in the audio-out port when sound should be playing, the internal switch is stuck in the position for digital output. You may be able to free it by inserting and removing a mini-stereo jack of the proper size. If not, the machine needs to be serviced. Inserting any kind of tool in the port may cause damage that won't be covered by the warranty.
    If there's no red light, the switch may still be stuck in the headphone position. Try to free it the same way.
    8. Disconnect all wired peripherals except keyboard and mouse, if applicable. If more than one display is connected, disconnect all extra ones. Restart and test.
    9. If you have a MacBook Air, turn off Bluetooth and restart.
    10. Start up in safe mode. Don't log in; just restart as usual when the login screen appears. When you do, make sure the words "Safe Boot" do not appear in the login screen. If they do, the system is still in safe mode and sound won't work.
    11. Reset the NVRAM.
    12. Reset the SMC.
    13. Triple-click anywhere in the line below on this page to select it:
    /Library/Preferences/Audio
    Right-click or control-click the highlighted line and select
              Services ▹ Reveal in Finder (or just Reveal)
    from the contextual menu.* A folder should open with an item selected. Move the selected item to the Trash. You may be prompted for your administrator login password. Restart the computer and empty the Trash. Recreate your settings in the Sound preference pane.
    *If you don't see the contextual menu item, copy the selected text to the Clipboard by pressing the key combination  command-C. In the Finder, select
              Go ▹ Go to Folder...
    from the menu bar and paste into the box that opens by pressing command-V. You won't see what you pasted because a line break is included. Press return.
    14. Reinstall OS X after backing up all data.
    15. Make a "Genius" appointment at an Apple Store.

  • Help me!! How to use JavaScript with JSP ??

    I am using JDeveloper and I created a screen in JSP which uses a bean for database connectivity and retriving info onto the page.
    The page has a ListBox where list items are populated from the database.My requirement is
    whenever the list is changed the page shuold be refreshed with the selected item info.
    I tried to use 'JavaScript' for triggering the event with 'onChange' event of the ListBox.But the event is not getting invoked. I think JavaScript is not working with JSP.
    Please help me with how to Use javaScript with JSP or any other alternative where I can meet my requirement.
    I have one more question...I have gone through the JSP samples in OTN and I am trying do download the sample 'Travel servlet' which show list of countries...etc
    I have also gone through the 'readme' but I don't know how to extract .jar file.
    I would be great if you could help me in this.
    Thanks!!
    Geeta
    null

    We have a similar need. We have used Cold Fusion to display data from Our Oracle Database. We have a simple SElect Box in HTML populated with the oracle data. When someone selects say the State of Pennsylvania. then we have an On change event that runs a Javascript to go get all the cities in Pennsylvania.
    Proble we are having is that inorder for the Javascript to work , we currently have to send all the valid data.
    Do you know of any way to dynamically query the the Oracle database in Javascript

  • I've got a new MacBookair11 2weeks ago and I am very happy with it. Today I've tried to synchronize it via icloud with my ipad and I have lost the camera. Looking through help in internet I found out that I had to reset the SMC. I did exactly as per instr

    I’ve got a new MacBookair11 2weeks ago and I am very happy with it. Today I’ve tried to synchronize it via icloud with my ipad and I have lost the camera.
    Looking through help in internet I found out that I had to reset the SMC. I did exactly as per instructions given but with no luck.
    Is there any other solutions that will fix my camera for facetime and iphoto?
    Thanks for your help 

    MacBook Air (Mid 2013): FaceTime HD Camera might not work after OS X 10.8.5 update:
    "Apple is investigating this issue."

  • I have a dynamic table that calculates the sum of all rows, no issue.  I'm struggling with pulling out a subtotal though.  I would like to have a check box in each row  that flags those rows and gives the sum of their total.  Any help would be greatly app

    I have a dynamic table that calculates the sum of all rows, no issue.  I'm struggling with pulling out a subtotal though.  I would like to have a check box in each row  that flags those rows and gives the sum of their total.  Any help would be greatly appreciated.

    Here's something I threw together rq. The script is in the change event for the checkbox in the table. (Of course, you'll have to modify it to suit the names of your fields.)
    var rows = xfa.resolveNodes("tblAmounts.Row1[*]");
    var subtotal=0;
    for (i=0; i<rows.length; i++) if (rows.item(i).cbAdd.rawValue == 1) subtotal = subtotal + rows.item(i).nfAmount.rawValue;
    nfSubtotal.rawVlaue=subtotal;

  • Please, can I with help of Javascript change spot color values? for example by my color VARNISH with c:0,m:10,y:15,k:0 to make change to c:0,m:0,y:0,k:0? thank you

    Please, can I with help of Javascript change specific spot color values? for example, I have color named VARNISH with values c:0,m:10,y:15,k:0 and it would help me to make change to c:0,m:0,y:0,k:0 as a part of an action. Is it possible? Thank you

    Hi Kon Verter,
    you can change the values of your spot swatch, but you have to check many things before.
    e.g. you can do something like this:
    var Vcolor = app.activeDocument.swatches.getByName("Varnish");
    if (Vcolor.color.spot.colorType == ColorModel.SPOT && Vcolor.color.spot.spotKind == SpotColorKind.SPOTCMYK) {
        alert("Black value before: "+Vcolor.color.spot.color.black);
        Vcolor.color.spot.color.black= 0; // and so on
        alert("Black value after: "+Vcolor.color.spot.color.black);
    This will change the black value of the cmyk spot color with name Varnish to 0
    Have fun

  • Can anyone help with an out of memory error on CS2?

    Hello,
    I have been battling with an out of memory error on a dell laptop running 2gb of ram. I have had no prior issues with this laptop running CS2 until last week when I started getting the out of memory errors. I have seen several articles about this occuring on later versions of illustrator. Just prior to this issue appearing I had to delete and rebuild the main user profile on the computer due to it consistently logging into a temporary account.
    Once the new profile was established and all user documents and profile settings were transferred back into it, this problem started showing up. The error occurs when clicking on files listed as Illustrator files, and when opening the illustrator suite. Once I click on the out of memory error it still continues to load illustrator. The files are located on a server and not on the remote computer. I have tried to copy the files to the local hard drive with the same result when I try to open them. I also tried to change the extension to .pdf and got no further. I tried to open a file and recreate the work and all I got was the black outline of the fonts. none of the other artwork appeared. once rebuilt, when trying to save, It gives the out of memory error and does not save the file.
    Illustrator was installed on another dell laptop, same model, etc and works fine. no problem accessing network files. I just attempted to use Illustrator from the admin profile on the machine in question and it works fine and lightening fast. Just not from the new rebuilt profile. I have tried to uninstall and reinstall the software. it has not helped. could there be stray configuration settings that we transfered over to the new profile that should not have been?
    Any insights will be helpful.
    Thank You,
    Brad Yeutter

    Here are some steps that could help you:
    http://kb2.adobe.com/cps/320/320782.html
    http://kb2.adobe.com/cps/401/kb401053.html
    I hope this helps!

  • Please help me with the XML tag reading.

    I have an content.xml with thouthand <table:table-row /> tags.
    How can I read the attributes and values of the tag 150 for example?
    Should I read one tag after the other before I reach 150, or there is a shorter way?
    XML Structure of content.xml as example below.
    In this sample I want to get the row4 and its value D4. Of course I don't know what value have the fourth tag and can't search tag with a value D4. I just know that the Row4 contains the value I need.
    Is there any possibility to read the fourth tag, or I should read from the beginning and increase the counter. If the counter is 4, I should read the value. It seems to me not a good approach, because the files can contain thousands of tags and for each value to go throught the whole xml is resource-intensive.
    <table:table table:name="Sheet1" table:style-
    name="ta1" table:print="false">
    <table:table-column table:style-name="co1" table:
    number-columns-repeated="7" table:default-cell-
    style-name="Default"/>
    <table:table-row table:style-name="ro1">
    <table:table-cell office:value-type="string">
    <text:p>A1</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>B1</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>C1</text:p>
    </table:table-cell>
    <text:p>D1</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="3"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell office:value-type="string">
    <text:p>A2</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>B2</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>C2</text:p>
    </table:table-cell>
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>E2</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="2"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell office:value-type="string">
    <text:p>A3</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>B3</text:p>
    </table:table-cell>
    <table:table-cell office:value-type="string">
    <text:p>C3</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="4"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>B4</text:p>
    </table:table-cell>
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>D4</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="3"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>B5</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="2"/>
    <table:table-cell office:value-type="string">
    <text:p>E5</text:p>
    </table:table-cell>
    <table:table-cell table:number-columns-repeated="2"/>
    </table:table-row>
    <table:table-row table:style-name="ro1" table:number-rows-repeated="2">
    <table:table-cell table:number-columns-repeated="7"/>
    </table:table-row>
    <table:table-row table:style-name="ro1">
    <table:table-cell table:number-columns-repeated="4"/>
    <table:table-cell office:value-type="string">
    <text:p>E8</text:p>
    </table:table-cell>
    <table:table-cell/>
    <table:table-cell office:value-type="string">
    <text:p>G8</text:p>
    </table:table-cell>
    </table:table-row>
    </table:table>

    Thanks for the answer.
    And is there any possibility to get the tag with the value 5. I know that the fifth tag should contain the value I want, in this case 5. But there is an attribute, and if this attribute is not null, then some tags1 can be shifted so that the third tag1 have an attribute tags=2, so I know that there is no the fourth tag and I read the next tag as fifth (with XPath doc/tag[4]).
    Should I read all tags, or there is some other way with the XPath. To search for the first tag with attributes and if its position before the fifth tag, than to decrease the tag-position counter and so on.
    <doc>
    <tag1>1</tag1>
    <tag1>2</tag1>
    <tag1 tags=2>3</tag1>
    <tag1>5</tag1>
    <tag1>6</tag1>
    </doc>Thanks in advance.

  • Need help on usage of es:forEachInArray tag

    Hi,
    Iam working on content selector using <cm:contentSelector>.
    I could able to fire the rule defined in EBCC. The content
    retrieval is also happeniong as it is evident from the fact
    that the System.out.println(contentarray.length) is showing
    me the value of 13,which is also matching with the "preview"
    seen from EBCC.
    Can somebody help me in using the <forEachInArray > tag
    and how to output the different types of documents. The
    documnet given is not so clear.
    I have basically iamges contained in the array.Pls help
    me how to send to browser
    Thanks in advance,
    Prashanth Bhat.

    Hi,
    The code seems to work well . But at certain times we get the following error related to my code as shown above.
    ORA-29283: invalid file operation
    ORA-06512: at "SYS.UTL_FILE", line 475
    ORA-29283: invalid file operation
    ORA-06512: at line 10This error occurs occassionally and on opening a new connection for oracle in TOAD and on executing the abvoe code I cannot see this error again.
    Regards,
    Vinesh

  • How to include javascript resources in  Facelet tag library

    I've been trying out Duncans watermark behavior tag (https://blogs.oracle.com/groundside/entry/placeholder_watermarks_with_adf_11). Indeed a great article and the example work perfectly when the tag library is included within the project and when the javascript resource (common.js) file is added to the document using af:resource tag.
    I would like to create a deployable tag library, including a setWatermarkBehavior tag, for reuse in various apps. I'm able to create and deploy the tag library as a ADF library and include it for use in an application. But on runtime, the pages are not able to find the "addWatermarkBehavior" method, which I hoped automatically got loaded from the javascript file defined in the tag library jar. In the tag library file, I've added a "adf-js-features.xml" in META-INF. This file and the .js file is included in the ADF library jar. "adf-js-features.xml" looks like this:
    <adf-js-features xmlns="http://xmlns.oracle.com/adf/faces/feature">
    <features xmlns="http://xmlns.oracle.com/adf/faces/feature">
    <feature>
    <feature-name>adfExtTaglib</feature-name>
    <feature-class>com/cgi/adf/ext/taglib/js/adfExtTaglib.js</feature-class>
    </feature>
    </features>
    </adf-js-features>
    I'm not sure, what value should be used for "feature-name" - I've tried many different "meaningful" names. I presume, that the ADF framework, should automatically discover all "adf-js-features" files and automatically load js-file on pages, which are using tags from the particular tag library. But apparently I'm missing something. In the facelets page used for testing, I have these few components.
    <f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:adfext="http://xmlns.cgi.com/adf/ext">
    <af:document title="testAdfExtTaglib" id="d1">
    <!-- af:resource type="javascript" source="/resources/js/common.js" / -->
    <af:form id="f1">
    <af:inputText label="Label 1" id="it1">
    <adfext:setWatermarkBehavior value="CHR-Nr"/>
    </af:inputText>
    </af:form>
    </af:document>
    </f:view>
    Doing some debugging, I can confirm that the "getScript" method of the setWatermarkBehavior class is called. I can also find the javascript produced by the "getScript" method in the DOM. But I cannot find anywhere in the DOM, where the javascript file from the tag library is loaded.
    Please, help me out?
    Edited by: wmjaboj on 2012-09-23 23:58

    The Javascript source URI has the value "RES_NOT_FOUND".
    If I try to access it using ".../faces/javax.faces.resource/javascript.js?ln=js" I get a blank page (contains a Html and Body only).
    If I try to access it using ".../faces/resources/js/javascript.js" I can download the javascript file from the taglib.
    If I manually copy the javascript.js file from the taglib into the enclosing project and save it in "resource/js", then the javascript source URI is resolved correctly to ".../faces/javax.faces.resource/javascript.js?ln=js" and I can downloaded it, but then it is the local copy and not the one from the taglib jar.
    Do I need some specific configuration in web.xml or other deployment descriptors, to be able to use "javax.faces.resource"?
    The only configurations whoch smells like "javax.faces.resource" is this context param: javax.faces.FACELETS_RESOURCE_RESOLVER=oracle.adfinternal.view.faces.facelets.rich.AdfFaceletsResourceResolver
    In web.xml various "resource" servlets is defined (I'm not sure whether I need them, JDeveloper has created them automatically):
    a) resources = org.apache.myfaces.trinidad.webapp.ResourceServlet, maps to: /adf/*, /afr/*, /bi/*
    b) adflibResources = oracle.adf.library.webapp.ResourceServlet, maps to: /adflib/*
    I appreciate your help.

  • Need help writing host program using LabView.

    Need help writing host program using LabView.
    Hello,
    I'm designing a HID device, and I want to write a host program using National Instrument's LabView. NI doesn't have any software support for USB, so I'm trying to write a few C dll files and link them to Call Library Functions. NI has some documentation on how to do this, but it's not exactly easy reading.
    I've written a few C console programs (running Win 2K) using the PC host software example for a HID device from John Hyde's book "USB by design", and they run ok. From Hyde's example program, I've written a few functions that use a few API functions each. This makes the main program more streamlined. The functions are; GetHIDPath, OpenHID, GetHIDInfo, Writ
    eHID, ReadHIC, and CloseHID. As I mentioned, my main program runs well with these functions.
    My strategy is to make dll files from these functions and load them into LabView Call Library Functions. However, I'm having a number of subtle problems in trying to do this. The big problem I'm having now are build errors when I try to build to a dll.
    I'm writing this post for a few reasons. First, I'm wondering if there are any LabView programmers who have already written USB HID host programs, and if they could give me some advice. Or, I would be grateful if a LabView or Visual C programmer could help me work out the programming problems that I'm having with my current program. If I get this LabView program working I would be happy to share it. I'm also wondering if there might already be any USB IHD LabView that I could download.
    Any help would be appreciated.
    Regards, George
    George Dorian
    Sutter Instruments
    51 Digital DR.
    Novato, CA 94949
    USA
    [email protected]
    m
    (415) 883-0128
    FAX (415) 883-0572

    George may not answer you.  He hasn't been online here for almost eight years.
    Jim
    You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice

  • I can load an Applet .class file with an OBJECT tag...

    How can I load a .jar file? I foolishly believed I could replace "myclass.class" with "myjar.jar" in the <PARAM> tag associated with an <OBJECT> tag, and if I had created my manifest file correctly, the Main-Class in my .jar would have its init() method called upon IE load of the web-page. But alas, it is not that simple.
    Is there an incantation of the <OBJECT> tag that is appropriate for .jar files?
    Thanks in advance for any help you can provide in this area.

    Please ignore the duplication. My browser burped, and I can't seem to figure out how to delete a thread.
    See answer posted in other thread.

  • How to Create User Defined Template in Back Office with Labels and Tags App

    Hello,
    Can anyone help me in creating a user defined template in Back Office with Labels and Tags Application. I'm currently using version 13.2.?
    Kindly help me out asap.
    Thanks,
    Monica.

    Hi Monica
    Third party software is available,from AccessVia, that can be used to create and update templates. Sample sample sqt can help you to understand the required inputs (batchID, templateID, departmentID, locale).
    Thanks
    Himanshu

  • How to insert javascript with in a servlet

    Please send the code to insert javascript with in a servlet

    hi,
    You have write u r java script code in Servlet with teh following steps
    1.Use out.println("<html> .....</html>")
    in between the above html code u write ur <script language="javascript"> etc
    write your javascript code in the above <sript tah function.
    Hope this helps
    -Srini

Maybe you are looking for

  • Passing request table to Jco function

    Hello Experts,   We have one requirement where we need to pass the table data from the BLS to SAP Jco Function Module call.  For example we are reading the material numbers from the oracle database and then we need to pass these material numbers to S

  • Flickr / 500px / Facebook etc. Upload not working

    I know this has been discussed before, but it's such a silly thing that it needs to be brought up until Apple fixes the problem. By now I am using three different browsers because of the shortcomings of Safari/iOS. Now it looks like I have to buy iCa

  • Client Payment Overdue: Take Site Down?

    Greetings, I have consolidated billing turned on. One of my clients is overdue on his annual BC payment. Unfortunately, this was automatically charged to me.  Since he is taking his sweet time paying up, I need to put the squeeze on.  What is the bes

  • I'm new to Mac - syncing old iPhone issue

    Hi. I have just bought a new iMac and tried to sync my 18month old 3G iPhone to it. iTunes is telling me its going to replace all my apps with the ones on the computer, which is none (I have a load on the phone). Does this mean i will lose all the ap

  • Problem with the Credit Card to Pay the Fee of Adobe CC

    Hi! I'm paying the Adobe CC plan for about 5 or 6 months, but the last month i have a trouble with the Credit Card and the auto payment of the Adobe CC was not completed. I have now restored the Credit Card and when i wanted to update the credit card