Simple Encryption and Simple Question

Anyway, I hope it is simple!
This is from an example in my text book, I have coded it up and it works great. I think I understand everything except for the subtraction of 'A' in the encryptMessage method. Any ideas? I thought it may be subtracting the ASCII value of 'A', but isn't that just 1?
Any help is appreciated.
public class CeasarCryptography
     public static final int ALPHASIZE = 26; //Standard English alphabet size, ALL uppercase
     public static char[] alpha = {'A','C','B','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
     protected char[] encryptionKey = new char[ALPHASIZE];
     protected char[] decryptionKey = new char[ALPHASIZE];
     public CeasarCryptography()
               //Initializes encryptionArray
               for (int x = 0; x < encryptionKey.length; x++)
                         encryptionKey[x] = alpha[ (x + 3) % ALPHASIZE ]; //Rotate alphabet by three places
               //Initializes encryptionArray and decryptionArray
               for (int x = 0; x < decryptionKey.length; x++)
                         decryptionKey[encryptionKey[x] - 'A'] = alpha[x]; //Decypt is revers of encrypt
     public String encryptMessage(String secret)
               char[] mess = secret.toCharArray(); //First, place the string in an array
               for (int x = 0; x < mess.length; x++)
                         if (Character.isUpperCase(mess[x]))
                                   mess[x] = encryptionKey[mess[x] - 'A'];
               return new String(mess);
     public String decryptMessage(String secret)
               char[] mess = secret.toCharArray();
               for (int x = 0; x < mess.length; x++)
                         if (Character.isUpperCase(mess[x]))
                                   mess[x] = decryptionKey[mess[x] - 'A'];
               return new String(mess);
     public static void main(String[] args)
               CeasarCryptography cipherObject = new CeasarCryptography();
               System.out.println("Welcome to the oldest known enryption program.");
               System.out.println("\tEncryption Key: " + new String(cipherObject.encryptionKey));
               System.out.println("\tDecryption Key: " + new String(cipherObject.decryptionKey));               
               String testString = "JAVA IS NOT EASY";
               System.out.println("\nEncrypt the following: " + testString);
               System.out.println("\tOnce encrypted: " + cipherObject.decryptMessage(testString));
}

If the value of 'A' is not important, how is 'D' -
'A' 3? Because D is 3 later than A. So whether 'A' is -123 or 0 or 1 or 65, 'A' + 3 is always 'D'.
Or is this D (which is the 4th letter) minus A
(which is the 1st letter) for 4-1 = 3. Right. It's just that in ASCII, 'A' is 65, instead of 1 or 0 that we usually think of it. The whole minus 'A' part is just to say "how far away from A are we, and therfore how much are we shifting?"
And 3 is the
element in the Array that D is in?I was winging it here but that's what it comes down to. Whether it's an index into an array where 'A' is in 0, 'B' is in '1', etc., or just an on-the-fly shifting, either way, "minus 'A'" ultimately means "How far away from A is this letter?"

