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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:06:19+00:00 2026-05-17T02:06:19+00:00

SUMMARY: The goal is to find the path to the WEB-INF folder in the

  • 0

SUMMARY: The goal is to find the path to the WEB-INF folder in the target folder for maven-jetty-plugin that is compatible with other servers as well. The ServletContext.getRealPath(“”) works beautifully for, e.g., Tomcat, or mvn jetty:run-war. Thank you

Misha


Dear All:

This is related to
http://tickets.openmrs.org/browse/TRUNK-1760

It can be easily tested with the following commands:

mvn archetype:generate -B -DarchetypeGroupId=org.appfuse.archetypes -DarchetypeArtifactId=appfuse-light-struts-archetype -DarchetypeVersion=2.1.0-M1 -DgroupId=com.mycompany -DartifactId=myproject
cd myproject
patch -p0 < diff
cd myproject
mvn clean install -DskipTests && mvn jetty:run

Please find the diff file here:
http://old.nabble.com/file/p29815681/diff

Now, navigate to
http://localhost:8080/
in a browser and this will point to
!!! /home/misha/workspace/myproject/src/main/resources

Should this not, instead, point to?

./target/classes

or

./target/myproject-2.1.0-M1/WEB-INF/classes

Is it possible to modify this behavior?

Thank you so much

Yours

Misha Koshelev

  • 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-05-17T02:06:20+00:00Added an answer on May 17, 2026 at 2:06 am

    It seems one work around, per Jan Bartel’s very helpful post on the user at jetty dot codehaus dot org mailing list, is to use

    mvn jetty:run-exploded

    I believe one of the disadvantages of this method is the extra time that it will take to first assemble a WAR and then to run it.

    Thank you
    Misha

    p.s. Reference to Jan Bartel’s post:
    http://markmail.org/message/445huiwr6vljblxn

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

Sidebar

Related Questions

The end goal is to have some form of a data structure that stores
The Goal Say I have a collection/folder of documents in Google Docs/Drive, and I
Summary: I need to collect data reliably from the satelite SQL servers using the
My goal is to come up with a spec file that defines subpackages dynamically.
Question/Environment The goal of my web application is to be a handy interface to
Goal: I want to achieve the path address, as string, of the application created
I am trying to create an rpm package with the help of the rpm-maven-plugin.
Summary I am making a ordering form that will multiply Qty of Items by
Summary: I want a horizontal row of ImageButtons to scale down evenly to fit
Summary For some reason, git commands don't work the same when I am logged

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.