Solved

Tomcat

Posted on 2007-03-30
5
547 Views
Last Modified: 2008-02-01
I have a WebApplication that is currently running on Tomcat 4 JDK 1.4. As part of upgrade, I am upgrading the WebApplication to be running on Tomcat 6 using JDK 1.5, everything is working and all good except for the following issue:
 
  I am using Login-Form <Form> authentication defined in the web.xml of my WebApp. In tomcat 4, when the user click on my myweb/service/main.jsp, the user basically gets redirected to common/login/login.jsp (defined in web.xml) after authentication the user basically goes back to myweb/service/main.jsp and all good. In tomcat 6, the login.jsp page, residing in myweb/common/login/ path, being retrived from where user is being asked for authentication.
 For example, assume a user is at myweb/service/canada/view.jsp then session timed out so the user will be prompted with login page, however, the login page does not get displayed properly (i.e. css and images not being loaded from myweb/images/) because tomcat is trying to retreive the login.jsp relative to where is being prompted with login, myweb/service/canada, and not from the webapp/ root directory.

 Any idea to fix this issue ?
0
Comment
Question by:fylix0000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 27

Expert Comment

by:rrz
ID: 18824142
You could use server-relative paths.  For example,
<img src="<%=request.getContextPath()%>/images.logo.gif" />
0
 
LVL 27

Accepted Solution

by:
rrz earned 500 total points
ID: 18824155
I meant
<img src="<%=request.getContextPath()%>/images/logo.gif" />
0
 

Author Comment

by:fylix0000
ID: 18824955
that did it man. thanks
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 18825554
Yes, that's usually the right way to do it so that you can keep moving your pages around and the paths will still work
0
 

Author Comment

by:fylix0000
ID: 18825757
Thanks for the feedback guys.
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Check Disk (CHKDSK) on all volumes and fix if needed. 8 223
null output 3 59
difference between sorce folder and folder in eclipise 3 65
spring maven example issues 3 108
Preface Having the need * to contact many different companies with different infrastructures * do remote maintenance in their network required us to implement a more flexible routing solution. As RAS, PPTP, L2TP and VPN Client connections are no…
Log files are useful in diagnosing and repairing problems.  This is a list of common log files and their standard locations that I've compiled.   While this is not exhaustive, it is a pretty good list that I've found to be useful.  I may update it f…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question