Some plz help a poor student

Hi
I'm a student stuck on a really crappy course my teacher has taught me nothing about java and CORBA and given me a coursework on it :(
I just want 2 use this program client/server type with CORBA, it checks a users ID and username against those held in a database
Can any1 help me do that please??
import javax.swing.JOptionPane;
import java.sql.*;
public class log
public static void main(String[] args)
//client
String UserId;
String Password;
UserId = JOptionPane.showInputDialog("Eneter your UserID"); // were the user eneters his User
Password = JOptionPane.showInputDialog("Eneter your Password");//were the user eneters his Password
//server
try {
//have to be in a try catch block
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
//setting up the database
String dataSourceName = "cw2";
String dbURL = "jdbc:odbc:" + dataSourceName;
Connection con = DriverManager.getConnection(dbURL, "","");
//setting up the database
Statement stmt = con.createStatement();
String query = "SELECT Username , password FROM LOG"; // find the values and printen them out
ResultSet rs = stmt.executeQuery(query);
String s, n;
boolean flag = false;
while(rs.next())
s = rs.getString("UserName");
n = rs.getString("password");
if(s.equals(UserId) && n.equals(Password))
flag = true;
System.out.println( " access allowed " );
//grant access
break;
} //if
} //while
if(flag == false)
System.out.println( " access refused " );
//deny access
catch (Exception err) {
System.out.println("ERROR: " + err);
System.exit(0);
idl file
module myapp
interface validator
boolean validate_user(in wstring username, in string password);

Why not take a look at the tutorials?
http://java.sun.com/j2se/1.4.1/docs/guide/idl/index.html
http://java.sun.com/j2se/1.4.1/docs/guide/corba/index.html
You could adapt the Hello World IDL from the tutorial from
module HelloApp
interface Hello
string sayHello();
oneway void shutdown();
to something like
module Security
interface ClientVerifier
boolean allowAccess(in wstring name, in wstring password);

Similar Messages

  • How do i can the new message feature i my ipod some plz help me, how do i can the new message feature i my ipod some plz help me

    help...............

    You need to have either an iPod 3G or 4G and update the iOS to to iOS 5.  The 1G and 2G iPods can't go to iOS 5.

  • Wifi works poorly on my brandnew ipad2. can some one help me or shall I return it to the store?

    Wifi works poorly to none on my brandnew (three days old) ipad2.
    The same Wifi connection works perfectly with my PC laptop.
    Can some one help me or shall I return it to the store?

    Try here...
    Apple - Support - iPad - Wi-Fi

  • HT201077 photos not getting added up in my photostream. It's showing some kinda registry error in my windows. Plz help

    photos not getting added up to my photostream. It's showing some kinda registry error in my windows. Plz help!!

    Hi Melissa_C!
    I have an article for you that may help shed light on this circumstance:
    iCloud: My Photo Stream FAQ
    http://support.apple.com/kb/ht4486
    How long are My Photo Stream photos stored in iCloud?
    The photos you upload to My Photo Stream are stored in iCloud for 30 days to give your devices plenty of time to connect and download them.
    How many photos are stored in My Photo Stream on my devices and computers?
    iCloud pushes all your photos to the My Photo Stream album on your devices and computers, and manages them efficiently, so you don’t run out of storage space.
    Your iOS devices keep a rolling collection of your last 1000 photos in the My Photo Stream album. From there, you can browse your recent photos or move the ones you like to your Camera Roll or another album to keep them on your device forever.
    Because your Mac and PC have more storage than your iOS devices, you can choose to have all of your My Photo Stream photos automatically downloaded. In iPhoto or Aperture preferences on your Mac, select Photos (or Photo Stream) > My Photo Stream > Automatic Import. All of your photo stream photos will be imported into your Events, Projects, Photos, Faces, and Places folders in iPhoto or Aperture. On your PC with My Photo Stream enabled in the Control Panel, all of your photos will be imported into C:\\Users\<user name>\Pictures\iCloud Photos\My Photo Stream. For iCloud Control Panel 2.0 to 2.1.2 users, the path isC:\\Users\<user name>\Pictures\Photo Stream\My Photo Stream .
    Thanks for being a part of the Apple Support Communities!
    Regards,
    Braden

  • Can som one help me plz its about videos

    ma ipod 5th generation wont play the videos that i purchase at itunes fo it i dont no why but hte scream remains blacc fo atleast 3 min can some one hook me up wit som help i tried lookin it up on hea in the ipod recommendations crap and questions asked but it dont say nothin bout it can sombody plz help me i would appreciate it alot than u.

    iight okay well i bought the videos from itunes it should already be sent to my libary right, well i clicked so that it would up date ma ipod with the videos i dont got but when i did that and clicked the eject button for the ipod, and was going to wath the videos to see if they were in it was but wont play the scream would stay in black. so i reconnected my ipod and deleted them and put them bacc in its still the same way, by any chance do any body know cuz i wokr tomorrow wont be able to call the custumer services number.

  • I have lost my iphone 5 and after sometime I find it in my office but some one has lock it by Icoloud plz help me how to recover my phone

    Dear Friends
    I have lost my iphone 5 in my office  and after sometime I find it in my office in my back drawer but some one has lock it by ICloud plz help me how to recover my phone U have all details of my phone.

    The only way to locate/disable/erase any lost/stolen iPhone/iPod Touch is through Find My Phone or a similar app. However, this requires that Find My Phone be setup/activated, on your phone, before it was lost/stolen. You would then login at iCloud.com & try to locate it. This requires the phone be turned on & have an Internet connection. There is no other way to locate a lost/stolen iPhone. Apple can't/won't help you, nor will your carrier. Report the loss to the Police, your carrier & Insurance company. Change all of your passwords, especially your Apple ID/iCloud password NOW!
    If your carrier offers Blacklisting & they Blacklist the phone, it will be unusable as a phone.
    If locked with a passcode, and running iOS 7.0, then phone cannot be re-activated or the passcode removed without knowing your Apple iD/Password. It will be nothing but a useless paperweight.
    If not running iOS 7.0, the phone can be forced into recovery mode & restored.

  • Hey plz help me out!!  i am using macbook pro 10.5.8..... and was using photobooth...and then after some time i opened it and there was no green light on cam, and it displayed nothing! plz tell me how to fix it! i want to see my face again!!! plz help me

    hey plz help me out!!  i am using macbook pro 10.5.8..... and was using photobooth...and then after some time i opened it and there was no green light on cam, and it displayed nothing! plz tell me how to fix it! i want to see my face again!!! plz help me

    iSight troubleshooting
    http://support.apple.com/kb/HT2090

  • Hi plz some one help me :( i cant play any video in firefox,i see thumbnails but when i go to it said:an error occured plz try again later :( anyone know why?

    i hadnt this problem since i reinstall my windows 7 because of some problems ,after i install firefox and real player,flash player ,... :) i wanted to see some clips on youtube but i cant , not also youtube also any sites :( i have a new version of flash player and... plz help me friend its so annoying :(

    Check your plugins are uptodate!
    *http://www.mozilla.org/en-US/plugincheck/
    Type '''about:addons''' in URL and Goto Plugins
    * Check all the plugins are "Always Active"
    Somewhere on the page right click, go to view page info > permissions and make sure that adobe flash content is allowed to play on that domain.
    Flash in Protected mode occurs issues too
    *http://kb.mozillazine.org/Flash#Flash_Protected_Mode_issues_on_Windows_Vista_and_above
    *http://forums.adobe.com/thread/1018071

  • Ios 6 have some bugs on ipod touch 4g like appstore search bug and accessibility which i cant go out from and crashes every where and imassages that the massge i send goes up and stick to the other messages plz help or do ios 6.1

    Ios 6 have some bugs on ipod touch 4g like appstore search bug and accessibility which i cant go out from and crashes every where and imassages that the massge i send goes up and stick to the other messages plz help or do ios 6.1 can i change my a4 chip plz i swear when i pressed done to submite this safari crashed

    Try to do a hard reboot (no data is lost) by holding down the home and power buttons at the same time untilyou see the Apple logo. Then, let go of both buttons. If that doesn't work, try restoring your iPod and do NOT restore from a backup. This will erase your data, but you can sync back everything except app data and settings from iTunes.

  • My iphone is acting crazy plz help asap my phone is giving reading me everything i lay my hand on and is not letting me scroll down or select anything i must have accidentally switched some voice thing on plz help me close it:(

    my iphone is acting crazy plz help asap my phone is giving reading me everything i lay my hand on and is not letting me scroll down or select anything i must have accidentally switched some voice thing on plz help me close it:(

    First off, try triple clicking the home button.
    To scroll use three fingers and I think you have to double tap to get into something.
    Go to Settings>General>Accessability>Voiceover and then turn that off.
    Hope that sorts it for you

  • Some one plz help me i've done everything i could think of PLZ HELP!!!!!!!!!!!!!!

    Hey everyone last night my Zen touch froze up on me while i was listening to it so i hit the little restart botton and i thought everything was cool until i tried to do anything in recovery mode first i tried to do the clean up but nothing happened so i went down to format all and a sign popped up saying harddisk problem so i went to reload firmware and again the sign popped up saying harddisk problem so i went to reboot and that worked but it put me right back in to recovery mode and i just want to get out of recovery mode and listen to my music i have tried everything someone plz HELP ME!!!!!!!!!!!!!!!!!!!!!!!!

    i just got it though like 2 weeks ago so why would it be dying
    Hardware can be quite unpredictable at times. I ever bought a 20Gb hard disk and when I fix it on back at home, it just died. That is a case I never forget. Take back to shop and they do a on exchange. It is only for one day right out of the box fresh!!!! And sometimes the fault seem to be in that particular batch that is shipped in. So one got fault others all got the same fault.
    For your case maybe it is the same? :smileytongue:

  • I want to add an application like winrar useing rar file so i can auto download it all thet i have is a zip fill but i want a rar file too the option to auto download it is gray so i cant use it plz help me.

    i want to add an application like winrar useing rar file so i can auto download it all thet i have is a zip fill but i want a rar file too the option to auto download it is gray so i cant use it plz help me.
    == This happened ==
    Every time Firefox opened
    == all the time

    Here is the answer: Not an add on or plug-in! In fact you can get rid of all those useless plugins and add-ons! Go and get it. Im using the Alpha version right now and it works great. Works better then anything else .......add multiple links for all files sit back and relax. Its all done for you with no more intervention on your part! Check it out!
    http://wordrider.net/freerapid/
    Only one downside to this. No proper installer. You will have to copy the files to your respective programs folder.
    C:\Program Files\FreeRapid or C:\Program Files (x86)\FreeRapid
    Then create shortcuts to your desktop from FRD app. Thats it then start downloading!
    By the way this not an add. I just spent the whole night looking for the solution to this problem because I was so frustrated with the whole thing. I download tons of files and I have lots of other projects going and I dont have time for all this nonsense with RapidShare and Firefox. Hope this helps some other poor souls out there!

  • Error while opening a module. plz help me, very urgent.

    when i try to open a module, the following error message appears on my screen.
              " no j2ee component found in d:\krisp\programs\servlets".
              i've installed bea in c: drive and my servlet program is in d: drive.
              plz help me, it's very urgent.

    Can you provide some more information? What were you doing when this happened?
              Can you post the entire error message?
              -- Rob
              WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • Had 1418 error.formatted as fat.not fat32.now ipod doesnt work.why?plz help

    The iTunes keeps saying that:
    "The iPod "IPOD" cannot be updated. The disk could not be read or written to"
    "The iPod "IPOD" cannot be updated.
    And when I tried to restore it.
    "The iPod "IPOD" could not be restored. An unknown error occurred (1418)"
    thats a dreaded problem and i researched at many forums on how to solve it.....
    before reading ur reply....there were some other replies that i read.....
    which told me to format my ipod into fat partition...and not fat32 partition....then we had to update it and then restoring it would be possible........
    that was the only article which i came across and which had a solution to 1418 problem......
    so i began my work....
    but as soon as i formatted my ipod shuffle second generation into fat partition.......
    i restarted my comp...and then.the ipod is no longer working.......
    if i push it to on......then there is a constant green light on it which does not go off even if i connect it to comp. using the dock provided.......
    if i put it off,the green light goes off....
    ideally when an ipod shuffle is connected to pc..there is an orange light that starts blinking ,that shows that the ipod is being charged.
    but now when i connect mine.....
    the green light blinks only once......and then nothing happens...
    the device isnt working and so i cant even solve my 1418 problem ,as now i even have the solution.......
    help me plz....
    its really urgent....
    its been just a month my uncle gifted me this ipod ...he stays in north carolina........and i stay in india.....
    i dont even know if there are service centres of apple available in mumbai.and if they are,whether they are trust worthy or the ipod that i send to them might never to me and get stolen or something.....somebody might just keep it and say that its lost.......mumbai is not trustworthy.
    but if there is a recognized apple service centre then i would want to go there and get my ipod repaired....i have one-year warranty with me.......but i dont know if the warranty of a product bought in north carolina works in india......
    i cant throw this ipod....cause its my first ipod and it has hardly been time that i got it...its too early for me to throw it.....
    i dont know why the ****.....cant i connect it to the comp...
    i tried the following: after getting 1418 read and write error...:
    reinstalled the itunes 7.0.2
    reinstalled the drivers......
    reset the ipod shuffle...
    restarted my computer several times.....
    checked the cable....
    plugged the usb cable onto another port...
    scanned the comp for viruses......
    now the only thing left is that i think.....there can be a problem with the jack where the dock is plugged.....
    maybe thats the reason my ipod isnt working...
    even if i formatted into fat partition rather than fat32 partition,it should atleast be connected......
    should atleast charge.....
    should atleast be detected......
    my ipod is not even getting detected by the comp as any unknown device also.....forget as an ipod....
    i just shouldnt have formatted it...
    although i think....that formatting it did not lead to this problem......
    please help me.......
    urgently...........
    plz.....
    plz......send ur reply fast..plz help me.........
    get this ipod to work......
    i will fix the 1418 error myself....
    just get this device to work....so that comp starts detecting that i have connected something thru usb.....

    On top of the two suggestions already given, make sure that the drive letter being assigned to the ipod when you plug it in in windows is not also a drive letter being assigned to another drive. I've heard that this happens occasionally and can cause all kinds of conflicts, from problems you are describing to lockups when trying to sync.
    I would also try it on a different computer to see if that helps. Maybe you've got a friend or a computer at work that you can install itunes on and give it a shot there. This will let you know whether it's a problem with your specific computer or if it's a problem with the ipod.
    The fact that it runs in Windows and you were able to reformat the flash memory stick tells me that the Ipod is working, but that something on your computer is not.
    P.S. Obviously you've had it for 90 days, So I must assume that the USB port is working correctly. Otherwise the Ipod's battery would have drained by now. So I don't believe it is a hardware issue. So move past that for right now and look to your computer's settings for the answer.

  • I created an iCloud account and also had to get more space after I have done the purchase, I am unable to backup my phone! I have a stable wifi connection at home and all I see for hours and hours is "Backing Up .. Estimating time remaining"!!!!! Plz help

    I created an iCloud account and also had to get more space so after I have made the purchase, I am unable to backup my phone! I have a stable wifi connection at home and all I see for hours and hours is "Backing Up .. Estimating time remaining"!!!!! Plz help I'm unable to make the backup as I need to transfer all my data on my new iPhone 5S

    This may be caused by a corrupt existing backup that needs to be deleted, or by data on your device that is causing the backup to fail.  To troubleshoot these, try deleting your last iCloud backup (if you have one) by turning off iCloud Backup in Settings>iCloud>Storage & Backup, then tap Manage Storage, tap your device under Backups, then tap Delete Backup.  Then go back and turn iCloud Backup back on and try backing up again.
    If it still won't back up, you may have an app or something in your camera roll that is causing the backup to fail.  To locate which one, go to Settings>iCloud>Storage & Backup>Manage Storage, tap the name of your device under Backups, under Backup Options tap Show All Apps, then turn them all to Off (including camera roll) and try backing up again.  If the backup is successful, then the camera roll and/or one of your apps is causing the backup to fail and you'll have to located by process of elimination. Turn the camera roll On and try backing up again.  If it succeeds, turn some of your apps to On and try backing up again.  If it succeeds again, turn some more apps to On then try again; repeat this process until it fails.  Eventually you'll be able to locate the problem app and exclude it from your backup.
    In the meantime you can back up your phone to your computer by connect it, opening iTunes and going to File>Devices>Back Up.  Also be sure to transfer your purchases (File>Devices>Transfer Purchases).  Then set up your new phone and when given the option, choose Restore from iTunes Backup and follow the prompts to restore this backup to your new phone.  This will be much faster than using iCloud anyway.

Maybe you are looking for

  • Unable to run a report from developer 10g

    Hi, i can´t run a report from developer 10g when i run the report with the web icon appears the message Thu Jan 07 14:44:29 CST 2010 javax.servlet.jsp.JspException javax.servlet.jsp.JspException      at oracle.reports.jsp.ReportTag.doStartTag(ReportT

  • Adobe CS6 keeps closing as soon as most apps loads

    I just recently did a clean install on my computer and was trying to reinstall my adobe cs6 production premium pack and whenever I load up an app, the program just closes (either automatically or as soon as I start a new project). Application such as

  • EMAIL output type problem

    I am having problem in executing email output in order.In customer master email address is mentioned correct.But from order when I am executing the email output its going to some the customer email address not the one which is mentioned in the custom

  • JSF-1.1 RI default-locale is ignored.

    Hi, following is bug, I believe. com/sun/faces/config/ConfigureListener.java Method: configure()         value = config.getDefaultLocale();          if (value != null) {              if (log.isTraceEnabled()) {       // <--- !!!!                  if

  • Server connection

    I've only been using DW (CS3) for about a year and a half, while still maintaining and updating GoLive sites. I have noticed a significant difference between DW and GL server connections. GL grabs it quickly and holds it well for trouble free uploads