This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

server path...  RSS feed

 
Tapan Thakkar
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello friends i am creating a file upload and download application.

i want to upload all files on my server. i am using tomcat and it is in "/opt/Portique/liferay-portal-5.2.4/tomcat-6.0.18".

now i want to upload my files to the webapps directory of tomcat.

how can i get path of this tomcat server in java.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By "upload", do you mean via HTTP? If so, then the servlet context has the getRealPath method that returns the file system path that corresponds to a web app-relative URL.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!