Win a copy of The Java Performance Companion this week in the Performance forum!
    Bookmark Topic Watch Topic
  • New Topic

how to use css and js file in servlet

 
rakhi sinha
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 68
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
 
Nam Ha Minh
Ranch Hand
Posts: 502
Eclipse IDE Firefox Browser Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
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?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64971
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
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.
 
    Bookmark Topic Watch Topic
  • New Topic