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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:39:44+00:00 2026-05-17T18:39:44+00:00

I am using JSTL c:url tag to define my URL’s in the application, something

  • 0

I am using JSTL c:url tag to define my URL’s in the application, something like:

<c:url value"/home" />

But the problem is that it appends the application context to the url, so the link becomes http://appName.come/appName/page while it should be http://appName.come/page.

The link had to be with slash, because it’s not relative. I want to prevent the application context from being added or something like that, any ideas?

  • 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-17T18:39:44+00:00Added an answer on May 17, 2026 at 6:39 pm

    That’s just the sole purpose of c:url: adding the context root and if necessary jsessionid whenever client doesn’t support cookies. It also has support for URL-encoding the query parameters by c:param. If you don’t want to have that, then just don’t use c:url but use a plain HTML <a> element instead.

    <a href="/home">home</a>
    

    Update: as per the comment you seem to want to have the jsessionid in the URL (do you realize that the sessions are by default not shared between contexts and that you have to configure the serletcontainer accordingly?). In that case, manually set the context attribute.

    <c:url context="/" value="/home" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using http://java.sun.com/jsp/jstl/fmt tag library for outputting messages from Message Resource Bundle which
I am retrieving a value from our DB using JSTL. I am inserting it
We are implementing i18n using JSTL and encountered an issue that the resource texts
I have some problem with using jstl. I have this: <jsp:useBean id=view class=user.View></jsp:useBean> <jsp:useBean
I'm using JSTL to loop over a list of shop objects. It looks like
I am using the following conditional check using JSTL but its throwing the error
Good day! I tried using JSTL in java but there's an error: exception javax.servlet.ServletException:
Using JSTL's forEach tag, is it possible to iterate in reverse order?
I am using jstl in order to create custom tag. Here is the content
I'm using JSTL to import a form from my main page. <c:import url =

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.