Javascript integration into rails

hi … i’m new into rails and had a small query … suppose if an web
application using j2ee framework is already in place … can we use the
java scripts and jsp from it and integrate it into a new rails frame
work or would we have to begin from the begining