What is the function of acetic acid as a solvent in EAS reactions?

I saw acetic acid being used in two reactions:



1. 


[![enter image description here](https://i.stack.imgur.com/1u7YS.png)](https://i.stack.imgur.com/1u7YS.png)


2.


[![enter image description here](https://i.stack.imgur.com/t5n1r.png)](https://i.stack.imgur.com/t5n1r.png)


I was asked to predict the outcome of the first reaction but I couldn't, because nitration requires generation of $\ce{NO2+}$ which in turn **requires an acid stronger than nitric acid**. (acetic acid is weaker)


I would like to know how exactly is $\ce{AcOH}$ participating in these two reactions. **Is it supporting the generation of electrophile?** **If yes, then how?** I couldn't find any relevant information on the net. The second reaction is from Clayden's book and it doesn't highlight the role of $\ce{AcOH}$ there. 


