m1051f 0 Newbie Poster

I am currently at this URL localhost:8080/Test/students/Steve

The page from that URL displays some info about Steve and a link that goes to teachers.

<a href="teachers/all">Click to view all teachers</a>

When I click the link it goes to localhost:8080/Test/students/teachers/all
I want localhost:8080/Test/teachers/all

How can I do that?

I managed to do it with

<a href="../teachers/all">Click to view teachers</a>

but .... is there another way to do this?


web.xml:

<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.4"

xmlns="http://java.sun.com/xml/ns/j2ee"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 

http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">







	<servlet>

		<servlet-name>springmvc</servlet-name>

		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>

		<load-on-startup>1</load-on-startup>

	</servlet>

	

	<servlet-mapping>

		<servlet-name>springmvc</servlet-name>

		<url-pattern>/</url-pattern>

	</servlet-mapping>

	

	

	<welcome-file-list> 

		<welcome-file>/WEB-INF/index.jsp</welcome-file>

	</welcome-file-list> 



</web-app>