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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T17:47:48+00:00 2026-05-19T17:47:48+00:00

I have a BasePage.java (together with a BasePage.html ). My base page is basically

  • 0

I have a BasePage.java (together with a BasePage.html). My base page is basically a CSS menu made by mycssmenu.com (I’m not good with CSS). I want to add my university’s logo to the base page:

        <ul>
            <li><a href="MainPage.html"wicket:id="home">Home</a></li>
            <li><a href="LecturerPage.html"wicket:id="lect">Lecturer Page</a></li>
            <li><a href="StudentPage.html"wicket:id="stud">Student Page</a></li>
        </ul>
    </li>
    <li><span class="qmdivider qmdividery" ></span></li>
    <li><a class="qmparent" href="javascript:void(0)">About</a>
        <ul>
            <li><a href="About.html"wicket:id="about">About</a></li>
        </ul>
    </li>
    <li class="qmclear">&nbsp;</li>
</ul>
<script type="text/javascript">qm_create(0,false,0,500,false,false,false,false,false</script>
</div>
<div id= "body">
    <img src="C:\Users\Eliezer Shindler\Desktop\cityunilogo.jpg"alt="City Logo"/>
    <wicket:child />

In short, the City logo gets displayed when I open the page in a web browser, but not when running Wicket. Why, and how can I make it work with Wicket? I’m quite new to Wicket.

  • 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-19T17:47:48+00:00Added an answer on May 19, 2026 at 5:47 pm

    You’re referencing a local drive path (C:\...), which: a) will not work outside your machine; b) even if it worked, the browser won’t show it, due security restrictions (will only open local files if the original page is also loaded from disk).

    Don’t, ever, use local machine paths in a web application. Just don’t, it’s evil, and your descendants will be cursed for 7 generations.

    If you want an image to be displayed in your web application, move it into a folder inside your application context, or in the classpath, and make your page point there.

    Suppose your project layout is like this:

    myapp/
        src/
            myapp/
                MyApplication.java
                MyPage.java
                MyPage.html
        web/
            WEB-INF/
                web.xml
    

    You could create a myapp/web/images folder, and copy your image (say, logo.png) into it:

    myapp/
        src/
            myapp/
                MyApplication.java
                MyPage.java
                MyPage.html
        web/
            images/
                logo.png
            WEB-INF/
                web.xml
    

    In MyPage.html, the markup would be something like this:

    <img src="images/logo.png">
    

    Another approach is to add your images from Java code, keeping your images/resources side-by-side with your .java files:

    myapp/
        src/
            myapp/
                images/
                    logo.png
                MyApplication.java
                MyPage.java
                MyPage.html
        web/
            WEB-INF/
                web.xml
    

    Then, the declaration in MyPage.html would be

    <img wicket:id="logo">
    

    And MyPage.java would contain

    add(new Image("logo", new PackageResourceReference(HomePage.class, "images/logo.png")));
    

    meaning that the logo.png file is in a ‘images’ folder, relative to the HomePage class’ package.

    A similar approach (using header contributions instead of Image) can be used for CSS and javascript files.

    This is a lot more verbose, but can be very useful, especially if you modularize the reusable components into a library, since you can then bundle all resources (images, css and javascript files, etc.) into one jar.

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

Sidebar

Related Questions

I have a base page, BasePage, that raises an event that displays messages to
I have a BasePage which inherits from System.Web.UI.Page , and every page that inherits
I have Default.aspx page, which inherits from BasePage.cs, which inherits from System.Web.UI.Page. BasePage is
I have usercontrols which inherit a base class which looks like this: BasePage.cs: using
I have a BasePage class which all other pages derive from: public class BasePage
Here are the basics of my setup: I have a BasePage class that inherits
Have just started using Google Chrome , and noticed in parts of our site,
Have you ever seen any of there error messages? -- SQL Server 2000 Could
Have you guys had any experiences (positive or negative) by placing your source code/solution
Have just started using Visual Studio Professional's built-in unit testing features, which as I

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.