Basic java problem help needed please

the problem is :
to produce a program which will show membership rates for a golf club..
membership yearly rate new member joining fee
category
full 650 3000
associate 200
ladies 350 2000
under 18 175
new members must pay a joining fee in addition to the yearly rate as shown
full/ladies members also prepay 150
write a program which will enter details of members,calculate and output the total amount each member should pay.
output number of members in each category
the total income for each category....
i need this program to show each category individually...cant do it at all..been at it a week....must be me && and || signs...i think...plz can someone help me as im really stuck now...thank you so much..
import java.util.Scanner;
public class assignmentquestion3 {
public static Scanner key=new Scanner(System.in);
public static void main(String []args){
int fullfee=800,newfullfee=3800,associatefee=200,newla diesfee= 2350,ladiesfee= 350,under18fee = 175;
int selectcat=0;
int reply = 0;
int addmember=0;
int currentfulltotalmem=0,newfulltotalmem=0,associatet otalmem=0,ladiestotalmem=0,under18totalmem=0;
int assoctotalcash=0,ladiestotalcash=0,under18totalcas h=0;
int fullprepay=150;
int ladiesfull=2500;
int completefull = 0;
int ladiescurrent=500;
int under18=175;
//Main introduction screen for the user and selections available. do while loops only allowing numbers 1,2,3 or 4.
do{
do{
System.out.printf("\n\t %90s","********************Membership Rates For The Golf Club********************");
System.out.printf("\n\n %105s","This program will allow users to enter details of members as well as calculating and.");
System.out.printf("\n%106s","outputing the total amount each member should pay. The program allows users to view the");
System.out.printf("\n%106s","total number of members in each category and the total income for each category.");
System.out.printf("\n\n\t %75s","Please select your membership category: ");
System.out.printf("\n\n\t %68s","Please press '1' for FULL");
System.out.printf("\n\n\t %68s","Please press '2' for ASSOCIATE");
System.out.printf("\n\n\t %68s","Please press '3' for LADIES");
System.out.printf("\n\n\t %68s","Please press '4' for UNDER 18");
System.out.printf("\n\n\t %68s","Please enter 1,2,3 or 4: ");
selectcat=key.nextInt();
}while (selectcat>4 || selectcat<1);
do{
System.out.printf("\n\n\t %75s","Are you a Current Member (press 1) or a New Member (press 2): ");
reply=key.nextInt();
}while (reply<1 || reply>2);
//if number '1' for 'FULL' category is selected by the user and reply is 'yes'(1) then new full member fee is shown to user
if (selectcat==1 ||reply==1)
System.out.printf("\n\n\t %68s","CURRENT FULL MEMBERSHIP SELECTED");
System.out.printf("\n\n\t %68s","Current full membership fees yearly are "+fullfee+"");
System.out.printf("\n\n\t %68s","Full members must also pre-pay "+fullprepay+" on a card can be used in the club facilities such as bar and shop ");
System.out.printf("\n\n\t %72s","The total of this membership is: "+fullfee+"");
currentfulltotalmem=currentfulltotalmem+1;
System.out.printf("\n\n\t %72s","The total number of 'CURRENT FULL MEMBERSHIPS = "+currentfulltotalmem+"");
completefull=completefull+fullfee;
System.out.printf("\n\n\t %68s","The total amount of income for 'FULL MEMBERSHIPS' within the club = "+completefull+"");
//if number '1' is selected by the user and reply is 'no' (2) then full member fee is shown to user
else if (selectcat==1 &&reply==2)
System.out.printf("\n\n\t %68s","NEW FULL MEMBERSHIP SELECTED");
System.out.printf("\n\n\t %68s","Full membership fees yearly are "+newfullfee+"");
newfulltotalmem=newfulltotalmem+1;
System.out.printf("\n\n\t %68s","The total number of 'NEW FULL MEMBERSHIPS = "+newfulltotalmem+"");
completefull=completefull+newfullfee;
System.out.printf("\n\n\t %68s","The total amount of income for 'FULL MEMBERSHIPS' within the club = "+completefull+"");
//if number '2' is selected by the user then associate member fee is shown to user
if (selectcat==2 &&(reply==1 || reply==2))
System.out.printf("\n\n\t %75s","ASSOCIATE MEMBERSHIP SELECTED");
System.out.printf("\n\n\t %75s","ASSOCIATE membership fees yearly are "+associatefee+"");
associatetotalmem=associatetotalmem+1;
System.out.printf("\n\n\t %75s","The total number of 'ASSOCIATE MEMBERSHIPS' WITHIN THE CLUB = "+associatetotalmem+"");
assoctotalcash=assoctotalcash+associatefee;
System.out.printf("\n\n\t %68s","The total amount of income for 'ASSOCIATE MEMBERSHIPS' within the club = "+assoctotalcash+"");
//if number '3' is selected by the user and reply is 'yes' then new ladies member fee is shown to user
if (selectcat==3 &&reply==1)
System.out.printf("\n\n\t %68s","LADIES CURRENT MEMBERSHIP SELECTED");
System.out.printf("\n\n\t %68s","Ladies full membership fees yearly are "+ladiesfee+"");
System.out.printf("\n\n\t %68s","Ladies must also pre-pay "+fullprepay+" on a card can be used in the club facilities such as bar and shop ");
System.out.printf("\n\n\t %68s","The total of this membership is: "+ladiescurrent+"");
ladiestotalmem=ladiestotalmem+1;
System.out.printf("\n\n\t %75s","The total number of 'LADIES MEMBERSHIPS' WITHIN THE CLUB = "+ladiestotalmem+"");
ladiestotalcash=ladiestotalcash+ladiescurrent;
System.out.printf("\n\n\t %68s","The total amount of income for 'LADIES MEMBERSHIPS' within the club = "+ladiestotalcash+"");
//if number '3' is selected by the user and reply is 'no' then the current ladies member fee is shown to user
else
if (selectcat==3 && reply==2)
System.out.printf("\n\n\t %68s","LADIES NEW MEMBERSHIP SELECTED");
System.out.printf("\n\n\t %68s","LADIES NEW MEMBERSHIP fees yearly are "+newladiesfee+"");
System.out.printf("\n\n\t %68s","Ladies must also pre-pay "+fullprepay+" on a card can be used in the club facilities such as bar and shop ");
System.out.printf("\n\n\t %68s","The total of this membership is: "+ladiesfull+"");
ladiestotalmem=ladiestotalmem+1;
System.out.printf("\n\n\t %75s","The total number of 'LADIES MEMBERSHIPS' within the club = "+ladiestotalmem+"");
ladiestotalcash=ladiestotalcash+ladiesfull;
System.out.printf("\n\n\t %68s","The total amount of income for 'LADIES MEMBERSHIPS' within the club = "+ladiestotalcash+"");
//if number '4' is selected by the user then under 18 member fee is shown to user
else if (selectcat==4 &&(reply==1||reply==2))
System.out.printf("\n\n\t %75s","UNDER 18 MEMBERSHIP SELECTED");
System.out.printf("\n\n\t %75s","UNDER 18 yearly membership fees are "+under18fee+"");}
System.out.printf("\n\n\t %68s","The total of this membership is: "+under18+"");
under18totalmem=under18totalmem+1;
System.out.printf("\n\n\t %75s","The total number of 'UNDER 18 MEMBERSHIPS' within the club = "+under18totalmem+"");
under18totalcash=under18totalcash+under18;
System.out.printf("\n\n\t %68s","The total amount of income for 'UNDER 18 MEMBERSHIPS' within the club = "+under18totalcash+"");
//allowing user to select '0' to add another member or any other key to exit program
System.out.printf("\n\n\t %68s","Please Press '0' to add another member or any other key to exit.: ");
addmember=key.nextInt();
}while (addmember==0 ||addmember>1);}}
the problem im having is whenever i make the choices 1,2,3,4 (CATEgorys) AND hit 1 or 2(current or new member selections) it brings up more than one category...
for example when i hit 1(Category full) and 1(current member)..it displays this:
Are you a Current Member (press 1) or a New Member (press 2): 1
CURRENT FULL MEMBERSHIP SELECTED
Current full membership fees yearly are 800
Full members must also pre-pay 150 on a card can be used in the club facilities such as bar and shop
The total of this membership is: 800
The total number of 'CURRENT FULL MEMBERSHIPS = 1
The total amount of income for 'FULL MEMBERSHIPS' within the club = 800
The total of this membership is: 175
The total number of 'UNDER 18 MEMBERSHIPS' within the club = 1
The total amount of income for 'UNDER 18 MEMBERSHIPS' within the club = 175
Please Press '0' to add another member or any other key to exit.:
under 18 membership as well?...does this for other selections too...is it my arithmetic operators?....my if loops?...

