Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Access java method in a submit of a jsp

Reply
Thread Tools

Access java method in a submit of a jsp

 
 
bolinhu
Guest
Posts: n/a
 
      10-24-2006
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

 
Reply With Quote
 
 
 
 
Joe Attardi
Guest
Posts: n/a
 
      10-24-2006
On Oct 24, 12:21 pm, "bolinhu" <sergio.ms.go...@gmail.com> wrote:
> 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.

--
Joe

 
Reply With Quote
 
 
 
 
bolinhu
Guest
Posts: n/a
 
      10-24-2006
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.

 
Reply With Quote
 
Joe Attardi
Guest
Posts: n/a
 
      10-24-2006
On Oct 24, 12:42 pm, "bolinhu" <sergio.ms.go...@gmail.com> wrote:
> 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Poll: Is a Java Method an Instance of the Java Classjava.lang.reflect.Method? Please reply with YES or NO. Paka Small Java 15 02-07-2012 07:04 PM
JSP newbie - can I use JSP to access exiting java classes withoutre-write to javabeans terry433iid@yahoo.com Java 2 03-17-2008 01:40 AM
[JSP] difference between jsp:forward and jsp:include alexjaquet@gmail.com Java 0 06-02-2006 01:21 PM
How to get the html output of a local JSP page from my Java code, or use a JSP as an HTML templates. DigitalUncle Java 0 11-02-2004 05:22 PM
JSP page access regular Java class (non-Java bean) Matt Java 2 05-30-2004 03:17 PM



Advertisments