File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts  & Tiles frame work issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts  & Tiles frame work issue" Watch "Struts  & Tiles frame work issue" New topic
Author

Struts & Tiles frame work issue

Ravi Seshu
Ranch Hand

Joined: Mar 19, 2005
Posts: 38
Hi,


I am using struts & tiles framework for the project, The page structure follows the below structure:
1)After logingin the page displays tabs, going to the corresponding tabs (1st level menu) by clicking it will display the avaliable links as menus on top-left-corner (2nd level menus),
clicking on the link in (2nd level)menu's will take to the page say URI is "/action/module/page.do", as uri calls
: after the uri call it constructing required information in its action class, redirect to the main page say "/page.jsp" its form is in session, input is the page "/module/page.jsp"

2) This page which uses a tile, initializing the menus (in tiles-defs,it extends a layout tile) 1st & 2nd level in its inner jsp)
module tab..etc, for the page and then loads the outer jsp.
3) for this main (inner) jsp page uses another tile which displays a block of information on the page.

say : inner jsp page content...
<tiles:insert definition="showinformation">
<tiles ut name="info1" value="..."/>
<tiles ut name="info2" value="..."/>
</tiles:insert>

<tiles:insert attribute="/PAGE.jsp"/> (this displays the outer jsp page content)

4) The above tiles definiton "show information" path in tiles-defs.xml is a URI "/tiles/showinformation.do?method=load" (uses dispatch action class)
this uri in struts-config.xml file is an action mapped to a form with few variables, scope in session,validation false
input attribute to the showinformation page "/show.jsp"

5) When clicking on the (2nd level navigation menu)link (getting back to step-1), this shows all the information what is desired, in the PAGE.jsp (inner.jsp display page content)

I am inserting another jsp say : "datajsp" in it, which shows few blocks of data,and a link to add another set of data.(this is done by adding another row in the list of form field in action class say "form field of type java.util.List".
This is done by updating the method name in the jsp page (in JavaScript) and submit it(this is onclick event of that link in sub jsp page) and in action class update the form field fo type list with another empty record which displays another set of empty info (need to be updated by the user).

query : here I observed 2 forms, 1 for the "show information in the inner.jsp" another for the main link "page.do i.e. pageform"

1) When i click on the link in the "datajsp", this page is redirected back to the same page showing empty data set of data(as desired) to be filledin by the user but shows "servletException" to display "show information" (step-4 tiles declared form+info display). I dont understand the reason as both of the forms are in session scope and the form(innser jsp "show information" form)exist in the session. The exception observed is "no bean specified".

How come it threw "ServletException : No Bean Specified" eventhough i have this form in the session (i tried printing the session variables and found it there).

can any one suggest me atleast the reason or is there anything to be known more in this scenario. The link in "datajsp" updates the form (main form Outerjsp: pageform) method variable to required action class method name and submits the form (/module/page.jsp page includes a page "datajsp", this "datajsp" page has a link and this submits the form of the including page(/page.jsp) form. IS there any chance of error...or something..

i would be pleased if anyone spares some time for this issue.

regards,
-eswar
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61419
    
  67

"Ravi R",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3710
    
    5

"Rawse"

Your name still does not match our naming policy. Please correct it ASAP.


My Blog: Down Home Country Coding with Scott Selikoff
Chris Boldon
Ranch Hand

Joined: Aug 10, 2006
Posts: 190
Possibly increase the buffer or tell it not to flush?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts & Tiles frame work issue