Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to route static files or assets #67

Open
varmasaurav opened this issue Mar 4, 2015 · 1 comment
Open

Not able to route static files or assets #67

varmasaurav opened this issue Mar 4, 2015 · 1 comment

Comments

@varmasaurav
Copy link

I have put a static schema file (.xsd) in the location "src/main/webapp/resources/schemas/latest/" in my spring mvc project. But I am not able to understand how to specify static file routing in routes.conf. I looked at the play framework documentation which says below -

GET /home staticFile:/public/html/index.html

I tried possibilities like

GET /schema staticFile:/resources/schemas/latest/myXsd.xsd

and

GET /schema staticFile:/schemas/latest/myXsd.xsd

But nothing worked.

@arashzz
Copy link

arashzz commented Nov 20, 2016

I know this is pretty old and my answer might be pretty late but here is what you have to do to fix this issue. You just have to change staticFile into classpath
Assuming your index.html is in :

src/main/resources/static

then you have to change the route.conf like this:

GET /home classpath:/static/index.html

my assumption is that staticFile is a scala's play framework standard not spring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants