• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

servlets and Jsp's

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
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.
thanks,
padmashree

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
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
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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()
{
window.location="/refresh.jsp";
}
</script>
<body>
<input type=button onClick="refreshmethod()" ></input>
</body>
 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
Thanks.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic