How can we share  setting Header between two servlets-Urgent

Hi ,
I have setting one Header on my 1st servlet and but I need to access same header on my 2nd servlet. Please tell me how can I solve this issues?
Regards,
Pattanaik

Sorry, misread the first time.
As long as you don't write to the body of the response in the first servlet, you should be able to write to the header in the second. So is your problem that both servlets try to write to the body of the response?
Edited by: paulcw on Nov 12, 2007 9:07 PM

Similar Messages

  • How can I share Pin variable between two packages?

    Hi every one,
    Is there any one who knows how can I share Pin variable that it is defined with OwnerPin between two packages in java card( with eclipse 3.1),I studied Sharing Interface subject and I knows it teorical but I can not do it practical .
    I can share primitive data type but I can not share Ownerpin.
    If anybody has some sample codes or knows any link ,please inform me.
    My code is same as below:
    //In Server Side
    package ginaPack;
    import javacard.framework.*;
    public class GinaApplet extends Applet implements GinaInterface{
    OwnerPIN pin;
    private GinaApplet (byte[] bArray,short bOffset,byte bLength) {
        pin =new OwnerPIN(PIN_TRY_LIMIT,MAX_PIN_SIZE);
              byte PinTemp[] = new byte[4];
              PinTemp[0] = (byte) 0x31;
              PinTemp[1] = (byte) 0x31;
              PinTemp[2] = (byte) 0x31;
              PinTemp[3] = (byte) 0x31;
              pin.update(PinTemp, (short) (0), (byte) PinTemp.length);       
        public Shareable getShareableInterfaceObject(AID clientAID,byte parameter)
              return  this;
        public OwnerPIN getPinShareable()
             return pin;         
         public void process(APDU apdu)
                      //there are some codes in this here
    }//Interface in Server side
    public interface GinaInterface extends Shareable
          public OwnerPIN getPinShareable();
    }//In Client side
    import ginaPack.*;
    public class UserCardApplet extends Applet {
    private UserCardApplet(byte[] bArray, short bOffset, byte bLength) {
         //there are some codes in this here
    public boolean select() {
              final byte[] Gina_AID={(byte)0x47,(byte)0x69,(byte)0x6e,(byte)0x61,(byte)0x41,(byte)0x70,(byte)0x70,(byte)0x6c,(byte)0x65,(byte)0x74};
              AID GinaAID = JCSystem.lookupAID( Gina_AID, ( short )0,( byte )Gina_AID.length );
              if ( GinaAID == null ) // probably not loaded on card
                        ISOException.throwIt( ISO7816.SW_FUNC_NOT_SUPPORTED );//6a 80
              GinaInterface ff = (GinaInterface) JCSystem.getAppletShareableInterfaceObject(GinaAID,(byte)0);
              if( ff == null )
                   ISOException.throwIt((short)0x0903);
    if ( ff.getPinShareable().getTriesRemaining()== 0 ) return false;
    }My problem is in this line :
    "if ( ff.getPinShareable().getTriesRemaining()== 0 ) return false; "when I select my applet this line throw an exception, ff.getPinshareable includes all of OwnerPin methods(such as getTriesRemaining ,check ,reset, update ,...)but all of them throw exception .
    I think firewal does not allow other packages uses this methods .If my guess is right then what should I do for sharing the variables that they are defined with non primitive data type such as (OwnerPin,Signature,...)
    I'd appriciated for any help.
    yours sincerely,
    Orchid.
    Message was edited by:
    NewOrchid

    Applet 1:
    package com.package1;
    import javacard.framework.*;
    public class Applet1 extends Applet {
        private static final byte tryLimit  = (byte)3;
        private static byte[] pinBytes = {(byte)1, (byte)7, (byte)4, (byte)5, (byte)2};
        private Library1 lib;
        protected Applet1(byte bArray[], short bOffset, byte bLength) throws PINException {
            lib= new Library1(tryLimit, (byte)pinBytes.length);
            lib.update(pinBytes, (short)0, (byte)pinBytes.length);
            register();
        public static void install(byte[] bArray, short bOffset, byte bLength) {
            new Applet1(bArray, bOffset, bLength);
        public void process(APDU apdu) {
            byte status=(byte)0;
            lib.resetAndUnblock();
            if (!(lib instanceof Shareable)) status += (byte)2;
            if (!(lib instanceof MyPIN)) status += (byte)4;
            ISOException.throwIt(Util.makeShort((byte)0x90, status)); // sw indicates tries remaining
        public Shareable getShareableInterfaceObject(AID cltAID, byte parm) {
            return lib;
    }Library1:
    package com.package1;
    import javacard.framework.OwnerPIN;
    import javacard.framework.PINException;
    public class Library1 extends OwnerPIN implements Interface1{
        public Library1(byte tryLimit, byte maxPINSize) throws PINException {
            super(tryLimit, maxPINSize);
    }Interface1:
    package com.package1;
    import javacard.framework.PIN;
    import javacard.framework.Shareable;
    public interface Interface1 extends Shareable {
        boolean check(byte[] pin, short offset, byte length);
        byte getTriesRemaining();
        boolean isValidated();
        void reset();
    }Applet2:
    package com.package2;
    import javacard.framework.*;
    import com.package1;
    public class Applet2 extends Applet {
        private final static byte CLA_TEST = (byte)0x80;  
        private final static byte INS_TEST = (byte)0x20;
        private final static byte P1_AUTHORIZE = (byte)0x00;
        private final static byte P1_DOIT = (byte)0x01;
        private final static byte P1_CHECK_SIO = (byte)0x0a;
        private Interface1 sio;
        protected Applet2(byte bArray[], short bOffset, byte bLength) {
            register();
        public static void install(byte[] bArray, short bOffset, byte bLength) {
            new Applet2(bArray, bOffset, bLength);
        public void process(APDU apdu) {
         byte[] buffer = apdu.getBuffer();
            if ((buffer[ISO7816.OFFSET_CLA] == CLA_TEST) ||
                (buffer[ISO7816.OFFSET_CLA] == ISO7816.CLA_ISO7816)) {
                short bytesReceived = apdu.setIncomingAndReceive();
                switch (buffer[ISO7816.OFFSET_INS]) {
                case ISO7816.INS_SELECT:
                    if (!JCSystem.getAID().equals(buffer, ISO7816.OFFSET_CDATA, buffer[ISO7816.OFFSET_LC]))
                        ISOException.throwIt(ISO7816.SW_APPLET_SELECT_FAILED);
                    sio = (Library1)JCSystem.getAppletShareableInterfaceObject(JCSystem.lookupAID(<fill in parameters>);
                    if (sio == null)
                        ISOException.throwIt(ISO7816.SW_CONDITIONS_NOT_SATISFIED);            
                    break;
                case INS_TEST:
                    switch (buffer[ISO7816.OFFSET_P1]) {
                    case P1_AUTHORIZE:
                        if (!sio.isValidated()) {
                            if(!sio.check(buffer, ISO7816.OFFSET_CDATA, buffer[ISO7816.OFFSET_LC]))
                                ISOException.throwIt(Util.makeShort((byte)0x9A, sio.getTriesRemaining()));
                        break;
                    case P1_DOIT:
                        if (!sio.isValidated())
                            ISOException.throwIt(ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED);
                        sio.reset();
                        ISOException.throwIt(Util.makeShort((byte)0x9A, sio.getTriesRemaining()));                
                        break;
                    default:
                        ISOException.throwIt(ISO7816.SW_INCORRECT_P1P2);                   
                    break;
                default:
                    ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
            else {
                ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
    }1. Upload package1
    2. Install Applet1
    3. Select Applet1
    4. Upload package2
    5. Install Applet2
    6. Select Applet2

  • TS4001 How can I share Safari bookmarks between two iCloud accounts using IOS 7 and Mavericks?

    Before iOS 7 and Mavericks, we were able to share Safari bookmarks between all of our devices.  My wife had the primary iCloud account which was setup to share bookmarks, contacts, calendars and reminders.  A secondary iCloud account was setup on my phone for only my email.  Each phone had our private email accounts segregated and we shared all the bookmarks, contacts, calendars and reminders.  When I saved a bookmark on my phone, I could see it later on our iMac or iPad.  Now only my wife can sync bookmarks between her phone and the iMac or iPad.  This *****!!  This worked beautifully before we upgraded to the latest versions of OS & iOS.  Is there a work around or a new way to set things up?  I don't want to be stuck reading Safari on my phone when I have a 24" iMac sitting in the living room.  I don't want to see all of my wife's email on my phone either.  Do we need three iCloud accounts now?  One main for sharing and two separate accounts for only email?  Need help!  Any suggestions would be appreciated, thanks.

    David,
    Thanks for the reply.  That's how I set it up originally.  Although the new iOS 7 update lost some functionality.  I found the following on the TUAW website.  The Safari Bookmarks and Find My Phone options have been removed from the secondary iCloud accounts options.  This is the problem.  Everything worked great before we updated.  I guess "new way" consolidates the iCloud accounts better with Maverick?  Now I will have extra documents on my phone that I don't need.  We will both have to share the same iCloud storage and backup space too.  Have to try it out and see how it works. Thanks.
    http://www.tuaw.com/2013/09/19/how-to-use-multiple-apple-ids-in-ios-7/

  • How can I share a folder between two users on the same mac?

    Hi all,
    I would like to share a folder between multiple users on the same macbook without having to transfer the folder to the Public/Shared folder.
    Is there not a way, using the the folders shared permissions, to allow shared folders from one user to be visible and usable by another user on the same mac without having to move the folder to a designated shared location?
    Regards,
    Caleb

    jrwood116 wrote:
    Thanks, but do you have to do that every time you share a folder?
    No, you just need to do it once and that's it. Anything that is in the Shared folder is accessible by all user accounts within the same Mac.
    jrwood116 wrote:
    I've read numerous 'how to share a folder' blogs and they just say it's as simple as clicking 'share' and allowing specific users to access it...none have mentioned this (not saying your advice is wrong at all, just don't get why no-one else has mentioned what appears to be a key step!)
    Can you give me an example of such a blog. I suspect you may have mis-understood what they were saying but if you can provide a link, I'll look at it.

  • How can I share a folder between two users on the same iMac?

    I have an iMac with 2 user accounts and I want to share a folder between them. I have gone on to system preferences>sharing and turned on file sharing. I have also got the 'Get Info' thing up, selected 'Shared Folder' and added the other user to the read and write permissions...it just doesn't show up on the other desktop (the folder is on my desktop, I would have expected to see it on the other desktop...?)
    Any ideas?

    jrwood116 wrote:
    Thanks, but do you have to do that every time you share a folder?
    No, you just need to do it once and that's it. Anything that is in the Shared folder is accessible by all user accounts within the same Mac.
    jrwood116 wrote:
    I've read numerous 'how to share a folder' blogs and they just say it's as simple as clicking 'share' and allowing specific users to access it...none have mentioned this (not saying your advice is wrong at all, just don't get why no-one else has mentioned what appears to be a key step!)
    Can you give me an example of such a blog. I suspect you may have mis-understood what they were saying but if you can provide a link, I'll look at it.

  • How can I share address lists between two iCloud users

    My daughter and I have two different icloud accounts.  We are able to share certain calendars, but I would like also to share address lists/groups.  Is there a way to do this?  I think you could "subscribe" to another Mobile Me user, but how is this done in ICloud?

    I do understand that if we have the same Icloud account and Apple ID then they will sync automatically.  We don't.  I have just separated our accounts (on purpose).  Via icloud we can share calendars, but I want to share address lists too.  Can address lists be shared (or subscribed to) by two different icloud users with two different Apple IDs? 
    Anybody know?

  • How can i share purchased apps between 2 diff users on the same mac?

    How can I share purchased apps between 2 diff users on the same mac?

    A purchased app is associated with an Apple ID. A user with a different Apple ID cannot use the app unless they also use the same Apple ID.
    I cannot use my wife's apps nor she mine because each were purchased with different Apple IDs.

  • How can I chose setting syn between IPad

    How can I chose setting syn between IPad & IPhone with ITunes for application and songs ........etc ( ie.. set IPad & IPhone as defult not ITunes )

    Cabdirisaq wrote:
    I can't find setting and App Store...
    Check in All Folders and on All Pages/Screens...
      If no joy...
    Settings > General > Reset > Reset Home Screen.

  • HT4539 How can I share my downloads between my two computers

    How can I share my I tune down loads between my two I pads?

    iTunes content can only be shared to an iPad or iPhone. (iOS based devices only).

  • Can I share an Ipod between two User accounts

    Trying to share one Ipod between two accounts ! but dont seem to be able to download from different accounts onto Ipod, outside of Ipod original account !!

    Other users on the machine should already be able to see the apps assuming they're not installed in a specific users ~/applications folder.
    Are they not visible?
    If the app is in the ~/applications folder you might want to try moving it to the /applications folder.

  • How can we share e-books between 2 accounts?

    My husband and I both have Kobo accounts, Adobe DE accounts and 2 separate e-book readers (both Aluretek Libre's).
    How can we share books?
    cm

    One of you will have to buy the book first (and put on reader, I assume).  According to what Kobo Customer Care told me, with Adobe Digital Editions open that person then goes on the site the book was bought from, signs in, goes on purchase history and clicks on the book.  Hit Download epub or pdf, choose Open for Windows or Save for Mac, Adobe will show the book.  make sure you are in library view, plug the reader in and authorize the device.  Drag and drop the book into the reader icon that shows up under the Bookshelf items.  It should copy the file.  When done, eject using the safely remove mass storage device option.  After unplugging, it will process the new content.  I haven't done it yet, I just received the instructions.

  • How can I share files/libraries between users?

    I have tried to enable file sharing between me and my hubby. I would like to share iTunes and iPhoto libraries but cannot. I don't want to have the same photos & CDs replicated just so we can have two different logins.
    How can I do this?

    Hi, Loker. Welcome to the Discussions.
    Mac OS X and other UNIX®-based systems, in general, are not set up to easily share data between users. A fundamental idea behind UNIX security is each user's data is theirs and theirs alone, and a user must take steps to share data on their accounts with other users, either on that computer or over a network. This is why, in Mac OS X, the Users > Shared folder exists: all users have Read & Write access to such, providing a "commons" for easily sharing documents between users on the same Mac. The Public folders in each account are extant for a similar reason.
    Simply changing the access privileges on the folders of a given user may provide access to the files within those folders, but does not change the access privileges on the individual files within such: you may be able to see the files, but not use them. This depends on the application. Additionally, applications often expect to find their specific content in a specific location, usually one owned by the user who created the content.
    ITunes and iPhoto have generally been designed as single-user applications. Despite Mac OS X being a multi-user operating system, Apple did not initially consider the idea of a "family" computer where a family would all share and update common music or photo libraries.
    Some of these issues have been addressed, albeit IMO somewhat inadequately, by adding content-sharing functions to recent versions of iTunes and iPhoto. This was primarily for sharing content over a local network, but these methods also work between users on the same Mac. You can find relevant information by searching the Help for iTunes and iPhoto. In iTunes, select Help > iTunes Help. In iPhoto, select Help > iPhoto Help.
    The downside of these approaches are the requirements they place on the account sharing its music or photos. Specifically, that account must be:
    1. Logged in, and...
    2. The specific application -- iTunes, iPhoto -- must be running to share its content.
    These functions also place limitations on what you can do with shared content, delineated in the "About" documents you will find in the Help related to sharing.
    More sophisticated methods for sharing iTunes music, iPhoto photos, iMovie projects, and other application-specific files between users on the same Mac are generallly found in magazine articles or by searching the Web. A good site to search is Mac OS X Hints. You can also search or post on the iTunes Discussion, iPhoto Discussion, etc. for additional ideas.
    Two useful magazine articles in praticular:
    • The June 2006 issue of MacWorld also had some suggestions on iPhoto sharing that could also be applied to iTunes. That article is currently online: see "One iPhoto, many users."
    • The article "Share Files and Apps with Multiple Users" by Fong and Willams in the August 2004 issue of MacAddict discussed techniques that generally involve the use of the Shared folder and UNIX symbolic links. You can order back issues of MacAddict by contacting their customer service office.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X

  • How do I share iTunes music between two user accounts?

    We have two (admin) user accounts on our iMac. My husband has downloaded tons of music from CDs to his iTunes library. How can I get some of his music to my iTunes library without having to re-download from CDs? If anyone can give me simple instructions it would be appreciated.
    Thanks Jeanette.

    Look at this article: iTunes: How to share music between different accounts on a single computer, http://support.apple.com/kb/HT1203

  • How do i share iPhoto library between two user accounts

    I need to share my iphoto pictures between two accounts on the same computer

    For iPhoto 09 (version 8.0.2) and later:
    What you mean by 'share'.
    If you want the other user to be able to see the pics, but not add to, change or alter your library, then enable Sharing in your iPhoto (Preferences -> Sharing), leave iPhoto running and use Fast User Switching to open the other account. In that account, enable 'Look For Shared Libraries'. Your Library will appear in the other source pane.
    Any user can drag a pic from the Shared Library to their own in the iPhoto Window.
    Remember iPhoto must be running in both accounts for this to work.
    If you want the other user to have the same access to the library as you: to be able to add, edit, organise, keyword etc.
    Quit iPhoto in both accounts. Move the Library to the Users / Shared Folder
    (You can also use an external HD set to ignore permissions, a Disk Image or even partition your Hard Disk.)
    In each account in turn: Double click on the Library to open it. (You may be asked to repair the Library Permissions.) From that point on, this will be the default library location. Both accounts will have full access to the library, in fact, both accounts will 'own' it.
    However, there is a catch with this system and it is a significant one. iPhoto is not a multi-user app., it does not have the code to negotiate two users simultaneously writing to the database, and trying will cause db corruption. So only one user at a time, and back up, back up back up.

  • How do I share iPhoto libraries between two Macs?

    Hi! I would ideally like to have one iPhoto library to share between two different Mac laptops. Is there some way I can set it up so that the same library can be shared, edited, and updated? Or if not, is there a way I can see the other Mac's iPhoto library? Both computers share the same Wifi and both using Mountain Lion OS (but I can upgrade if that would help).
    Thanks!

    The only way to do what you want is to put the Library on an external disk formatted Mac OS Extended (Journaled). Then connect - a wired usb/firewire/thunderbird  connection - the drive to each machine as required.
    What you're describing is a media server. They start at the $200 mark.

Maybe you are looking for

  • Can not get CF7 to Communicate with DB2 v9.1

    Installed on a windows server I have DB2 UDB Enterprise edition 9.01, all the fix packs are current. I also loaded ColdFusion MX7.02 Enterprise edition on the same server. I had to download the latest JDBC Drivers from Adobe. I let db2 create the DSN

  • How do I save a numbers spreadsheet on my iPad as a template?

    I have created a Spreadsheet on my iPad for staff to record time and materials on site an I would like to save it as a template so they can open a new copy of it each time and not change the original spreadsheet. Also I would like to be able to lock

  • White dots on Samsung TV

    I to am having whie dot problems. Just a month ago our 65" tv would keep cutting itself on and off. I called Samsung. Our TV was bought in 2007 so I was told it was out of warranty. I was told that a serviceman would contact me. He called the cost up

  • Project Resource Management

    Given all of the Oracle Project solutions out there (EBS, Primavera, Fusion, PeopleSoft), which of these is the best choice for a company that would like to do resource allocation, forecasting, etc? (taking Oracle's longterm vision in this area into

  • Obligatory transport target for business system BS_DEV in SLD

    Hi all,    We are moving receiver detrmination from QA to PRD, there we are getting one error "com.sap.aii.ibtransportclient.XiTransportException: caused by: ClientServerException exception:Impo >>>rt failed because of business system transfer of obj