Professional Documents
Culture Documents
http://www.bloomers.com/bulbs/tulips.html
/admin/web/topdocs/bulbs/tulips.html
cd /usr/local/etc/httpd/logs
kill -HUP `cat httpd.pid`
- Directives
ServerName www.bloomers.com
- Default is /usr/local/etc/httpd
ServerRoot /usr/local/httpd
ServerAdmin webguy@www.bloomers.com
- Default is /usr/local/etc/httpd/htdocs
DocumentRoot /local/webdocs
- Example:
- Now,
http://www.bloomers.com/bushes/roses.html
will be mapped to
/usr/local/plants/bushes/roses.html
ScriptAlias /cgi-bin/
/usr/local/etc/httpd/cgi-bin/
Redirect /bushes
http://www.bloomers2.com/local/web/bushes
UserDir public_html
http://site-name/~bob/stuff.html
will work
UserDir public_html/special_stuff
UserDir disabled
- Logs
- Servlet Advantages:
- Extends GenericServlet
- Implements java.io.Serializable
doGet*
doPost*
doPut*
doDelete*
init
destroy
getServletInfo
response.setContentType("text/html");
PrintWriter servletOut =
response.getWriter();
- The servlet:
ObjectInputStream indat =
new ObjectInputStream(
new FileInputStream(File_variable_name));
zip = request.getParameter("zip");
price = Integer.parseInt(
request.getParameter("price"));
- Servlet actions:
- Cookies
Cookie newCookie =
new Cookie(gender, vote);
1. Add cookies
2. Set content type
3. Get response output stream
4. Place info in the response
à Show VoteCounter
- Session Tracking
- An alternative to cookies
mySession.putValue("iVoted", "true");
à SHOW VoteCounter2.java