Managing Tomcat and Servlets for CSE 3330 at Southern Methodist University
This guide provides essential information for managing Tomcat and Servlets in CSE 3330 at Southern Methodist University. When modifying your servlet, remember to notify Tomcat by restarting the server or using the manager app. You may also need to adjust the tomcat-users.xml file in your Tomcat configuration. To handle request parameters, use the request object’s `getParameter()` method to retrieve values. For instance, accessing `req.getParameter("fname")` allows you to retrieve the value associated with a specific key in your web application.
Managing Tomcat and Servlets for CSE 3330 at Southern Methodist University
E N D
Presentation Transcript
Tomcat and Servlets CSE 3330 Southern Methodist University
Tomcat • If you change your servlet, you’ll need to let Tomcat know. • Restart the server • Use the manager app • Modify the tomcat-users.xml file in <TCHome>/conf
Request Parameters • http://localhost:8080/MyServ/Serv?fname=Mark&lname=Fontenot • Use the request object’s getParameter() method to get the value of a particular key. • req.getParameter(“fname”); Parameters are key/value pairs