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

  • SEARCH
  • Home
  • 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 8977237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:19:32+00:00 2026-06-15T19:19:32+00:00

I am running Tomcat 5.0 and I have problem with getting a resource from

  • 0

I am running Tomcat 5.0 and I have problem with getting a resource from tomcats ‘webapps’ from Java. There is a html file that I check if it’s available after server start in

  tomcat_folder/webapps/myProject/site.html

In Java I run this code when server is started:

  URL url = new URL("http://localhost:8080/myProject/site.html");
  URLConnection con = url.openConnection();
  Object content = con.getContent();

getContent() throws FileNotFoundException.

But when I put “http://localhost:8080/myProject/site.html” into browser, the site is displayed without problems.

Also I tested that on 4 machines – on 2 everything is fine, on other 2 FileNotFoundException.

I thought it might be some folder security access problem or user rights, but in the end I have no clue. Any suggestions?

  • 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-06-15T19:19:33+00:00Added an answer on June 15, 2026 at 7:19 pm

    I found the solution to my problem.

    The cause was a windows service using port 8080, which was also in use by Tomcat. Resource was available through browser, but not from Java code.
    After stopping conflicting service everything works as it should now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Java webapp, running in Tomcat 6, that loads RSS feeds from
I have a Java web app running on Tomcat 7 that is using JDBC
I have a problem with a server, written in Java, running on Tomcat, serving
We have an application running on Tomcat 6.0.32 and using JSSE (Java 1.6.0_26) for
I have a simple method (running on Tomcat 6.0.35) that looks like so: @RequestMapping(value
I have a Java web application running on Tomcat. I want to load static
I have tomcat 6.0.18 running on one server without a problem. With the exact
I have a Java Webapplication running on Tomcat, executing Shell scripts at runtime in
I have a JSP page that has 2 forms running on Tomcat 6. One
I have a new tomcat application server running on tomcat 6, java 6 (openjdk),

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.