CDV ❯ Cart sessions example uses bad practise
-
Bug
-
Status: Open
-
2 Major
-
Resolution:
-
-
-
prodmgmt
-
Reporter: gbevin
-
June 13, 2008
-
0
-
Watchers: 0
-
March 19, 2010
-
Description
The Cart example has a web.xml file that catches all URLs and maps those to the single servlet that is creates by carts.jsp. Also, that JSP uses / as the form it posts to. This makes it confusing for people that want to quickly add other JSPs to the example to play around with it, since none of them are actually usable before the web.xml is adapted and carts.jsp is adapted to post to itself instead of to /.
Comments
Gary Keim 2008-06-13
Geert Bevin 2008-06-13
Ah, didn’t know that. I agree with you that this sample should be improved .. the source code is quite horrible atm.
For historical context, the cart sample is taken from the Tomcat dist and it was decided way back when that it remain unchanged. I tend to think it should be improved but remain as helloworld-like as possible.