Help with texturing over multiple polygons

Hey I am trying to texture some GL_QUADs that are textured seamlessly.

 
        wood.enable();
        wood.bind();
        
        gl.glBegin(GL.GL_QUADS);

        gl.glNormal3f(0.0f,0.0f,1.0f);
        gl.glTexCoord2f(0.0f, 0.0f); gl.glVertex3f(...);
        gl.glTexCoord2f(0.0f, 2.0f); gl.glVertex3f(...);
        gl.glTexCoord2f(2.0f, 2.0f); gl.glVertex3f(...);
        gl.glTexCoord2f(2.0f, 0.0f); gl.glVertex3f(...);

        gl.glTexCoord2f(0.0f, 0.0f); gl.glVertex3f(...);
        gl.glTexCoord2f(0.0f, 2.0f); gl.glVertex3f(...);
        gl.glTexCoord2f(2.0f, 2.0f); gl.glVertex3f(...);
        gl.glTexCoord2f(2.0f, 0.0f); gl.glVertex3f(...);
        
        gl.glEnd();
        
        wood.disable();

Whats the best way to texture the GL_QUADs as if they were one?

http://users.cs.cf.ac.uk/K.P.Sullivan/TextureProblem.jpg

just make sure that vertices that have the same position also have the same texture coordinates