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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:16:25+00:00 2026-05-30T21:16:25+00:00

I have a relative path to another context on the same server I can’t

  • 0

I have a relative path to another context on the same server

I can’t use <jsp:include .../> nor the <%@ include .../> directive are meant to be used with URL that are relative to the context

When i try <c:import url="/dir/file.html" context="/context" var="tfile" scope="page"/>
${tfile}
needs an absolute url
i get the c:/dirExternal/dir/jsp/mainjsp.jsp is not available

  • 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-30T21:16:26+00:00Added an answer on May 30, 2026 at 9:16 pm

    try this code in your jsp to include html file form different context

        <@:include file="<%= request.getContextPath() %>/index.html" />
    

    OR you can do like given below to..

    1. access different context of same server

      javax.servlet.ServletContext context = application.getContext("WAR Name");

    2. now access pages

      javax.servlet.RequestDispatcher rd = context.getRequestDispatcher("index.html");
      rd.include(request, response);

    3. and last one entry in TOMCAT location conf/server.xml

      <context path="/WAR Name" debug="0" reloadable="true" crosscontext="true">

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

Sidebar

Related Questions

How can I have a relative path in the web.config file. This value is
I have a base URL : http://my.server.com/folder/directory/sample And a relative one : ../../other/path How
I have a relative path (e.g. foo/bar/baz/quux.xml) and I want to pop a directory
I have a relative path $base_path = input/myMock.TGZ; myMock.TGZ is the file name located
I have a website that has a relative path to a stylesheet that looks
In my applications, I often have to use relative paths. For example, when I
If I have a relative path that I need to get from the current
SEO and 301 redirects - Can they have relative paths or must they be
I have a page whose relative path is ~/pages/mypage.aspx. I tried using VirtualPathUtility.ToAbsolute(@~/pages/mypage.aspx) hoping
I have an absolute path of (verified working) $target_path = F:/xampplite/htdocs/host_name/p/$email.$ext; for use 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.