| | |
load database info in a JSP using a config file
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
Check the Read Me post at the top of the jsp forum:
JSP database connectivity according to Model View Controller (MVC) Model 2
JSP database connectivity according to Model View Controller (MVC) Model 2
Check out my New Bike at my Public Profile at the "About Me" tab
•
•
Join Date: Sep 2009
Posts: 2
Reputation:
Solved Threads: 0
This is what I am trying to do
but this is apparently not retrieving any data from the properties file. Can someone tell me where exactly does the .properties file needs to be placed (the directory structure).
java Syntax (Toggle Plain Text)
Properties properties = new Properties(); try { properties.load(new FileInputStream("database.properties")); } catch (IOException e) { System.err.println(e.getMessage()); }
but this is apparently not retrieving any data from the properties file. Can someone tell me where exactly does the .properties file needs to be placed (the directory structure).
Last edited by peter_budo; Sep 25th, 2009 at 4:37 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
![]() |
Similar Threads
- Unable to connect to the database! (PHP)
- Creating Config File (PHP)
- jdbc connection w/ config file (Java)
- database string in web.config not working (ASP.NET)
- Web.config File (C#)
- What is config file used for? (C#)
- Help! Don't Know How to Edit includes/config.inc file!! (MySQL)
- smb/// no host "null" (*nix Software)
- sourcing a python config file? (Python)
Other Threads in the JSP Forum
- Previous Thread: JSP and MySql connectivity
- Next Thread: JSP Bank Application
| Thread Tools | Search this Thread |
apache backbutton combobox connection database development directorystructure dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 network parameters passing ping printinserverinsteadofclient redirect request.getparameter response servlet servletdopost()readxml sessions software ssl state_saving_method stocks sun tomcat tutorial update video web






