Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 10 Aug 2008 00:51:07 -0000 Issue 8187

user-digest-help

2008-08-09


Author LoginPost Reply

user Digest 10 Aug 2008 00:51:07 -0000 Issue 8187

Topics (messages 189870 through 189892):

Re: problem with <s:text>
 189870 by: Muralidhar Y

not displaying Action errors
 189871 by: Narasimha Raju Naidu

Re: Struts 2 Jasper Reports Plugin
 189872 by: sattanari

Re: Simple validation does not work
 189873 by: Anton Bashmakov
 189874 by: holod
 189884 by: Struts Two

Re: Struts 2 links and Internet explorer problem
 189875 by: Milan Milanovic

[OT] Re: Struts 2 links and Internet explorer problem
 189876 by: Dave Newton
 189878 by: Milan Milanovic

Re: [S2] general question about cookies and namespace
 189877 by: Randy Burgess
 189879 by: Pierre Thibaudeau
 189885 by: Randy Burgess
 189887 by: Pierre Thibaudeau

[OT] Re: [S2] general question about cookies and namespace
 189880 by: Dave Newton
 189883 by: Pierre Thibaudeau

Struts 2 and radio buttons
 189881 by: Michael Finney
 189882 by: Dave Newton
 189886 by: Michael Finney

[S2] submitting a form and choice of action mappings
 189888 by: Pierre Thibaudeau
 189892 by: Pierre Thibaudeau

[S2] LookupDispatchAction Equivalent in Struts 2
 189889 by: Lalchandra Rampersaud
 189890 by: Dave Newton
 189891 by: Lalchandra Rampersaud

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)

----------------------------------------------------------------------

Attachment: user_189870.ezm (zipped)
Thank you Dave

Warm regards,
Muralidhar Y
muralidhary@(protected)

US Main: 877 KENSIUM (536.7486)
India Main: +91 9949495511
India Fax:  +91 9949495522
Kensium
200 S Wacker Dr, Suite 3100
Chicago, IL 60606


Confidentiality Note:
-----------------------------
The information contained in this e-mail is strictly confidential and for
the intended use of the addressee only. Any disclosure, use or copying of
the information by anyone other than the intended recipient is prohibited.
If you have received this message in error, please notify the sender
immediately by return e-mail and securely discard this message.

________________________________



-----Original Message-----
From: Dave Newton [mailto:newton.dave@(protected)]
Sent: Friday, August 08, 2008 6:31 PM
To: Struts Users Mailing List
Subject: RE: problem with <s:text>

The extra markup is most certainly not coming from S2.

I don't know what paradigm pop is, or myPoPProject, and paradigmpop.org
doesn't respond, but your answer lies there.

Dave


--- On Fri, 8/8/08, Muralidhar Y <muralidhary@(protected):

> From: Muralidhar Y <muralidhary@(protected)>
> Subject: RE: problem with <s:text>
> To: "'Struts Users Mailing List'" <user@(protected)>,
newton.dave@(protected)
> Date: Friday, August 8, 2008, 8:42 AM
> Hi dave here is my complete jsp code
>
> <%@(protected)"
> contentType="text/html; charset=ISO-8859-1"
>   pageEncoding="ISO-8859-1"%>
> <%@(protected)"
> uri="/struts-tags"%>
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01
> Transitional//EN"
> "http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>  
>  <title><s:text name="P_Search_Page"
> /></title>
> </head>
> <body>
>  <s:form action="executePoPSearch.action" >
>    <table>
>      <tr>
>        <td><s:textfield name="searchText"
> value="enter search keywords here"
> size="100"  /></td>
>        <td><s:submit value="search"
> /></td>
>      </tr>
>    </table>  
>  </s:form>
> </body>
> </html>
>
>
> The result html page is as below
>
>
>
> <html>
> <head>
> <title>search page | myPoPProject, by Paradigm
> PoP</title>
> <link rel="stylesheet"
> href="/pop/struts/css_xhtml/styles.css"
> type="text/css" />
> <script type="text/javascript">
>   // Dojo configuration
>   djConfig = {
>      baseRelativePath: "/pop/struts/dojo",
>      isDebug: false,
>      bindEncoding: "UTF-8",
>      debugAtAllCosts: true // not needed, but allows the
> Venkman debugger
> to work with the includes
>   };
> </script>
> <script type="text/javascript"
>    
> src="/pop/struts/dojo/dojo.js"></script>
> <script type="text/javascript"
>    
> src="/pop/struts/simple/dojoRequire.js"></script>
> <script language="javascript"
> type="text/javascript"
> src="/pop/scripts/prototype-1.6.0.2.js"></script>
> <link rel="stylesheet"
> type="text/css"
> href="/pop/styles/pop.css" />
>
>  
>  
>
> </head>
> <body>
> <div class="main">
> <div class="header">
> <h1>search page</h1>
> </div>
> <div class="content">
>        
> <form id="executePoPSearch"
> onsubmit="return true;"
> action="executePoPSearch.action"
> method="post">
>    <table>
>       <tr>
>           <td><div
> id="wwgrp_executePoPSearch_searchText"
> class="wwgrp">
>
> <div id="wwctrl_executePoPSearch_searchText"
> class="wwctrl">
> <input type="text" name="searchText"
> size="100" value="enter search keywords
> here"
> id="executePoPSearch_searchText"/></div>
> </div>
> </td>
>              <td><div align="right"
> id="wwctrl_executePoPSearch_0"><input
> type="submit" id="executePoPSearch_0"
> value="search"/>
> </div> </td>
>      </tr>
>    </table>  
>  </form>
>
>
>
>
> </div>
> </div>
> <div class="footer">
>
>
>
>
>
> <p>(c) 2008 Paradigm PoP. ALL INFORMATION PRESENTED
> HERE IS
> CONFIDENTIAL.</p>
> </div>
> </body>
> </html>
>
>
>
> Warm regards,
> Muralidhar Y
> muralidhary@(protected)
>
> US Main: 877 KENSIUM (536.7486)
> India Main: +91 9949495511
> India Fax:  +91 9949495522
> Kensium
> 200 S Wacker Dr, Suite 3100
> Chicago, IL 60606
>
>
> Confidentiality Note:
> -----------------------------
> The information contained in this e-mail is strictly
> confidential and for
> the intended use of the addressee only. Any disclosure, use
> or copying of
> the information by anyone other than the intended recipient
> is prohibited.
> If you have received this message in error, please notify
> the sender
> immediately by return e-mail and securely discard this
> message.
>
> ________________________________
>
>
>
> -----Original Message-----
> From: Dave Newton [mailto:newton.dave@(protected)]
> Sent: Friday, August 08, 2008 4:25 PM
> To: Struts Users Mailing List
> Subject: Re: problem with <s:text>
>
> --- On Fri, 8/8/08, Muralidhar Y
> <muralidhary@(protected):
> > when I use
> > <head>
> >  <title><s:text
> name="P_Search_Page" /></title>
> > </head>
> >
> > it also adding a header in the body tag like
> >
> > <div class="header">
> > <h1>search page</h1>
> > </div>
>
> I find it unlikely that the <s:text.../> tag is
> adding an element to your
> body element. AFAIK the text tag has no ability to do this.
> I'd suggest
> posting more information about the source JSP, your
> configuration, etc.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail:
> user-help@(protected)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail:
> user-help@(protected)

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


