out.println报红字错误,这是因为没有关联好tomcat服务器 点击File –>Project Structure–>Modules –>Dependencies 点击绿色+ –>library,点击确认。