-
1. Re: Forbidden when running http://localhost:8080/myproject
jaysensharma Jan 14, 2016 12:35 AM (in response to twittmin)***Usually:
403 Forbidden error usually occurs if you have configured security for your webapp but either user might be entering an incorrect credential or User might not be associated with a particular role.
***In Your Case:
As you said that you are deploying a very simple HelloWorld Project so i am assuming that you might not be configuring any security related additional settings to your webapp. Still if you are getting the error that means You might not have default web pages in your "myProject.war" like "index.jsp/index.html" ...etc. Or your web.xml file might not be including the <welcome-file-list> tag to define a default welcome page for your web app.
So suppose if you have your WAR as following (which does not include any default welcome page like index.jsp/index.html ...etc)
myProject.war
|____hello.jsp
|____test.jsp
|____WEB-INF
|____web.xml
Then even if the application will deploy successfully you will get "Forbidden" error if you access: http://localhost:8080/myProject/
So Either define a valid welcome file in web.xml or enter the URL to the last resource like suppose if you have a servlet with name "TestServlet" then access it directly like: http://localhost:8080/myProject/TestServlet
Regards
Jay SenSharma
-
2. Re: Forbidden when running http://localhost:8080/myproject
webvikrant Apr 25, 2016 1:35 AM (in response to jaysensharma)Thanks. It solved the issue for me.