Tricky question. Everything in Java is passed by value. Objects are actually never passed, only references to objects. This makes it sound like objects are passed by reference but they are
NOT.
Code wise, objects are passed like any other variable.
Person guy = new Person();
Person girl = new Person();
guy.shakeHands(girl);
public class Person(){
public void shakeHands(Person shakee){
}
}
As far as JSP pages go, that's a pretty broad question. The most basic way is something like this:
<%= object.toString(); %>
I know this works for return types of Strings and ints. It might work for others but I'm not 100% sure.