wood burning stoves 2.0*
The moose likes Struts and the fly likes Splitting up JSP containing logic:iterate tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Splitting up JSP containing logic:iterate tag" Watch "Splitting up JSP containing logic:iterate tag" New topic
Author

Splitting up JSP containing logic:iterate tag

Jack Numen
Ranch Hand

Joined: Nov 09, 2011
Posts: 32

Hi,
I have a JSP file -size issue in my Weblogic server which is not allowing JSPS files of more than 65KB size.
I want to split that file but the issue is the entire file is written in logic:iterate tag .
I want to know how to split this file.

Files contains boolean values along with form-beans which are to be used in the entire scope.

Regards,
Jack
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 296

Hi Jack,

Cant comment much without having idea of Jsp but have you explore the options for Tiles or Jsp:include. Also , if you are including code in other files it will be executed as it executes in logic:itearte tag.

Regards
Jatan
Jack Numen
Ranch Hand

Joined: Nov 09, 2011
Posts: 32

Lets take the example


Now i want to use the last logic tag


in another JSP reading all the variable like "read" etc without re-declaring them.
rohit chavan
Ranch Hand

Joined: Oct 08, 2010
Posts: 131

Please use CODE tag so that it is readable. Pleae refer https://www.coderanch.com/how-to/java/UseCodeTags.
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 296

Hi Jack ,

you can take whole the logic:present tag in different file and include that jsp in main jsp. Also you can define the variable in main jsp which will be available in all the included jsp files so definately you can split the jsp and check.
Here,
you can get the changed parameter value of read variable from the included jsp to main jsp. So

can be include in another jsp get the value of read in the main jsp based on which you have put the condition.
Also , I am not aware how complex logic you have written so based on that you can try.

Regards
jatan
Jack Numen
Ranch Hand

Joined: Nov 09, 2011
Posts: 32

Thanks,
Sorry!!Here i dint explain the issue clearly .

Main .jsp contains a logic:itereate tag in which there are nearly 3000 lines of code.
When i try to run this on my Weblogic server.It gives an error that "File is too large:max filesize allowed in JSP is 65KB"

So i have to spilt the code inside the logic:iterate tag so that each fragmented JSP is <65KB size.
jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 296

hi,

you need to rewrite the jsp and split it up.Its all depend on you as you have the code and you need to take up the challenge.

Second option you can pre compile the jsp and then put it in to the server.


Also you can check the possibilites of changing the web logic's jsp compiler in web logic server . I am not sure is it allowed or not ,but you can ask it in the web logic server forum.



Regards
Jatan
rohit chavan
Ranch Hand

Joined: Oct 08, 2010
Posts: 131

Also you can check the possibilites of changing the web logic's jsp compiler in web logic server . I am not sure is it allowed or not ,but you can ask it in the web logic server forum.


I think this should be possible in weblogic.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Splitting up JSP containing logic:iterate tag
 
Similar Threads
Using Struts to save files
Retrieving indexed property of form-bean
how to split a Zip file
Display data using Structs Tag
"code too large for try statement " , While compiling JSP