Sto iniziando ad interessarmi alle Web Server Application e tutto quello che gli gira attorno.
Mi sono documentato sui possibili ambienti di lavoro per programmare questo tipo di applicazioni, così ho scelto Apache TomCat 7 come piattaforma software per l'esecuzione di applicazioni Web e NetBeans come ambiente di sviluppo.
Dopo aver configurato il server TomCat 7 su NetBeans come localhost:8080 ed impostato i dati dell'account per far partire le Web App, NetBeans mi dà il seguente errore:

codice:
C:\Users\Gianluca\Desktop\WebApp3\nbproject\build-impl.xml:1022: Deployment error: Access to Tomcat server has not been authorized. Set the correct username and password with the "manager-script" role in the Tomcat customizer in the Server Manager. See the server log for details.
Mi sono documetato sull'errore ed ho trovato diverse soluzioni che non sono servite a risolvere il mio problema, ma che rimandavano ad intervenire sempre sullo stesso spazio di codice, ovvero questo:

codice:
<tomcat-users> <user name="admin" password="admin" roles="admin-gui,manager-gui" /> 
<!--   NOTE:  By default, no user is included in the "manager-gui" role required
to operate the "/manager/html" web application.
If you wish to use this app,
you must define such a user - the username and password are arbitrary. -->
<!--   NOTE:  The sample user and role entries below are wrapped in a comment
and thus are ignored when reading this file.
Do not forget to remove   <!.. ..> that surrounds them. -->    

<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
</tomcat-users>
Le soluzioni che ho trovato miravano ad aggiungere queste due righe di codice:

codice:
<role rolename=”manager-script”/>   <user username=”user” password=”user” roles=”manager-script”/>
codice:
<role rolename="manager-gui"/> <user username="tomcat" password="s3cret" roles="manager-gui"/>
ovviamente i campi username e password li ho modificati coi miei dati utente, ma non ha comunque funzionato come vi ho già detto.