Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6865041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:59:25+00:00 2026-05-27T02:59:25+00:00

So my question is related to my previous post: SQLException : No value specified

  • 0

So my question is related to my previous post: SQLException : No value specified for parameter 1

I have no idea what a properties file is. Can I create a properties file from text editor, and have the path set in the catalina.properties file in the Tomcat/conf folder? or do I have the following

javabase.jdbc.url = jdbc:mysql://200.230.71.12:3306/social
javabase.jdbc.driver = com.mysql.jdbc.Driver
javabase.jdbc.username = cepein
javabase.jdbc.password = 1234cinco

inserted within shared.loader= in the catalina.properties file?

So anyway I did the following:

# starting with file:
shared.loader= /home/shaunkoo/NetBeansProjects/dao.properties

and load the file in via

private static final String PROPERTIES_FILE = "/NetBeansProjects/dao.properties";
private static final Properties PROPERTIES = new Properties();

static {
    ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
    InputStream propertiesFile = classLoader.getResourceAsStream(PROPERTIES_FILE);

However, I am getting the error that states that /NetBeansProjects/dao.properties is missing in classpath. Any clue what I have done wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:59:26+00:00Added an answer on May 27, 2026 at 2:59 am

    I have no idea what a properties file is.

    A Java .properties file is just a configuration file with key=value pairs in each line, like a Windows (actually, C++/C#) .ini file.

    See also:

    • Java Tutorials – Essentials – Platform Environment – Properties

    Can I create a properties file from text editor, and have the path set in the catalina.properties file in the Tomcat/conf folder?

    It boils down to that the file has to be placed in the Java classpath. In case of a Java web application, you can put it in one of the existing paths which is covered by the classpath, such as /WEB-INF/classes (in an IDE, placing the file in root folder of Java source should make it to end up in /WEB-INF/classes). You can of course also put it somewhere else and add its root path to the classpath, as you’re trying to do with shared.loader of Tomcat.


    So anyway I did the following:

    # starting with file:
    shared.loader= /home/shaunkoo/NetBeansProjects/dao.properties
    

    This is not correct, it has to point to a folder which represents the classpath root, or to an individual JAR file. In your case, it should be:

    shared.loader= /home/shaunkoo/NetBeansProjects
    

    This way the content of the above folder becomes part of the classpath.


    and load the file in via

    private static final String PROPERTIES_FILE = "/NetBeansProjects/dao.properties";
    

    This is not correct, the path for context class loader cannot start with / and should not point to a folder which is not inside the classpath. You’ve specified the /home/shaunkoo/NetBeansProjects to be part of the classpath, so any files which are inside the folder are accessible by the class loader, not the folder itself. In your case, it should be:

    private static final String PROPERTIES_FILE = "dao.properties";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question is related to the previous post. How to save file and read
I couldn't get the POST value in servlet page. my previous question related to
This question is related to a previous post of mine Here . Basically, I
This question is related to a previous post . Is there something comparable to
This question is related with one of my earlier questions.. Previous Post In there
This question is related to my previous question . The storyline: I have an
This is a CSS related question, I got one good answer from my previous
Related to my previous question , I have a string on the following format:
This is related to a previous question I asked with Jquery. If I have
Following up from my previous question. Can anyone explain why the following code compiles

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.