• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

WSAD error accessing css in jsp

 
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 ]
 
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?
 
Every time you till, you lose 30% of your organic matter. But this tiny ad is durable:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!