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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T08:43:35+00:00 2026-06-13T08:43:35+00:00

On port 80 I have normal apache web server. On port 8080 I have

  • 0

On port 80 I have normal apache web server.

On port 8080 I have tomcat with client and server side stuff.

My goal is:

http://www.mydomain.com renders a static and SEO friendly index.html while javascript stuff is loading.

In the header of this index.html I load http://www.mydomain.com:8080/myapp/stuff.js

stuff.js is compiled with gwt and calls a RootLayoutPanel.get().add(nice_panel) which will remove static content and show dynamic widgets. It also calls servlets (server side code).

Problem: for security reasons, browsers wont let me load http://www.mydomain.com:8080/myapp/stuff.js because it is on a different port.

Wrong attempt: I tried to create a symlink from “normal” apache web server directory to the tomcat webapp containing stuff.js. I am now able to load stuff.js because its url is: http://www.mydomain.com/mysymlink_to_tomcat/stuff.js. But stuff.js is not able anymore to call servlets on server side again because of browsers security rules (“XMLHttpRequest cannot load … origin …is not allowed by Access-Control-Allow-Origin”).

I would like to avoid the “crazy” solution of redirect from index.html to tomcat with header(‘location: http://mydomain.com:8080/another_index_on_tomcat.html‘). This solution works but it has many drawbacks (SEO…)

What would be the best approach ?

Thanks.

  • 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-13T08:43:35+00:00Added an answer on June 13, 2026 at 8:43 am

    You have basically two solutions:

    • make it work with the 2 origins: use the xsiframe linker in GWT to allow the page on :80 to load the script from :8080 (for readers: it’s not about loading, it’s about what the script does).
      Add the following to your `gwt.xml:

      <add-linker name='xsiframe' />
      

      That unfortunately won’t solve your issue with GWT-RPC (o whatever you use to talk to the server). For that, there’s CORS.

    • use a single origin: use Apache’s mod_proxy (or mod_jk) to proxy your Tomcat through your Apache. Nobody will ever use :8080, everything will go through :80. See Using Tomcat with Apache HTTPD and a proxy at https://developers.google.com/web-toolkit/doc/latest/DevGuideServerCommunication#DevGuideRPCDeployment

    And of course there’s also the solution of ditching the HTTPD and serving everything with Tomcat (recent Java and Tomcat versions have fixed their slowness issues).

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

Sidebar

Related Questions

I have an app running on port 9100 on a remote server serving http
In sockets I have written the client server program. First I tried to send
I'm having trouble getting a client/server implementation of Quartz.NET working. I have a SQL
i want to have both an Apache and a Game Server to be reachable
I have alternative layouts in my layout-normal-land and layout-normal-port folders and they are correctly
I have a website with apache 1.3(SSL enabled) + mod_jk + tomcat 5.5 on
I have successfully sent email to a remote server using port their port 25
I have written a simple SSL Client/Server set of programs from a few tutorials
I have a C/S program. Client use socket to send a file to server,
I have a Web service based application, where the web server is running in

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.