Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get app path in grails?

I want to get application path in my application, but I haven't found any way. If anyone knows how can I get application path in my app, It would be great.

Many thanks,

like image 334
Ima Vafaei Avatar asked Mar 22 '23 18:03

Ima Vafaei


1 Answers

If you want to get absolute path for application, you can get like this.

String applicationPath = request.getSession().getServletContext().getRealPath("")

It will provide absolute path for application.

like image 193
user1791574 Avatar answered Apr 06 '23 22:04

user1791574