Multi-post [http://forums.sun.com/thread.jspa?threadID=5346248&messageID=10498270#10498270]
And it still doesn't compile.

Similar Messages

  • Basic Java Program help needed urgently.

    I have posted the instructions to my project assignment on here that is due tomorrow. I have spent an extremely large amount of time trying to get the basics of programming and am having some difficulty off of the bat. Someone who has more experience with this and could walk me through the steps is what I am hoping for. Any Help however will be greatly appreciated. I am putting in a lot of effort, but I am not getting the results I need. Thank you for the consideration of assisting me with my issues. If you have any questions please feel free to ask. I would love to open up a dialogue.
    CIS 120
    Mathematical Operators
    Project-1
    Max possible pts 100
    Write a program “MathOperators” that reads two integers, displays user’s name, sum, product,
    difference, quotients and modulus of the two numbers.
    1. Create a header for your project as follows:
    * Prgrammer: Your Name (1 pt) *
    * Class: CIS 120 (1 pt) *
    * Section: (1 pt) *
    * Instructor: (1 pt) *
    * Program Name: Mathematical Operators (1 pt) *
    * Description: This java program will ask the user to enter two integers and *
    display sum, product, difference, quotients and modulus of the two numbers
    * (5 pts) *
    2. Display a friendly message e.g. Good Morning!! (2 pts)
    3. Explain your program to the user e.g. This java program can add, subtract, multiply,
    divide and calculate remainder of any two integer numbers entered by you. Let’s get
    started…. (5 pts)
    4. Prompt the user- Please enter your first name, store the value entered by user in a
    string variable name. Use input.next() instead of input.nextLine(). (8 pts)
    5. Prompt the user- name, enter first integer number , store the value entered by user in
    an integer variable num1.(5 pts)
    6. Prompt the user- name, enter second integer number , store the value entered by user in
    an integer variable num2.(5 pts)
    7. Display the numbers entered by the user as: name has entered the numbers num1and
    num2.(5 pts)
    8. Calculate sum, product, difference, quotients and modulus of the two numbers. ( 30 pts)
    9. Display sum, product, difference, quotients and modulus of the two numbers. ( 10 pts)
    10. Terminate your program with a friendly message like- Thanks for using my program,
    have a nice day!!(2 pts)

    Nice try. You have not demonstrated that you've at least TRIED to do something. No one is going to do your homework for you. Your "urgency" is yours alone.

  • Multiple problems - help needed please

    I've got so many problems that I've completely confused myself. So, if anyone can help….
    I was previously using a D-Link D-320T DSL modem on BT Broadband in the UK. The modem was set up in bridge mode, and hooked up via ethernet to my Airport Extreme (n). The AEBS would use PPPoE and successfully connected to the internet, as well as handling all my network needs.
    Everything worked and everything was fine, allowing screen sharing and file sharing between my Mac Mini, MacBook and MacBook Pro.
    Earlier this week, the internet connection dropped and I couldn't find the cause. Resetting the router and hooking it up directly to my Mac Mini, I connected to it (192.168.1.1) and had it connect to the internet itself.
    It did so, and distributed IP addresses to the Mac Mini…but after 30 seconds my internet connection dropped, and looking in network preferences, I found that the modem had jumped from a router address of 192.168.1.1, to an 82.xx.xx.xx address, which was clearly the public IP address forwarded by my ISP. So it seemed like it was working in a sort of bridge mode still.
    I reset the router numerous times, tried switching it into full bridge mode etc, but the AEBS was unable to use it to connect via PPPoE as before, because the D-Link would play nice for 30 seconds, then jump around with addresses.
    Very strange, but I assumed the modem was just broken.
    I dug out my spare router, being the Netgear DG632.
    I managed to get this hooked up to the internet really quickly, and using an ethernet connection to the Mac Mini, it all appeared fine. However, as I started looking around the internet, I noticed that although google.com would open up, any subsequent links, and indeed any other domains I tried to visit would not open.
    Resetting the router seemed to solve this.
    I then hooked up my AEBS to the Netgear and, after pondering which way to use it, I found the only way I could get it to play nice was to have the AEBS in bridge mode itself, meaning that the Netgear would do all the routing work.
    The MacBook connected to the airport, and all seemed okay….
    …However, I then noticed that the internet connection would randomly drop. Web pages would not open (in any browser), and downloads which were under way could be seen in the Safari download manager to suddenly crash.
    The same was true on the Mac Mini - web browsing stopped at random. I had however hooked this up to the airport via an ethernet cable, I noticed that, although the "internet" wasn't working, other connections like torrents were still active.
    Reconnecting the Netgear router directly to the Mac Mini allowed me to see in its diagnostics that it still held a connection to the ISP and still had an external IP address.
    Again, a reset of the router seemed to resolve things….but only for a few hours. And whilst the Mac Mini seemed resilient, the airport connection to the MacBook was terrible. (I haven't even tried using the MBP yet).
    Furthermore, I noticed that networking between devices had severely been crippled. Although the Mac Mini and MacBook were visible to each other in the shared devices section of finder, clicking the link meant waiting literally four minutes for a connection to establish, and screen sharing timed out, from either direction.
    I then tried assigning everything static IP addresses, but this seemed to confuse matters with the router.
    Under the impression that the Netgear clearly couldn't handle the job of routing my network, I tried to set it up in bridge mode and use the AEBS as before.
    Reading around the internet (on my iPhone at this stage), I realised there was no obvious "bridge mode" option, but I was told to set the device mode as router, and then say "no" when it asks if there are any login details for the ISP (under Basic Router Settings). This was done.
    However, setting up the AEBS with PPPoE had no success, and the connection was never made.
    At this stage, I'm living with a crippled network and two routers, neither of which do what I want.
    Can anybody advise me on a solution to fix either router/modem?
    I want to use the modem in bridge mode and have the AEBS handle everything as before, as it was perfect.
    At this stage, which a frazzled brain (after messing with everything for several hours), something step-by-step would be great.
    Help! (and thanks)

    I have also recently developed problems with my airport network. I was playing my air tunes when it started freezing so i reset my airport extreme and expresses. When I tried to setup my networks again I en counted problems like airport utility couldn't find the extreme base station or when it did it couldn't read the setting. I eventually managed to create a network then when i tried to connect to the network it either asks for the password (even though its saved in keychain) When I enter the password it keeps saying "connection time out". I then turn airpot off & on and it the sometimes reconnects automatically without requiring a password.
    My internet then will sometime start working again but then drop out completely or take an age to load.
    The network will then sometimes disappear from the network list and I'm unable to see it at all.
    No matter how many time i reset the base station it doesn't make a difference.
    I my broadband modem is also a wireless router and Im experiencing similar problems with that. I took my laptop to work and tried to connect to the network at work and it seems to work ok except it did ask for a password the time out but did it only once.
    I did download a security update recently but im not sure if its that that is causing it
    please help me as well as I'm stuck without my network

  • Importing XML into Java.  Help needed Please!!!

    Hi,
    I have downloaded j2sdk1.4.1_05 and want to configure it to import XML files into a DOM in Java. I am having trouble doing this and need help. I read that version 1.4 support JAXP 1.1 but I am having trouble finding the JAXP-api.jar file. It says to put all the other Jar files into a folder and leave the JAXP-api.jar.
    Could you please tell me how to set up Java so that I can import an XML file. I also downloaded JAXP 1.2. But there seems to be no installer.
    Thanx John

    You can learn about reading xml in java by reading the J2EE tutorial at
    http://java.sun.com/j2ee/1.4/docs/tutorial/doc/
    Here is sample program to read XML file into a DOM taken from this tutorial
    (http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPXSLT4.html)
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.FactoryConfigurationError;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.w3c.dom.Document;
    import org.w3c.dom.DOMException;
    import java.io.*;
    public class TransformationApp
      static Document document;
      public static void main(String argv[])
        if (argv.length != 1) {
          System.err.println (
            "Usage: java TransformationApp filename");
          System.exit (1);
        DocumentBuilderFactory factory =
          DocumentBuilderFactory.newInstance();
        //factory.setNamespaceAware(true);
        //factory.setValidating(true);
        try {
          File f = new File(argv[0]);
          DocumentBuilder builder =
            factory.newDocumentBuilder();
          document = builder.parse(f);
        } catch (SAXParseException spe) {
          // Error generated by the parser
          System.out.println("\n** Parsing error"
            + ", line " + spe.getLineNumber()
            + ", uri " + spe.getSystemId());
          System.out.println("  " + spe.getMessage() );
          // Use the contained exception, if any
          Exception x = spe;
          if (spe.getException() != null)
            x = spe.getException();
          x.printStackTrace();
        } catch (SAXException sxe) {
          // Error generated by this application
          // (or a parser-initialization error)
          Exception x = sxe;
          if (sxe.getException() != null)
            x = sxe.getException();
          x.printStackTrace();
        } catch (ParserConfigurationException pce) {
          // Parser with specified options can't be built
          pce.printStackTrace();
        } catch (IOException ioe) {
          // I/O error
          ioe.printStackTrace();
      } // main
    } If you have java 1.4 sdk installed everything should compile and run. Separate
    JAXP package is nor required - JAXP is included in rt.jar in java-home-directory/jre/lib.

  • Metadata problem - help needed please

    A rather strange thing has happened when opening Lightroom a few moments ago and before I go and do something stupid would request some advice.
    I have a folder open containing approx 800 CR2 RAW image. The thumbnails for these images display the small icons indicating that I have applied keywords, edits and in some cases crops.
    However, the thumbnails also display the question mark and when clicked upon I receive the following 'the following files relating to this photo were present before but are now missing' and in the box below it indicates that the xmp file(s) are missing. What's strange is that I have never written out to xmp files in this folder and so they were never there to be missing in the first place.
    Now the options I have are to (a) forget about them but as there was nothing to forget this seems irrelevant or (b) to continue to track them but again, as there aren't any xmp files there aren't obviously any to track.
    I had thought that up until this point in time all my edits and crops etc were contained within the database file and if this is so why the question mark. The options I seem to have are from the menu bar to 'Read Metadata from file' but because there aren't any xmp files associated with these images doing so results in the loss of my edits, and secondly, if I choose the 'Write Metadata to File' I end up with xmp files that I do not want or need.
    Has anyone any reasonable suggestion as to why these question marks should be appearing above all the folders images (800) when the edits etc have clearly been written to the database. Yesterday no question marks today all this folders images show them so what if anything can I do about it?

    Thanks Lee and if only the answer were so simple. No - none of the files have been moved or deleted outside of Lightroom because if that were the case then I would have no files at all showing in this particular LR folder as ALL 800 images have suddenly and mysteriously had the question mark attached to them.
    As I mentioned earlier, when moving the mouse over the question mark itself it brings up the message relating to missing xmp files for which NON were every generated.
    Anyway, the problem is in the past now as I have labour intensively gone through 800 images first clicking on the question mark and then choosing the option to ignore the xmp file as there aren't any xmp files to ignore anyway, Now the right wrist is aching somewhat. :-( The task would have been made much easier if there was an option within LR to apply the 'Ignore xmp files' to ALL selected images but of course there isn't one. User request coming up me thinks.
    Never before has one application given me so much joy and so much grief. :-) :-(

  • Very strange problem, help needed please???

    I had a piece of software that acted as a virtual disk when I plugged in my 60GB Video Ipod but when I opened iTunes it appeared as if my iPod was connected with a different name and over 20 GB's used (which is right) but nothing could be seen. After disabling the virtual drive, rebooting and trying again I still had the same problem. I have all my library on my PC so it didn't bother me to try a system restore, I did the system restore but when it was finished it said that my iPod was restored but the wrong name was there and I'm missing 30 GB's. I'm happy to completely wipe it and start again but I've tried the restore twice now and I get the same problem, the capacity has halved??

    hiya!
    I did the system restore but when it was finished it said that my iPod was restored but the wrong name was there and I'm missing 30 GB's
    hmmmm. we'd probably better check on this possibility:
    Windows confuses iPod with network drive and may keep iPod from mounting or songs may seem to disappear
    love, b

  • Help needed please.. how do I remove my credit card from itunes? just discovered over $450 of charges when I looked at my email... Kids had no clue they were using our money and not their gift cards

    Help needed please.... I just discovered over $450 charges to my credit card from Itunes. The kids had no idea they were using our credit card and not their itunes gift cards and 4 year old just clicks on anything! I didnt save my credit card details so am a bit miffed at this... I cant find anywhere in itunes to remove it. Edit.. but not remove. Editing does not remove it.. HELP

    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact
    Accepted forms of payment  >  http://support.apple.com/kb/HT5552
    Changing Account Information  >  http://support.apple.com/kb/HT1918

  • Help needed please, with Iphone stuck with apple picture and progress bar after software update attempted

    Help needed please, everytime I try to update the software version on my iphone it comes up with a message saying it could not be completed and is now frozen with the apple picture and progress bar on it. Do I unplug it and hope the macbook pro sees it again, I also stupidly did not back up before starting the download which I realise I will have to go back to the previous back up. This keeps happening, everytime I do this type of update, I'm starting to think I should just give up on updating my software on the Iphone. I thought it was happening because I was using a window based computer to do the updates, this time I used my Macbook Pro. Please somebody help

    ljm17 wrote:
    ...This keeps happening, everytime I do this type of update, I...
    Then you should know what you need to do... If you don't remember...
    See Here  >  http://support.apple.com/kb/HT1808

  • I recently had to restore my Iphone 4s and ever since I cannot double click the home button whilst the phone is locked and change my music. The controls come up and I can adjust the volume but I cannot change the songs. Help needed please!!

    I recently had to restore my Iphone 4s and ever since I cannot double click the home button whilst the phone is locked and change my music. The controls come up and I can adjust the volume but I cannot change the songs. Help needed please!!

    Have you guys been able to activate your iphone yet? I bought an iphone 4s from eBay and it worked fine, but the previous user had left some data on it, so last night I used the "erased all content and settings" to restore it to factory setting so I can start fresh and restore my backup. But now I'm stuck at the activation screen (I get the same "the activation server is temporarily unavailable")  and can't get it to activate, even if I use my old deactivated AT&T sim card (I'm on straighttalk now).
    I might try activating it with an active AT&T sim card from my fiancee's phone when she gets home, so I'll let you know how that works outs.
    If it's true that the server is down; anyone know when it will be back up again? Thanks in advance.
    iPhone 4s iOS 5.1.1 (9B206)
    Carrier AT&T 12.0
    Modem Firmware 2.0.12

  • Install problems - help needed desperately for new Java user

    I have been trying to install Java SE Development Kit 6 - Version 1.6.0_13. Initially I could not get the javac process to work no matter what I tried. After uninstalling and reinstalling numerous times I now have it so that my javac will rewrite my file from a .java to a .class file. Now when I try to execute my Hello.class file I am getting an error message....
    Error occurred during initialization of VM
    java/lang/NoClassDefFoundError: java/lang/Object
    Can anyone please help me fix this? I was really anxious to learn programming but all of these setbacks are really frustrating. I have basic books to help when I am up and running but nothing helps you with problems with installations.
    Please help!!!

    Enigmafae wrote:
    Thank you so much. Worked like a charm! I also installed from Explorer instead of Firefox. Maybe the Firefox installations were incompatible with my XP Environment????Worked fine for me... but I downloaded and then installed... I did NOT "run" the install over the network.
    I don't care I'm just so thrilled it worked. Now I can get to learning the actual programming that I have been trying to get to.
    Thx again for your help!I love it when a plan comes together.
    ~~ Hannibal.

  • Urgent help needed, please help me

    Hi,
    I am developing a web site using Java Servlets. The site requires to send XML as POST to an HTTPS server and get the response.
    Development environment:
    Laptop running Windows XP with jdk1.3.1, j2sdkee1.3 and Tomcat 4.1.
    Since I need to use https request from the servlet, I am using the following code;
    URL url = new URL("https://www.somesite.com");
    HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
    To use the above code I downloaded the jsse1.0.3_03 package from the sun website and added the three jar files to the appropriate location. Also edited the java.security file.
    The program compiles and when deployed to the web server, it works great.
    Now the problem;
    I need to deploy the web site in a server that is connected to the internet. This server is running Windows 2000 Server. It has the same jdk1.3.1, j2sdkee1.3 and Tomcat 4.1. Also I added the three jar files from jsse1.0.3_03. I also updated the classpath in the environment variable accordingly.
    Everything is pretty much similar to the Laptop that I use to develop the site except that the OS is Windows 2000 Server.
    But when I deployed the class files to the web server and tested the site, the servlet gave the following error:
    "unknown protocol: https"
    What could be wrong? I really need to fix this issue as soon as possible and any input from you will be highly appreciated.
    Thanks in advance,
    Rajesh

    Hi,
    I used java class as beans and added to JSP page as follows (the code is not complete, I am just giving the parts that are relevant);
    login.java: Implementation of login to access the database      
    *through JDBC. Uses MySQL.                              
    Last Modified: 03.22.03                    
    package user;
    import java.sql.*;
    import java.util.*;
    public class login
         private static Statement statement;
         private static Connection database;
         private static String jdbcDriver = "org.gjt.mm.mysql.Driver";
         private static String source = "jdbc:mysql://127.0.0.1/user";
         private static String username = "user";
         private static String password = "passwordforuser";
         Constructor for initializing the connection to the database                              
         public login()
              try
                   Class.forName(jdbcDriver);
                   database = DriverManager.getConnection(source, username, password);
                   statement = database.createStatement();
              catch (Exception e)
                   System.out.println("Error (From loginDatabase Constructor): " + e.getMessage());
         Used to check the users      
         public String checkUser(String userName, String passwd) throws Exception
              try
                   ResultSet names = statement.executeQuery("SELECT username, passwd FROM users");
                   while (names.next())
                   return "success";
                   return "wronguser";
              catch (Exception e)
                   throw e;
    <!--*********************************************************************************
    login.jsp: Server page to process the login request. Uses login.class to     
    *add / login users.                                        
    Last Modified: 03.23.03                         
    **********************************************************************************-->
    <%@ page import="user.login" %>
    <jsp:useBean id="login" scope="page" class="user.login" />
    <jsp:setProperty name="login" property="*" />
    <html>
    <head>
    <title>Login</title>
    </head>
    <body bgcolor="#3366FF" link="#000000" vlink="#000000" alink="#000000">
    <table border="0" width="100%" cellspacing="0" cellpadding="0">
    <tr>
    <% //Login the user and display the status
    String loginResult = login.checkUser(request.getParameter("username"), request.getParameter("password"));
    if (loginResult.equalsIgnoreCase("success"))
    %>
              <h1 align="center">You are successfully logged to the Server!</h1>
    <%
    %>
    </tr>
    </table>
    </body>
    </html>
    Hope that helps...
    Good luck!
    Rajesh

  • New Hard drive, can't access certain aspects. Help needed please

    Hi everyone.
    I have an HP Pavilion dv6-6052ea laptop.
    I've been having problems with the hard drive so got a new one installed.
    My main issues are since getting it back, I can't access any of the original HP installations etc (I've downloaded all the drivers I know about through HP).
    The 2 main things I'm missing are 2 things that came with the laptop.
    1: Beats Audio sound system 
    2: Video Graphics: AMD Radeon HD 6490M (1 GB DDR5)
    and I have no idea how to get them back. Can anyone help. Do I need to install specific drivers? I can't find any trace that they exist on my laptop now apart from the stickers on the laptop! Any help is greatly appreciated. 
    I never had any CD back ups for the laptop. I do have the old HP back up etc saved on a USB but I don't know enough about the folders and files to know what I need to look for. (I still have the old hardrive.)
    Again, any help is massively appreciated. Thank you!
    Tony 

    If you used your HP Recovery Media, all factory install drivers and software would have been installed. If you didn't create your HP Recovery Media when you first setup your computer, please contact official HP support in your region / country, via the HP Worldwide Support Portal, to see if HP Recovery Media is available for your computer.
    If a generic Windows 7 installation disc was used, you will need to install all HP specific driver for your computer. Please try IDT High-Definition (HD) Audio Driver, Intel High-Definition (HD) Graphics Driver, and AMD High-Definition Graphics Driver to resolve your missing drivers issues. Windows 7 64-bit driver for your computer can be found on the HP Pavilion dv6-6052ea Entertainment Notebook PC Drivers page.
    If you have any further questions, please don't hesitate to ask.
    Please click the White KUDOS "Thumbs Up" to show your appreciation
    Frank
    {------------ Please click the "White Kudos" Thumbs Up to say THANKS for helping.
    Please click the "Accept As Solution" on my post, if my assistance has solved your issue. ------------V
    This is a user supported forum. I am a volunteer and I don't work for HP.
    HP 15t-j100 (on loan from HP)
    HP 13 Split x2 (on loan from HP)
    HP Slate8 Pro (on loan from HP)
    HP a1632x - Windows 7, 4GB RAM, AMD Radeon HD 6450
    HP p6130y - Windows 7, 8GB RAM, AMD Radeon HD 6450
    HP p6320y - Windows 7, 8GB RAM, NVIDIA GT 240
    HP p7-1026 - Windows 7, 6GB RAM, AMD Radeon HD 6450
    HP p6787c - Windows 7, 8GB RAM, NVIDIA GT 240

  • IReader installed but wont open Urgent help needed please!

    I have installed Acrobat Reader X.
    When i try to open files I get a problem saying Microsoft and Adobe have encountered a problem and need to close.
    I get an option to Debug, Send error report or Dont send.
    The information which comes up when I look for more information is the following::
    error signature
    Appname. Acrord32.exe. Appver 10.0.1.434 Modname acrord32.dll
    Modver 10.0.1.434  offset 001869666
    It was previously working then the next time I came to use it I got this.
    Desparately need help

    1. camera loading - have you tried updating or reinstalling your firmware?
    2. keyboard - define strange
    3. slow - how much is phone memory and what apps are running in background (see taskmanager, hold menu key until it shows)? turn off theme animations. it helps.
    4.  handwriting - have you set the handwriting recognition to recognize your particular penmanship? Go to menu>settings>phone>touch input. Set writing speed to very fast, calibrate your screen and take handwriting training so the phone will recognize your handwriting.
    5. qwerty - what things? how so? have you set it to qwerty?
    6. cannot scroll in file manager - its not a problem. Thats normal for the OS. Use Nokia Photobrowser or the Gallery for viewing pictures. File manager is for managing files, not viewing them.
    7.  Motion sensors - read #3
    8. Phone feels hot - how hot? Batteries heat up when charged. Its normal. However it depends on how hot exactly.
    9. Depends maybe on how long the video is. My 5800 feels hot when watching an entire movie. Also this would be reflected on #3 as well, as the phone may be working overtime.
    10.  Music when unplug headset - Its normal for almost all Nokia phones (heck even some other brands this is normal), try to use an alternative player if you like
    11. Back cover -  Its the design
    12. Yotube - use youtube app
    13. Use Nokia Photo Browser download from ovi store. It shows pics only and looks real cool. Anyway, you can put all your videos in the gallery into a virtual folder so that it is separate. Its the way the gallery is designed, to show both pics and video. As you can see, it is written Images and Videos, so they're supposed to be together in there.
    14. Adobe still hasnt caughtup its mobile solutions for its PC solutions. Its their fault not Nokia's or anyone else's.
    15. Depends on extension. Built in office reader only reads .doc, not .docx.
    If you find my post helpful please click the green star on the left under the avatar. Thanks.

  • Z87 msi mpower big problem help me please auto turn off and never boot

    i had bought msi z87 mpower from amazon 2 weeks ago while trying to open it, it just turn on and leds light up but no beep/ no display= no signal , i tried to take it out of case the same problem tried it with 1 stick of ram g-skill 1600 mhz 4g same problem i removed the vga card same problem i removed the ram , the motherboard didn't recognize it and power on led on but no beep nothing debug led all the time 00 , with cpu i5 4690k only some people told me , mobo didn't recognize the cpu because it's haswell refresh need update for bios , but how when i can't see any screen and it can't even boot just fan spin and leds light up nothing else , i sent it to some msi technical support in egypt to try to make bios for it , he told me he could bot it and update it from windows normally without any problem and he sent it back to me , while i took it to try at my home with my cpu the same problem motherboard didn't recognize my cpu , i had connected everything and as well wifi card with the pin and the 4 kits of 16 giga ram trying to power on same problem i did 1 restart and the motherboard never turns on again like dead
    i get it out the case and removed everything except wifi card same problem no power i just removed the wifi card it turns on for 1 second the turn off automatically i connect it again, and mobo don't turn on again i just release this pin of wifi card out of mobo the leds turn on like if the pin of wifi card shorting the motherboard i don't know why i removed it at all and try to turn on the motherboard light up and fans works for 1 sec then turn off automatically like the motherboard shut down it self for safety i try to connect the vga card only with 1 ram and cpu but the motherboard don't turn on at all , so motherboard only turn on now with 1 ram and cpu just turn on for 1 sec and then off if i connect anything more it will not turn on at all same problem with other power supply i sent it back to technical shop they said it's just bios corrupted and nothing bad but they told me they can't make it because bios files on msi site doesn't work for some reason and they want to give me it back like that turn on/ off immediately what could i do , did they make something bad when i sent it to them at start because it was turn on normally and when i try it just 1 restart and full fail to power after that and they admit , they had work through it to windows and make normal bios update so what would be the issue , i feel like if wifi card made some short to the motherboard with it's pin or the bios failed ot recognize wifi card and failed after 1 restart i don't know where to start or what to do psu good cpu good ram is good tested what could make some motherboard no turn on , as well i have removed the battery for 5 minutes and try with it and i made clear cmos button still same and they said they didn't touch motherboard while making bios
    help me please
    pc spec:
    cpu i5 4690k
    mobo msi z87 mpower
    ram g-skill 1600 4giga
    vga zotac gtx 970 amp extreme edition OC
     psu seasonic 600 watt eco
    case corsair spec 03 gamming

    Quote from: bassam.mohamed20 on 13-April-15, 02:46:28
    okay tomorrow i will try another processor chip but what if doesn't work , same here i suspect it's bios so what could let some motherboard turn on and off immediately?
    Bad CPU? bad Motherboard? Other stuff.
    The only way to know is testing parts.
    You said it already worked with another CPU. Did you check CPU socket pins?

  • HELP NEEDED PLEASE

    Hi everyone
    Programming help needed here. Any advice would be greatly appreciated!!!
    I have been assigned some work for a program called Processing 1.0 availale at http://processing.org/download
    I was give the 9 individual programs I needed to make however they were converted to Java files from .pde files. The program is based on Java but only runs .pde files and NOTHING else!
    I decompiled the files and got the source code, but it is a slight variation of the original someone made in processing, and needs some tidying to get it to run.
    I think the programs are very simple for a programmer, although I AM NOT.
    CODE is BELOW
    // Decompiled by DJ v3.10.10.93 Copyright 2007 Atanas Neshkov Date: 02/05/2009 13:15:00
    // Home Page: http://members.fortunecity.com/neshkov/dj.html http://www.neshkov.com/dj.html - Check often for new version!
    // Decompiler options: packimports(3)
    // Source File Name: Assign2_1.java
    import processing.core.PApplet;
    public class Assign2_1 extends PApplet
    public Assign2_1()
    SquareSide = 20;
    Rank = Nums.length;
    Side = SquareSide * Rank;
    Green = color(0, 255, 0);
    Yellow = color(255, 255, 0);
    BG = Yellow;
    public void setup()
    size(Side, Side);
    background(BG);
    fill(Green);
    for(int i = 0; i < Rank; i++)
    rect(i * SquareSide, 0.0F, SquareSide, SquareSide * Nums);
    public static void main(String args[])
    PApplet.main(new String[] {
    "--bgcolor=#ece9d8", "Assign2_1"
    int Nums[] = {
    6, 14, 8, 9, 2, 3, 4, 2, 8, 3,
    9, 2, 0, 5
    int SquareSide;
    int Rank;
    int Side;
    int Green;
    int Yellow;
    int BG;
    Edited by: chevy1 on May 2, 2009 7:32 AM

    HELP NEEDED PLEASEShouting is a good way ensure you don't get help. Also you should give a meaningful subject.
    Any advice would be greatly appreciated!!!I suggest you ask a question after providing enough information to be able to answer it.
    Also use CODE tags when posting code as it make the code more readable.
    We are more likely to help people who are trying to learn Java rather than someone who might be looking for an easy way out of doing an assignment.

Maybe you are looking for

  • Java Web Start no longer works after Update 4 (2)

    There was another thread under this title for which a solution was found by correcting the designated "open with" app back to Java Web Start. My problem however is the Java Web Start simply crashes every time i try to open it since the installation o

  • How to convert date from ccyymm format to mmddyy

    hi, How to convert date from ccyymm format to mmddyy

  • Stacked canvas is overlapping the content canvas

    Hi all, I am writing a program where I have one content canvas and a button to display the stacked canvas on button click. But when I run the form, 'only' the stacked canvas is showing-up even though I have hidden the stacked canvas in the on-new-for

  • Open-With menu displays two of every application

    After upgrading to Snow Leopard, there are two of every application when I right-click to "open-with" a file. I have followed directions found here, http://discussions.apple.com/message.jspa?messageID=10043445 except one problem, I have no .csstore f

  • DVC Pro HD codec

    Hi guys: I'm editing firewire-captured DVCPro HD footage from a Varicam for a series I'm working on. I don't understand the codec thing for After Effects movies. We use a lot of AE in our productions, but we if we use the DVCPro HD codec, we can't ge