Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2006

Tip: Looking for answers? Try searching our database.

Access java method in a submit of a jsp

Thread view: 
bolinhu - 24 Oct 2006 17:21 GMT
Hi

I'm having a problem with a form that has 3 submits in a jsp and I want
that each one of them to access different methods in a java class. How
can I do that?

Thanx
Joe Attardi - 24 Oct 2006 17:31 GMT
> I'm having a problem with a form that has 3 submits in a jsp and I want
> that each one of them to access different methods in a java class. How
> can I do that?

A little more information on your environment. What is your JSPs
submitting to? A servlet? Are you using Struts?
If you give some more details we can help you out.

Signature

Joe

bolinhu - 24 Oct 2006 17:42 GMT
My jsp is just refreshing the actual page with some variables
actualized, because 2 of the 3 submits I have don't work yet. The ideia
is to acces in the other 2 submits some methods is a java class(a
servlet maybe, I haven't implemented it yet) to access a databse and
return some objects from there.
Joe Attardi - 24 Oct 2006 17:48 GMT
> My jsp is just refreshing the actual page with some variables
> actualized, because 2 of the 3 submits I have don't work yet. The ideia
> is to acces in the other 2 submits some methods is a java class(a
> servlet maybe, I haven't implemented it yet) to access a databse and
> return some objects from there.

You should probably have your form submit to a servlet. Then, in the
doGet() or doPost() method of the servlet, you can determine what
method to call, and just call it. Then redirect to your JSP from there.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.