cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Accessing user input data from multiple external jsp includes

Former Member
0 Likes
5,404

Hi all,

As my jsp page is becoming a long file, due to 64kb method limit the jsp page is giving java.lang.VerifyError during jsp compilation. Due to this reason i have split the jsp page into 3 seperate jsp pages and included them using action tags. All these three page will be having their own <hbj:content id="a1PageContext" ><hbj:form id="form1" >... hbj:content id="a2PageContext" ><hbj:form id="form2" >...hbj:content id="a3PageContext" ><hbj:form id="form3" >.

Now when i click a button in the 3rd jsp page , in the pageprocessor, i could able to access the controls within the current(3rd) jsp page only using method

InputField inputFld = (InputField)this.getComponentForId("input1");

It is giving null for controls of jsp page1 & 2.

How cxan i access these controls data in the jspGynpage.

Your help is highly appreciable.

Thanks & Regards

Markandeya

View Entire Topic
Former Member
0 Likes

hi

we had the same problem, and maybe our solution will help :

our page contained a main tab strip with 5 items (tabs).

we broke the large JSP to 5 smaller JSPs the following way :

JSP1:

<some general code>

<tab>

<item1 title>

<item code>

<item2 title>

<item3 title>

<item4 title>

<item5 title>

JSP2:

<some general code>

<tab>

<item1 title>

<item2 title>

<item code>

<item3 title>

<item4 title>

<item5 title>

JSP3:

<some general code>

<tab>

<item1 title>

<item2 title>

<item3 title>

<item code>

<item4 title>

<item5 title>

JSP4:

<some general code>

<tab>

<item1 title>

<item2 title>

<item3 title>

<item4 title>

<item code>

<item5 title>

JSP5:

<some general code>

<tab>

<item1 title>

<item2 title>

<item3 title>

<item4 title>

<item5 title>

<item code>

This way, each of the 5 JSPs is significantly smaller than the original one we had, thus avoiding approaching the 64k limit.

We were able to do it thanks to the fact that our user does not HAVE to see all fields at the same time.

I hope this helps

zach

Former Member
0 Likes

Hi Zach,

I have implemented the same idea couple of days back, which solved the 64k problem.

Really good to see the same idea.

Bu still i am facing jsp loading time considerbly high in comparision to external jsps.

Thanks & Regards

Markandeya

Former Member
0 Likes

I did face similar problem, with different circumstances,

though. What I did and which worked is ---

--Create a JSP file with all HTMLB tags and some dynamic

include action tags, like <%@include file="xxx.jsp" %>.

This JSP page will have content, page, form etc. tags

beginning along with their closing end too.

--Create the xxx.jsp, yyy.jsp files which simply have

normal HTMLB tags, NO content, page, form tags. In these

pages you can make use of Java/JSP object references

from the enclosing JSP page, since this page runs in the

same context as the enclosing page.

Now you have separated a big JSP page in to several small

JSP pages.

I am not sure whether this answers your problem though,

Prasad

Former Member
0 Likes

Dear Prasad,

The solution you are splitting the jsp pages in this approach is static include using <%@include file="xxx.jsp" %>. At the time of compilation main jsp will includes all its child jsps in a single jsp/servelet. This approach we can not avoid 64K problem.

Dymnamic include using action tag <jsp:include />

Will not incude the child jsps in Master jsp but runs as

separate/external servlet. (this will reduce code content of single jsp).

If u have any solution with Dymnamic include , pl let me know.

Regards

Markandeya