GeeCON Prague 2014*
The moose likes Struts and the fly likes Problem of <frameset> tag with struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem of <frameset> tag with struts2" Watch "Problem of <frameset> tag with struts2" New topic
Author

Problem of <frameset> tag with struts2

Prajatna Mahunta
Greenhorn

Joined: Sep 01, 2008
Posts: 25
I am migrating my application from struts 1 to staruts 2

We are using struts 2.1.8 jar. We were using <fameset> to have our website layout.

But unfortunately using <fameset> the struts 2 is not able to render the page. In the UI it is only showing "undefined" . Please suggest how to make <frameset > work in struts2


Prajatna Mahunta
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You've provided almost no information we can use to help you.

Please read ItDoesntWorkIsUseless and TellTheDetails.
Prajatna Mahunta
Greenhorn

Joined: Sep 01, 2008
Posts: 25
From 1st jsp page I am calling a action "login.action"

The struts.xml mapping is like-


Inside zulaHome.jsp I am using <frameset> tag to create the Welcome page which is a combination of header, menu & body .
The code I am using for zulaHome.jsp is as follows



I can see in my console that on call of this login.action my zulaHome.jsp page is loading. But in UI i am not able to see any thing . only it is showing a single word "undefined".

As you can see I have tried various option for the <frame src="" > tag as follows.

(1. using jsp location,


2. using s:url tag to load the jsp ,


3. using a action to load the corresponding JSP


)
But non of these worked out for me..

Can you please let me know id these is any comparability issue is there with struts2 & <frameset> tag ?
If not why this is happening..and what is the solution for this. ???

can any body please help me.
Anbarasu Aladiyan
Ranch Hand

Joined: Jun 02, 2009
Posts: 182

Hi Prajatna Mahunta,

I have used the same thing in my last project with out any problem.
like below (this code is a part of the page which will be displayed after successful login validation)


All the src attribute calls a struts2 action. But i have not build the url using strut2 url tag.
It worked well for me...


A.A.Anbarasu
Prajatna Mahunta
Greenhorn

Joined: Sep 01, 2008
Posts: 25
anbarasu aladiyan wrote:Hi Prajatna Mahunta,

I have used the same thing in my last project with out any problem.
like below (this code is a part of the page which will be displayed after successful login validation)
zulaHome.jsp


All the src attribute calls a struts2 action. But i have not build the url using strut2 url tag.
It worked well for me...



Thanks Anbarasu ,
I tried with your solution. But still I am facing the same problem..Is there any problem with Struts version, I am using Struts 2.1.8

I have changed the frameset page like--


And the corresponding action mapping is--


And the action class is --



I am still wondering ...why i am not able to get my page , because i can see in the logs that my frameset page() is getting called




But in UI still it is coming "undefined" .

Can anybody please help me out..
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I'm not sure what you mean by " In the UI it is only showing "undefined"". You don't show the JSP, so we can't help diagnose a JSP problem.

Struts 2 has absolutely nothing to do with framesets. Do your actions work on their own, i.e. if you just call them manually? Are you using JavaScript in the pages?
 
GeeCON Prague 2014
 
subject: Problem of <frameset> tag with struts2