Foros del Web » Programación para mayores de 30 ;) » Java »

No carga css y scripts en deployment

Estas en el tema de No carga css y scripts en deployment en el foro de Java en Foros del Web. Hola. Tengo una aplicacion con jsp, pero al momento del deployment los scripts y css no cargan, si lo hago con netbeans en el monitor ...
  #1 (permalink)  
Antiguo 21/09/2015, 18:21
Avatar de Andreslrz  
Fecha de Ingreso: septiembre-2008
Mensajes: 99
Antigüedad: 15 años, 8 meses
Puntos: 2
Exclamación No carga css y scripts en deployment

Hola.

Tengo una aplicacion con jsp, pero al momento del deployment los scripts y css no cargan, si lo hago con netbeans en el monitor de red pararece lo siguiente:

Código:
Failed to load resource: the server responded with a status of 404 (Not Found) (19:14:52:909 | error, network)
  at http://192.168.1.50:15635/resources/css/bootstrap.css
Failed to load resource: the server responded with a status of 404 (Not Found) (19:14:52:926 | error, network)
  at http://192.168.1.50:15635/resources/js/jquery.js
Failed to load resource: the server responded with a status of 404 (Not Found) (19:14:52:930 | error, network)
  at http://192.168.1.50:15635/resources/css/aditional.css
Failed to load resource: the server responded with a status of 404 (Not Found) (19:14:52:934 | error, network)
  at http://192.168.1.50:15635/resources/css/colors.css
Failed to load resource: the server responded with a status of 404 (Not Found) (19:14:52:940 | error, network)
  at http://192.168.1.50:15635/resources/js/validacionlogin.js
Failed to load resource: the server responded with a status of 404 (Not Found) (19:14:52:944 | error, network)
  at http://192.168.1.50:15635/resources/js/bootstrap.js
Failed to load resource: the server responded with a status of 404 (Not Found) (19:14:52:947 | error, network)
  at http://192.168.1.50:15635/resources/js/md5.js
Failed to load resource: the server responded with a status of 404 (Not Found) (19:14:52:987 | error, network)
  at http://192.168.1.50:15635/favicon.ico
alguien sabe como solucionar este problema?, gracias de antemano.
  #2 (permalink)  
Antiguo 22/09/2015, 09:53
Avatar de Profesor_Falken  
Fecha de Ingreso: agosto-2014
Ubicación: Mountain View
Mensajes: 1.323
Antigüedad: 9 años, 8 meses
Puntos: 182
Respuesta: No carga css y scripts en deployment

Buenas,

Aparentemente no estas incluyendo el contextPath en la ruta para buscar los recursos.

http://192.168.1.50:15635/[TucontextpathdetuApp]/resources/js/bootstrap.js

Un saludo
__________________
If to err is human, then programmers are the most human of us

Etiquetas: jsp, jsp-servlets
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 12:02.