Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

WSAD error accessing css in jsp  RSS feed

 
Jason Kretzer
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
Getting a strange error message in WSAD. I am testing my app on the default WSAD server.
I start the server and goto the built-in web browser and access the login.html.
This posts to a servlet which then verifies and forwards to the next window which is a
jsp. When it gets to the jsp, the css it is supposed to use does not get used. I
get this error in the console window

In relation to the jsp the css file is ../css/nyk-style-00.css. In the jsp I am using the following to load it.

I have also tried it the following way without the quotes.

I have also tried it straight without an intermediate string.

Anyone have any ideas? It works when I use the full path to the css instead of the relative path.
[ February 10, 2004: Message edited by: Jason Kretzer ]
 
Tony Chen
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is this /css/nyk-style-00.css ? Where is it defined? In your web appliation (WAR)?
 
Jason Kretzer
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have found a solution besides calling the full path. When you run a JSP on the test server, the test server treats it as a servlet and as such the ../css/SomeCSS.css does not exist. It can be referenced from css/SomeCSS.css. Also, the paths of the links need to be adjusted as well.
Does anyone know if this is expected behavior? Will it act this way when it is deployed?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!