How can I use JDBC to get the db name in a db url ?

Hi,
My program needs to read a database url from a txt file and connect to the specify database. And my program also needs to know what's the database name. So DatabaseMetaData or Driver can retrieve the database name from the url ?
Please brief me about that.
thank a lot.

You need to write a java program to read the text file with buffered streams. Then you need to use this file as a bean.
In the same file you can have connection to your database.
get theconnection and related things in your web application.
Thanx,

Similar Messages

  • How can I use applet to get the desktop image of client

    hi,I have a question to ask u.
    How can I use applet to get the desktop image of client? Now I develop a web application and want user in the client to get his current image of the screen.And then save as a picture of jpeg format ,then upload it to the server?
    I have done an application to get the screen image and do upload file to server in a servlet with the http protocal.

    Since the desktop image is on the client's local hard drive, you'll need to look at trusted applets first.

  • How can I use evaluate to get the instance variable in customized tag

    1.
    At first , I create a class called bean,and declared several params in it and do not define any getter function for the param.
    class bean{
    String param = "test";
    SomeClass scObj = new SomeClass();
    2.
    The second ,I use
    request.setAttribute("beanObj",new bean());
    3.
    And then I wanna use the customized tag to show a text box , then initialize it's value.
    <salt:text name="param" value="beanObj.param">
    <salt:text name="obj" value="beanObj.scObj.func()">
    4.
    I tried the evaluator provided by JexlContext ,Struts, JSTL and it seems that if I do not define the getter for the variable ,I can not get the bean's instance variable's value.
    Expression e = ExpressionFactory.createExpression( value );
    JexlContext jc = JexlHelper.createContext();
    jc.getVars().put(strInitBeanName, request.getAttribute("beanObj"));
    Object obj = e.evaluate(jc);
    the result of the obj is null....
    Can anybody recommand some other evaluator can get the value of a instance variable from an object?

    do you have any other suggestion ? Nops, somebody else may have though. AFAIK, all lookups of the type
    beanName.propertyNameuse reflection on the getXXX() methods to access the property.
    Having said that, I guess you could write one though in a custom tag, using the same - reflection (you will ahve to rely on the java.lang.reflect.Field class quite heavily) - but that would be reinventing the wheel for most other functionality that you would have to include (like looking up the bean in scope etc)
    cheers,
    ram.

  • How can I use Office Update without the Office CD?

    How can I use Office Update without the Office CD? On the microsoft website I've clicked the options which mean I shouldn't need the CD (which wasn't supplied with the laptop), but poartway through updating the service pack I get a request for the Office 2000 Professional CD.
    Any suggestions?

    Hi
    Did you mean a Office or One Note?
    As far as I know the One Note is a part of the Recovering Image and the CD is not delivered with the unit. Furthermore the Toshiba units are not delivered with the Office 2000 software.
    Nevertheless, did you check the update function in the Help i.e. in Word?
    There you will find a options called Check for Updates
    http://office.microsoft.com/en-us/officeupdate/default.aspx
    Bye

  • HT5699 I forgot the answers for security questions, how can I reset them and get the access back to the iTunes store?

    Need help to get access to iTunes store. I bought an iTunes card bor buying on iTunes store.
    I forgot the answers for security questions, how can I reset them and get the access back to the iTunes store?

    If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then go to https://appleid.apple.com/ and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you should see an option to send security question reset info to your rescue email address.
    If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then you won't get the reset option - you will need to contact iTunes Support or Apple to get them reset.
    e.g. you can try contacting iTunes Support : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management , and then 'Forgotten Apple ID security questions'
    or try ringing Apple in your country and ask to talk to the Accounts Security Team : http://support.apple.com/kb/HE57
    When they've been reset (and if you don't already have a rescue email address) you can then use the steps half-way down this page to add a rescue email address for potential future use : http://support.apple.com/kb/HT5312 . Or you could change to 2-step verification : http://support.apple.com/kb/HT5570

  • How can i use my account without the billing info, as i do not have a credit card. and my shipping and billing info is under US. i'm in singapore. how do i change this?

    how can i use my account without the billing info, as i do not have a credit card. and my shipping and billing info is under US. i'm in singapore. how do i change this?

    If you are just visiting Singapore, then leave the account as it is. If you have moved there, then view your account using the iTunes app on a Mac or PC and change the country/region to your current location and address. If you do not have a bank card, you can fund your account using iTunes gift cards if available in Singapore.

  • HT201272 Hello there,I delete my scruff application on the 8/05/13. Receipt N: 184052577343. And I was charged ammount of £ 16.99on the 15/05/13. I t's a Subscription Renewal. How can I stop it and get the refund of this ammount back on my account? Thank

    Hello there,I delete my scruff application on the 8/05/13. Receipt N: 184052577343. And I was charged ammount of £ 16.99on the 15/05/13. I t's a Subscription Renewal. How can I stop it and get the refund of this ammount back on my account? Thank you!!

    There are instructions on this page for managing and stopping auto-renewing subscriptions (deleting an app won't stop it) : http://support.apple.com/kb/HT4098
    In terms of a refund, what does it say on the app's description page in the store (a lot say that refunds aren't given) ? But you can try contacting iTunes Support and see if they will refund or credit you : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • HT4901 I have HughesNet with a capped amount of Internet capacity. How can I use iCloud but adjust the time it is on to conserve my Internet allowance and not have to backup my information all the time????

    I have HughesNet satellite for an ISP with a capped amount of Internet capacity. How can I use iCloud but adjust the time it is on to conserve my Internet allowance and not have to back up my information all the time?

    Thanks Roger W1,
    Yes, I was using iTunes to sync over cable without problems since orinigal purchase in 2011 and using 10.6 w/o problem. There was an "update" in Nov 2012 that crashed the sync service. I went to the Apple Store and reviewed the problem with the Geniuses there. It was discovered at that time that the update included mandated use of iCloud but enough of the un-updated code remained that he was able to patch functions to allow Microsoft Office to still sync over iTunes.
    This March (+/-) there was another "update" to 10.6 that totally destroyed the patch that was in place so there was no sync service available between Microsoft and iTunes what-so-ever. Then recently, because of some unknown process, all my notes, contacts, and calendars were erased in both my Apple utilities and Microsoft utilities.
    After many hours of frustration I was able to recover most of the information to the Apple utilities only, but those were unstable. At my visit to the Apple store it was suggested that an upgrade to 10.8 might solve the stability problem. That it did but being connected to the iCloud all the time keeps using up all my Internet time and I have nothing left to check emails or do research.
    This, to me, is not my problem but one created by Apple. I have searched the Internet and support groups and there doesn't seem to be a solution.
    The "aircraft mode" turns off all other communication functions and is not acceptable. Neither is disconnecting/turning off Airport on my MBP.
    Thanks,
    Jay

  • How can i use microsoft office on the mAC - what app do i purchase? help?!!

    how can i use microsoft office on the mAC - what app do i purchase? help?!!

    What aspect of Microsoft Office? Office is a suite of programs... Word, Excel, Powerpoint, etc.
    You've got several potential options. Libre Office and Open Office (both googleable) are 'open source,' free, downloadable programmes that will open most MS Office programmes and perform many of the functions of MS Office. Might be an idea to have a look round for reviews (etc) first, to see if they sound like they'll match your needs.
    If you're keen to use the App Store, there's Apple's own suite of programmes: Pages, Numbers and Keynote. They're a word processor, spreadsheet programme, and presentation-type programme with similar functions to Word, Excel and Powerpoint respectively. They're pretty good for most functions, and are better integrated with Macs than MS programmes. They're excellent programmes for what they do, and relatively cheap (about £14 each?).
    But if you're heavily reliant on MS, want ALL the bells and whistles of MS, or need to regularly transfer files between MS programmes on other computers and your laptop / desktop computer, then they might not be the best of ideas. Keynote - IME - can have some difficulties in transferring formatting to Powerpoint.
    Finally, there's MS Office Mac 2011. You can't download MS Office from the App Store, but can order the CDs from most online stores (including Apple's own store). It might be worth price hunting - if you're a student, you can usually find the programmes relatively cheap (£38 at the moment on Software4Students, though you'll need to belong to an academic institution / have a UK .ac email address). Apple's own prices on MS software are unlikely to be the best prices out there (though the product will be identical).
    MS Office includes Word, Excel and Powerpoint in the basic version. The slightly more expensive version (which, I think, is the £38 one on S4S) includes Outlook. Which - IME - is far more of a nuisance than Apple's native Mail programme.
    (I should probably add - I'm an academic. I own both Apple's own programmes, and MS Office 2011. I tend to use the MS programmes more, if only because they're the ones that other people tend to use, and transferring between Apple and MS programmes is a minor inconvenience. Pages also lacks Garamond, my favourite work font. The Apple progs are, however, far more beautifully integrated, and would be MORE than good enough for most users...)

  • HT4437 how can i use my labtop on the wed and watch everthing im doing on my tv

    how can i use my labtop on the wed and watch everthing im doing on my tv

    Mirror, if your MBP is early 2011 or later running OSX 10.8 or newer.  If older visit www.airparrot.com, a third party app that works OK, mixed reviews but mine works well.

  • How can i use my tv as the 2nd monitor

    hi, how can i use my tv as the 2nd monitor, for example pull a video from desktop to tv for windows7, the computer is hp omni 120 all in one. because i have a cable for it that connects to the tv but i dont know how to connect the pc to the tv. i tried to go on the 'change screen resolutions' but that didnt help. thanks

    Hi,
    Here is it specs:
       http://h10025.www1.hp.com/ewfrf/wc/document?cc=us&lc=en&dlc=en&docname=c03343048#N1221
    You can only see:
    Front:
    1 - Screen area
    2 - Microphone array
    3 - Webcam camera
    4 - Stand
    5 - Speakers
    Back:
    1 - Optical disk drive (actually right)
    2 - Stand
    3 - Kensington lock slot
    4 - Power button
    5 - Memory card reader and other I/O on left side
    6 - Motherboard back I/Os (specific I/Os are model dependent)
    7 - Activity indicator
    8 - Power connector
    9 - LAN (ethernet)
    10 - Four USB 2.0 ports
    11- Audio port (actually left side)
    Left:
    1 - Hard drive activity indicator
    2 - Memory card reader activity indicator
    3 - Memory card reader
    4 - Two USB 2.0 ports
    5 - Microphone jack
    6 - Audio port
    Right:
    1 - Optical disc drive
    The only hope is "6 - Motherboard back I/Os (specific I/Os are model dependent)" area:
    Please check area 6 above. As mentioned in my previous reply: Most likely your machine has no video out port.
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • How can i use dsadm to change the ldap port?

    I have a ldap with port 1389,I changed it to 389,now I can not start it because it is a non root user.
    Now I want to change the port back to 1389,but I can not use dsconf because the server is not running.
    How can i do now? How can i use dsadm to change the port?
    Thank u very much.

    My apologies, I didn't mean to be rude/impolite.
    I just wanted to emphasize that in a situation where a Directory Server doesn't even start, you cannot interact with the live server to configure the new port (either talking LDAP or otherwise). All you can do in that case won't be related with the LDAP (that's just the name of the protocol): either assigning network privileges to the user, or changing the Directory Server configuration file.
    The other thing I'd like to outline (and this could take a separate thread ;-) ), is that semantically, I'd prefer talking of a Directory Server instead of an LDAP Server because the former is 'something' providing Directory Services, whereas the latter is just the name of the protocol we use to interact with the server; but this is just my personal opinion, you don't have to agree with me.
    that's all folks!
    marco

  • How can I use aperture after receiving the full adobe suite? It won't allow me to use it.

    How can I use aperture after receiving the full adobe suite? It won't allow me to use it. I receive a dialogue box which states previews are not allowed in  aperture and the application is shut down.

    Aperture is Apples version of Lightroom. This has nothing to do with Adobe. Ask on a Apple forum. You won't find many people here using this program.
    Mylenium

  • How can i use text expander with the new Mavericks,

    how can i use text expander with the new Mavericks,

    I regret upgrading to mavericks for the same reason
    ftamez wrote:
    how can i use text expander with the new Mavericks,
    Now I have been searching - and you have to buy an app and it will cost you $34.99 (what a rip off)

  • How can I use Mac OS in the IPAD2

    How can I use Mac OS in the IPAD2?
    I really want to use Mac OS in the IPAD2!!!!!!!

    no ios is ARM based and all IOS devices have ARM cpu's
    osx is x86 based (and older version are also powerPc based)
    an os made for a cpu type can't run on another type of cpu

Maybe you are looking for