Is it possible to create a front end in Swing and write the back end in the same java file and then use the .java file as bean in a JSP through a jsp:usebean tag. Please Suggest
Swing is a clientside GUI technology. JSP are a serverside technology. You can't mix the two.
What you can do is write an applet using Swing and serve it with your JSP. If the applet needed to use some of the serverside logic, it would have to communicate with servlets using the java.net.* stuff.