Reputation: 289
In web.xml
<welcome-file>file:C:/Users/abc/Desktop/Design Pages/index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
I want to access file from my local drive not from classpath
in eclise project.
Upvotes: 1
Views: 50
Reputation: 133
Welcome files, if specified as file, must exist physically within your application. It's not an eclipse thing, it's the nature of the web app your are developing using eclipse (and probably deploying using eclipse). An option for serving that local file can be to define a servlet + servlet-mapping which then can be used to read the content of that file and set it as the http-response content.
I don't know your use case, however when it comes to delivery it might be useful to ship the welcome page within your application.
Upvotes: 1