1

I know this question has been asked before many times, but after reading through all of them, I unfortunately couldn't find an answer that applied to me. The reason I say that is because my "base name" is coming up as "LocalStrings" and I'm not exactly sure why. Here is what my web.xml file looks like:

<?xml version="1.0" encoding="utf-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<servlet>
    <servlet-name>Backend</servlet-name>
    <servlet-class>com.backend.BackendServlet</servlet-class>
</servlet>
<servlet>
    <servlet-name>TestKody</servlet-name>
    <servlet-class>com.backend.TestKody</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>TestKody</servlet-name>
    <url-pattern>/TestKody</url-pattern>
</servlet-mapping>
<servlet-mapping>
    <servlet-name>Backend</servlet-name>
    <url-pattern>/backend</url-pattern>
</servlet-mapping>
<welcome-file-list>
    <welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>

I can get to the "Backend" servlet fine, but whenever I try to get to "TestKody" it comes up with the error "Caused by: java.util.MissingResourceException: Can't find bundle for base name LocalStrings, locale en_US." Again I apologize for asking a question that has been asked before, but again I couldn't find an answer that pointed me in the right direction!

EDIT:

Here are pictures

enter image description here

enter image description here

3
  • How are you trying to fetch/load your resource file? Commented Feb 20, 2016 at 0:21
  • @Abdelhak I apologize, but what do you mean exactly? Commented Feb 20, 2016 at 0:21
  • @Abdelhak sorry, I'm freshly new to eclipse/java! I created a web application project from google's plugin. I didn't create a .properties file myself, but there are two there (though I don't know if they are what you're looking for). I'm going to upload a picture of both of them and the file structure so you can see it. Commented Feb 20, 2016 at 0:30

1 Answer 1

1

Your are missing the servlet-api jar,f you're using maven add this dependency in your project:

 <dependency>
  <groupId>javax.servlet</groupId>
  <artifactId>javax.servlet-api</artifactId>
  <version>3.1.0</version>
 </dependency>

If not you can add the jar in your classpath from here.

Sign up to request clarification or add additional context in comments.

1 Comment

I downloaded the jar, put it in my lib folder, went to Project > Properties > Java Build path > Add JARs and selected that jar but it still isn't working. Is there anything else I'm missing?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.