Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Scriptless JSP

 
Shailesh Narkhede
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to write scrptless JSP.
But in my jsp I want to include css file so I need contextPath
curently I am doing like,


I want to do this thing without scriptlet or expression.
How can I do this ?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Hope this helps
 
Shailesh Narkhede
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried but it prints ${pageContext.request.contextPath} to response directly,
then I put <web-app> element
like,
(I am using Eclipse editor)


then it giving parsing error on server starting for web.xml


 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
go through this
 
Pravin Shirke
Ranch Hand
Posts: 152
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hii shail,
Can you please tell me what is the directory structure of you application. i mean where is your CSS folder stored in your application. If its directly stored under WebContent in your web application. then you should use this code to access it as follows:



I think it will do the job. Best of luck
 
Shailesh Narkhede
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I removed following code from web.xml

Now EL is working
Thanks seetharaman & pravin
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shail Narkhede wrote:Thanks seetharaman & pravin


You are Welcome
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic