Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Pro JSP
|
Pro JSP Advanced JSP coding questions. Beginning questions will be redirected to the Beginning JSP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro JSP 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 April 27th, 2004, 10:40 AM
Authorized User
 
Join Date: Feb 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem with pathname


I have had a problem for quite a while and I don't know how to solve it properly.
Here is a part of my problem. Once it is solved, I will ask for help for the rest
The root of my application is <my_app> and I have the following:

      <my_app>
           |
       -------------------------------------------
       | | |
      web images
       | | login.jsp
      serv logo.gif menu.jsp
        | login_page.jsp
      index.jsp header.jsp
                                            logo.html

You should enter the application using "login.jsp". The authentication is the Tomcat form-based authentication. The form page is "login_page".
In web.xml I have defined:
<security-constraint>
 <web-resource-collection>
      <web-resource-name>Protected Site .. Test</web-resource-name>
      <url-pattern>/web/*</url-pattern>
 </web-resource-collection>
 <auth-constraint>
    <role-name>tomcat</role-name>
 </auth-constraint>
</security-constraint>

<login-config>
  <auth-method>FORM</auth-method>
  <form-login-config>
    <form-login-page>/web/login_page.jsp</form-login-page>
    <form-error-page>/web/login_failed.jsp</form-error-page>
  </form-login-config>
</login-config>

Now, my problem is that the "login_page.jsp" contains a logo which can be found under the images directory.
For this reason, the file "login_page" contains:
         <%@ include file="logo.html" %>
where logo.html is:

<a href="http://www.lucent.com/"><img border="0"
src="../images/lucent-logo.gif
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><center><B>PROVISION DE DATOS </B></center></p>

The first time, if the user enters the application with "login.jsp", the "login_page.jsp" page appears and every thing works fine.

Now, if the user tries to enter the application, let's say with "servicios/index.jsp", the login_page appears ..... but the logo cannot be found since it is at the level above it!!

I have tried absolute path but I must do something wrong since it does not work.

HELP, please!!!


Elisabeth


Para cancelar su subscripción a este grupo, envíe un mensaje de correo electrónico a:
[email protected]
Propietario de la lista: [email protected]


Enlaces a Yahoo! Grupos

Para visitar tu grupo en la web, accede a:
 http://es.groups.yahoo.com/group/j2ee-spanish/

Para cancelar tu suscripción en este grupo, envía
un mensaje en blanco a:
 [email protected]

El uso que hagas de Yahoo! Grupos está sujeto a
las Condiciones del servicio de Yahoo!:
 http://es.docs.yahoo.com/info/utos.html


 
Old June 21st, 2004, 01:48 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

I think that there is some error
<img border="0" src="../images/lucent-logo.gif


It should be
<img border="0" src = "../images/lucent-logo.gif" >


Love 4 all





Similar Threads
Thread Thread Starter Forum Replies Last Post
get pathname ck Visual C++ 0 March 23rd, 2005 11:43 PM
Regarding getting pathname in vb.net snowydust VB How-To 0 July 29th, 2004 09:23 AM





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