Solved

Tomcat

Posted on 2007-03-30
5
537 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
  • 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:mayankeagle
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

My purpose is to describe the basic concepts of virtual memory as implemented in a modern Windows-based operating system. I will also describe the problems inherent in older systems and how virtual memory solves them. The dark ages - before virtu…
The password reset disk is often mentioned as the best solution to deal with the lost Windows password problem. In Windows 2008, 7, Vista and XP, a password reset disk can be easily created. But besides Windows 7/Vista/XP, Windows Server 2008 and ot…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

760 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now