reset password
Author Message
mrighetti
Posts: 20
Posted 14:36 Apr 19, 2012 |

On homework 2, question 2, we're asked to do the following:

2. (30pt)  A user may access a class website at the URL http://<host>/<application>/sites/<quarter>/<course>/<section>, e.g. http://localhost:8080/hw1/sites/spring2012/cs520/section1/. If the website already exists, the application should display its content.

Should we find and insert <application> into the URL similar to homework 1, or is that something we hard-code based on our project naming?

cysun
Posts: 2935
Posted 14:43 Apr 19, 2012 |

The URL described in this question will be entered by a user, by either manually typing the URL in the browser address bar, or clicking on a link generated by your application (e.g. a link in the site list). In the first case, you can assume that the user will always type in the correct URL, but in the second case, you do need to ensure that the URLs generated by your application are correct. As I mentioned in class, you can do that easily with <c:url>, which will automatically generated the correct application name.

mrighetti
Posts: 20
Posted 23:22 Apr 20, 2012 |

Thanks for clarifying.  I was only considering the case when the user enters the address.