This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Servlets and the fly likes how to use css and js file in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

how to use css and js file in servlet

rakhi sinha
Ranch Hand

Joined: Mar 26, 2012
Posts: 147
I have problem in using calendar in my servlet ..i dont understand where to save css ,js file and .png image file so that i can use these in my servlet to call the calendar in the servlet .how to give url in the servlet.

Neeraj Dhiman
Ranch Hand

Joined: Dec 19, 2011
Posts: 63

you can store your css, js and image any where in webcontent folder in any hierarchy except WEB-INF Folder. and corresponding path use to access.


Correct Me if i am wrong
Nam Ha Minh
Ranch Hand

Joined: Oct 31, 2011
Posts: 346

Putting HTML code inside servlet may work for the first time, but it will make maintain the code harder.
Why don't you dispatch to a JSP page from the servlet?


Job Offer: Online working Java technical writing
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56204
    
  13

Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place. Please click this link ⇒ CarefullyChooseOneForum ⇐ for more information.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: how to use css and js file in servlet
 
Similar Threads
JSF messes up my script and link tags
WebSphere 6.1.0.0 and JavaScript uissue
retrieve value at servlet from javascript.
relative path confusion
problem in running external java Script