You're not far from the solution. That's what I advise:
- Create a page listing the departments index.jsp.
I advise you to generate a list of departments from the database. Each department is pointing to the page with a parameter department.jsp number of departments. Example: "department.jsp?department = 2A"
- Department.jsp create a page that retrieves the parameter department. From this setting, the list of cities is displayed via a query in your database.
Each point on the city page city.jsp with parameter in the city number.
- City.jsp create a page that retrieves the number of town. From this setting, the details of the city are displayed with access to your database.
Concerning your questions:
- Method for sending parameters
=> POST or GET, whatever, you earn nothing effective. To retrieve the url parameters:
Code:
request.getParameter("department")
- Requires that the results can be clickable .... how?
=> Just add a tag <a> on behalf of your department. Example:
HTML Code:
<a href="department.jsp?department=<%=num_department%>"><%=name_department%></a>
When you've done all that, you can finally think url rewriting put in place.
The principle is simple: it converts a url type http://www.mydomain/listing/depart75/mumbai.dhtml "in" http://www.mydomain/listing/city.jsp?city=num "
But before putting the system in place already created your application.
Bookmarks