Attachment: user_189871.ezm (zipped)
hi to all,


    im sending my code please check where i am doing mistake

form.jsp
---------------
<%@(protected)"%>
<html:errors/>
<div style="background-color:#fcc;border: 1px dashed
blue;width:280px;margin:2px;">
<html:form action="/login.do">
<table cellpadding=2 align=center style="font-family:verdana;font-size:15;">

<tr><td><b>User Name</b></td>
<td><html:text property="userName"/></td></tr>
<tr>
<td><b>Password</b></td>
<td><html:password property="pwd"/></td></tr>
<tr><td>
<html:submit property="submit" value="Connect"/></td><td>
<html:reset property="reset" value="Re-Try"/></td></tr>
</table>
</html:form>
</div>

-------------------------------------------------------------------------
formbean
---------------------------
import javax.servlet.http.*;
import org.apache.struts.action.*;

public class LoginBean extends ActionForm
{
  private String userName;
  private String pwd;

  public void setUserName(String userName)
  {
   this.userName=userName;
  }
  public String getUserName()
  {
   return userName;
  }
  public void setPwd(String pwd)
  {
   this.pwd=pwd;
  }
  public String getPwd()
  {
   return pwd;
  }

  public void reset(ActionMapping mapping,HttpServletRequest request)
  {
   System.out.println("--reset LoginForm--");
   this.userName="";
   this.pwd="";
  }

  public ActionErrors validate(ActionMapping mapping,HttpServletRequest
request)
  {
   ActionErrors aes=new ActionErrors();
   if(userName==null||userName=="")
   {
    aes.add("userName",new ActionError("UserName is Required"));
   }
   if(pwd==null||pwd=="")
   {
    aes.add("pwd",new ActionError("Password is Required"));
   }
   return aes;
  }
}

--------------------------------------------------------------
action class
----------------------

import javax.servlet.http.*;
import org.apache.struts.action.*;


public class LoginAction extends Action
{
  public ActionForward execute(ActionMapping mapping,ActionForm
form,HttpServletRequest request,HttpServletResponse response) throws
Exception
  {
   LoginBean login= (LoginBean)form;
   return mapping.findForward("succ");
  }
}

-------------------------------------------------------------------
struts-config.xml code
------------------------------
<form-beans>
  <form-bean name="LBBean" type="LoginBean"/>
</form-beans>


<action path="/login" type="LoginAction" name="LBBean" scope="request"
input="/pages/login.jsp" validate="true">
  <forward name="succ" path="/pages/succ.jsp"/>
</action>


while compiling im not getting any errors while running if i did not give
any input i am getting bullet not the exact error what i gave. waiting for
you people's valuable replys.

Regards,

Narasimha Raju




uni...

Attachment: user_189872.ezm (zipped)

hi
iam sending one example have a look at this


package com.kogent.action;
import com.opensymphony.xwork2.*;
import net.sf.jasperreports.engine.JasperCompileManager;
import java.text.*;
import java.sql.*;
import java.util.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts2.interceptor.*;
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.design.JasperDesign;



