samimave / car-pool

Automatically exported from code.google.com/p/car-pool
0 stars 0 forks source link

page name mapping in web.xml #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
So right now we have forms like:

<form action="index.jsp">

Where index.jsp is the page name where you want to send the user when the
button is clicked.
Its good practice to make a change to the web.xml so a naming pattern is
associated with a particular jsp/servlet.
There are a number of good reasons for this, the main reason I havent
mentioned it before is that its easier to see exactly whats happening if
you enter the page name instead of fiddling with web.xml.
I propose that when we have done the majority of the pages I (or someone
who wants to) will go through each of the forms and enter the naming
patterns in the web.xml.
The entries will look something like what James did when he made a couple
of servlets:

  <servlet-mapping>
    <servlet-name>RegistrationProcessing</servlet-name>
    <url-pattern>/adduser</url-pattern>
  </servlet-mapping>

  <servlet>
    <description>Process form data and then registers the user in the
database with this data</description>
    <display-name>RegistrationProcessing</display-name>
    <servlet-name>RegistrationProcessing</servlet-name>

<servlet-class>car.pool.user.registration.servlet.RegistrationProcessing</servle
t-class>
  </servlet>

So instead of http://www.site.com/index.jsp the user will see something like:

http://www.site.com/index

which will be associated with index.jsp.
No hurry however.

Original issue reported on code.google.com by arlo.pho...@gmail.com on 22 Sep 2008 at 4:44

GoogleCodeExporter commented 9 years ago
As everything works in terms of links between pages I cant be bothered. At 
least we 
thought about it

Original comment by arlo.pho...@gmail.com on 14 Oct 2008 at 9:45