but our object doesn't have a property called "mystring"
Doesn't matter. What this setProperty standard action does is trying to set all the properties of the bean whose id == "name" from the request parameters. And yes, you're right, as String doesn't have any bean property setters, this line won't have any effect.
But when we come to this :
I think we are no longer talking about the same "mystring". As Alexander said, the standard action above declares an attribute in the PageScope, which is a JSP Map of <String, Object>, but this scriptlet is plain old servlet, it refers to a servlet instance object called "mystring". I'm not sure whether the output should be "" or a compilation error as this instance does not seem to have been declared (e.g. with a <%! String mystring = "" %>
Could anybody confirm that servlet variables have nothing to do with PageScope attributes ?