This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes style sheet problems Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "style sheet problems" Watch "style sheet problems" New topic
Author

style sheet problems

subramanian
Greenhorn

Joined: Aug 05, 2003
Posts: 3
hello sir/madam,
i am downloading the html file into word format. while i download i set the my CSS file like this:

<head>
<link rel="STYLESHEET" type="text/css" href="<%=sContextPath%>/html/css/professional.css">
</head>

where <%=sContextPath%> is the my server relative URLpath. but when i download it asking me to place that
professional.css file in C:\ directory.

while client access my server it is asking client to place the professional.css file in his system.

how to fix this problem?

thanks lot
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"subra subra",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp.
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please edit your profile and select a new name which meets the requirements.
To solve this problem, you may need to add the mime-type to the list for the web server or application server (depending on your setup) ie "text/css extension css"
Thanks.
Dave
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
subramanian,

Welcome to JavaRanch!! I appreciate that you changed your display name when David asked , but apparently you didn't READ the policy .
JavaRanch's naming policy. It should not be obviously fictitious.
Your displayed name should be 2 separate names with more than 1 letter each. We really would prefer that you use your REAL name.
You can change your name: here.
Thanks,
Cindy


"JavaRanch, where the deer and the Certified play" - David O'Meara
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Since you don't start your href with a slash, it thinks that what you are desdcribing is relative to your actual URL (like under the /servlet/ directory).
Try adding the leading slash.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: style sheet problems
 
Similar Threads
Closing Line Space
How to download the file to the client machine
prototype framework with ajax in struts 2 'jsp
Problem in using DHTML Object Model
make a java application downloadable on the web