Where to put keys(Struts)?

If I can't use resource files like ApplicationResources.properties and I need to set two keys:
button.add=Add Record
button.delete=Delete Record
Can this be done in some other file, like in the JSP page or struts-config.xml?
/Matt

You could always make a constant calss that contains those string values....
public final static String BUTTON_ADD =  "Add";
public final static String BUTTON_CANCEL =  "Cancel";

Similar Messages

  • Architecture question...where to put the code

    Newbie here, so please be gentle and explicit (no detail is
    too much to give or insulting to me).
    I'm hoping one of you architecture/design gurus can help me
    with this. I am trying to use good principals of design and not
    have code scattered all over the place and also use OO as much as
    possible. Therefore I would appreciate very much some advice on
    best practices/good design for the following situation.
    On my main timeline I have a frame where I instantiate all my
    objects. These objects refer to movieClips and textFields etc. that
    are on a content frame on that timeline. I have all the
    instantiation code in a function called initialize() which I call
    from the content frame. All this works just fine. One of the
    objects on the content frame is a movieClip which I allow the user
    to go forward and backward in using some navigation controls.
    Again, the object that manages all that is instantiated on the main
    timeline in the initialize() function and works fine too. So here's
    my question. I would like to add some interactive objects on some
    of the frames of the movieClip I allow the user to navigate forward
    and backward in (lets call it NavClip) . For example on frame 1 I
    might have a button, on frame 2 and 3 nothing, on frame 4 maybe a
    clip I allow the user to drag around etc. So I thought I would add
    a layer to NavClip where I will have key frames and put the various
    interactive assets on the appropriate key frames. So now I don't
    know where to put the code that instantiates these objects (i.e.
    the objects that know how to deal with the events and such for each
    of these interactive assets). I tried putting the code on my main
    timeline, but realized that I can't address the interactive assets
    until the NavClip is on the frame that holds the particular asset.
    I'm trying not to sprinkle code all over the place, so what do I
    do? I thought I might be able to address the assets by just
    providing a name for the asset and not a reference to the asset
    itself, and then address the asset that way (i.e.
    NavClip["interactive_mc"] instead of NavClip.interactive_mc), but
    then I thought that's not good since I think there is no type
    checking when you use the NavClip["interactive_mc"] form.
    I hope I'm not being too dim a bulb on this and have missed
    something really obvious. Thanks in advance to anyone who can help
    me use a best practice.

    1. First of all, the code should be:
    var myDraggable:Draggable=new Draggable(myClip_mc);
    myDraggable.initDrag();
    Where initDrag() is defined in the Draggable class. When you
    start coding functions on the timeline... that's asking for
    problems.
    >>Do I wind up with another object each time this
    function is called
    Well, no, but. That would totally depend on the code in the
    (Draggable) class. Let's say you would have a private static var
    counter (private static, so a class property instead of an instance
    property) and you would increment that counter using a
    setInterval(). The second time you enter the frame and create a new
    Draggable object... the counter starts at the last value of the
    'old' object. So, you don't get another object with your function
    literal but you still end up with a faulty program. And the same
    goes for listener objects that are not removed, tweens that are
    running and so on.
    The destroy() method in a custom class (=object, I can't
    stress that enough...) needs to do the cleanup, removing anything
    you don't need anymore.
    2. if myDraggable != undefined
    You shouldn't be using that, period. If you don't need the
    asset anymore, delete it using the destroy() method. Again, if you
    want to make sure only one instance of a custom object is alive,
    use the Singleton design pattern. To elaborate on inheritance:
    define the Draggable class (class Draggable extends MovieClip) and
    connect it to the myClip_mc using the linkage identifier in the
    library). In the Draggable class you can define a function unOnLoad
    (an event fired when myClip_mc is removed using
    myClip_mc.removeMovieClip()...) and do the cleanup there.
    3. A destroy() method performs a cleanup of any assets we
    don't need anymore to make sure we don't end up with all kinds of
    stuff hanging around in the memory. When you extend the MovieClip
    Class you can (additionally) use the onUnLoad event. And with the
    code you posted, no it wouldn't delete the myClip_mc unless you
    program it to do so.

  • Put Key order

    Hello eveyone,
    I've sucessfully changed the KMAC, KENC & KEK keys through GPshell, but there is something i do not understand when it constructs the APDU.
    *[1]* Using GPshell, and changing only the KMAC key it changes all three keys (I just wanted to change KMAC) I was unable to find in the GP specification, nor in GP Key Management System
    documents why this happens.
    The command used is:
    #put_sc_key -keyver 4 -newkeyver 5 -mac_key 414142434445464748494A4B4C4D4E4E
    The execution of this command is:
    CLA ins          P1(Kver)          P2(Kid)          LC
    80      D8          04               81     43
    N.V. number
    05
    Ktype     Kle          New Key                                                            L.CValue     K.V
    80          10          EF BE E6 C6 D9 9D 7B 70 BD E9 D7 E9 27 F0 20 AF      03               8B AF 47
    80          10          B3 CD A7 9E AF DA 24 14 CC 32 1B 9C 7A 91 16 CE      03               8B AF 47     
    80          10          EF BE E6 C6 D9 9D 7B 70 BD E9 D7 E9 27 F0 20 AF      03               8B AF 47
    As can be seen, it sets an unknown (DES+CBC) key on the first and third place, and in the second the actual KMAC.
    *[2]* When setting in GPshell only "-enc_key"
    It changes the two first keys and sets the third key to an unknown (DES+CBC) key.
    80 D8 06 81 43 07
    8010 B3CDA79EAFDA2414C81268ADFF4D471903AE7589
    8010 B3CDA79EAFDA2414C81268ADFF4D471903AE7589
    8010 EFBEE6C6D99D7B70BDE9D7E927F020AF038BAF47
    00
    *[3]* Finally, the same operation in GPshell with only "-kek_key" it changes all three keys to the same value.
    80 D8 07 81 43 08
    8010 F4A8CAA63DD4F371AA0A1E5903EE51FB03AE7589
    8010 F4A8CAA63DD4F371AA0A1E5903EE51FB03AE7589
    8010 F4A8CAA63DD4F37190D37089B5FB024903AE7589
    00
    Someone knows where this behavior is explained in detail? it doesn't make sense to me.
    Thanks,

    This is most likely an issue with the GPShell code. The GP card spec says you can specify a key version and key ID in the PUT KEY command. As a workaround you can try to set the other two keys to the current value.
    - Shane

  • Put Key Command Fail.(CLA=0x84)

    Hello.
    I have a problem to transmit Put Key Command.
    I followed 'GP2.1.1 E4.4' to create a C-Mac using S-Mac Key but the result is failed.
    I think there is something wrong in my calculating...
    So, could you explain me how to create C-Mac of Put key Command ?
    ---------my log.------------
    *Base Key
    DES-ECB/
    404142434445464748494a4b4c4d4e4f
    1/2/DES-ECB/
    404142434445464748494a4b4c4d4e4f
    1/3/DES-ECB/
    404142434445464748494a4b4c4d4e4f
    *New Key
    DES-ECB/
    404142434445464748494a4b4c4d4e4f
    2/2/DES-ECB/
    404142434445464748494a4b4c4d4e4f
    2/3/DES-ECB/
    404142434445464748494a4b4c4d4e4f
    => 80 50 00 00 08 FD3FC82EB5403371
    <= 611C
    => 00 C0 00 00 1C
    <= 00001104000012A9089A0102002B6C04D3C7DDE8F5569C833019DDCE9000
    => 84 82 01 00 10 DDE15E5AE73CA146CC15FC59AC11787A
    <= 9000
    => 84 D8 01 81 4B 0180101F2DE4D6C8509DFF2F8AC23D8370A6A6038BAF4780101F2DE4D6C8509DFF2F8AC23D8370A6A6038BAF4780101F2DE4D6C8509DFF2F8AC23D8370A6A6038BAF479F353241203729B0
    <= 6982
    ---sample log(success)----
    cm> set-key 1/1/
    DES-ECB/
    404142434445464748494a4b4c4d4e4f
    1/2/DES-ECB/
    404142434445464748494a4b4c4d4e4f
    1/3/DES-ECB/
    404142434445464748494a4b4c4d4e4f
    cm> init-update 1
    => 80 50 01 00 08 D3 B3 00 7C 8B D1 5E 41
    <= 00 00 70 15 00 05 94 91 11 07 01 02 00 01 6C 7F FC 11 3F B9 A9 76 C3 F9 AA 34 9D 46
    cm> ext-auth mac
    => 84 82 01 00 10 951724B48FD378858B1ED7
    D1 C5 2D 7E 45
    <= 90 00 ..
    Status: No Error
    cm> set-key 2/1/
    DES-ECB/
    ffeeddccbbaa99887766554433221100
    2/2/DES-ECB/
    ffeeddccbbaa99887766554433221100
    2/3/DES-ECB/
    ffeeddccbbaa99887766554433221100
    cm> put-keyset
    => 84 D8 00 81 4B 02 80 10 AE 25 9D AE 8A 7F 23 37 7F CF AD 42 5C B8 C3 EC 03 F3 9C 09 80 10 AE 25 9D AE 8A 7F 23 37 7F CF AD 42 5C B8 C3 EC 03 F3 9C 09 80 10 AE 25 9D AE 8A 7F 23 37 7F CF AD 42 5C B8 C3 EC 03 F3 9C 09 69 54 47 5D 25 8A AA 36
    <= 02 F3 9C 09 F3 9C 09 F3 9C 09 90 00
    Status: No Error
    Edited by: 970753 on 2012. 11. 12 오전 3:13

    Here is my log.
    Session IV: 0000000000000000
    Session IV: e2d6f67e500c6b68I put all session IV equal "0000000000000000", but yours are every different. Where are they coming from?
    KeySet
    ENC : 404142434445464748494A4B4C4D4E4F
    MAC : 404142434445464748494A4B4C4D4E4F
    DEK : 404142434445464748494A4B4C4D4E4F
    Session Keys
    S-ENC : A2268F71917EFE0F33CC6166E1154E27
    S-MAC : 7A227D376A9DBE23AB50B7DCB45B2093
    S-DEK : F39FCFB2383B09578723B8C2E03B2729
    New KeySet
    ENC : 404142434445464748494A4B4C4D4E4F
    MAC : 404142434445464748494A4B4C4D4E4F
    DEK : 404142434445464748494A4B4C4D4E4F
    Encrypted Keys = ECB_TDES(S-DEK, NewKEY)
    ENC : 6CCC3D43CFC2CDE6CEABC760468B7EFF
    MAC : 6CCC3D43CFC2CDE6CEABC760468B7EFF
    DEK : 6CCC3D43CFC2CDE6CEABC760468B7EFF
    => 80 50 00 00 08 3A2A0051F957624F
    <= 611C
    => 00 C0 00 00 1C
    <= 00001104000012A9089A0102000710AF44C6064E6B91632B302205699000
    Session IV: 0000000000000000
    => 84 82 01 00 10 9C4DA4D81C5AB9E2A19A614FB880BFE0
    <= 9000
    Session IV: 0000000000000000
    => 84 D8 01 81 4B 0180106CCC3D43CFC2CDE6CEABC760468B7EFF038BAF4780106CCC3D43CFC2CDE6CEABC760468B7EFF038BAF4780106CCC3D43CFC2CDE6CEABC760468B7EFF038BAF47AB4BFB2D4F634E9C
    <= 6982
    Session IV: 0000000000000000
    => 84 CA 00 CF 08 2BD04A1545B7CC72
    <= 6985

  • Put-Key Command Fails with 6982

    Hi,
    I am using a JCOP 2.4.1 R3 card. And i am trying to send PUT-KEY command through APDU. But i get 6982 as a response from the card.
    Initial Key: 404142434445464748494A4B4C4D4E4F
    New Key: 101112131415161718191A1B1C1D1E1F
    IV: 0000000000000000
    ENCSessionKey - 3DES_CBC("0182" + "0000" + "000000000000000000000000") with inital Key
    macSessionKey - 3DES_CBC("0101" + "0000" + "000000000000000000000000") with inital Key
    IV: 0000000000000000
    encrypted Key  - 3DES_CBC(new key) with ENCSessionKey
    KeyCheckValue - 3DES_CBC("0000000000000000") with new key
    PutKey APDU = "80D8008143 + 01 + 8010 + 730CD82CAC6724E7CF9CA4E822934B7F + 03 + 3E1CFE + 8010 + 730CD82CAC6724E7CF9CA4E822934B7F + 03 + 3E1CFE + 8010 + 730CD82CAC6724E7CF9CA4E822934B7F + 03 + 3E1CFE"
    Response from card : 6982
    Can someone tell me where i am going wrong? And what i am missing to do?

    Hi,
    I found the issue. I was using 3DES_CBC instead of using 3DES_ECB_NoPadding.

  • Hello there, am new here and very stressed, i have an Imac core i3 which is logging off itself after a few seconds of login, it goes back to the login menu where i put the password. I have tried to repair the os but my pioneer rom is not reading the disk.

    Hello there, am new here and very stressed, i have an Imac core i3 which is logging off itself after a few seconds of login, it goes back to the login menu where i put the password. I have tried to repair the os but my pioneer rom is not reading the disk. I press the :c" button on startup but its not picking up the disk in the rom, i have tried to put the disk in an external rom but same answer, am starting to think that my os disk is bad. Please help me.

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of this exercise is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login. Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
    Be sure your Mac is shut down.
    Press the power button.
    Immediately after you hear the startup tone, hold the Shift key. The Shift key should be held as soon as possible after the startup tone, but not before the tone.
    Release the Shift key when you see the gray Apple icon and the progress indicator (looks like a spinning gear).
    *Note: If FileVault is enabled under Mac OS X 10.7 or later, or if a firmware password is set, you can’t boot in safe mode.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem(s)?
    After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • Put Key Command APDU log

    Hi everyone
    I'll appreciate it if anyone could send me an APDU Log of a correct PUT KEY Command. Specially if its a log from gpshell commands.
    Best Regards
    Shilan

    Here is my log.
    Session IV: 0000000000000000
    Session IV: e2d6f67e500c6b68I put all session IV equal "0000000000000000", but yours are every different. Where are they coming from?
    KeySet
    ENC : 404142434445464748494A4B4C4D4E4F
    MAC : 404142434445464748494A4B4C4D4E4F
    DEK : 404142434445464748494A4B4C4D4E4F
    Session Keys
    S-ENC : A2268F71917EFE0F33CC6166E1154E27
    S-MAC : 7A227D376A9DBE23AB50B7DCB45B2093
    S-DEK : F39FCFB2383B09578723B8C2E03B2729
    New KeySet
    ENC : 404142434445464748494A4B4C4D4E4F
    MAC : 404142434445464748494A4B4C4D4E4F
    DEK : 404142434445464748494A4B4C4D4E4F
    Encrypted Keys = ECB_TDES(S-DEK, NewKEY)
    ENC : 6CCC3D43CFC2CDE6CEABC760468B7EFF
    MAC : 6CCC3D43CFC2CDE6CEABC760468B7EFF
    DEK : 6CCC3D43CFC2CDE6CEABC760468B7EFF
    => 80 50 00 00 08 3A2A0051F957624F
    <= 611C
    => 00 C0 00 00 1C
    <= 00001104000012A9089A0102000710AF44C6064E6B91632B302205699000
    Session IV: 0000000000000000
    => 84 82 01 00 10 9C4DA4D81C5AB9E2A19A614FB880BFE0
    <= 9000
    Session IV: 0000000000000000
    => 84 D8 01 81 4B 0180106CCC3D43CFC2CDE6CEABC760468B7EFF038BAF4780106CCC3D43CFC2CDE6CEABC760468B7EFF038BAF4780106CCC3D43CFC2CDE6CEABC760468B7EFF038BAF47AB4BFB2D4F634E9C
    <= 6982
    Session IV: 0000000000000000
    => 84 CA 00 CF 08 2BD04A1545B7CC72
    <= 6985

  • Edit location where iphone4 puts uploaded mobileme video

    I have a lot of photos and videos on my mobileme gallery already, and in various folders. How do I tell my iphone 4 where to put the video that I just shot when I select upload to mobileme? It's currently defaulting to a folder that I don't really want it to go to, but I don't know where to find a place that I can tell it to upload elsewhere. Help...

    The last 2 queries are getting optional data out of the DB.  The user is not required to fill out those fields but if they do, I want to get that data.
    I have designed it this way following the instruction of the book "head first php and my SQL" by Head First Labs.  It said that you should minimize duplicate data in a table as much as possible to keep them small.  Instead put the data in a separate table and reference it with a key.  Your tables should only describe one specific thing, so thats what I did.  I have them linked with foreign keys and primary keys.
    In my case each user can have a vehicle saved for them, maybe 2 or 3.  for each vehicle they have the option of listing a car audio setup for that vehicle.  Now when they change their setup and update it on the site, a new setup entry is made.  That way the old pics/video of their old setup are still correct and all new pics will be correct as well.     So essentially each vehicle can have maybe 5. 10 setups linked to it.   Hence the separate table for video data, vehicle and setup.  make sense?
    As for the joins, I was kind of confused on how to do it correctly with my particular queries. And since the 2nd and 3rd queries dont always need to be executed, i thought if i left it as 3 it might save some execution time as only 1 short query needs to be executed.
    what is your opinion on the matter?
    and what do you mean by procedural language? like if/else?

  • Where i Put my swing application jar file in jboss

    Hi experts...
    I develope swing application and convert it into jar file....I know jnlp deployment using tomcat..In tomcat i
    put my appcation.jar in webapps/root folder...This is not similar in jboss..I dont know where i put my applcation.jar in jboss.If any body know the idea please let me know..

    Hi
    You have to put your jar file in
    server/default/deploy
    Regards
    M Fazal Ur Rehman

  • I changed my iPhone lately but i can't restore my last backup since it keeps saying "itunes could not restore backup because the password was incorrect" but I don't know where to put the password to make it happen... Any suggestions?

    Hey guys,
    I just bought a new iPhone but i can't restore my backup files beacuse it keeps saying "itunes could not restore backup because the password was incorrect" but I really don't know where to put the password to restore it. I really have some files that are meaningful for me so I really need help. Any suggestions anyone?

    Select your iDevice in the iTunes.
    Choose the Summary screen (tab) and scroll to the bottom of the screen.
    Then un-select Encrypt iPhone backup.
    iTunes will then prompt you to “Enter the password to unlock your iPhone backup”, enter the password you set originally.

  • My computer screen keeps going blank and then going back to the box where I put my password in to start my comp. Why is this happening?

    My computer (Macbook) was working fine this am. I left it for an hour and then came back and the screen was black (always does that as the screensaver hardly ever works). I moved the mouse to wake it up and everything was normal. I went to adjust the volume and the screen went blank and the main page with the box where I put my password in when I first start my comp appeared. I put my password in and everything was normal again. I opened a window in Safari and before it loaded completely the same thing happened, the screen went blank and went back to the password box. Does anyone know why this is happening? I don't have an external hard drive or any blank flash drives so I can't back anything up right now and am afraid I'm going to lose everything. Thank you

    Sounds like hardware failure, called boot loop. Call Apple and or go on apple.com and make Genius Bar appointment to have your iphone reviewed by a Tech. Provided you iphone shows no physical or liquid damage they will take care of you, or if you have Apple Care Plus
    Genius Bar Rerservation :  http://www.apple.com/retail/geniusbar/

  • I am trying to organize a zip file with a bunch of links and files. But when I drag an image file to a folder, it always "Snaps to grid" instead of just landing where I put it.

    I am trying to organize a zip file with a bunch of links and files. But when I drag an image file to a folder, it always "Snaps to grid" instead of just landing where I put it. All of the files are going into the same zip file but I want them visually in the space that I put them and not at the bottom of the snap to grid folder location they are looking like.  I am trying to  drag and drop files in groups so that I can group them for now, but image files always do their own "sort by" when I drag them from my web pages. Links don't do it though.  I tried resetting the folder, and deleting the DS files. No luck.

    You keep asking variants on this same question. You've had replies in all your other threads. If you can't find them, go here and click where it says Activity:
    Thomas Cannon Jr.

  • Where to put javascript code?

    Hello,
    I am trying to set some columns in a list as "read-only" and is using the following code:
    <script type=”text/javascript”>
    function SetReadOnly()
    var elements=document.getElementById(’4_ctl00_ctl00_TextField’);
    elements.readOnly=true;
    _spBodyOnLoadFunctionNames.push(“SetReadOnly()”);
    </script>
    But I am not sure where to put the code in. Should I put it in the space in Content Editor Web Part,
    or through a link to a txt file, or in "Edit HTML"? I've tried them but none works.
    Thanks a lot!
    Patrick

    You can try this:
    1) Open your Sharepoint List. Go to List edit view.
    2) On right side of Ribbon you will find "Form Web Parts" option as shown in figure.
    3) Choose your List form which you want to edit.
    4) Now you can add web part in new window.
    5) Add Content Editor Web part.
    6) In content editor web part add the path of your "txt" file in which you have written your script, for eg.
    <!DOCTYPE html>
    <html>
    <body>
    <script type=”text/javascript”>
    function SetReadOnly()
    var elements=document.getElementById('4_ctl00_ctl00_TextField');
    elements.readOnly=true;
    _spBodyOnLoadFunctionNames.push("SetReadOnly()");
    </script>
    </body>
    </html>
    I haven't tried this method so I am not sure but hope it works...:D
    ***If my post is answer for your query please mark as answer***
    ***If my answer is helpful please vote***

  • This is less a question and more of a suggestion and I am not sure where to put it..... I would like an update that would allow you to have a tone for each individual email account

    I am not sure where to put this but I would like individual tones for all my email accounts

    Wonderful suggestion.
    You can give Apple feedback here > http://www.apple.com/feedback/
    Hop that helps

  • Why are many of my toolbar bookmarks suddenly missing, & why can't I designate where to put bookmarks now? Star won't accept double-clicks anymore.

    All of a sudden yesterday I can no longer click the star twice to tell it where to put the bookmark, and even when I click it once it doesn't save the bookmark anywhere. Also many of my toolbar bookmarks are now suddenly missing. I've tried to restore bookmarks and it says it's unable to perform that function. Help!

    You can check for problems with the <b>places.sqlite</b> database file in the Firefox profile folder.
    *http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    *https://support.mozilla.org/kb/Bookmarks+not+saved#w_fix-the-bookmarks-file
    *Places Maintenance: https://addons.mozilla.org/firefox/addon/places-maintenance/

Maybe you are looking for

  • HP Officejet 100 Mobile Printer - L411a

    Hi, i just bought the printer HP Officejet 100 Mobile Printer - L411a I need it to be able to print riget from me Iphone 5 with supported app to print now i'm going to use it on my van on work. yesterday i try to connect it via bluetooth bet it not s

  • Where i see the detailed log of cache referesh error????????

    in sxi_cache when i do full refresh...i get error in cache refresh.... where can i see the detailed log of that error

  • Re: How do I turn off the auto keypad lock ?

    Hi,i just got zis phone nokia asha 300.i really need to remove zis auto key lot.its just a headache.i want to use the key lock manually.please help

  • Unable to calculate DEPRECIATION

    Hi All, I am Doing CAPEX Planning for one of the client.. In Cape I am Calculating The Depreciation based on simple formula Depreciation=StdCapex/Life.. My LOgic is.. *XDIM_MEMBERSET RptCurrency=LC *XDIM_MEMBERSET CAPACCOUNT=StdCapex,Life,Depreciatio

  • How to save alv report

    Hi, I want to allow the user to save the alv report. I could not enable to save button in my report. I could save only layout..not the result of the report. my code is data:is_variant type disvariant.   CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'     EXPO