Similar Messages

  • Simple question involving data signing and encryption

    What is exactly mean by signing and encrypting data?
    And how would it apply to the case of a web browser..where I have to sign and encrypt data to and from a web browser? In this case it is an output and input stream.
    Does every byte have to be signed or just the starting bytes? Singing every byte would make the process slow and inefficient

    I know if you you sign and encrypt the data to the
    web browser, it will obviously not be recognized but
    this is my scenario:Your ASCII art didn't come across at all, I'm afraid - I'm not sure what you were going for, but I can't seem to recreate it. I think I can follow the explanation, though.
    P is the program i am developing. It is supposed to
    encrypt and sign data to and from the web browser.
    P1 get the web browser request, encrypts the data
    a and is supposed to sign the data...send it
    to P2 which decrypts and verifies the signing which
    then forwards it to the proxy or the server as seen.
    Vice versa from the server response.So you're working on a web-proxy that encrypts it's transmissions, and you want to add signature verification as well.
    My question still remains...how do you sign a stream?I answered your question, actually. You don't sign "streams" - you sign "messages". In your case, you sign the entire transmission, and then you transmit it.
    Right now I am using RSA keys to send a symmetric key
    across safely for the decryption etc I have the
    encryption/decryption process covered and the browser
    works..but i didn't do signing of any sort...how to
    implement this..for every byte? Is signing necessary?Given your requirements, I have to ask - why are you re-creating SSL? If you have P1 and P2 talk SSL to each other, you get everything you've described here, including signing. I don't understand why you feel the need to recreate an existing protocol.
    Grant

  • Current Year and current month?simple question

    How can i get four Digit current Year and two digit current month. So if is march it should get me as 03 and the Year as 2002. Please do help me, is a simple question isn't it ?. Thanks for your earliest response.
    Thank you.

    i have a directory structre of the format
    REPTS2000209/E200209-98000001
    in which 2002 is current YEAR
    09 is current month
    and 9800001 is the code i would submit(list box) from a form
    so what i need is a program that can generate the above path and open that particular PDF file
    so basically E200209-98000001.pdf is the PDF file.
    i am submitting it from JSP page. PLEASE HELP ME how can i program.

  • This might be a simple question.   On those sites that do not differentiate between models when on the internet I.e. Facebook when after your comment and you cannot hit "enter" on an iPad for examp. And speed is slow to connect.  What is = to post?

    This might be a simple question. On those sites that do not differentiate between CRT, laptop, tablet etc. such as an iPad Mini and using the Facebook site fir example when going to post a comment and you do not have a enter button on the IPad and the speed is slow how do you get your comments to post if we do not have a enter button? 
    <Email Edited By Host>

    I don't have facebook so I cannot answer but for your personal security, I have asked the hosts to remove your e-mail address.   It is very unwise to publish this.

  • Simple question about telnet and characters

    Hi all,
    We've installed for the first time a SUN machine. So i think it's for a SUN expert a very simple question.
    Normally when i type a special character it will be dispayed like " � " [alt+132]
    But when i use a telnet session and i type "alt+132" i get a "d" and not "�".
    Does someone know where i must start to find out how this works ?
    Thanks you very much.
    ESP

    This is probably related to the locale your server is in. I don't remember the default locale a box is installed in if you don't specify. I think its "C". I use the UTF-8 or en_US.ISO8859-1 locales at home. At work, usually C but sometimes applications may require UTF-8. BEA Weblogic required this for a project a while back. This is defined in /etc/init/tz.

  • Simple question about flex and AS 3.0

    Hi, this might sound like a simple question so I apologize...
    I have both a copy of flex 2 and 3, and i want to simply code in AS
    3.0 not mxml. I referred to the help of both flex 2 and 3, and all
    i could come up with is "you can add dynamic behavior to your
    documents using actionscript", which means to me, you only write
    your functions in AS and create instances with mxml (...ugh).
    personally, i find mxml to be ugly (mainly because it looks like
    html to me), and i'd rather not use it. coming from programming in
    an IDE in Java, it seems like it would be nicer to have something
    similar, all the while having the power and cool features of flash.
    I'm not fully educated in this matter so i understand that i could
    be totally wrong.
    i mean, if i have to code in mxml, i will. i'm a web
    programmer for a living, and if a more experience programmer said
    something like "if you don't code mxml in flex, you'll never get a
    job coding in flex", i would trust the advice, and learn the ugly
    code. :)
    yes, i do have Flash cs3, it's great but it seems like a pain
    to me the way you organize classes.... i've only seen a few
    tutorials, ones that explain how you cannot simply import a custom
    class, you have tell your movie to link to it, put it in the same
    directory, or manually name the package, it's sort of confusing.
    my main point here is that i'm very eager to start building
    apps in straight AS 3.0 instead of using flash cs3 (for some
    projects), and it would be cool to get some help or be pointed in
    the right direction.
    to simplify:
    can i write AS 3.0 and only as 3.0 in flex 2 or 3? how? can
    you link me to a tutorial? any advise?
    thanks!

    Hey William, thanks for the post. It's a great coincidence
    because I'm reading that book as well. I'm about half way through
    it, and I love it. I installed mxmlc on my linux box and am writing
    pure AS 3 apps. I think that's the way to go, though I know it's
    not for everybody.
    My problem with mxml is that it has a weird syntax for
    function calls, and it's not as 'intuitive' for a person like me,
    who came from C++ and Java programming in the past. I like writing
    programs in the C++ and Java style syntax, and since so many other
    languages use a similar syntax, I don't see any reason to learn the
    nuances of mxml, unless I was getting paid to do it. As far as I
    can tell there is no benefit.
    I hate using Flash to write flash apps as well, I feel like
    they become messy and confusing, especially when trying to write an
    OOP application. I only use it if I want to move an object in a
    very specific way and can't do it with the Tween methods.

  • Simple question about mount and delay script

    Hello, I have a simple question about mounting volumes on start up.
    My computer wakes up auto - and then auto there are serveral applescript tasks (mount and start up programs)
    I use this script (daily) for serveral connections with external volumes I always need the connect to. ( In the script I use this code 3 times for other locations) I do this on start up.
    set Uname to "XXX"
    set Pword to "XXX"
    set someVolume to "afp://XXX.XXX.XXX.XXX/XXX/XXX
    mount volume someVolume as user name Uname with password Pword
    (same code for 2 other locations)
    When i do this on start up sometimes the script says there is no connection possible. I guess it's because on start up the connection isn't there. And 1 minute later when computer is total ready the connection is ok. When I run the script then It works. Just sometimes ( In the morning) 'It' want to connect but the script stops. When i do it manually(I run the script again) it works just fine.
    Is it possible that I need a delay? Can someone explain this?
    How would I make a delay handler for this script? Is that the best solution?
    Thanks in advance. This is something small i'm wondering about.
    Colin

    BTW, If you saved the script as an application +(and not as an application bundle)+ you could drop the script on to *Drop Script Backgrounder* (freeware).
    Then the script would run in the background, so, you wouldn't see it running in the Finder.
    <http://www.macupdate.com/info.php/id/7922/drop-script-backgrounder-x>
    Tom

  • Probably incredibly simple question, so sorry. I have just changed e-mail after many many years and I want to e-mail everyone in my mac mail client with the new e-mail address at the same time.

    Probably incredibly simple question, so sorry. I have just changed e-mail after many many years and I want to e-mail everyone in my mac mail client with the new e-mail address at the same time.

    If you are using Address Book, open it, create a new Group, select all you contacts by click the top one while holding down the shift key and then select the last one. Drag the contacts to the group, then send an e-mail to the group.

  • Audigy 4 and Reciever/Amp simple question

    Hi all,
    Despite inundating myself with what is probably TOO much information from the knowledge base and forum, I could really do with an answer to what is essentially a pretty simple question....
    I recently got an Audigy 4 sound card and external io hub. Lovely bit of kit. Very nice. I only really use it to watch the odd dvd and listen to music with WMP9.
    I have a Sony multi-channel receiver/amp with 5. speakers attached.
    The amp has multiple digital connections - all either optical or co-axial. (and individual 5. analogue too)
    These currently accept optical links from my dvd player and xbox. Lovely.
    So, I would prefer to use the digital connections (nice and easy cable approach as with xbox) but I think I'll only get 2 channels when I play dvd... So what is the best way to connect the two....
    Thanks
    Glen

    The thing about that kind of digital connection is that involves compressing 5. channels into the space of 2, using proprietary encodings. This makes sense in terms of storage space savings (i.e. more room on that DVD for special features), or if bandwidth is constrained (i.e. broadcast TV can fit 5. into the space originally designed for stereo), but the only way it makes any kind of sense for getting audio a few feet from the soundcard to a receiver or speaker system is because nothing more direct ends up being available. The result is that your xbox needs a high-powered chip to make something very (and unnecessarily) complex seem simple. Your Audigy does not have that; it does not have the ability to make that kind of 5. audio for your receiver to then decode.
    Your Audigy does, in fact, have the ability to output 5. digitally, in the digital space that 6 full-range channels need, using a single cable; but your receiver, like virtually all of such, doesn't accept it. CL digital speaker systems have a "Digital DIN" input which uses it, but your receiver does not have a "Digital DIN" input, nor any equivalent of that. Even if it did, there's still a problem, because it's muted for DVD-Audio's higher-resolution formats, purely as an effort to prevent consumers access to high-resolution digital audio signals that are not encoded, for copy-protection reasons.
    Because DVD 5. soundtracks are pre-encoded on the DVD, you don't need the Audigy to be able to encode. All that is needed is to get the soundtrack from the DVD to your receiver as is. The Audigy can do that. As the other post indicates, the keys are to tell the DVD player software to output digital, and to tell the Audigy not to decode.
    Under the covers, that actually uses the Audigy as a 2-channel soundcard, and the rest of its channels are "wasted." None of its real multichannel capabilities can actually be used with a "digital" connection like that. However, if all you do is watch DVD's and listen to stereo audio files, especially if your receiver has features to simulate full surround from stereo, you may not care.
    Personally, my strong preference is for the multichannel analog hookup, although I might set up both types so I could compare the sound of the receiver's decoding with the Audigy's decoding.
    Things you can't do when using an external decoder hookup:
    . Use the soundcard to adjust volume while listening to DD/DTS multichannel soundtracks (though it's best to use the receiver to adjust volume all the time, actually).
    2. Hear any other sound sources while listening to DD/DTS multichannel soundtracks.
    3. Get multichannel audio from PC games.
    4. Get multichannel upmixing using CL's CMSS feature.
    -Dave
    [email protected]

  • Why does this site have online chat when you can never actually chat - always "not available"?  I was trying to get a simple question answered without calling and being on hold for 10 minutes?

    Why does this site have online chat when you can never actually chat - always "not available"?  I was trying to get a simple question answered without calling and being on hold for 10 minutes?

        Hello flabucki,
    Help is just a post away for you my friend! I can help with your questions right here. May I ask what question do you have? Both myself and the community would love to assist in any way that we can.
    Thank you…
    ArnettH_VZW
    Follow us on Twitter @VZWSupport

  • Four simple questions on LOP, DateModifier, HolidayCalendar and PlanVersion

    Dear All,
    I feel for you people it's a simple question and not required to post 4 different threads.
    1. I create a LOP and a ML, how the system knows for LOP we have to deduct salary and for ML not required?
    2. Date Modifier: We create a date modifier, but where we mention specific date for the date modifier?
    3. Why holiday calender (or number range) can't transport? Why it 's not asking for a request while saving?
    4. We can create different plan versions. Once we create a new plan version and planed to use that. How to transport the data from one Planversion to another? Do we need to repeat all the process again, like position, person etc or we can transport?
    Regards
    ET

    1. I create a LOP and a ML, how the system knows for LOP we have to deduct salary and for ML not required?
    This is throught Absence Valuation that is Paid and Inpai which we configure in table T554C and assign the absence vlaution to the Absences the table V_554S_G
    2. Date Modifier: We create a date modifier, but where we mention specific date for the date modifier?
    Hmmm once you Generated the pay periods the dates are generated and stored in table V_T549S
    3. Why holiday calender (or number range) can't transport? Why it 's not asking for a request while saving?
    For holiday Calendar we have the Transport request which shd be done Manually check the truck button in the tcode SCAL
    4. We can create different plan versions. Once we create a new plan version and planed to use that. How to transport the data from one Planversion to another? Do we need to repeat all the process again, like position, person etc or we can transport?
    Can you littel more clear
    *I feel this are the doubts raised by you interview  questions are not allowed as per the Rules of SDN

  • Simple question I have Adobe Creative Suite in my office and I want to be able to use it on another PC in the same room  Is this possible?

    Simple question
    I have Adobe Creative Suite in my office and I want to be able to use it on another PC in the same room
    Is this possible? – more than happy to only use one PC at a time as I am now using a colleagues PC
    I would need a password
    I have my original End User Purchase Order

    Adobe ID, sign in, and account help
    If that doesn't work, try Web Chat:
    Adobe ID and registration support

  • Simple question: I placed a document in iCoud on my iMac and it appeared on my iOS devices. If I change it on my iPad it changes on my iMac. Now, how do I change it and save it on my iMac so it automatically changes on my iOS devices?

    Simple question: I placed a document in iCoud on my iMac and it appeared on my iOS devices.
    If I change it on my iPad it changes on my iMac.
    Now, how do I change it and save it on my iMac so it automatically changes on my iOS devices?

    Welcome to the Apple Community.
    I have seen previous versions mentioned in a pop up message before on iCloud.com, but I'm not really sure at all how it would help, as I couldn't get it to do anything.
    The best advice I have at this time is to back up your work on your iOS device by regularly saving it to iTunes, if anything goes wrong you can then either load it into the numbers app again on the device or recover it via iTunes on your computer.
    My syncs are immediate, I never get chance to see if it works in the background, sorry.

  • How can I talk with someone? I have a simple question and it's not answered anywhere in the forums. I have asked it before and repetedly gets swept over

    Where do my files have to be in order to use creative cloud and not have my indesign links break? I'll need to use Indesign on different computers and my images won't be traveling with me... will I need to relink every image every time? this gets way too tedious after 5 pages of links are broken. Also,,, why do I need all these plugin's once I use an icloud version of indesign when I've saved the file on my external hard drive, and then open the exact same file from the exact same hard drive? The file never opens and is corrupt which means I have to rebuild the entire thing or physically travel back to that computer which has the indesign cloud.... It's baffling.
    And another question... how does adobe not have a live support number to call and ask questions? I've been in the same "click-loop" now forever  and I can't ever get to an actual useful forum.

    WesternJarhead wrote:
    Where do my files have to be in order to use creative cloud and not have my indesign links break? I'll need to use Indesign on different computers and my images won't be traveling with me... will I need to relink every image every time?
    Standard practice is to use File>Package and then save to drive/location that suits you. If you need it to travel with you bring the entire folder.
    The InDesign file will link to the folder where the Links folder is situated.
    WesternJarhead wrote:
    Also,,, why do I need all these plugin's once I use an icloud version of indesign when I've saved the file on my external hard drive, and then open the exact same file from the exact same hard drive? The file never opens and is corrupt which means I have to rebuild the entire thing or physically travel back to that computer which has the indesign cloud.... It's baffling.
    The file isn't corrupt. The Craeative Cloud version is a newer version than you have on your computer at home. That's why the plugins are missing, as older versions don't have the same plugins as the newer version of InDesign.
    If you want to work on a version created with CC - then you need to use file Export/Save and choose IDML - then open that in earlier versions of InDesign.
    However, you could install the Creative Cloud on your computer at home and use the same version of InDesign - this would solve  your problem without any extra work.
    WesternJarhead wrote:
    And another question... how does adobe not have a live support number to call and ask questions? I've been in the same "click-loop" now forever  and I can't ever get to an actual useful forum.
    InDesign has never offered user support in using the software. It's telephone and helpline service is not for that purpose. InDeisgn is a professional graphic designer/typesetter/whateveryourjob is tool.
    Like any tool you need to have specific training to it's end use, most people used to do an apprenticeship/trainee position going to college to learn the software and the fine principles of lithographic/screen/flexo/gravure printing and the use of images/text/graphics etc on the web.
    It's a professional's tool that requires professional training. Much like I wouldn't go out and buy a carpenters tool set and then complain that none of the tools do what I want them to do, like hammering in a screw.

  • Load Balancing Directory Servers with Access Manager - Simple questions

    Hi.
    We are in the process of configuring 2 Access Manager instances (servers) accessing the same logical LDAP repository (comprising physically of two Directory Servers working together with Multi-Master Replication configured and tested) For doing this, we are following guide number 819-6258.
    The guide uses BigIP load balancer for load balancing the directory servers. However, we intend to use Directory Proxy Server. Since we faced some (unresolved) issues last time that we used DPS, there are some simple questions that I would be very grateful to have answers to:
    1. The guide, in section 3.2.10 (To configure Access Manager 1 with the Directory Server load balancer), talks about making changes at 4 places, and replacing the existing entry (hostname and port) with the load balancer's hostname and port (assuming that the load balancer has already been configured). It says that changes need not be made on Access Manager 2 since the LDAPs are in replication, and hence changes will be replicated at all places. However, the guide also states that changes have to be made in two files, namely AMConfig.properties, and the serverconfig.xml file. But these changes will not be reflected on Access Manager 2, since these files are local on each machine.
    Question 1. Do changes have to be made in AMConfig.properties and serverconfig.xml files on the other machine hosting Access Manager 2?
    Question 2: What is the purpose of putting these values here? Specifically, what is achieved by specifying the Directory server host and port in AMConfig.properties, as well as in serverconfig.xml?
    Question 3. In the HTTP console, there is the option of specifying multiple primary LDAP servers, as well as multiple secondary LDAP servers. What is the purpose of these? Are secondary servers attempted when none of the list in the primary list are accessible? Also, if there are multiple entries in the primary server list, are they accessed in a round robin fashion (hereby providing rudimentary load balancing), or are other servers accessed only when the one mentioned first is not reachable etc.?
    2. Since I do not have a load balancer setup yet, I tried the following deviation to the above, which, according to me, should have worked. If viewed in the HTTP console, LDAP / Membership / MSISDN and Policy configuration all pointed to the DS on host 1. When I changed all these to point to the directory server on host 2 (and made AMConfig.properties and serverconfig.xml on host 1 point to DS of host 2 as well), things should have worked fine, but apparently Access manager 1 could not be started. Error from Webserver:
    [14/Aug/2006:04:30:36] info (13937): WEB0100: Loading web module in virtual server [https-machine_1_FQDN] at [search]
    [14/Aug/2006:04:31:48] warning (13937): CORE3283: stderr: Exception in thread "EventService" java.lang.ExceptionInInitializerError
    [14/Aug/2006:04:31:48] warning (13937): CORE3283: stderr: at com.iplanet.services.ldap.event.EventServicePolling.run(EventServicePolling.java:132)
    [14/Aug/2006:04:31:48] warning (13937): CORE3283: stderr: at java.lang.Thread.run(Thread.java:595)
    [14/Aug/2006:04:31:48] warning (13937): CORE3283: stderr: Caused by: java.lang.InterruptedException
    [14/Aug/2006:04:31:48] warning (13937): CORE3283: stderr: at com.sun.identity.sm.ServiceManager.<clinit>(ServiceManager.java:74)
    [14/Aug/2006:04:31:48] warning (13937): CORE3283: stderr: ... 2 more
    In effect, AM on 1 did not start. On rolling back the changes, things again worked like previously.
    Will be really grateful for any help / insight / experience on dealing with the above.
    Thanks!

    Update to the above, incase anyone is reading:
    We setup a similar setup in Windows, and it worked. Here is a detailed account of what was done:
    1. Host 1: Start installer, install automatically, chose Directory server, Directory Administration server, Directory Proxy server, Web server, Access Manager.
    All installed, and worked fine. (AMConfig.properties, serverconfig.xml, and the info in LDAP service, all pointed to HOST1:389)
    2. Host 2: Start installer, install automatically, chose Directory server, Directory Administration server, Directory Proxy server, Web server, Access Manager.
    All installed, and worked fine. (AMConfig.properties, serverconfig.xml, and the info in LDAP service, all pointed to HOST2:389)
    3. Host 1: Started replication. Set to Master
    4. Host 2: Started replication. Set to Master
    5. Host 1: Setup replication agreement to Host 2
    6. Host 2: Setup replication agreement to Host 1
    7. Initiated the remote replica from Host 1 ----> Host 2
    Note that since default installation uses abc.....xyz as the encryption key, setting this to same was not an issue.
    9. Started webserver for Host 1 and logged into AM as amadmin.
    10. Added Host 2 FQDN in DNS Aliases / Realms
    11. Added http://HOST2_FQDN:80 in the Platform server (instance) list.
    12. Started Host 2 webserver. Logged in AM on Host 2, things worked fine.
    At this stage, note the following:
    a) Host 1:
    AMConfig.properties file has
    com.iplanet.am.directory.host=host1_FQDN
    and
    com.iplanet.am.directory.port=389
    serverconfig.xml has:
    <Server name="Server1" host="host1_FQDN" port="389" type="SIMPLE" />
    b) Host 2:
    AMConfig.properties file has
    com.iplanet.am.directory.host=host2_FQDN
    and
    com.iplanet.am.directory.port=389
    serverconfig.xml has:
    <Server name="Server1" host="host2_FQDN" port="389" type="SIMPLE" />
    c) If one logs into AM, and checks LDAP servers for LDAP / Policy Configuration / Membership etc services, they all contain Host2_FQDN:389 (which makes sense, since replica 2 was initialized from 1)
    Returning back to the configuations:
    13. On Host 1, login into the Admin server console of the Directory server. Navigate to the DPS, and confgure the following:
    a) Network Group
    b) LDAP servers
    c) Load Balancing
    d) Change Group
    e) Action on-bind
    f) Allow all actions (permit modification / deletion etc.).
    g) any other configuations required - Am willing to give detailed steps if someone needs them to help me / themselves! :)
    So now, we have DPS configured and running on Host1:489, and distributing load to DS1 and DS2 on a 50:50 basis.
    14. Now, log into AM on Host 1, and instead of Host1_fqdn:389 (for DS) in the following places, specify Host1_fqdn:489 (for the DPS)--
    LDAP Authentication
    MSISDN server
    Membership Service
    Policy configuation.
    Verified that this propagated to the Policy Configuration service and the LDAP authentication service that are already registered with the default organization.
    15. Log out of AM. Following the documentation, modify directory.host and directory.port in AMConfig.properties to point to Host 1_FQDN and 489 respectively. Make this change in AMConfig.properties of both Host 1 as well as 2.
    16. Edit serverconfig.xml on both hosts, and instead of they pointing to their local directory servers, point both to host1_FQDN:489
    17. When you start the webserver, it will refuse to start. Will spew errors such as:
    [https-host1_FQDN]: Sun ONE Web Server 6.1SP5 B06/23/2005 17:36
    [https-host1_FQDN]: info: CORE3016: daemon is running as super-user
    [https-host1_FQDN]: info: CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.5.0_04] from [Sun Microsystems Inc.]
    [https-host1_FQDN]: info: WEB0100: Loading web module in virtual server [https-host1_FQDN] at [amserver]
    [https-host1_FQDN]: warning: WEB6100: locale-charset-info is deprecated, please use parameter-encoding
    [https-host1_FQDN]: info: WEB0100: Loading web module in virtual server [https-host1_FQDN] at [ampassword]
    [https-host1_FQDN]: warning: WEB6100: locale-charset-info is deprecated, please use parameter-encoding
    [https-host1_FQDN]: info: WEB0100: Loading web module in virtual server [https-host1_FQDN] at [amcommon]
    [https-host1_FQDN]: info: WEB0100: Loading web module in virtual server [https-host1_FQDN] at [amconsole]
    [https-host1_FQDN]: warning: WEB6100: locale-charset-info is deprecated, please use parameter-encoding
    [https-host1_FQDN]: info: WEB0100: Loading web module in virtual server [https-host1_FQDN] at [search]
    [https-host1_FQDN]: warning: CORE3283: stderr: netscape.ldap.LDAPException: error result (32); matchedDN = dc=sun,dc=com; No such object (DN changed)
    [https-host1_FQDN]: warning: CORE3283: stderr: Got LDAPServiceException code=-1
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.services.ldap.DSConfigMgr.getConnection(DSConfigMgr.java:357)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.services.ldap.DSConfigMgr.getNewFailoverConnection(DSConfigMgr.java:314)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.services.ldap.DSConfigMgr.getNewConnection(DSConfigMgr.java:253)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.services.ldap.DSConfigMgr.getNewProxyConnection(DSConfigMgr.java:184)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.services.ldap.DSConfigMgr.getNewProxyConnection(DSConfigMgr.java:194)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.ums.DataLayer.initLdapPool(DataLayer.java:1248)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.ums.DataLayer.(DataLayer.java:190)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.ums.DataLayer.getInstance(DataLayer.java:215)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.ums.DataLayer.getInstance(DataLayer.java:246)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.sun.identity.sm.ldap.SMSLdapObject.initialize(SMSLdapObject.java:156)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.sun.identity.sm.ldap.SMSLdapObject.(SMSLdapObject.java:124)
    [https-host1_FQDN]: warning: CORE3283: stderr: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    [https-host1_FQDN]: warning: CORE3283: stderr: at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    [https-host1_FQDN]: warning: CORE3283: stderr: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    [https-host1_FQDN]: warning: CORE3283: stderr: at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    [https-host1_FQDN]: warning: CORE3283: stderr: at java.lang.Class.newInstance0(Class.java:350)
    [https-host1_FQDN]: warning: CORE3283: stderr: at java.lang.Class.newInstance(Class.java:303)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.sun.identity.sm.SMSEntry.(SMSEntry.java:216)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.sun.identity.sm.ServiceSchemaManager.(ServiceSchemaManager.java:67)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.am.util.AMClientDetector.getServiceSchemaManager(AMClientDetector.java:219)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.am.util.AMClientDetector.(AMClientDetector.java:94)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.sun.mobile.filter.AMLController.init(AMLController.java:85)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:322)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:120)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3271)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.core.StandardContext.start(StandardContext.java:3747)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.ias.web.WebModule.start(WebModule.java:251)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.core.StandardHost.start(StandardHost.java:652)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:355)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.startup.Embedded.start(Embedded.java:995)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.ias.web.WebContainer.start(WebContainer.java:431)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:500)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:161)
    [https-host1_FQDN]: failure: WebModule[amserver]: WEB2783: Servlet /amserver threw load() exception
    [https-host1_FQDN]: javax.servlet.ServletException: WEB2778: Servlet.init() for servlet LoginLogoutMapping threw exception
    [https-host1_FQDN]: at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:949)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3478)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardContext.start(StandardContext.java:3760)
    [https-host1_FQDN]: at com.iplanet.ias.web.WebModule.start(WebModule.java:251)
    [https-host1_FQDN]: at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardHost.start(StandardHost.java:652)
    [https-host1_FQDN]: at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:355)
    [https-host1_FQDN]: at org.apache.catalina.startup.Embedded.start(Embedded.java:995)
    [https-host1_FQDN]: at com.iplanet.ias.web.WebContainer.start(WebContainer.java:431)
    [https-host1_FQDN]: at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:500)
    [https-host1_FQDN]: at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:161)
    [https-host1_FQDN]: ----- Root Cause -----
    [https-host1_FQDN]: java.lang.NullPointerException
    [https-host1_FQDN]: at com.sun.identity.authentication.UI.LoginLogoutMapping.init(LoginLogoutMapping.java:71)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:921)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3478)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardContext.start(StandardContext.java:3760)
    [https-host1_FQDN]: at com.iplanet.ias.web.WebModule.start(WebModule.java:251)
    [https-host1_FQDN]: at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardHost.start(StandardHost.java:652)
    [https-host1_FQDN]: at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:355)
    [https-host1_FQDN]: at org.apache.catalina.startup.Embedded.start(Embedded.java:995)
    [https-host1_FQDN]: at com.iplanet.ias.web.WebContainer.start(WebContainer.java:431)
    [https-host1_FQDN]: at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:500)
    [https-host1_FQDN]: at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:161)
    [https-host1_FQDN]:
    [https-host1_FQDN]: info: HTTP3072: [LS ls1] http://host1_FQDN:58080 [i]ready to accept requests
    [https-host1_FQDN]: startup: server started successfully
    Success!
    The server https-host1_FQDN has started up.
    The server infact, didn't start up (nothing even listening on 58080).
    However, if AMConfig.properties is left as it originally was, and only serverconfig.xml files were changed as mentioned above, web servers started fine, and things worked all okay. (Alright, except for some glitches when viewed in /amconsole. If /amserver/console is accessed, all is good. Can this mean that all is still not well? I am not sure).
    So far so good. Now comes the sad part. When the same is done on Solaris 9, things dont work. You continue to get the above error, OR the following error, and the web server will refuse to start:
    Differences in Solaris and Windows are as follows:
    1. Windows hosts have 1 IP and hostname. Solaris hosts have 3 IPs and hostnames (for DS, DPS, and webserver).
    No other difference from an architectural perspective.
    Any help / insight on why the above is not working (and why the hell does the documentation seem so sketchy / insecure / incorrect).
    Thanks a bunch!

  • A simple question on random number generation?

    Hi,
    This is a rather simple question and shows my newbieness quite blatantly!
    I'm trying to generate a random number in a part of a test I have.
    So, I have a little method which looks like this:
    public int getRandomNumber(int number){
            Random random = new Random(number);
            return random.nextInt(number);
        }And in my code I do int random = getRandomNumber(blah)...where blah is always the same number.
    My problem is it always returns the same number. What am I missing here. I was under the impression that nextint(int n) was supposed to generate the number randomly!! Obviously I'm doing something wrong or not using the correct thing. Someone please point out my stupidity and point me in the right direction? Ta

    I think the idea is that Random will generate the same pseudo-random sequence over and over if you don't supply a seed value. (The better to debug with, my dear.) When you're ready to put an app into production, the seed value should be the current system time in milliseconds to guarantee a new sequence with each run.
    Do indeed move Random outside the loop. Think of it like a number factory - instantiate it once and let it pump out the random values for you as needed.

Maybe you are looking for

  • Convert to PDF in MS Word 2007, with CS2

    Hello, At work I have a menu/ribbon for "Convert to PDF" within Word 2007. At home, I am using Adobe CS2 and don't have this in Word. Is it available with CS2? I also don't seem to have Adobe PDF installed as a printer either, even though I have Acro

  • I can't load a PDF from my Mac to my iPad

    I have made changes to a PDF doc on my MAC. When I send it to my email and open it on my iPad, I only have a blank doc. What am I doing wrong? It shows up fine when I check my email on my MAC.

  • How can I download icloud data for my lost iPad to my new iPad.?

    How can I download data from icloud that came from my lost ad to my new iPad.

  • Why no option for DV 16:9 at setup?

    I see a whole list of formats, including 16:9 HDV but the closest I could find for DV is 3:2.

  • T400 External Speaker Sound Issues

    Hello, I recently purchased a used ThinkPad T400 and I am having some problems with the sound when using external speakers. Whenever using external speakers, everything has a bizarre underwater/reverb sound. This is a very frustrating issue as I have