Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Help in struts

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi All,
Let me first clear the subject. I have two frames in a jsp page. I want that I can see the contant of the first frame everytime. But content of the 2nd frame should change according to the first frame. I am using sturts frame work. when I go for submit button on the first frame it should change the contant of the 2nd frame accordingly. But at present instead of opening the same page it opens the Main page in the first frame only.

my config.xml file is

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">

<struts-config>

<!-- Data Sources -->

<!-- Form Beans --><form-beans>
<form-bean name="blankpForm" type="com.uboc.wpm.forms.BlankpForm">
</form-bean>
<form-bean name="recordForm" type="com.uboc.wpm.forms.RecordForm">
</form-bean>
<form-bean name="splitForm" type="com.uboc.wpm.forms.SplitForm">
</form-bean>
</form-beans>
<global-forwards>
</global-forwards>

<!-- Action Mappings -->

<!-- Message Resources -->
<action-mappings>
<action path="/blankp" type="com.uboc.wpm.actions.BlankpAction" name="blankpForm" scope="request">
<forward name="success" path="/JSP/BlankRecords.jsp">
</forward>
<forward name="failuar" path="/JSP/error.jsp">
</forward>
</action>
<action path="/records" type="com.uboc.wpm.actions.RecordAction" name="recordForm" scope="request">
<forward name="success" path="/JSP/RecycleRecords.jsp">
</forward>
<forward name="failuar" path="/JSP/SplitRecycledAternate.jsp">
</forward>
</action>
<action path="/split" type="com.uboc.wpm.actions.SplitAction">
<forward name="success" path="/JSP/BlankRecords.jsp">
</forward>
<forward name="failuar" path="/JSP/BlankRecords.jsp">
</forward>
</action>
</action-mappings>

</struts-config>


I want to know that what is the best way to deal with such problem. OR What can we do when we want first page same as it is in one frame and want second frame to be refreshed only according to the first frame.

Thanks and Regards
Mahesh Malviya
 
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Hi Mahesh,

I don't know Struts and this is the wrong forum to be asking your question (you want the Web App Frameworks forum) but I'm going to try and give you a pointer.

If you were doing this the old-fashioned way with straightforward HTML (which is, after all, what your Struts translates to before it reaches the browser) you'd need to use the 'target' attribute of your <form> tag, for example:

In your Struts config file, do the <action> or <forward> elements allow you to specify a target attribute? I reckon that's the key to your problem.

Jules
 
Sheriff
Posts: 67752
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Mahesh, please do not cross-post the same question in multiple forums. Continue any discussion of this topic here.
 
Don't destroy the earth! That's where I keep all my stuff! Including this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
    Bookmark Topic Watch Topic
  • New Topic