and in th loginservlet get the requested url using request.getRequestURL() that gives you the requested url from where you can get the *id* using substring.
and then dispatch the request using RequestDispatcher.forward("/index.jsp?id"+id)
this is just an idea that i got, i am not sure whether this works, but you can do something like this.
just try it and let me know.
----------------------
<%@ taglib uri="/WEB-INF/c.tld" prefix="c"%>
<c:redirect url="www.a.com/index.jsp?id=12345?"/>
---------------------
and make sure you have c.tld in /web-inf.
<servlet>
<servlet-name>loginservlet
<servlet-class>/loginservl
</servlet>
<servlet-mapping>
<servlet-name>loginservlet
<url-pattern>/</url-patter
</servlet-mapping>
and in th loginservlet get the requested url using request.getRequestURL() that gives you the requested url from where you can get the *id* using substring.
and then dispatch the request using RequestDispatcher.forward(
this is just an idea that i got, i am not sure whether this works, but you can do something like this.
just try it and let me know.