Rajan
Rajan

Reputation: 125

Elements in <jsp:include> doesn't have access to form element in parent jsp

I have a Parent Jsp called Details.jsp. That have a form tag and some buttons like submit.

Since my page have different sections so I have created several jsps by breaking down the page.

section1.jsp,

section2.jsp.

But now. I dont have access to the form that is defined in parent jsp and the Jsp is giving error.

FYI : I am using custom tags in the child jsps (section1.jsp)

Do you have any idea what could be cause ?

Thanks, Rajan

Upvotes: 1

Views: 922

Answers (1)

Serge Ballesta
Serge Ballesta

Reputation: 149065

You should look at this other post What's the difference between including files with JSP include directive, JSP include action and using JSP Tag Files? for more detailed explainations.

I think that what you want is really an @include, as it will include the source of the included jsp instead of running it in its own context.

Upvotes: 1

Related Questions