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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:13:33+00:00 2026-05-28T22:13:33+00:00

I have a maven project that I run using jetty: $ mvn run:jetty Where

  • 0

I have a maven project that I run using jetty:

$ mvn run:jetty

Where in my project should I be storing my static files like HTML, CSS, Javascript, images?

My layout is using a simple web app arch type:

/src/main/java/webapp/web-inf/views/

Should I just create a folder there named e.g. ‘assets’ ?

And then my view pages will reference the /assets folder somehow? I’m confused as to what path I will use in my html pages to reference an image like:

/assets/images/logo.png
  • 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-28T22:13:34+00:00Added an answer on May 28, 2026 at 10:13 pm

    This isn’t so much a Jetty question as it is a general Java webapp question. If you plan to serve them out directly (like *.css, *.css, images, etc), put them somewhere above WEB-INF but below your docroot. Java WebApps are all the following basic directory structure.

    <docroot>
      +WEB-INF/
        +lib/
        +classes/
    

    Anything in <docroot> is reachable directly through straight up http. Anything WEB-INF and below is not. A really simple webapp with one page (index.jsp), one image in an images directory, and its configuration file (web.xml) would look like this.

    index.jsp
    images/bob.jpg
    WEB-INF/
      web.xml
      lib/
      classes/
    

    In index.jsp you could reference bob.jpg like…

    <img src="images/bob.jpg"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small command line utility project that I'm using Maven to manage.
We have our project build using maven. We try to run our unit test
I have a multi module Spring project that I set up using Maven: my-root
I have a maven project that has a set of library dependancies that are
I have a maven project that was generated by Spring Roo. Now I am
We have a multi-module maven project that uses a profile that defines a buildnumber-maven-plugin
I have a project that is built and managed by Maven. I have a
I have a maven project and I'd like to create a distribution of it
I have a Maven Java project, imported using m2eclipse . The target/ directory is
I have a Maven project that is a child project. It has many sibling

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.