I am using Angularjs, Java for my application. Initially I am using tomcat to run my application. when I run my project it will open the URL
http://localhost:8080/projectname
so I configured my base tag and html5 mode as
$locationProvider.html5Mode(true);
$locationProvider.hashPrefix('');
<base href="/projectname/">
with welcome file configured to main.html in web.xml and I added the code
<welcome-file-list>
<welcome-file>main.html</welcome-file>
</welcome-file-list>
<error-page>
<error-code>404</error-code>
<location>/</location>
</error-page>
to make ui-router work with html5 mode(mentioned in ui-router issue page).
Then I change my project to google app engine standard java project and when I run my project it open with url
so I changed my base tag to
<base href="/">
with this there no problem in main.html but my routing are not working. When I use $state.go its working. But on refreshing or manually entering the url i'm getting 404 error. My console error is
WARNING: No file found for: /url
I referred many blogs but still confused to configure
I have configured spring in web.xml file
<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
It seems that it is mapping all the url request to spring, is there any way to solve this?