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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T07:27:04+00:00 2026-06-11T07:27:04+00:00

I have a web app that I run locally in tomcat and which I

  • 0

I have a web app that I run locally in tomcat and which I have also deployed to Cloudbees. However, I am having some problems with cloudbees using a virtual host versus my local tomcat using a context path.

I access my local tomcat app via

  • http://localhost:8080/SpringMVC

In cloudbees, I access it via

  • http://springmvc.shaunabram.cloudbees.net

So far so good, but the problem is when I try to do a submit. Locally, this submits successfully to

  • http://localhost:8080/SpringMVC/HelloWorld

But on cloudbees, it tries (and fails) to submit to

  • http://springmvc.shaunabram.cloudbees.net/SpringMVC/HelloWorld

If I manually modify the browser URL to

  • http://springmvc.shaunabram.cloudbees.net/HelloWorld

it all works fine.

I saw a similar problem posted here, but the suggested solution was to

  1. update the web.xml to use the prefix path (e.g. I think
    /SpringMVC in my case), but this would break my local tomcat version, or
  2. deploy the app as an EAR file with an application.xml – but
    migrating to an EE container like tomcat EE or JBoss will be a much
    bigger task.

I had thought the solution might be to use the CloudBees Web Configuration File to somehow configure the app to use (something like) http://springmvc.shaunabram.cloudbees.net/SpringMVC as my base url, but I can’t see any examples of that (all CloudBees Web Configuration File examples seem to be used for environment specific DataSources).

Any help greatly appreciated!

Shaun

  • 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-11T07:27:05+00:00Added an answer on June 11, 2026 at 7:27 am

    Web application should never use absolute path and always build URL using ServletContext.getContextPath(). I wonder you hit this issue, assuming you use SpringMVC that handles this for you.

    Or maybe you hard-coded some resources path, but should use to generate the adequate path, or a scriptlet to append context Path :

    <c:url value="/style.css" var="url" />
    <link rel="stylesheet" href="${url}" type="text/css">
    

    or

    <link rel="stylesheet" href="${pageContext.request.contextPath}/style.css" type="text/css">
    

    see also Spring MVC Request URLs in JSP

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

Sidebar

Related Questions

I have an app that is run from a compiled DLL on a web
I have a web app I'm making to run off a CMS that is
I have a semi-large web application that we run locally and I need to
I've deployed, after some struggle, a web-app on a (remote) Tomcat 5.5 server (Turnkey
I have a web app that runs fine in Visual web developer. But when
I have a web app that reads data from a SQL DB that contains
I have a web app that has a big and complex form (fields, checks,
We have an web app that is talking to Netsuite via Netsuite's web services.
I have a web app that I've recently applied a jQuery ThemeRoller theme to.
I have a web app that lets a client define a daily rate for

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.