File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Scriptless JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Scriptless JSP" Watch "Scriptless JSP" New topic
Author

Scriptless JSP

Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 368
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 ?

Thanks,
Shailesh
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575



Hope this helps
Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 368
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

Joined: Jan 28, 2008
Posts: 5575

go through this
Pravin Shirke
Ranch Hand

Joined: Apr 05, 2008
Posts: 150

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


[Vipassana] - It is seeing the reality as it is, And not as you want it to be.!!!
SCJP1.5.
Shailesh Narkhede
Ranch Hand

Joined: Jul 10, 2008
Posts: 368
I removed following code from web.xml

Now EL is working
Thanks seetharaman & pravin
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Shail Narkhede wrote:Thanks seetharaman & pravin


You are Welcome
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Scriptless JSP