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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:22:03+00:00 2026-06-14T08:22:03+00:00

How do I redirect a user in my dynamic web project so that when

  • 0

How do I redirect a user in my dynamic web project so that when he opens localhost:8080/pageName he actually gets somepage.html opened which is inside my WebContent folder? What do I write in web.xml to achieve that?

I want user to enter localhost:8080/pageName but actually see localhost:8080/somepage.html

  • 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-06-14T08:22:04+00:00Added an answer on June 14, 2026 at 8:22 am

    You could use a filter. This url shows how to install a jar, and modify your web.xml:
    http://tuckey.org/urlrewrite/

    Your rewrite file would look like this:

    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.2//EN"
        "http://tuckey.org/res/dtds/urlrewrite3.2.dtd">
    
    <urlrewrite>
        <rule>
            <name>pageName Redirect</name>
            <from>^/pageName$</from>
            <to>/somepage.html</to>
        </rule>
    </urlrewrite>
    

    Edit:

    My example does not change the URL in the users browser. It’s form is helpful when you want more than one URL to show the same content.

    If you want to change the URL, make this change to the code above:

            <to type="redirect">/somepage.html</to>
    

    Instead of sending the users browser content to display, this sends a message to the browser that the page has moved, and it should, transparently modify the browsers URL, and then load that page.

    Difference between JSP forward and redirect

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

Sidebar

Related Questions

I experience strange problem. We have error handling in global.asax that would redirect user
I heared that if i don't redirect the user from http://domain.com to http://www.domain.com it
If a web application relies on a database to serve dynamic content and that
I want to redirect user from one web page on one server to another
I need to make A Dynamic HTML Page to Redirect to A URL Using
When I Redirect user to this Url http://localhost:34768/Module/Edit?versionId=f4592b62-17e4-47e1-8a08-6a927a1c895e?selectedTab=0&selectedRowId=4c1fb4a6-691f-4c03-9e67-8f8b10a95c0e I'll get following error: The parameters
I need to redirect user to another page called free.php from index page, if
Is it possible with the Facebook OpenGraph's and API's to redirect user to a
I want to redirect the user to next page afte successfully submitting their information
I need to redirect the user to page not found page if the 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.