Q:

Adding parameters in jsp file

Is there any way to add parameters in a servlet or jsp? Because as far as I have searched, parameters can only be set in forms. 
Why is there no command in java to add parameters manually? 
Another doubt I have is that, when forwarding from one jsp page to other, is the input request(with the parameters, attributes etc) forwarded to the next jsp page? 
What if I don't want certain parameters or attributes to be forwarded?

A:

Request parameters can be passed by using <jsp: param>
This tag contains two attributes: 

name 
value.  

eg:
<jsp: param name="myParam" value="Amar Patel"/>

This tag is used as a nested tag within <jsp:forward> or <jsp:include> blocks.
For example:
<jsp: forward page="ssParameters.jsp">
  <jsp: param name="myParam" value="Amar Patel"/>
  <jsp: param name="Age" value="15"/>
</jsp: forward>

A:

Is there any way to add parameters in a servlet or jsp?

Yes. If it's possible to use the RequestDispatcher.forward(ServletRequest, ServletResponse) or  RequestDispatcher.include(ServletRequest, ServletResponse) you can use the the HttpServletRequestWrapper to add or filter Request Parameters
// assuming this code is part of a Servlet or JSP
HttpServletRequest request = ...;
final Map<String,String> additionalParameters = ...;

RequestDispatcher dispatcher = this.getServletConfig().getServletContext().getRequestDispatcher("/");

dispatcher.forward(new HttpServletRequestWrapper(request){

    public String getRequestParameter(String parameterName) {
        if (additionalParameters.contains(parameterName)) {
           return additionalParameters.get(parameterName);
        } else {
           if (!"filteredParameter".equals(parameterName)) {
              return super.getParameterMap().get(parameterName());
           } else {
              return null;
           } 
        }
    }
}
, response);

If you only want to pass additional "parameters" to the forwarded/included page / servlet
it's recomended to use the ServletRequest.setAttribute(String, Object). ServletRequest Attributes may be added / removed during processing the request and allow to add complete java Objects rather than Strings when using Request Parameters.

Why is there no command in java to add parameters manually?

The ServletRequest Request Parameters should usually be treated as unmodifiable as it is Warpper of the Request sent from the Client to server. If you want to add Parameters use the Request Attributes.

Another doubt I have is that, when forwarding from one jsp page to
  other, is the input request(with the parameters, attributes etc)
  forwarded along to the next jsp page?

Most of the time the original HttpServletRequest is passed to the forwarded page / servlet. But as shown in my snipplet it's also possible to pass a different ServletRequest to the forwarded / included servlet / jsp. 

What if I don't want certain parameters or attributes to be forwarded?

See code snippet above. You can filter the forwarded parameters or attributes using your own HttpServletRequestWrapper

