1. How can I enable a site for crawling better?

2. How to use jsp forward?

3. How can I pass parameters to a forward?

4. How can I retrieve parameters from a forward?

5. what is the odd behavior of a request when it is forwarded?

6. Can I forward between two contexts?

7. How to simulate a forward between contexts?

when to use response redirect and jsp forward

Search for: forward tag in jsp

syntax for forward tag


<html>
<head>
<title></title>
</head>
<body>
<jsp: forward page="ssParameters.jsp">
  <jsp: param name="myParam" value="Amar Patel"/>
  <jsp: param name="Age" value="15"/>
</jsp: forward>
</body>
</html>

another nice discussion


RequestDispatcher dispatcher = request.getRequestDispatcher(targeturl);
dispatcher.forward(request, response);

<jsp:forward page="<%=targeturl%>"/>

Where the "targeturl" is a variable that is dynamic and derived.

Capturing jsp output using capture tags: initial work

Search for: Problem with request.getParameters, forward and tomcat

geparamters and geturlquery string seem to behave differently


String scheme = request.getScheme();
String host = request.getLocalName();
String port = Integer.toString(request.getLocalPort());
String urlPrefix = null;
if (StringUtils.isValid(port))
{
	urlPrefix = scheme + "://" + host + ":" + port;
}
else
{
	urlPrefix = scheme + "://" + host;
}

Search for: jsp expire attribute or tag


<%
response.setHeader("Cache-Control","no-cache"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server
%>

the above taken from

Search for: How to retrieve parameters from a servlet or jsp forward

Search for: How can I forward between two servlet contexts

Search for: how can I enable a website for crawling, best practices

api for sevlet request