WebSphere Application Server - Images/javascripts/css not loading

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Application Server > May 2004 > Images/javascripts/css not loading





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Images/javascripts/css not loading
davidpow

2004-05-21, 5:39 pm

Can anyone say why the images, javascript and css not loading in my jsp pages after they have been deployed to WAS 4.0. ?? The images, stylesheets, and javascripts all load and display ok in the WSAD test environment (WAS 4.0).The context root is ok too.


The following exception is thrown.

Servlet Error: com.ibm.servlet.engine.webapp.WebApp: java.lang.ClassCastException: com.ibm.servlet.engine.webapp.WebApp
at com.ibm.servlet.engine.webapp.SimpleFileServlet.doGet(SimpleFileServlet.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java(Compiled Code))
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java(Compiled Code))
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java(Inlined Compiled Code))
at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java(Compiled Code))
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java(Compiled Code))
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java(Inlined Compiled Code))
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher. handleWebAppDispatch(WebAppRequestDispat
cher.java(Compiled Code))
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java(Compiled Code))
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java(Compiled Code))
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java(Compiled Code))
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java(Compiled Code))
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java(Compiled Code))
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java(Compiled Code))
at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java(Compiled Code))
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code))
at com.ibm.ws.util.CachedThread.run(ThreadPool.java(Compiled Code))
Ken Hygh

2004-05-21, 5:39 pm

davidpow wrote:

>Can anyone say why the images, javascript and css not loading in my jsp pages after they have been deployed to WAS 4.0. ?? The images, stylesheets, and javascripts all load and display ok in the WSAD test environment (WAS 4.0).The context root is ok too.


>
>The following exception is thrown.
>
>
>


Make sure that the URLs for this static stuff are relative to the
SERVLET context root. I suspect that if you look at the actual URLs,
you'll find that they're not what you think they are.

Ken
davidpow

2004-05-21, 5:39 pm

the images, javascripts and css are all references correctly in relation to the context root. The check each ref and they were fine. the directory structure is:

images
theme
jscript
WEB-INF
<several jsp files>

in jsp files I ref to images as src="images/go.gif" and
ref to css as "theme/master.css"



davidpow

2004-05-21, 5:39 pm

The images, javascripts and css are all referenced correctly in relation to the context root. I checked each ref and they were all fine.

The directory structure is:

images (folder)
theme (folder)
jscript (folder)
WEB-INF (folder)
<several jsp files>

in jsp files I ref to images as src="images/go.gif" and
ref to css as "theme/master.css"

no problem there ???

davidpow

Ken Hygh

2004-05-21, 11:38 pm

davidpow wrote:

>The images, javascripts and css are all referenced correctly in relation to the context root. I checked each ref and they were all fine.
>
>The directory structure is:
>
>images (folder)
>theme (folder)
>jscript (folder)
>WEB-INF (folder)
><several jsp files>
>
>in jsp files I ref to images as src="images/go.gif" and
>ref to css as "theme/master.css"
>
>no problem there ???
>
>davidpow
>
>
>

These will be loaded relative to the directory of the original servlet
that was requested. Not the JSP.

Ken
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com