I'm using a applet and java class files in my application including the servlet. The database connection and the sql querys are written on a standard java class file. I'm going to host all the files in the same server. Now what i need is i need the servlet and the applet to access the java class file methods and also i need the applet to access the methods which are written in the servlet. Please let me know is it possible and also let me know how to do this.
If you know any other solutions please let me know. Thanks in advance
Sutharshan wrote also i need the applet to access the methods which are written in the servlet
Which methods of servlet do you want to access? If the method has some business logic you can move it out of servlet into a java class. Its not a great idea to create an instance of the servlet class and invove some method on it. Please revert back and give some more details of your requirements so that we can work out on some approach.
Joined: Jul 31, 2008
sorry for the error in the post friend.
I need the servlet and the applet to access the java standard class methods in the same server, which contains the database details.
Also i want to check the user login details in applet, but i cant use session inside applet. So i need to check the session in jsp or servlet and pass that to applet via a method. Hope the problem is clearly explained now.
Give me some idea and sampLe code to handle this issue.