Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java Open Source > Apache Tomcat
|
Apache Tomcat General discussion of the Apache Tomcat servlet container. For discussions specific to the Professional Apache Tomcat book, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Apache Tomcat section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 16th, 2004, 05:16 AM
Registered User
 
Join Date: Jul 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default url mapping for jsp in tomcat

To access my jsp's in tomcat, url is [u]http://locatlhost:port/appName/jsp/Logon.jsp</u>
but i don't want to see jsp in the above url without changing the name of the folder(jsp in appName.war) in war file.

Is there anyway i can specify in the web.xml saying all request starts with demo (for an example) to redirect / refer to jsp.
ie
if i type http://locatlhost:port/appName/demo/Logon.jsp it should call internally http://locatlhost:port/appName/jsp/Logon.jsp

Thanks in advance.

Ram :)

 
Old July 16th, 2004, 06:10 AM
Registered User
 
Join Date: Jul 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi

i got the answer..
use the below configurations in web.xml.

<servlet>
           <servlet-name>MainJSP</servlet-name>
           <jsp-file>/jsp/SXPFCallCenterUserView.jsp</jsp-file>
       </servlet>
    <servlet-mapping>
        <servlet-name>MainJSP</servlet-name>
        <url-pattern>/demo/UserView</url-pattern>
    </servlet-mapping>

thanks guys








Similar Threads
Thread Thread Starter Forum Replies Last Post
url mapping for jsp in tomcat deepakkotla Apache Tomcat 1 March 20th, 2008 07:58 AM
Tomcat URL mapping question colinexl Apache Tomcat 1 October 17th, 2007 10:20 PM
url mapping and regular expressions rudgr BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 3 February 4th, 2006 08:46 AM
How to remove URL rewriting using tomcat config or mintnovate Apache Tomcat 0 November 13th, 2005 01:01 AM
jsp in tomcat damo Apache Tomcat 1 February 15th, 2005 01:32 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.