File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes servlets and Jsp's Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlets and Jsp Watch "servlets and Jsp New topic

servlets and Jsp's

padmshree Patil
Ranch Hand

Joined: Dec 18, 2000
Posts: 54
Thanks. My problem is solved
One more doubt.
In my test.jsp page I have few bottons Back,Next and Finish
When i click on Next it should disply next question.
Can I call jsp method for onclick event?
where i forward it to NextQue servlet it fetches next question
<INPUT TYPE = "BUTTON" NAME ="Back" VALUE ="Back " onclick = 'Backmtd(this)' >
public void Backmtd()
{ %>
<jsp:forward page="/servlet/NextQue" />
<%! } %>
I tried like this .it's not working.
I am confussed...
please help me out.

prakash muthu
Ranch Hand

Joined: Sep 06, 2000
Posts: 75
Jsp:forward will run in server side. but the general function will execute in client side. so i think you can't use javascript function for JSP work.
let me know if you have any other points.

Prakash.M<BR>Bangalore- India<BR>(

Joined: Dec 20, 2000
Posts: 2
Even I addressed the same problem .
But now i have solved it.
Call a Java script function onclick event. say refreshmethod() is the Java script method which is called on clicking the button
In a JSP page
<script language="JavaScript">
function refreshmethod()
<input type=button onClick="refreshmethod()" ></input>
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
Please note that The Java Ranch has a naming policy, described here and "maheshe" is not a valid name. Please choose one which meets the requirements.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
I agree. Here's the link:
subject: servlets and Jsp's
It's not a secret anymore!