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 8395911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:24:53+00:00 2026-06-09T20:24:53+00:00

Basically I have 2 RESTful services: one build in Java and using Tomcat server,

  • 0

Basically I have 2 RESTful services: one build in Java and using Tomcat server, and other build in PHP and using Apache Server.
Is there any way to configure such that the app from Tomcat becomes a consumer of the one from Apache?

The webservice from Tomcat is at address:

http://localhost:8080/myapp1

and the app from Apache is at address:

http://localhost:80/myapp2.

What I want is to use the responses of the RESTful service on Apache in the Tomcat one, something like this to use from the Java code:

HttpGet httpget = new HttpGet(http://localhost:80/myapp2/items);

Currently I am receiving 404-Not Found. Is there any way to do this? Or is there another way to make the services communicate?

  • 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-09T20:24:55+00:00Added an answer on June 9, 2026 at 8:24 pm

    Forgot to post the answer. I feel so dumb – I was having a mistake in my code. It works as expected. Here is a simple example of calling the Apache server from Tomcat:

    final static String BASE_URL = "http://localhost:80/proiect/";
    
        private String getResponse(String title) {
            HttpClient httpclient = new DefaultHttpClient();
            String url = (title != null && title.length() > 0) ? BASE_URL + "?title=" + title : BASE_URL;
            HttpGet httpget = new HttpGet(url);
            String response;
            try {
                ResponseHandler<String> responseHandler = new BasicResponseHandler();
                response = httpclient.execute(httpget, responseHandler);
                return response;
    
            } catch (ClientProtocolException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }
    
            return null;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I basically have a program that filters records from one excel file to another
I basically have a server set up and I'm accepting new clients(UNIX) and i'm
Most of the work I do is with RESTful web services but one of
I am currently developing a RESTful Webservice in Java using the Jersey library. For
well right now I basically have the jquery load function like this $('#results').load(sources.php?source=1&page=<?=$_GET['page']?>&search=<?=$_GET['search']?>); so
I am using Jersey restful web services for the Application development. <servlet> <servlet-name>Jersey Web
I want to build a web application which basically is a restful web-service serving
I am using cakephp 2.1.0 I have a Post Controller that basically creates a
Basically I have an existing CollegeClass Controller that has the default basic RESTful actions
I basically have three tables, posts, images and postimages (this simply contains the ids

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.