tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "German Augusto Niebles Alvarez" <GERMN...@susalud.com.co>
Subject Re: New to war files
Date Mon, 28 Oct 2002 13:30:34 GMT
I think your problem is not with war files, instead relatives paths.

Relatives paths have been a problem for me too.

I decided to use the context and a absolute path instead.

Try with this example:

1. including a context within  a jsp file (include file ...)

<%@ include file="/contextoPaginasGenerales.htm"%>

<html>
  <head>
    <title>Sistema de Informacion y Estadistica</title>
  </head>
  <body class='body01'>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <table class='cajaComponentes01' align="center" border="3">
 <tr>
     <td>
        <h2 align="center"><font class='cajaComponentes01'
face="Verdana">Sistema de Informacion y Estadistica</font></h2>
          <%@ include file="/direccionControladorPrincipal.htm"%>
            <div align="center">
              <center>
                <table border=1 >
                  <tr>
                    <td class='avisoParametroEntrada'
align="center"><font face="Verdana" size="2"><b>Usuario</b></font></td>
                    <td class='avisoParametroEntrada'
align="center"><font face="Verdana"
size="2"><b>ContraseƱa</b></font></td>
                  </tr>
                  <tr>
                    <td class='cajaTextoEntrada' align="center"><font
face="Verdana"><input type="text" name="idUsuario"></font></td>
                    <td class='cajaTextoEntrada' align="center"><font
face="Verdana"><input type="password" name="password"></font></td>
                  </tr>
                </table>
              </center>
            </div>
            <p align="center">
              <font face="Verdana"><input type="submit" class='button'
name="accion" value="Ingresar"></font>
              <input type="hidden" name="nombrePaginaRequest"
value="/frmLogin.jsp">
          </form>
     </td>
   </tr>
    </table>
  </body>
</html>

2. the files included "contextoPaginasGenerales.htm"

<LINK href="/aplicacionPdn/styles/paginasGenerales.css" type="text/css"
rel="stylesheet">

3. At ="/aplicacionPdn/styles/paginasGenerales.css: the css.file.


aplicacionPdn is my Context.


for me works i hope for you too.



====================

By the way watch if inside o f your war file exists the file that you
are searching for 




German

=========================================

>>> TrickelEE@ISL-3Com.com 10/25 11:31 a.m. >>>

    I am new to using war files, and I have run into a problem.  I tried
searching the archives and I didn't see an answer to my problem.  I am
building the war file from an ant build script.  I have tested this on
the
pre-war directory and it works fine.  The issue I am running into
involves a
jsp page and a server side include file.  I am using a relative path
with
the .. pointer.  So It looks something like this

search/search.jsp
<%@include file="../general/globalvars.jsp"%>

I am running on win2k server, Tomcat as a service, 

I have verified the file was included in the war, and even changed the
context to use the extracted directory.  Any help would be great.


Thank you,
Erik


--
To unsubscribe, e-mail:  
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message