Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

forward from a jsp page to an action class

843838Dec 13 2005 — edited Dec 14 2005
I want to foward from a JSP page to an action class or servlet:
<%@ taglib uri="/bean" prefix="bean" %>
<%@ taglib uri="/html" prefix="html" %>
<%@ taglib uri="/logic" prefix="logic" %>
<html>
<jsp:useBean id="concordanceForm"
             class="Concordance.ConcordanceForm"
	     scope="request">
</jsp:useBean>

	<head>

<script type="text/javascript">
function next()
{ //foward to action class
<html:hidden property="option" value="next" />	
<jsp:forward page="/concordance.do" />
}
</script>
	</head>
	<body>

<bean:write name="concordanceForm" property="concordance"/>

 <html:submit onclick="next();">NEXT</html:submit> 
//call the function to forward to the action class when button clicked

</body>

</html>
I've tried the above code for the jsp page, but it always comes up with a
java.lang.StackOverflowError.

It's as if it's forwarding to the action class when the jsp page loads, instead of when I click the button (thus creating a never-ending loop).

Does anybody know how to solve the problem and get it to forward to the action class when I click the button?

Thanks in advance for any help,

Chris
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 11 2006
Added on Dec 13 2005
14 comments
701 views