Ver Mensaje Individual
  #6 (permalink)  
Antiguo 10/04/2015, 10:53
Tusade
 
Fecha de Ingreso: marzo-2015
Mensajes: 42
Antigüedad: 10 años
Puntos: 2
Respuesta: Como insertar un String dentro de la ruta en <%@ o <jsp:

AL FIN HE VISTO LA LUZ, SIIIIIIIIIIIIIIIIII

Aquí está la solución (en Google, como siempre):

http://www.servlets.com/archive/servlet/ReadMsg?msgId=312103&listName=jsp-interest

Cita:
As per the JSP include sytanx you can use either the include-file-name in
quotes directly or you can give it as a variable within scriptlet tags but
not as a combination of both.

Try :

<% String file="xyz";
String path = "/distributor/ytf/gatekeeperreports/";
String location = path+file+".jsp";
%>
<jsp:include page="<%=location%>" flush="true"/>
Traducción: en los <jsp:include page=""/> se puede utilizar 2 opciones para indicar la ruta:

- O bien indicar la ruta directamente entre comillas (page="carpeta/archivo.html")

- O bien poner una variable jsp (page="<%=variable_ruta%>")

Pero no se puede hacer una combinación de ambos... y eso era lo que me pasaba a mí.