Hi there, Thanks for looking, This is the page which doesnt execute if I goto it from a link. It works if opened directly. (Apologize for the long pieces of code)
ChooseJournalType.jsp <%@ page language="java" %> <%@ include file="../pages/Includes/Validator.jsp" %> <!-- this validates the user on each request //--> <% String tooltitle = application.getInitParameter("tooltitle"); <!-- this is defined in web.xml and prints ok //--> %> <%@ taglib prefix="html" uri="http://struts.apache.org/tags-html" %> <%@ taglib prefix="bean" uri="http://struts.apache.org/tags-bean" %> <jsp:useBean id="jvcoll" scope="request" class="fpa.collections.JVTypes"> <jsp:setProperty name="jvcoll" property = "con" value="<%=cms.getCon()%>"/> <jsp:setProperty name="jvcoll" property = "jvTypeTable" value="<%=application.getInitParameter("jvtypes")%>"/> </jsp:useBean> <% jvcoll.generateJVList(); <!-- this is to generate the collection for the selectbox //--> pageContext.setAttribute("myJvTypes", jvcoll.getJvType()); %> <html:html> <head> <html:base /> <title><%=tooltitle%></title> <link rel="stylesheet" type="text/css" href="../pages/Includes/mystyle.css"> </head> <body> <table width="750" border="0" cellspacing="2" cellpadding="2"> <tr> <td colspan="2"> <%@ include file="../pages/Includes/TopBar.jsp" %> <!-- this is a banner - which contains the member login/welcome etc.. //--> </td> </tr> <tr> <td width="200" valign="top"> <%@ include file="../pages/Includes/Navigation.jsp" %> <!-- this is the navigation bar which has all the links //--> </td> <td width="80%"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <html:errors/> </td> </tr> <tr> <td> <html:form action="/choosejvaction.do"> <table width="100%" border="1" cellpadding="2" cellspacing="2" bordercolor="#BBBBFF"> <tr bgcolor="#BBBBFF"> <td colspan="2" align="center" class="forTexts"><strong><bean:message key="prompt.choosejvpage.heading"/></strong></td> </tr> <tr class="forTexts"> <td width="50%"> <b><bean:message key="prompt.choosejvpage.jvtype"/></b></td> <td width="50%"> <html:select property="jvType" style="forForms" size="1"> <html:options collection="myJvTypes" property="value" labelProperty="label" /> <!-- this gets populated from the collection initiated at the start of this page - no problem //--> </html:select> </td> </tr> <tr class="forTexts"> <td align="center" colspan="2"> <html:cancel styleClass="forButton"><bean:message key="button.cancel"/></html:cancel> <html:submit styleClass="forButton"><bean:message key="button.choosejvpage.gotonext"/></html:submit></td> </tr> </table> </html:form> </td> </tr> </table> </td> </tr> </table> </body> </html:html> My struts-config.xml contains the below code. <global-forwards> <forward name="choosejv" path="/ChooseJV.do" /> </global-forwards> <action-mappings> <action path="/choosejvaction" type = "fpa.jv.ChooseJVTypeAction" name="ChooseJVTypeForm" input = "/index.jsp" cancellable = "true"> <forward name="success" path="/results.jsp" /> <forward name="cancelled" path="/cancelled.jsp" /> </action> <action path="/ChooseJV" forward="/forms/ChooseJournalType.jsp" /> </action-mappings> I have 2 classes - 1 is ChooseJVAction.java - which contains an execute method, and println statements inside the isCancelled method - which doesn't go through, and also println to getJvType() which returns null.. 1 is ChooseJVForm which has a standard getter and setter for String "jvType". All in all, the page shows a blank page when submitted, no errors etc Thanks in advance. Regards, Amit -----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Laurie Harper Sent: Thursday, March 15, 2007 12:08 PM To: user@struts.apache.org Subject: Re: Html:Cancel and html:submit works only on new page [EMAIL PROTECTED] wrote: > Hi, > > I have a navigation page which takes me to pageA.jsp throw an > <html:link> PageA.jsp has a textbox, a submit button and a cancel > button. > If I navigate through the index.jsp navigation menu to goto PageA.jsp, > the cancel and submit requests don't work - they both return a blank > page - no cancel is captured etc. > > However, when I goto the PageA.jsp directly in a new browser window, > both buttons work ok - capturing data in the textbox, capturing the > cancel event. > > Anyone has any pointers... ? Not without seeing what you're doing. Please post your relevant JSP and action code, and configuration snippets. I don't know what you mean by 'no cancel is captured' or 'capturing data in the textbox'; can you explain more what behaviour you're seeing and how it differs from what you're expecting? L. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]