public class ReportsAction extends ActionSupport implements
ServletRequestAware, ServletResponseAware
{
 
 private HttpServletRequest request=null;
 private HttpServletResponse response=null;
 Connection con=null;
 Statement stmt=null;
 ResultSet rs=null;
 
 JasperReport jasperReport;
 JasperPrint jasperPrint;
 JasperDesign jasperDesign;
 
 private List<MonthlyStatement> myList=null;
 
 private List<Dummy> dummyList=null;
 
 private String fromdate;
 private String todate;
 private String reporttype;
 private String accountnumber;
 public String getAccountnumber() {
   return accountnumber;
 }
 public void setAccountnumber(String accountnumber) {
   this.accountnumber = accountnumber;
 }
 public String getFromdate() {
   return fromdate;
 }
 public void setFromdate(String fromdate) {
   this.fromdate = fromdate;
 }
 public String getReporttype() {
   return reporttype;
 }
 public void setReporttype(String reporttype) {
   this.reporttype = reporttype;
 }
 public String getTodate() {
   return todate;
 }
 public void setTodate(String todate) {
   this.todate = todate;
 }
 
 
  public void setServletRequest(HttpServletRequest request)
  {
    this.request=request;
  }
 
  public void setServletResponse(HttpServletResponse response)
  {
    this.response=response;
  }
 
 public String execute()
 {
   
   System.out.println("************ Execute Method is Called
***************");
   
   myList = new ArrayList<MonthlyStatement>();
   dummyList = new ArrayList<Dummy>();
   
   Dummy dummy = new Dummy();
   dummy.setTxreference("some Referece");
   dummy.setTxdetails("detauks");
   dummy.setTxamount("200");
   
   dummyList.add(dummy);
   String dir = request.getRealPath("/");
   
   
   try
   {
     
     
   /*Class.forName("com.mysql.jdbc.Driver");
   con= DriverManager.getConnection("jdbc:mysql://localhost:3306/test",
"root","123456");
   stmt= con.createStatement();
   
   SimpleDateFormat sdf    = new SimpleDateFormat("yyyy-MM-dd");
   java.util.Date fdate    = sdf.parse(fromdate);
   java.util.Date tdate    = sdf.parse(todate);
   
   java.sql.Timestamp fromDate = new java.sql.Timestamp(fdate.getTime());
   java.sql.Timestamp toDate  = new java.sql.Timestamp(tdate.getTime());
   
   
   String query = "select * from monthlystatement where date between
'"+fromDate+"' AND '"+toDate+"' ";
   
    rs = stmt.executeQuery(query);
   while(rs.next())
   {
     
   
     MonthlyStatement monthStatement = new MonthlyStatement();
     //monthStatement.setDate(date)
     monthStatement.setTransactiondetails(rs.getString("transactiondetails"));
   
monthStatement.setTransactionreference(rs.getString("transactionreference"));
      monthStatement.setTransactionamount(rs.getString("amount"));
     // monthStatement.setDate(rs.getTimestamp("date"));
     
      myList.add(monthStatement);
     
      System.out.println(" SIZE OF LIST IS========>" + myList.size());
     
   
   }
   */
     
   
 
JasperCompileManager.compileReportToFile(dir+"/jasper/our_jasper_template.jrxml",dir+"/jasper/our_compiled_template.jasper");
   
   /* load JasperDesign from XML and compile it into JasperReport
   jasperDesign =
JRXmlLoader.load(dir+"/jasperReports/our_jasper_template.jrxml");
   jasperReport = JasperCompileManager.compileReport(jasperDesign);
   
    fill JasperPrint using fillReport() method
    jasperPrint =
JasperFillManager.fillReport(jasperReport,parameters,con);
   
   JasperExportManager.exportReportToPdfFile(jasperPrint,
dir+"/jasperReports/output.jasper");
   response.setContentType("application/pdf");
    */
   
   }
   
   catch(Exception e)
   {
     System.out.println(e);
   }
   
   
   return SUCCESS;
 }
 
 public List<MonthlyStatement> getStatement()
 {
   System.out.println(" Returning Size Is ==============>" + myList.size());
   return myList;
 }
 
 public List<Dummy> getDummyList()
 {
   return dummyList;
 }

}

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_189873.ezm (zipped)
I'm using JBOSS-5.0.0.CR1, could you please explain in more details what I
should do?

On Fri, Aug 8, 2008 at 7:37 PM, holod <serega.sheypak@(protected):

>
> If you are using IBM WebSphere 6.x, that's ok.
> I've faced the same problem: http://jira.opensymphony.com/browse/XW-651
>
> So, I've simply checked out branch of x-work, packaged it using Maven and
> now stupid IBM App server allows me to use validation.
>
> Anyway, you you aren't WebSphere user, I suggest you to perform the same
> operation.
>
> P.S.
>
> I prefer to use annotations. They are more comfortable.
>
>
>
> JAnton wrote:
> >
> > Hi,
> > I have strange situation, here is my form :
> >
> >   <body>
> >      <s:form action="Colors" >
> >         <s:textfield label="Name" name="name" />
> >         <s:submit />
> >      </s:form>
> >
> >   </body>
> >
> > Here is the action :
> >
> > public class Colors extends ActionSupport {
> >
> >   private String name;
> >
> >   @Override
> >   public String execute() throws Exception {
> >      return SUCCESS;
> >   }
> >
> >   public String getName() {
> >      return name;
> >   }
> >
> >   public void setName(String name) {
> >      this.name = name;
> >   }
> > }
> >
> > Here is the part of struts.xml :
> >
> >      <action name="Colors_*" method="{1}"
> > class="com.anton.noname.actions.Colors" >
> >         <result type="redirectAction">/Welcome</result>
> >         <result name="input">/Colors.jsp</result>
> >      </action>
> >
> > and finally Colors-validation.xml :
> >
> > <!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator
> > 1.0.2//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
> ">
> >
> > <validators>
> >   <field name="name">
> >      <field-validator type="requiredstring">
> >         <message>You must enter a name</message>
> >      </field-validator>
> >   </field>
> > </validators>
> >
> > And there is stake trace that I get :
> >
> > *type* Exception report
> >
> > *message*
> >
> > *description* *The server encountered an internal error () that prevented
> > it
> > from fulfilling this request.*
> >
> > *exception*
> >
> > javax.servlet.ServletException: Filter execution threw an exception
> >
> >
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter (ReplyHeaderFilter.java:96)
> >
> > *root cause*
> >
> > java.lang.ExceptionInInitializerError
> >
> >
> com.opensymphony.xwork2.validator.ValidatorFileParser.addValidatorConfigs (ValidatorFileParser.java:192)
> >
> >
> com.opensymphony.xwork2.validator.ValidatorFileParser.parseActionValidatorConfigs (ValidatorFileParser.java:72)
> >
> >
> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.loadFile (AnnotationActionValidatorManager.java:361)
> >
> >
> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildClassValidatorConfigs (AnnotationActionValidatorManager.java:252)
> >
> >
> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildValidatorConfigs (AnnotationActionValidatorManager.java:340)
> >
> >
> >
> org.apache.struts2.dispatcher.Dispatcher.serviceAction (Dispatcher.java:504)
> >
> >
> org.apache.struts2.dispatcher.FilterDispatcher.doFilter (FilterDispatcher.java:419)
> >
> >
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter (ReplyHeaderFilter.java:96)
> >
> > *root cause*
> >
> > java.lang.IllegalArgumentException: URI scheme is not "file"
> >     java.io.File.<init>(File.java:366)
> >
> >
> com.opensymphony.xwork2.validator.ValidatorFactory.parseValidators (ValidatorFactory.java:314)
> >
> >
> com.opensymphony.xwork2.validator.ValidatorFactory.<clinit>(ValidatorFactory.java:224)
> >
> >
> com.opensymphony.xwork2.validator.ValidatorFileParser.addValidatorConfigs (ValidatorFileParser.java:192)
> >
> >
> com.opensymphony.xwork2.validator.ValidatorFileParser.parseActionValidatorConfigs (ValidatorFileParser.java:72)
> >
> >
> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.loadFile (AnnotationActionValidatorManager.java:361)
> >
> >
> > Can somebody tell me why the simplest validation show this behavior?
> > --
> > Best regards,
> > Bashmaкov Anton
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Simple-validation-does-not-work-tp18894126p18896117.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


--
Best regards,
Bashmaкov Anton

Attachment: user_189874.ezm (zipped)

http://www.mvnrepository.com/artifact/com.opensymphony/xwork/2.0.5

Scroll down page and see Source Control paragraph.
Use some svn client and checkout branch.
Using command mvn package you can compile and package the project.
Then use your new jar instead of official-released.
It helped for me, but I'm using WebSphere AppServer 6.1 + EJB3 feature pack.
The problem was in difference between IBM JDK and Sun JDK.
Good luck, Anton.


JAnton wrote:
>
> I'm using JBOSS-5.0.0.CR1, could you please explain in more details what I
> should do?
>
> On Fri, Aug 8, 2008 at 7:37 PM, holod <serega.sheypak@(protected):
>
>>
>> If you are using IBM WebSphere 6.x, that's ok.
>> I've faced the same problem: http://jira.opensymphony.com/browse/XW-651
>>
>> So, I've simply checked out branch of x-work, packaged it using Maven and
>> now stupid IBM App server allows me to use validation.
>>
>> Anyway, you you aren't WebSphere user, I suggest you to perform the same
>> operation.
>>
>> P.S.
>>
>> I prefer to use annotations. They are more comfortable.
>>
>>
>>
>> JAnton wrote:
>> >
>> > Hi,
>> > I have strange situation, here is my form :
>> >
>> >   <body>
>> >      <s:form action="Colors" >
>> >         <s:textfield label="Name" name="name" />
>> >         <s:submit />
>> >      </s:form>
>> >
>> >   </body>
>> >
>> > Here is the action :
>> >
>> > public class Colors extends ActionSupport {
>> >
>> >   private String name;
>> >
>> >   @Override
>> >   public String execute() throws Exception {
>> >      return SUCCESS;
>> >   }
>> >
>> >   public String getName() {
>> >      return name;
>> >   }
>> >
>> >   public void setName(String name) {
>> >      this.name = name;
>> >   }
>> > }
>> >
>> > Here is the part of struts.xml :
>> >
>> >      <action name="Colors_*" method="{1}"
>> > class="com.anton.noname.actions.Colors" >
>> >         <result type="redirectAction">/Welcome</result>
>> >         <result name="input">/Colors.jsp</result>
>> >      </action>
>> >
>> > and finally Colors-validation.xml :
>> >
>> > <!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator
>> > 1.0.2//EN" "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd
>> ">
>> >
>> > <validators>
>> >   <field name="name">
>> >      <field-validator type="requiredstring">
>> >         <message>You must enter a name</message>
>> >      </field-validator>
>> >   </field>
>> > </validators>
>> >
>> > And there is stake trace that I get :
>> >
>> > *type* Exception report
>> >
>> > *message*
>> >
>> > *description* *The server encountered an internal error () that
>> prevented
>> > it
>> > from fulfilling this request.*
>> >
>> > *exception*
>> >
>> > javax.servlet.ServletException: Filter execution threw an exception
>> >
>> >
>> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter (ReplyHeaderFilter.java:96)
>> >
>> > *root cause*
>> >
>> > java.lang.ExceptionInInitializerError
>> >
>> >
>> com.opensymphony.xwork2.validator.ValidatorFileParser.addValidatorConfigs (ValidatorFileParser.java:192)
>> >
>> >
>> com.opensymphony.xwork2.validator.ValidatorFileParser.parseActionValidatorConfigs (ValidatorFileParser.java:72)
>> >
>> >
>> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.loadFile (AnnotationActionValidatorManager.java:361)
>> >
>> >
>> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildClassValidatorConfigs (AnnotationActionValidatorManager.java:252)
>> >
>> >
>> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.buildValidatorConfigs (AnnotationActionValidatorManager.java:340)
>> >
>> >
>> >
>> org.apache.struts2.dispatcher.Dispatcher.serviceAction (Dispatcher.java:504)
>> >
>> >
>> org.apache.struts2.dispatcher.FilterDispatcher.doFilter (FilterDispatcher.java:419)
>> >
>> >
>> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter (ReplyHeaderFilter.java:96)
>> >
>> > *root cause*
>> >
>> > java.lang.IllegalArgumentException: URI scheme is not "file"
>> >     java.io.File.<init>(File.java:366)
>> >
>> >
>> com.opensymphony.xwork2.validator.ValidatorFactory.parseValidators (ValidatorFactory.java:314)
>> >
>> >
>> com.opensymphony.xwork2.validator.ValidatorFactory.<clinit>(ValidatorFactory.java:224)
>> >
>> >
>> com.opensymphony.xwork2.validator.ValidatorFileParser.addValidatorConfigs (ValidatorFileParser.java:192)
>> >
>> >
>> com.opensymphony.xwork2.validator.ValidatorFileParser.parseActionValidatorConfigs (ValidatorFileParser.java:72)
>> >
>> >
>> com.opensymphony.xwork2.validator.AnnotationActionValidatorManager.loadFile (AnnotationActionValidatorManager.java:361)
>> >
>> >
>> > Can somebody tell me why the simplest validation show this behavior?
>> > --
>> > Best regards,
>> > Bashmaкov Anton
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Simple-validation-does-not-work-tp18894126p18896117.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
> --
> Best regards,
> Bashmaкov Anton
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_189884.ezm (zipped)
xwork2.0.5 is missing a patch for websphere users, use xwork2.0.6. I am also using RAD 7.5 and Was 6.1.0.17 and EJB3 feature pack. When I upgraged to struts 2.0.12, I had problems in running my validations and some more issues, I downgraded to 2.0.11.1 and everything is fine. However, the struts 2 folks in their release note mentioned that xwork 2.0.5 is missing a patch for WAS users and the patch is included in xwork 2.0.6. So you can either use 2.0.11.1 or use xwork 2.0.6 instead of xwork 2.0.5



----- Original Message ----
From: holod <serega.sheypak@(protected)>
To: user@(protected)
Sent: Saturday, August 9, 2008 6:39:42 AM
Subject: Re: Simple validation does not work


http://www.mvnrepository.com/artifact/com.opensymphony/xwork/2.0.5

Scroll down page and see Source Control paragraph.
Use some svn client and checkout branch.
Using command mvn package you can compile and package the project.
Then use your new jar instead of official-released.
It helped for me, but I'm using WebSphere AppServer 6.1 + EJB3 feature pack.
The problem was in difference between IBM JDK and Sun JDK.
Good luck, Anton.


   __________________________________________________________________
Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com


Attachment: user_189875.ezm (zipped)

No one has this problem ?! I have this problem with IE 7 (default settings),
but not with Firefox 3. It is hard to force all users to user Firefox.
Simply, in IE when user log on and click second time on this link, Struts 2
action doesn't run, it just show resulting jsp from earlier call ?!

--
Regards, Milan



Milan Milanovic wrote:
>
> Hi,
>
> I have one simple and stupid problem, but this problem is serious because
> users could be confused.
> For example, I defined following link in my jsp:
>
>  <s:url action= "> Enter sample
>
> If user have already clicked earlier to this link, next time when he click
> it response method defined in struts mappings for sample.action will not
> be fired at all, and only the resulting jsp page will be show!
> It seems like that IE cache pages, even though I turned this option off.
>
> I must say that this is not happening in Firefox. Is there any solution to
> this ?
>
> --
> Thx, Milan
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_189876.ezm (zipped)
Our current applications all work correctly under IE7; I don't recall that we had to do anything in particular. In any case, I'm not sure how it would be a Struts issue.

Dave

--- On Sat, 8/9/08, Milan Milanovic <milanmilanovich@(protected):

> From: Milan Milanovic <milanmilanovich@(protected)>
> Subject: Re: Struts 2 links and Internet explorer problem
> To: user@(protected)
> Date: Saturday, August 9, 2008, 12:50 PM
> No one has this problem ?! I have this problem with IE 7
> (default settings),
> but not with Firefox 3. It is hard to force all users to
> user Firefox.
> Simply, in IE when user log on and click second time on
> this link, Struts 2
> action doesn't run, it just show resulting jsp from
> earlier call ?!
>
> --
> Regards, Milan
>
>
>
> Milan Milanovic wrote:
> >
> > Hi,
> >
> > I have one simple and stupid problem, but this problem
> is serious because
> > users could be confused.
> > For example, I defined following link in my jsp:
> >
> >  <s:url action= "> Enter sample
> >
> > If user have already clicked earlier to this link,
> next time when he click
> > it response method defined in struts mappings for
> sample.action will not
> > be fired at all, and only the resulting jsp page will
> be show!
> > It seems like that IE cache pages, even though I
> turned this option off.
> >
> > I must say that this is not happening in Firefox. Is
> there any solution to
> > this ?
> >
> > --
> > Thx, Milan
> >
>
> --
> View this message in context:
> http://www.nabble.com/Struts-2-links-and-Internet-explorer-problem-tp18071984p18906430.html
> Sent from the Struts - User mailing list archive at
> Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail:
> user-help@(protected)

Attachment: user_189878.ezm (zipped)

As it works with Firefox, I agree that is not Struts 2 issue, but some IE
issue. I just ask if anyone had similar problem?

--
Milan


newton.dave wrote:
>
> Our current applications all work correctly under IE7; I don't recall that
> we had to do anything in particular. In any case, I'm not sure how it
> would be a Struts issue.
>
> Dave
>
> --- On Sat, 8/9/08, Milan Milanovic <milanmilanovich@(protected):
>
>> From: Milan Milanovic <milanmilanovich@(protected)>
>> Subject: Re: Struts 2 links and Internet explorer problem
>> To: user@(protected)
>> Date: Saturday, August 9, 2008, 12:50 PM
>> No one has this problem ?! I have this problem with IE 7
>> (default settings),
>> but not with Firefox 3. It is hard to force all users to
>> user Firefox.
>> Simply, in IE when user log on and click second time on
>> this link, Struts 2
>> action doesn't run, it just show resulting jsp from
>> earlier call ?!
>>
>> --
>> Regards, Milan
>>
>>
>>
>> Milan Milanovic wrote:
>> >
>> > Hi,
>> >
>> > I have one simple and stupid problem, but this problem
>> is serious because
>> > users could be confused.
>> > For example, I defined following link in my jsp:
>> >
>> >  <s:url action= "> Enter sample
>> >
>> > If user have already clicked earlier to this link,
>> next time when he click
>> > it response method defined in struts mappings for
>> sample.action will not
>> > be fired at all, and only the resulting jsp page will
>> be show!
>> > It seems like that IE cache pages, even though I
>> turned this option off.
>> >
>> > I must say that this is not happening in Firefox. Is
>> there any solution to
>> > this ?
>> >
>> > --
>> > Thx, Milan
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Struts-2-links-and-Internet-explorer-problem-tp18071984p18906430.html
>> Sent from the Struts - User mailing list archive at
>> Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail:
>> user-help@(protected)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_189877.ezm (zipped)
If the path is different then they are completely separate cookies. So you
could have a cookie named "fruit" and a path of "/root" with a value of
"apple". You could have another cookie named "fruit" but with a path of
"/root/anotherpath" and it has a value of "orange". If you don't set a path
for the cookie it gets set for you so to stop this from happening I always
set the path explicitly.

Regards,
Randy Burgess
Sr. Software Architect
D5 Systems, LLC


> From: Pierre Thibaudeau <pierre.thibaudeau@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Sat, 9 Aug 2008 00:16:11 -0400
> To: Struts Users Mailing List <user@(protected)>
> Subject: [S2] general question about cookies and namespace
>
> Struts: 2.1.2
> browser: Firefox 3.0, with Firebug add-on
>
> Strange phenomenon involving cookies. I don't know who to blame: my code,
> Struts or Firefox...
>
> I am running a copy of my application locally on my own local Tomcat server
> (on localhost). After several operations on the webapplication (among which
> would be logging in), four cookies are set in the browser:
> * JSESSIONID (dealt with by tomcat; not my doing, of course)
> * language (the user's last selection of language)
> * password
> * username
>
> However, when I study the net requests through firebug, I notice that
> Firefox includes only the first of these cookies in the following requests'
> header. Accordingly, if I start a new session, the language of the previous
> session is read as it should from the "language" cookie, but the auto-login
> interceptor fails to find the "username" and "password" cookies (even though
> they are present to the browser).
>
> On the other hand, things work fine on Safari.
>
> This seems strange to me. The only formal distinction I can find between,
> say, the "language" cookie and the "username" cookie is the "path":
> * Firefox report the path of the "language" cookie as: /mywebapp/
> * but it reports the path of the "username" cookie as: /mywebapp/users/
>
> Is it possible that Firefox is overstrict with which cookie to provide back
> to a given action, and the different namespace of the "username" cookie
> becomes problematic? The actions that register my auto-login interceptor
> are all in the "/" namespace (that is, the same namespace as reported by the
> "language" cookie). Has anyone come accross anything like this?



Attachment: user_189879.ezm (zipped)
Thanks Randy. That confirms what I have been discovering since last night.

This is a little annoying given that there are some bits of information that
I would love to set for the entire site. For instance, if I wish to
remember the current surfing language of a user and set that in a cookie
with path "/", who's to say that, on the next session that the user will
start, she won't enter the site through a different logical path?

Is there such a thing as site-wide cookies?

2008/8/9 Randy Burgess <randyb@(protected)>

> If the path is different then they are completely separate cookies. So you
> could have a cookie named "fruit" and a path of "/root" with a value of
> "apple". You could have another cookie named "fruit" but with a path of
> "/root/anotherpath" and it has a value of "orange". If you don't set a path
> for the cookie it gets set for you so to stop this from happening I always
> set the path explicitly.
>

Attachment: user_189885.ezm (zipped)
You're welcome. As long as you set the cookie path and stick to that path it
doesn't matter where the user enters the site. I normally use either / or
/context for my cookies.

Regards,
Randy Burgess
Sr. Software Architect
D5 Systems, LLC


> From: Pierre Thibaudeau <pierre.thibaudeau@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Sat, 9 Aug 2008 13:37:35 -0400
> To: Struts Users Mailing List <user@(protected)>
> Subject: Re: [S2] general question about cookies and namespace
>
> Thanks Randy. That confirms what I have been discovering since last night.
>
> This is a little annoying given that there are some bits of information that
> I would love to set for the entire site. For instance, if I wish to
> remember the current surfing language of a user and set that in a cookie
> with path "/", who's to say that, on the next session that the user will
> start, she won't enter the site through a different logical path?
>
> Is there such a thing as site-wide cookies?
>
> 2008/8/9 Randy Burgess <randyb@(protected)>
>
>> If the path is different then they are completely separate cookies. So you
>> could have a cookie named "fruit" and a path of "/root" with a value of
>> "apple". You could have another cookie named "fruit" but with a path of
>> "/root/anotherpath" and it has a value of "orange". If you don't set a path
>> for the cookie it gets set for you so to stop this from happening I always
>> set the path explicitly.
>>



Attachment: user_189887.ezm (zipped)
2008/8/9 Randy Burgess <randyb@(protected)>

> As long as you set the cookie path and stick to that path it
> doesn't matter where the user enters the site.


Well, not entirely, it seems to me. Say, for example, that I were to set
the path to "/something/very/complex/and/unwieldy", the browser would make
those cookies available with the request only when the namespace of the
request were to be the same (or a child) of that long path.

Which is why, as you point out, the only practical options are "/" or
"contextPath()". (In which case, indeed, it doesn't matter where the user
enters.)

Attachment: user_189880.ezm (zipped)
--- On Sat, 8/9/08, Pierre Thibaudeau wrote:
> [...] I wish to remember the current surfing language of a user
> and set that in a cookie with path "/", who's to say that, on
> the next session that the user will start, she won't enter the site
> through a different logical path?
>
> Is there such a thing as site-wide cookies?

Isn't a path of "/" a "site-wide" cookie?

Dave


Attachment: user_189883.ezm (zipped)
>
> Isn't a path of "/" a "site-wide" cookie?
>

Thank you, Dave. I just tried that and path "/" behaves as site-wide. That
solves my issue!

Attachment: user_189881.ezm (zipped)

Using the simple theme, how do:

 o I get radio buttons in a group to be vertically listed?

Thanks,
Mike


--
Michael Finney - "Always Striving To Serve You Better Every Day"
finney@(protected)
http://www.SmilingSoftwareSolutions.com



Attachment: user_189882.ezm (zipped)
--- On Sat, 8/9/08, Michael Finney <finney@(protected):
> Using the simple theme, how do:
>  o I get radio buttons in a group to be vertically listed?

You can play some CSS games, or extend/modify the theme and change the template. (There are probably other options too, but those are probably the easiest.)

Dave


Attachment: user_189886.ezm (zipped)
Thank you. I was wondering about CSS. I had not considered extending the
theme. That's a nice idea. :)  

Digging into themes is something I should consider more often perhaps.


--
Michael Finney - "Always Striving To Serve You Better Every Day"
finney@(protected)
http://www.SmilingSoftwareSolutions.com

-----Original Message-----
From: Dave Newton [mailto:newton.dave@(protected)]
Sent: Saturday, August 09, 2008 1:04 PM
To: Struts Users Mailing List
Subject: Re: Struts 2 and radio buttons

--- On Sat, 8/9/08, Michael Finney <finney@(protected):
> Using the simple theme, how do:
>  o I get radio buttons in a group to be vertically listed?

You can play some CSS games, or extend/modify the theme and change the
template. (There are probably other options too, but those are probably the
easiest.)

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.138 / Virus Database: 270.6.0/1601 - Release Date: 8/8/2008
9:02 AM


Attachment: user_189888.ezm (zipped)
I am a little puzzled as to what my best option is for mapping and naming
actions in the following context.

I have a "posting" form (in JSP) which is used for any of the following:
* Posting a new comment
* Editing an existing comment
* Previewing a new comment
* Previewing a comment while it's being edited.

I have a DispatchPost action with three methods: newPost(), editPost(),
preview().

The form has two buttons: "Post" and "Preview". Clicking "Preview" should
call the preview() method (which will forward back to the same JSP).
Clicking "Post" should call either the newPost() method or the editPost(),
depending on the null-ity of various hidden fields; the JSP form can
distinguish internally between those two options.

The problem arises with respect to the various security interceptors. A
dispatchNewPost action requires a different set of interceptors than a
dispatchEditPost action. Therefore, I need to label them separately in
struts.xml (interceptors not displayed):

<action name="dispatchNewPost" class="com.actions.DispatchPost"
method="newPost"/>
<action name="dispatchEditPost" class="com.actions.DispatchPost"
method="editPost"/>

Since the JSP form can distinguish between those two situations, I can wire
the appropriate action inside the form. But then, how do I catch the click
of the "Preview" button (short of using javascript to modify the form's
action)?
Say, for instance, that I define the Preview button as follows:

<s:form action="dispatchNewPost">
  <s:submit value="Post" />
  <s:submit value="Preview" method="preview"/>
</s:form>

What will that Preview button map to? What would be the entry of struts.xml
corresponding to that strange combination? (The dispatchNewPost action
already points to a method, even before I click on the Preview button...)

Attachment: user_189892.ezm (zipped)
In case anyone's interested, I solved the problem by making a small
compromise: that previewing a post (whether a new one or an edited one)
should require the same security authorization as posting one.

From that point on, I can limit myself to two action mappings: dispatchPost,
editPost

Those two mappings correspond to two separate actions: DipatchNewPost,
DispatchEdit. Each action has its own preview() method. (In fact, the
preview() method is inherited in each case from an abstract superclass.)

Clicking the "Preview" button calls the preview() method.


2008/8/9 Pierre Thibaudeau <pierre.thibaudeau@(protected)>

> I have a "posting" form (in JSP) which is used for any of the following:
> * Posting a new comment
> * Editing an existing comment
> * Previewing a new comment
> * Previewing a comment while it's being edited.
>
> I have a DispatchPost action with three methods: newPost(), editPost(),
> preview().
>
> The form has two buttons: "Post" and "Preview". Clicking "Preview" should
> call the preview() method (which will forward back to the same JSP).
> Clicking "Post" should call either the newPost() method or the editPost(),
> depending on the null-ity of various hidden fields; the JSP form can
> distinguish internally between those two options.
>
> The problem arises with respect to the various security interceptors. A
> dispatchNewPost action requires a different set of interceptors than a
> dispatchEditPost action. Therefore, I need to label them separately in
> struts.xml (interceptors not displayed):
>
> <action name="dispatchNewPost" class="com.actions.DispatchPost"
> method="newPost"/>
> <action name="dispatchEditPost" class="com.actions.DispatchPost"
> method="editPost"/>
>

Attachment: user_189889.ezm (zipped)
Hi,
I am migrating an application from struts 1 to struts 2 but I cannot find a way to replicate the convenient LookupDispatchAction found in struts 1.
I have many buttons that require a form submit require different functions, in struts 1 this is achieved using the key attribute in conjunction with the resource file.

Any help would be appreciated.

Saludos
Lalchandra Rampersaud

------------
Carpe diem

Attachment: user_189890.ezm (zipped)
--- On Sat, 8/9/08, Lalchandra Rampersaud wrote:
> I am migrating an application from struts 1 to struts 2 but
> I cannot find a way to replicate the convenient
> LookupDispatchAction found in struts 1.
> I have many buttons that require a form submit require
> different functions, in struts 1 this is achieved using the
> key attribute in conjunction with the resource file.

You can specify the action method to be called in S2 via mapping or tag attributes.

Dave


Attachment: user_189891.ezm (zipped)
Hi Dave,
Thanks for the quick reply. Mapping is exacty the solution I need, but I don't know how to implement mapping in struts 2.
It would be helpful if you can indicate where I can start looking.

Saludos
Lalchandra Rampersaud

------------
Carpe diem


----- Original Message -----
From: "Dave Newton" <newton.dave@(protected)>
To: "Struts Users Mailing List" <user@(protected)>
Sent: Saturday, August 09, 2008 5:21 PM
Subject: Re: [S2] LookupDispatchAction Equivalent in Struts 2


> --- On Sat, 8/9/08, Lalchandra Rampersaud wrote:
>> I am migrating an application from struts 1 to struts 2 but
>> I cannot find a way to replicate the convenient
>> LookupDispatchAction found in struts 1.
>> I have many buttons that require a form submit require
>> different functions, in struts 1 this is achieved using the
>> key attribute in conjunction with the resource file.
>
> You can specify the action method to be called in S2 via mapping or tag attributes.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
©2008 gg3721.com - Jax Systems, LLC, U.S.A.