<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>user@struts.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/struts-user/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/struts-user/"/>
<id>http://mail-archives.apache.org/mod_mbox/struts-user/</id>
<updated>2009-12-06T08:28:07Z</updated>
<entry>
<title>Re: Struts HTML taglib vs. Standard HTML tags</title>
<author><name>Paul Benedict &lt;pbenedict@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c4B1B5266.2050800@apache.org%3e"/>
<id>urn:uuid:%3c4B1B5266-2050800@apache-org%3e</id>
<updated>2009-12-06T06:42:46Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Did you check your server logs? I bet the problem is the taglib uri.

See the TLD URIs section:
http://wiki.apache.org/struts/StrutsUpgradeNotes12to13

Paul

On 12/4/2009 1:41 PM, davargas123 wrote:
&gt;
&gt; When I change the standard HTML tags of my .jsp page into the Struts tags,
&gt; the page loads up completely blank, aside from what is loaded by the
&gt; tiles-def. What could be causing this? I'm thinking that's why my page
&gt; doesn't submit data to the actionform, but I don't see why it wouldn't be
&gt; rendering the struts tags at all. For instance, if I even add ONE struts tag
&gt; in the middle of my working code that isn't the html:form tag, the entire
&gt; jsp page will not be rendered at all. It's driving me nuts, I've been
&gt; working on figuring this out for far too long and would greatly appreciate
&gt; some input.
&gt;
&gt;
&gt; ---------------------------JSP---------------------------------------
&gt; &lt;%@taglib uri="/taglib/struts-html" prefix="html"%&gt;
&gt; &lt;%@taglib uri="/taglib/struts-bean" prefix="bean"%&gt;
&gt; &lt;%@page import="com.thomson.west.pubrec.optout.ui.servlet.SSNLookupAction"
&gt; %&gt;

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: [ANN] Practical Apache Struts2 Web 2.0 Projects</title>
<author><name>VipKumar &lt;chauhan.vipin@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c26652440.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26652440-post@talk-nabble-com%3e</id>
<updated>2009-12-05T02:32:59Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hi All,

I got the issue resolved using the 

&lt;package name="enterEvent" namespace="/event" extends="base-package"&gt;

        &lt;interceptors&gt;
            &lt;interceptor name="flash"
class="com.opensymphony.webwork.interceptor.FlashInterceptor" /&gt;
            
            &lt;interceptor-stack name="eventStack"&gt;            	
                &lt;interceptor-ref name="scope"&gt;
                    Model
                    partialEvent
                    true
                &lt;/interceptor-ref&gt;
                &lt;interceptor-ref name="flash"/&gt;
                &lt;interceptor-ref name="paramsPrepareParamsStack"/&gt;
            &lt;/interceptor-stack&gt;
        &lt;/interceptors&gt;

        &lt;default-interceptor-ref name="eventStack" /&gt;

        &lt;action name="addEventFlow"
class="com.fdar.apress.s2.actions.event.BaseEventAction"&gt;
            &lt;interceptor-ref name="eventStack"&gt;
                start
            &lt;/interceptor-ref&gt;
            &lt;result&gt;/WEB-INF/jsp/event/enterEventDetails-input.jsp&lt;/result&gt;
        &lt;/action&gt;

        &lt;action name="completeEvent"
class="com.fdar.apress.s2.actions.event.BaseEventAction"&gt;
            &lt;interceptor-ref name="eventStack"&gt;
                end
            &lt;/interceptor-ref&gt;
            &lt;result&gt;/WEB-INF/jsp/event/eventReview.jsp&lt;/result&gt;
        &lt;/action&gt;

         &lt;action name="flashedSelectEventType"
class="com.fdar.apress.s2.actions.event.SelectLocationTypeAction"&gt;
             &lt;interceptor-ref name="flash"&gt;
                 Retrieve
             &lt;/interceptor-ref&gt;
             &lt;interceptor-ref name="eventStack" /&gt;
            &lt;result&gt;/WEB-INF/jsp/event/selectLocationType-input.jsp&lt;/result&gt;
        &lt;/action&gt;

    &lt;/package&gt;
    


It the same configuration only thing is there are minor changes here and
there.

Thanks
Vipin
chauhan.vipin@gmail.com

Jim Kiley wrote:
&gt; 
&gt; Are you using the OpenSessionInViewFilter?  If you aren't, you'll want to.
&gt; 
&gt; If you are doing that already, you may be trying to persist when you
&gt; should
&gt; merge.  If you're using Hibernate's API directly, take advantage of
&gt; Hibernate's saveOrUpdate() method, rather than the JPA merge()/persiste()
&gt; methods.
&gt; 
&gt; Jim Kiley
&gt; Technical Consultant
&gt; Summa
&gt; jhkiley@summa-tech.com
&gt; 
&gt; 
&gt; On Mon, Apr 28, 2008 at 3:50 PM, raxden2 &lt;esthar_2000@hotmail.com&gt; wrote:
&gt; 
&gt;&gt;
&gt;&gt; HI! i had the same problem, but I have another problem:
&gt;&gt;
&gt;&gt; When i push the button for save Event... throws this exception:
&gt;&gt;
&gt;&gt; excepciÃ³n
&gt;&gt;
&gt;&gt; javax.servlet.ServletException: javax.persistence.PersistenceException:
&gt;&gt; org.hibernate.PersistentObjectException: detached entity passed to
&gt;&gt; persist:
&gt;&gt; com.fdar.apress.s2.domain.Location
&gt;&gt;
&gt;&gt; 
&gt;&gt; org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)
&gt;&gt;
&gt;&gt;
&gt;&gt; org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)
&gt;&gt;
&gt;&gt;
&gt;&gt; com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118)
&gt;&gt;
&gt;&gt;
&gt;&gt; com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
&gt;&gt;
&gt;&gt;
&gt;&gt; org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)
&gt;&gt;
&gt;&gt; causa raÃ­z
&gt;&gt;
&gt;&gt; javax.persistence.PersistenceException:
&gt;&gt; org.hibernate.PersistentObjectException: detached entity passed to
&gt;&gt; persist:
&gt;&gt; com.fdar.apress.s2.domain.Location
&gt;&gt;
&gt;&gt;
&gt;&gt; org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629)
&gt;&gt;
&gt;&gt;
&gt;&gt; org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:218)
&gt;&gt;
&gt;&gt;
&gt;&gt; com.fdar.apress.s2.services.EventServiceImpl.create(EventServiceImpl.java:24)
&gt;&gt;
&gt;&gt;
&gt;&gt; com.fdar.apress.s2.actions.event.SaveEventAction.execute(SaveEventAction.java:32)
&gt;&gt;        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
&gt;&gt;
&gt;&gt; ..............
&gt;&gt;
&gt;&gt; causa raÃ­z
&gt;&gt;
&gt;&gt; org.hibernate.PersistentObjectException: detached entity passed to
&gt;&gt; persist:
&gt;&gt; com.fdar.apress.s2.domain.Location
&gt;&gt;
&gt;&gt;
&gt;&gt; org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:79)
&gt;&gt;        org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:609)
&gt;&gt;        org.hibernate.impl.SessionImpl.persist(SessionImpl.java:601)
&gt;&gt;
&gt;&gt;  org.hibernate.engine.CascadingAction$8.cascade(CascadingAction.java:295)
&gt;&gt;        org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:268)
&gt;&gt;        org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:216)
&gt;&gt;        org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
&gt;&gt;
&gt;&gt; ..........
&gt;&gt;
&gt;&gt; I need help, i donÂ´t know how resolve this.
&gt;&gt;
&gt;&gt;
&gt;&gt; Thanks.
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt; Ian Roughley wrote:
&gt;&gt; &gt;
&gt;&gt; &gt; I'm not sure, and I'm only taking an educated guess at it being
&gt;&gt; &gt; OS/platform-dependent (since a JAR that worked for me had problems for
&gt;&gt; &gt; another user).  Unfortunately I can't reproduce the error.  I'm all for
&gt;&gt; &gt; doing the work to fix the problem if someone has the problem and cycles
&gt;&gt; &gt; to work through testing it.
&gt;&gt; &gt;
&gt;&gt; &gt; /Ian
&gt;&gt; &gt;
&gt;&gt; &gt; Dave Newton wrote:
&gt;&gt; &gt;&gt; --- Ian Roughley &lt;ian@fdar.com&gt; wrote:
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt;&gt; The solution provided to me was to change the scope interceptor
&gt;&gt; &gt;&gt;&gt; reference to use a session value of "Model" rather than "model" - see
&gt;&gt; &gt;&gt;&gt; below.
&gt;&gt; &gt;&gt;&gt;
&gt;&gt; &gt;&gt;&gt;   &lt;interceptor-ref name="scope"&gt;
&gt;&gt; &gt;&gt;&gt;     Model
&gt;&gt; &gt;&gt;&gt;     partialEvent
&gt;&gt; &gt;&gt;&gt;   &lt;/interceptor-ref&gt;
&gt;&gt; &gt;&gt;&gt;
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt; Hmm, why does that fix it? If it's an OS-dependent issue we should fix
&gt;&gt; it
&gt;&gt; &gt;&gt; for
&gt;&gt; &gt;&gt; real.
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt; Dave
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt; ---------------------------------------------------------------------
&gt;&gt; &gt;&gt; To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
&gt;&gt; &gt;&gt; For additional commands, e-mail: user-help@struts.apache.org
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;&gt;
&gt;&gt; &gt;
&gt;&gt; &gt;
&gt;&gt;
&gt;&gt; --
&gt;&gt; View this message in context:
&gt;&gt; http://www.nabble.com/-ANN--Practical-Apache-Struts2-Web-2.0-Projects-tp13863084p16945872.html
&gt;&gt; Sent from the Struts - User mailing list archive at Nabble.com.
&gt;&gt;
&gt;&gt;
&gt;&gt; ---------------------------------------------------------------------
&gt;&gt; To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
&gt;&gt; For additional commands, e-mail: user-help@struts.apache.org
&gt;&gt;
&gt;&gt;
&gt; 
&gt; 
&gt; -- 
&gt; Jim Kiley
&gt; Technical Consultant | Summa
&gt; [p] 412.258.3346 [m] 412.445.1729
&gt; http://www.summa-tech.com
&gt; 
&gt; 

-- 
View this message in context: http://old.nabble.com/-ANN--Practical-Apache-Struts2-Web-2.0-Projects-tp13863084p26652440.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Struts HTML taglib vs. Standard HTML tags</title>
<author><name>Dan Vargas &lt;davargas123@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3cb288a8f40912041232n9acf9eftee7378c62205e3c5@mail.gmail.com%3e"/>
<id>urn:uuid:%3cb288a8f40912041232n9acf9eftee7378c62205e3c5@mail-gmail-com%3e</id>
<updated>2009-12-04T20:32:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
It told me it wasn't sent to the mailing list, I wasn't aware. My apologies.

On Fri, Dec 4, 2009 at 3:30 PM, Brian Thompson &lt;elephantium@gmail.com&gt;wrote:

&gt; Why the triple-post?
&gt;
&gt; On Fri, Dec 4, 2009 at 2:07 PM, davargas123 &lt;davargas123@gmail.com&gt; wrote:
&gt;
&gt; &gt;
&gt; &gt; When I change the standard HTML tags of my .jsp page into the Struts
&gt; tags,
&gt; &gt; the page loads up completely blank, aside from what is loaded by the
&gt; &gt; tiles-def. What could be causing this? I'm thinking that's why my page
&gt; &gt; doesn't submit data to the actionform, but I don't see why it wouldn't be
&gt; &gt; rendering the struts tags at all. For instance, if I even add ONE struts
&gt; &gt; tag
&gt; &gt; in the middle of my working code that isn't the html:form tag, the entire
&gt; &gt; jsp page will not be rendered at all. It's driving me nuts, I've been
&gt; &gt; working on figuring this out for far too long and would greatly
&gt; appreciate
&gt; &gt; some input.
&gt; &gt;
&gt; &gt;
&gt; &gt; ---------------------------JSP---------------------------------------
&gt; &gt; &lt;%@taglib uri="/taglib/struts-html" prefix="html"%&gt;
&gt; &gt; &lt;%@taglib uri="/taglib/struts-bean" prefix="bean"%&gt;
&gt; &gt; &lt;%@page
&gt; import="com.thomson.west.pubrec.optout.ui.servlet.SSNLookupAction"
&gt; &gt; %&gt;
&gt; &gt;
&gt; &gt; &lt;script&gt;
&gt; &gt; function encryptSSN(){
&gt; &gt;        document.ssnLookupForm.submit();
&gt; &gt; }
&gt; &gt;
&gt; &gt;
&gt; &gt; function showError(){
&gt; &gt;        document.getElementById('error').style.display='block';
&gt; &gt;        document.getElementById('box1').style.display='none';
&gt; &gt; }
&gt; &gt;
&gt; &gt; function validateSSN(){
&gt; &gt;        var ssn = document.ssnLookupForm.ssn.value;
&gt; &gt;    if( /^\d{3}-\d{2}-\d{4}$/.test(ssn) == false ){
&gt; &gt;                showError();
&gt; &gt;    }else{
&gt; &gt;       encryptSSN();
&gt; &gt;    }
&gt; &gt; }
&gt; &gt; &lt;/script&gt;
&gt; &gt; &lt;html:form method="post" action="/SSNLookupEncrypt"&gt;
&gt; &gt;        &lt;div style="text-align: center; font-family: arial;"&gt;
&gt; &gt;      &lt;div class="productsdiv" style="margin: 0 auto; padding: 5px;
&gt; &gt; text-align: left; width: 43%"&gt;
&gt; &gt;         &lt;div&gt;
&gt; &gt;            SSN: &lt;input type="text" name="ssn"
&gt; &gt; value="&lt;%=ssnLookupForm.getSSN()%&gt;"/&gt;
&gt; &gt;            &lt;div class="spacer"&gt; &lt;/div&gt;
&gt; &gt;            Format: XXX-XX-XXXX
&gt; &gt;         &lt;/div&gt;
&gt; &gt;         &lt;div class="spacer"&gt; &lt;/div&gt;
&gt; &gt;         &lt;div style="text-align: center;"&gt;
&gt; &gt;           &lt;input type="button" value="Encrypt" onclick="validateSSN()"/&gt;
&gt; &gt;         &lt;/div&gt;
&gt; &gt;         &lt;div class="textBox" id="box1" style="text-align: center;
&gt; &gt; display:block"&gt;
&gt; &gt;         &lt;div class="spacer"&gt; &lt;/div&gt;
&gt; &gt;           Encrypted Value: &lt;%=ssnLookupForm.getEncryptedSSN()%&gt;
&gt; &gt;       &lt;/div&gt;
&gt; &gt;      &lt;/div&gt;
&gt; &gt;      &lt;div class="spacer"&gt; &lt;/div&gt;
&gt; &gt;   &lt;/div&gt;
&gt; &gt; &lt;/html:form&gt;
&gt; &gt; ------------------------------------------------------
&gt; &gt; This is the corresponding ActionForm:
&gt; &gt;
&gt; &gt; public class SSNLookupForm extends ActionForm{
&gt; &gt;
&gt; &gt;        private static Logger log =
&gt; &gt;              Logger.getLogger(SSNLookupForm.class.getName());
&gt; &gt;
&gt; &gt;        private String ssn = "XXX-XX-XXXX";
&gt; &gt;        private String encryptedSSN = "[Encrypted Value]";
&gt; &gt;
&gt; &gt;        public String getSSN(){
&gt; &gt;                return ssn;
&gt; &gt;        }
&gt; &gt;
&gt; &gt;        public void setSSN(String ssn){
&gt; &gt;                this.ssn = ssn;
&gt; &gt;        }
&gt; &gt;
&gt; &gt;        public String getEncryptedSSN(){
&gt; &gt;                return encryptedSSN;
&gt; &gt;        }
&gt; &gt;
&gt; &gt;        public void setEncryptedSSN(String encryptedSSN){
&gt; &gt;                this.encryptedSSN = encryptedSSN;
&gt; &gt;        }
&gt; &gt;
&gt; &gt;        public void reset(ActionMapping mapping, HttpServletRequest
&gt; request)
&gt; &gt; {
&gt; &gt;            this.ssn = "XXX-XX-XXXX";
&gt; &gt;            this.encryptedSSN= "[Encrypted Value]";
&gt; &gt;        }
&gt; &gt;
&gt; &gt; }
&gt; &gt; --
&gt; &gt; View this message in context:
&gt; &gt;
&gt; http://old.nabble.com/Struts-HTML-taglib-vs.-Standard-HTML-tags-tp26636386p26636386.html
&gt; &gt; Sent from the Struts - User mailing list archive at Nabble.com.
&gt; &gt;
&gt; &gt;
&gt; &gt; ---------------------------------------------------------------------
&gt; &gt; To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
&gt; &gt; For additional commands, e-mail: user-help@struts.apache.org
&gt; &gt;
&gt; &gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Struts HTML taglib vs. Standard HTML tags</title>
<author><name>Brian Thompson &lt;elephantium@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c7d3e1a010912041230h473f6f5dpd138ea03012c9076@mail.gmail.com%3e"/>
<id>urn:uuid:%3c7d3e1a010912041230h473f6f5dpd138ea03012c9076@mail-gmail-com%3e</id>
<updated>2009-12-04T20:30:24Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Why the triple-post?

On Fri, Dec 4, 2009 at 2:07 PM, davargas123 &lt;davargas123@gmail.com&gt; wrote:

&gt;
&gt; When I change the standard HTML tags of my .jsp page into the Struts tags,
&gt; the page loads up completely blank, aside from what is loaded by the
&gt; tiles-def. What could be causing this? I'm thinking that's why my page
&gt; doesn't submit data to the actionform, but I don't see why it wouldn't be
&gt; rendering the struts tags at all. For instance, if I even add ONE struts
&gt; tag
&gt; in the middle of my working code that isn't the html:form tag, the entire
&gt; jsp page will not be rendered at all. It's driving me nuts, I've been
&gt; working on figuring this out for far too long and would greatly appreciate
&gt; some input.
&gt;
&gt;
&gt; ---------------------------JSP---------------------------------------
&gt; &lt;%@taglib uri="/taglib/struts-html" prefix="html"%&gt;
&gt; &lt;%@taglib uri="/taglib/struts-bean" prefix="bean"%&gt;
&gt; &lt;%@page import="com.thomson.west.pubrec.optout.ui.servlet.SSNLookupAction"
&gt; %&gt;
&gt;
&gt; &lt;script&gt;
&gt; function encryptSSN(){
&gt;        document.ssnLookupForm.submit();
&gt; }
&gt;
&gt;
&gt; function showError(){
&gt;        document.getElementById('error').style.display='block';
&gt;        document.getElementById('box1').style.display='none';
&gt; }
&gt;
&gt; function validateSSN(){
&gt;        var ssn = document.ssnLookupForm.ssn.value;
&gt;    if( /^\d{3}-\d{2}-\d{4}$/.test(ssn) == false ){
&gt;                showError();
&gt;    }else{
&gt;       encryptSSN();
&gt;    }
&gt; }
&gt; &lt;/script&gt;
&gt; &lt;html:form method="post" action="/SSNLookupEncrypt"&gt;
&gt;        &lt;div style="text-align: center; font-family: arial;"&gt;
&gt;      &lt;div class="productsdiv" style="margin: 0 auto; padding: 5px;
&gt; text-align: left; width: 43%"&gt;
&gt;         &lt;div&gt;
&gt;            SSN: &lt;input type="text" name="ssn"
&gt; value="&lt;%=ssnLookupForm.getSSN()%&gt;"/&gt;
&gt;            &lt;div class="spacer"&gt; &lt;/div&gt;
&gt;            Format: XXX-XX-XXXX
&gt;         &lt;/div&gt;
&gt;         &lt;div class="spacer"&gt; &lt;/div&gt;
&gt;         &lt;div style="text-align: center;"&gt;
&gt;           &lt;input type="button" value="Encrypt" onclick="validateSSN()"/&gt;
&gt;         &lt;/div&gt;
&gt;         &lt;div class="textBox" id="box1" style="text-align: center;
&gt; display:block"&gt;
&gt;         &lt;div class="spacer"&gt; &lt;/div&gt;
&gt;           Encrypted Value: &lt;%=ssnLookupForm.getEncryptedSSN()%&gt;
&gt;       &lt;/div&gt;
&gt;      &lt;/div&gt;
&gt;      &lt;div class="spacer"&gt; &lt;/div&gt;
&gt;   &lt;/div&gt;
&gt; &lt;/html:form&gt;
&gt; ------------------------------------------------------
&gt; This is the corresponding ActionForm:
&gt;
&gt; public class SSNLookupForm extends ActionForm{
&gt;
&gt;        private static Logger log =
&gt;              Logger.getLogger(SSNLookupForm.class.getName());
&gt;
&gt;        private String ssn = "XXX-XX-XXXX";
&gt;        private String encryptedSSN = "[Encrypted Value]";
&gt;
&gt;        public String getSSN(){
&gt;                return ssn;
&gt;        }
&gt;
&gt;        public void setSSN(String ssn){
&gt;                this.ssn = ssn;
&gt;        }
&gt;
&gt;        public String getEncryptedSSN(){
&gt;                return encryptedSSN;
&gt;        }
&gt;
&gt;        public void setEncryptedSSN(String encryptedSSN){
&gt;                this.encryptedSSN = encryptedSSN;
&gt;        }
&gt;
&gt;        public void reset(ActionMapping mapping, HttpServletRequest request)
&gt; {
&gt;            this.ssn = "XXX-XX-XXXX";
&gt;            this.encryptedSSN= "[Encrypted Value]";
&gt;        }
&gt;
&gt; }
&gt; --
&gt; View this message in context:
&gt; http://old.nabble.com/Struts-HTML-taglib-vs.-Standard-HTML-tags-tp26636386p26636386.html
&gt; Sent from the Struts - User mailing list archive at Nabble.com.
&gt;
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
&gt; For additional commands, e-mail: user-help@struts.apache.org
&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Struts HTML taglib vs. Standard HTML tags</title>
<author><name>davargas123 &lt;davargas123@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c26636386.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26636386-post@talk-nabble-com%3e</id>
<updated>2009-12-04T20:07:39Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

When I change the standard HTML tags of my .jsp page into the Struts tags,
the page loads up completely blank, aside from what is loaded by the
tiles-def. What could be causing this? I'm thinking that's why my page
doesn't submit data to the actionform, but I don't see why it wouldn't be
rendering the struts tags at all. For instance, if I even add ONE struts tag
in the middle of my working code that isn't the html:form tag, the entire
jsp page will not be rendered at all. It's driving me nuts, I've been
working on figuring this out for far too long and would greatly appreciate
some input.


---------------------------JSP---------------------------------------
&lt;%@taglib uri="/taglib/struts-html" prefix="html"%&gt;
&lt;%@taglib uri="/taglib/struts-bean" prefix="bean"%&gt;
&lt;%@page import="com.thomson.west.pubrec.optout.ui.servlet.SSNLookupAction"
%&gt;
                       
&lt;script&gt;
function encryptSSN(){
        document.ssnLookupForm.submit();
}


function showError(){
        document.getElementById('error').style.display='block';
        document.getElementById('box1').style.display='none';
}

function validateSSN(){
        var ssn = document.ssnLookupForm.ssn.value;
    if( /^\d{3}-\d{2}-\d{4}$/.test(ssn) == false ){
                showError();
    }else{
       encryptSSN();
    }
}
&lt;/script&gt;
&lt;html:form method="post" action="/SSNLookupEncrypt"&gt;
        &lt;div style="text-align: center; font-family: arial;"&gt;
      &lt;div class="productsdiv" style="margin: 0 auto; padding: 5px;
text-align: left; width: 43%"&gt;
         &lt;div&gt;
            SSN: &lt;input type="text" name="ssn"
value="&lt;%=ssnLookupForm.getSSN()%&gt;"/&gt;
            &lt;div class="spacer"&gt; &lt;/div&gt;
            Format: XXX-XX-XXXX
         &lt;/div&gt;
         &lt;div class="spacer"&gt; &lt;/div&gt;
         &lt;div style="text-align: center;"&gt;
           &lt;input type="button" value="Encrypt" onclick="validateSSN()"/&gt;
         &lt;/div&gt;
         &lt;div class="textBox" id="box1" style="text-align: center;
display:block"&gt;
         &lt;div class="spacer"&gt; &lt;/div&gt;
           Encrypted Value: &lt;%=ssnLookupForm.getEncryptedSSN()%&gt;
       &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="spacer"&gt; &lt;/div&gt;
   &lt;/div&gt;
&lt;/html:form&gt;
------------------------------------------------------
This is the corresponding ActionForm:

public class SSNLookupForm extends ActionForm{

        private static Logger log =
              Logger.getLogger(SSNLookupForm.class.getName());
               
        private String ssn = "XXX-XX-XXXX";
        private String encryptedSSN = "[Encrypted Value]";
       
        public String getSSN(){
                return ssn;
        }
       
        public void setSSN(String ssn){
                this.ssn = ssn;
        }
       
        public String getEncryptedSSN(){
                return encryptedSSN;
        }
       
        public void setEncryptedSSN(String encryptedSSN){
                this.encryptedSSN = encryptedSSN;
        }
       
        public void reset(ActionMapping mapping, HttpServletRequest request)
{
            this.ssn = "XXX-XX-XXXX";
            this.encryptedSSN= "[Encrypted Value]";
        }
               
} 
-- 
View this message in context: http://old.nabble.com/Struts-HTML-taglib-vs.-Standard-HTML-tags-tp26636386p26636386.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Struts HTML taglib vs. Standard HTML tags</title>
<author><name>davargas123 &lt;davargas123@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c26636383.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26636383-post@talk-nabble-com%3e</id>
<updated>2009-12-04T19:41:54Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

When I change the standard HTML tags of my .jsp page into the Struts tags,
the page loads up completely blank, aside from what is loaded by the
tiles-def. What could be causing this? I'm thinking that's why my page
doesn't submit data to the actionform, but I don't see why it wouldn't be
rendering the struts tags at all. For instance, if I even add ONE struts tag
in the middle of my working code that isn't the html:form tag, the entire
jsp page will not be rendered at all. It's driving me nuts, I've been
working on figuring this out for far too long and would greatly appreciate
some input.


---------------------------JSP---------------------------------------
&lt;%@taglib uri="/taglib/struts-html" prefix="html"%&gt;
&lt;%@taglib uri="/taglib/struts-bean" prefix="bean"%&gt;
&lt;%@page import="com.thomson.west.pubrec.optout.ui.servlet.SSNLookupAction"
%&gt;
                       
&lt;script&gt;
function encryptSSN(){
        document.ssnLookupForm.submit();
}


function showError(){
        document.getElementById('error').style.display='block';
        document.getElementById('box1').style.display='none';
}

function validateSSN(){
        var ssn = document.ssnLookupForm.ssn.value;
    if( /^\d{3}-\d{2}-\d{4}$/.test(ssn) == false ){
                showError();
    }else{
       encryptSSN();
    }
}
&lt;/script&gt;
&lt;html:form method="post" action="/SSNLookupEncrypt"&gt;
        &lt;div style="text-align: center; font-family: arial;"&gt;
      &lt;div class="productsdiv" style="margin: 0 auto; padding: 5px;
text-align: left; width: 43%"&gt;
         &lt;div&gt;
            SSN: &lt;input type="text" name="ssn"
value="&lt;%=ssnLookupForm.getSSN()%&gt;"/&gt;
            &lt;div class="spacer"&gt; &lt;/div&gt;
            Format: XXX-XX-XXXX
         &lt;/div&gt;
         &lt;div class="spacer"&gt; &lt;/div&gt;
         &lt;div style="text-align: center;"&gt;
           &lt;input type="button" value="Encrypt" onclick="validateSSN()"/&gt;
         &lt;/div&gt;
         &lt;div class="textBox" id="box1" style="text-align: center;
display:block"&gt;
         &lt;div class="spacer"&gt; &lt;/div&gt;
           Encrypted Value: &lt;%=ssnLookupForm.getEncryptedSSN()%&gt;
       &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="spacer"&gt; &lt;/div&gt;
   &lt;/div&gt;
&lt;/html:form&gt;
------------------------------------------------------
This is the corresponding ActionForm:

public class SSNLookupForm extends ActionForm{

        private static Logger log =
              Logger.getLogger(SSNLookupForm.class.getName());
               
        private String ssn = "XXX-XX-XXXX";
        private String encryptedSSN = "[Encrypted Value]";
       
        public String getSSN(){
                return ssn;
        }
       
        public void setSSN(String ssn){
                this.ssn = ssn;
        }
       
        public String getEncryptedSSN(){
                return encryptedSSN;
        }
       
        public void setEncryptedSSN(String encryptedSSN){
                this.encryptedSSN = encryptedSSN;
        }
       
        public void reset(ActionMapping mapping, HttpServletRequest request)
{
            this.ssn = "XXX-XX-XXXX";
            this.encryptedSSN= "[Encrypted Value]";
        }
               
} 
-- 
View this message in context: http://old.nabble.com/Struts-HTML-taglib-vs.-Standard-HTML-tags-tp26636383p26636383.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: checkbox : unchecked elements not in list</title>
<author><name>Colin NG &lt;colin_ng@hotmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3cCOL115-W19F36523048C136D52159AFE930@phx.gbl%3e"/>
<id>urn:uuid:%3cCOL115-W19F36523048C136D52159AFE930@phx-gbl%3e</id>
<updated>2009-12-04T19:00:45Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

The use "accounts" in s:iterator is wrong. It probably works if you can create something like
"new int [7]".
 
&gt; Date: Fri, 4 Dec 2009 12:50:36 -0600
&gt; Subject: Re: checkbox : unchecked elements not in list
&gt; From: elephantium@gmail.com
&gt; To: user@struts.apache.org
&gt; 
&gt; Unchecked checkboxes in html forms don't submit a value. If you want true
&gt; vs. false submitted back to the Java action, you'll need to use radio
&gt; buttons.
&gt; 
&gt; -Brian
&gt; 
&gt; On Fri, Dec 4, 2009 at 12:31 PM, akoo &lt;ogenium@yahoo.com&gt; wrote:
&gt; 
&gt; &gt;
&gt; &gt; I have following form
&gt; &gt;
&gt; &gt; &lt;s:form action="updateAccount"&gt;
&gt; &gt; &lt;s:iterator value="accounts"&gt;
&gt; &gt; &lt;s:property name="account"/&gt;
&gt; &gt; &lt;s:checkbox name="accountStatus" value=={active}/&gt;
&gt; &gt;
&gt; &gt; .....
&gt; &gt; &lt;/s:iterator&gt;
&gt; &gt; &lt;/s:form&gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt; In my action class I have following
&gt; &gt;
&gt; &gt; public UpdateAccount account
&gt; &gt; {
&gt; &gt; List accountStatus;//list to hold all the checkbox values
&gt; &gt; List accounts; //list to hold all the accounts values
&gt; &gt;
&gt; &gt; // getter setters
&gt; &gt;
&gt; &gt; public String execute()
&gt; &gt; {
&gt; &gt; //iterate through the list of accounts/
&gt; &gt; //set account status value to that list accountStatus
&gt; &gt; }
&gt; &gt;
&gt; &gt; }
&gt; &gt;
&gt; &gt; Ideally I would want the accountStatus list to contains a list of "true" or
&gt; &gt; "false" strings, however accountStatus list only seems to contains only the
&gt; &gt; checked
&gt; &gt; elements...
&gt; &gt; --
&gt; &gt; View this message in context:
&gt; &gt; http://old.nabble.com/checkbox-%3A-unchecked-elements-not-in-list-tp26636367p26636367.html
&gt; &gt; Sent from the Struts - User mailing list archive at Nabble.com.
&gt; &gt;
&gt; &gt;
&gt; &gt; ---------------------------------------------------------------------
&gt; &gt; To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
&gt; &gt; For additional commands, e-mail: user-help@struts.apache.org
&gt; &gt;
&gt; &gt;
 		 	   		  
_________________________________________________________________
Windows Live: Make it easier for your friends to see what you’re up to on Facebook.
http://go.microsoft.com/?linkid=9691816

</pre>
</div>
</content>
</entry>
<entry>
<title>RE: checkbox : unchecked elements not in list</title>
<author><name>&quot;Neil Aggarwal&quot; &lt;neil@JAMMConsulting.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3cA7FCFB6389C047D4B54DD6647C67479D@neilhp%3e"/>
<id>urn:uuid:%3cA7FCFB6389C047D4B54DD6647C67479D@neilhp%3e</id>
<updated>2009-12-04T18:55:23Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt; Ideally I would want the accountStatus list to contains a 
&gt; list of "true" or
&gt; "false" strings, however accountStatus list only seems to 
&gt; contains only the
&gt; checked
&gt; elements...

It looks like you are processing the submitted params
yourself.  If that is the case, the browser only gives 
you values for the checked boxes.  That is an http limitation, 
not struts.  If you want to do it that way, you will have
to check for the non-presence of unchecked boxes.

Struts will handle the checkboxes correctly if you let it handle 
the form submission.  On my form bean, I have boolean values 
for each of the checkboxes and set the checkbox to use
the field name: &lt;s:checkbox name="myName"&gt; 
When the user submits the form, everything
works as expected.  

Can you do that in your app instead of processing the 
request params yourself?

	Neil

--
Neil Aggarwal, (281)846-8957, http://UnmeteredVPS.net
Host your struts app on a CentOS VPS for only $25/month!
Unmetered bandwidth = no overage charges, 7 day free trial


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: checkbox : unchecked elements not in list</title>
<author><name>Brian Thompson &lt;elephantium@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c7d3e1a010912041050i4a562108id0fa94a86079377@mail.gmail.com%3e"/>
<id>urn:uuid:%3c7d3e1a010912041050i4a562108id0fa94a86079377@mail-gmail-com%3e</id>
<updated>2009-12-04T18:50:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Unchecked checkboxes in html forms don't submit a value.  If you want true
vs. false submitted back to the Java action, you'll need to use radio
buttons.

-Brian

On Fri, Dec 4, 2009 at 12:31 PM, akoo &lt;ogenium@yahoo.com&gt; wrote:

&gt;
&gt; I have following form
&gt;
&gt; &lt;s:form action="updateAccount"&gt;
&gt; &lt;s:iterator value="accounts"&gt;
&gt; &lt;s:property name="account"/&gt;
&gt; &lt;s:checkbox name="accountStatus" value=={active}/&gt;
&gt;
&gt; .....
&gt; &lt;/s:iterator&gt;
&gt; &lt;/s:form&gt;
&gt;
&gt;
&gt;
&gt;
&gt; In my action class I have following
&gt;
&gt; public UpdateAccount account
&gt; {
&gt;        List accountStatus;//list to hold all the checkbox values
&gt;        List accounts; //list to hold all the accounts values
&gt;
&gt;        // getter setters
&gt;
&gt;        public String execute()
&gt;        {
&gt;                //iterate through the list of accounts/
&gt;                //set account status value  to that list accountStatus
&gt;        }
&gt;
&gt; }
&gt;
&gt; Ideally I would want the accountStatus list to contains a list of "true" or
&gt; "false" strings, however accountStatus list only seems to contains only the
&gt; checked
&gt; elements...
&gt; --
&gt; View this message in context:
&gt; http://old.nabble.com/checkbox-%3A-unchecked-elements-not-in-list-tp26636367p26636367.html
&gt; Sent from the Struts - User mailing list archive at Nabble.com.
&gt;
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
&gt; For additional commands, e-mail: user-help@struts.apache.org
&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Re: Help with S:Select</title>
<author><name>aruna.hcu@gmail.com</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c14168685.11259952437096.JavaMail.root@wombat%3e"/>
<id>urn:uuid:%3c14168685-11259952437096-JavaMail-root@wombat%3e</id>
<updated>2009-12-04T18:47:17Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
the below code works to make the select option required. If nothing is selected displays the
provided message.

&lt;s:select name = "user.department" key = "user.department" headerKey="-1" 
             headerValue="-- Please Select --" list="allDepartments" required="true"
             requiredposition="left" /&gt; 

In validation.xml

 &lt;field name="user.department"&gt;
          &lt;field-validator type="fieldexpression"&gt;
               &lt;param name="expression"&gt;!(user.department).equals("1")&lt;/param&gt;
               &lt;message&gt;Please select a department.&lt;/message&gt;
         &lt;/field-validator&gt; 
 &lt;/field&gt; 

--
This message was sent on behalf of aruna.hcu@gmail.com at openSubscriber.com
http://www.opensubscriber.com/message/user@struts.apache.org/10986643.html

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>checkbox : unchecked elements not in list</title>
<author><name>akoo &lt;ogenium@yahoo.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c26636367.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26636367-post@talk-nabble-com%3e</id>
<updated>2009-12-04T18:31:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

I have following form 

&lt;s:form action="updateAccount"&gt;
&lt;s:iterator value="accounts"&gt;
&lt;s:property name="account"/&gt;
&lt;s:checkbox name="accountStatus" value=={active}/&gt;

.....
&lt;/s:iterator&gt;
&lt;/s:form&gt;




In my action class I have following

public UpdateAccount account
{
	List accountStatus;//list to hold all the checkbox values
	List accounts; //list to hold all the accounts values

	// getter setters

	public String execute()
	{
		//iterate through the list of accounts/
		//set account status value  to that list accountStatus
	}

}

Ideally I would want the accountStatus list to contains a list of "true" or
"false" strings, however accountStatus list only seems to contains only the
checked
elements...
-- 
View this message in context: http://old.nabble.com/checkbox-%3A-unchecked-elements-not-in-list-tp26636367p26636367.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Problem with Struts2 JSON RPC using simple HTTP Post</title>
<author><name>Frans Thamura &lt;frans@meruvian.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c3a71add70912041009i2c7f239by25fcdeb9ae22798a@mail.gmail.com%3e"/>
<id>urn:uuid:%3c3a71add70912041009i2c7f239by25fcdeb9ae22798a@mail-gmail-com%3e</id>
<updated>2009-12-04T18:09:13Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
i am succesfully also using DOJO, but never succes using JavaME and Swing

may be u can share with us

we use swing with http client instead JSONRPC




On Sat, Dec 5, 2009 at 1:02 AM, Prasenjit Bhadra &lt;prbhadra@gmail.com&gt; wrote:

&gt; Hi guys,
&gt;
&gt; Thanks.This works fine now. I passed the single object instead of an
&gt; element
&gt; of the list.
&gt; Have to Wrap the params as a List (i.e; "Params": ["obj1","obj2" ,.....])
&gt;
&gt; This would help us to extend JSON framework with almost any platform as
&gt; long
&gt; as we have a serializing - de-serializing  compoent to create a JSON string
&gt; and vice-versa.
&gt;
&gt; We have an alternative to Dojo/Ajax implementation. I am using the same
&gt; from
&gt; a mobile platform to create a platform agonostic request`response model :)
&gt;
&gt; Regards,
&gt; Jeet
&gt;
&gt;
&gt; On Fri, Dec 4, 2009 at 11:17 AM, Frans Thamura &lt;frans@meruvian.org&gt; wrote:
&gt;
&gt; &gt; i am glad if we can have a .war with JSON, like show case
&gt; &gt;
&gt; &gt; make it independent example, we can extend with another tech, such as
&gt; &gt; swing,
&gt; &gt; jquery, or may be php
&gt; &gt;
&gt; &gt; F
&gt; &gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Problem with Struts2 JSON RPC using simple HTTP Post</title>
<author><name>Prasenjit Bhadra &lt;prbhadra@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c17a3e0cb0912041002u5909062bia32971c2a4f14818@mail.gmail.com%3e"/>
<id>urn:uuid:%3c17a3e0cb0912041002u5909062bia32971c2a4f14818@mail-gmail-com%3e</id>
<updated>2009-12-04T18:02:46Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi guys,

Thanks.This works fine now. I passed the single object instead of an element
of the list.
Have to Wrap the params as a List (i.e; "Params": ["obj1","obj2" ,.....])

This would help us to extend JSON framework with almost any platform as long
as we have a serializing - de-serializing  compoent to create a JSON string
and vice-versa.

We have an alternative to Dojo/Ajax implementation. I am using the same from
a mobile platform to create a platform agonostic request`response model :)

Regards,
Jeet


On Fri, Dec 4, 2009 at 11:17 AM, Frans Thamura &lt;frans@meruvian.org&gt; wrote:

&gt; i am glad if we can have a .war with JSON, like show case
&gt;
&gt; make it independent example, we can extend with another tech, such as
&gt; swing,
&gt; jquery, or may be php
&gt;
&gt; F
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Absolute URL from s:a tag</title>
<author><name>Chris Pratt &lt;thechrispratt@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c42db7f0a0912040957x6a27d06do1d6dcf6cd1549378@mail.gmail.com%3e"/>
<id>urn:uuid:%3c42db7f0a0912040957x6a27d06do1d6dcf6cd1549378@mail-gmail-com%3e</id>
<updated>2009-12-04T17:57:41Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
forceAddSchemeHostAndPort="true"
  (*Chris*)

On Fri, Dec 4, 2009 at 9:54 AM, wkbutler &lt;kent.butler@gmail.com&gt; wrote:

&gt;
&gt; I know this is kind of a silly question. Does anyone know if there is a way
&gt; to get the Struts2 'a' tag to emit an absolute URL?  Silly or not, I can't
&gt; think of any reason for it not to support that, and maybe it's there
&gt; already.
&gt;
&gt; Thanks -
&gt;
&gt; --
&gt; View this message in context:
&gt; http://old.nabble.com/Absolute-URL-from-s%3Aa-tag-tp26636169p26636169.html
&gt; Sent from the Struts - User mailing list archive at Nabble.com.
&gt;
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
&gt; For additional commands, e-mail: user-help@struts.apache.org
&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Absolute URL from s:a tag</title>
<author><name>wkbutler &lt;kent.butler@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c26636169.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26636169-post@talk-nabble-com%3e</id>
<updated>2009-12-04T17:54:46Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

I know this is kind of a silly question. Does anyone know if there is a way
to get the Struts2 'a' tag to emit an absolute URL?  Silly or not, I can't
think of any reason for it not to support that, and maybe it's there
already. 

Thanks -

-- 
View this message in context: http://old.nabble.com/Absolute-URL-from-s%3Aa-tag-tp26636169p26636169.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Struts HTML taglib vs. Standard HTML tags</title>
<author><name>davargas123 &lt;davargas123@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c26635943.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26635943-post@talk-nabble-com%3e</id>
<updated>2009-12-04T16:31:46Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

When I change the standard HTML tags of my .jsp page into the Struts tags,
the page loads up completely blank, aside from what is loaded by the
tiles-def. What could be causing this? I'm thinking that's why my page
doesn't submit data to the actionform, but I don't see why it wouldn't be
rendering the struts tags at all. For instance, if I even add ONE struts tag
in the middle of my working code that isn't the html:form tag, the entire
jsp page will not be rendered at all. It's driving me nuts, I've been
working on figuring this out for far too long and would greatly appreciate
some input.


---------------------------JSP---------------------------------------
&lt;%@taglib uri="/taglib/struts-html" prefix="html"%&gt;
&lt;%@taglib uri="/taglib/struts-bean" prefix="bean"%&gt;
&lt;%@page import="com.thomson.west.pubrec.optout.ui.servlet.SSNLookupAction"
%&gt;
                       
&lt;script&gt;
function encryptSSN(){
        document.ssnLookupForm.submit();
}


function showError(){
        document.getElementById('error').style.display='block';
        document.getElementById('box1').style.display='none';
}

function validateSSN(){
        var ssn = document.ssnLookupForm.ssn.value;
    if( /^\d{3}-\d{2}-\d{4}$/.test(ssn) == false ){
                showError();
    }else{
       encryptSSN();
    }
}
&lt;/script&gt;
&lt;html:form method="post" action="/SSNLookupEncrypt"&gt;
        &lt;div style="text-align: center; font-family: arial;"&gt;
      &lt;div class="productsdiv" style="margin: 0 auto; padding: 5px;
text-align: left; width: 43%"&gt;
         &lt;div&gt;
            SSN: &lt;input type="text" name="ssn"
value="&lt;%=ssnLookupForm.getSSN()%&gt;"/&gt;
            &lt;div class="spacer"&gt; &lt;/div&gt;
            Format: XXX-XX-XXXX
         &lt;/div&gt;
         &lt;div class="spacer"&gt; &lt;/div&gt;
         &lt;div style="text-align: center;"&gt;
           &lt;input type="button" value="Encrypt" onclick="validateSSN()"/&gt;
         &lt;/div&gt;
         &lt;div class="textBox" id="box1" style="text-align: center;
display:block"&gt;
         &lt;div class="spacer"&gt; &lt;/div&gt;
           Encrypted Value: &lt;%=ssnLookupForm.getEncryptedSSN()%&gt;
       &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="spacer"&gt; &lt;/div&gt;
   &lt;/div&gt;
&lt;/html:form&gt;
------------------------------------------------------
This is the corresponding ActionForm:

public class SSNLookupForm extends ActionForm{

        private static Logger log =
              Logger.getLogger(SSNLookupForm.class.getName());
               
        private String ssn = "XXX-XX-XXXX";
        private String encryptedSSN = "[Encrypted Value]";
       
        public String getSSN(){
                return ssn;
        }
       
        public void setSSN(String ssn){
                this.ssn = ssn;
        }
       
        public String getEncryptedSSN(){
                return encryptedSSN;
        }
       
        public void setEncryptedSSN(String encryptedSSN){
                this.encryptedSSN = encryptedSSN;
        }
       
        public void reset(ActionMapping mapping, HttpServletRequest request)
{
            this.ssn = "XXX-XX-XXXX";
            this.encryptedSSN= "[Encrypted Value]";
        }
               
} 
-- 
View this message in context: http://old.nabble.com/Struts-HTML-taglib-vs.-Standard-HTML-tags-tp26635943p26635943.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Problem with Struts2 JSON RPC using simple HTTP Post</title>
<author><name>Frans Thamura &lt;frans@meruvian.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c3a71add70912040817o378129c5k5c7128afd2843da0@mail.gmail.com%3e"/>
<id>urn:uuid:%3c3a71add70912040817o378129c5k5c7128afd2843da0@mail-gmail-com%3e</id>
<updated>2009-12-04T16:17:05Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
i am glad if we can have a .war with JSON, like show case

make it independent example, we can extend with another tech, such as swing,
jquery, or may be php

F


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Problem with Struts2 JSON RPC using simple HTTP Post</title>
<author><name>Musachy Barroso &lt;musachy@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3cd8bdeb6f0912040815x46024003lb62e6a85dcabfaba@mail.gmail.com%3e"/>
<id>urn:uuid:%3cd8bdeb6f0912040815x46024003lb62e6a85dcabfaba@mail-gmail-com%3e</id>
<updated>2009-12-04T16:15:15Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
see my previous reply.

On Thu, Dec 3, 2009 at 4:10 PM, Prasenjit Bhadra &lt;prbhadra@gmail.com&gt; wrote:
&gt; I have developed a native client interface which calls struts2 JSON RPC
&gt; using post method. I have set content type, content length as suggested in
&gt; the spec. The request body looks like as follows : {"method":
&gt; "uploadTxpAssignment","id": "txpUploadRequest",
&gt; "params":{"addressByDestAddrId":{"addrLine1":"test home","addrLine2":"7th
&gt; ave","addressId":2,"aptRoomNo":5,"city":"queens","phone":"435-577-4567","state":"NY","zipCode":10183},"atDestTime":null,"callRcvdTime":"2009-11-26T08:01:00","comments":"comments1","dateCreated":"2009-11-26T00:00:00","dateModified":null,"user":{"dateCreated":null,"dateModified":null,"dob":"1956-09-18T00:00:00","firstName":"passfname","gender":"Male","lastName":"patient1lname","mi":null,"ssn":null,"userId":10000}}}
&gt; The struts.xml configurations are : &lt;action name="UploadAction"
&gt; class="com.actions.upload.UploadAction" method="smd"&gt; &lt;interceptor-ref
&gt; name="json"&gt; &lt;param name="enableSMD"&gt;true&lt;/param&gt; &lt;param
&gt; name="ignoreSMDMethodInterfaces"&gt;false&lt;/param&gt; &lt;/interceptor-ref&gt; &lt;result
&gt; type="json"&gt; &lt;param name="enableSMD"&gt;true&lt;/param&gt; &lt;param
&gt; name="ignoreInterfaces"&gt;false&lt;/param&gt; &lt;param
&gt; name="contentType"&gt;text/plain&lt;/param&gt; &lt;param name="bufferSize"&gt;1024&lt;/param&gt;
&gt; &lt;param name="allowCaching"&gt;false&lt;/param&gt; &lt;param
&gt; name="contentCharSet"&gt;UTF-8&lt;/param&gt; &lt;/result&gt; &lt;/action&gt; The simple
action
&gt; code body : public class UploadCallreportAction { private
&gt; TransportAssignmentVO transport; /** * @return the transport */ public
&gt; TransportAssignmentVO getTransport() { return transport; } /** * @param
&gt; transport the transport to set */ public void
&gt; setTransport(TransportAssignmentVO transport) { this.transport = transport;
&gt; } public String smd() { return Action.SUCCESS; } @SMDMethod public void
&gt; uploadTxpAssignment(TransportAssignmentVO txpVO) { setTransport(txpVO);
&gt; System.out.println("The Tansport assignment is for Run #:"+
&gt; transport.getRunNumber()); } } When I run the client the call reaches the
&gt; server and returns me an exception : :35,013 ERROR [RPCError]
&gt; java.util.HashMap cannot be cast to java.util.List
&gt; java.lang.ClassCastException: java.util.HashMap cannot be cast to
&gt; java.util.List at
&gt; org.apache.struts2.json.JSONInterceptor.invoke(JSONInterceptor.java:204) at
&gt; org.apache.struts2.json.JSONInterceptor.intercept(JSONInterceptor.java:131)
&gt; at
&gt; com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
&gt; at
&gt; org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
&gt; at
&gt; org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
&gt; at
&gt; org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
&gt; I am also using Spring 2.5 and Hibernate JPA in the same app.... Not sure if
&gt; there is any conflict.I have followed the simple rules to set up the JSON
&gt; RPC.However I am not able to resolve the problem. Please let me know if
&gt; anyone has a solution for this.
&gt;
&gt; Jeet
&gt;

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Struts HTML taglib vs. Standard HTML tags</title>
<author><name>Mark Shifman &lt;mark.shifman@yale.edu&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c4B193455.2000900@yale.edu%3e"/>
<id>urn:uuid:%3c4B193455-2000900@yale-edu%3e</id>
<updated>2009-12-04T16:09:57Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Come on, at least tell us the strut version.

I happen to be using struts 1.3.10 and if you look in
/META-INF/tld/struts-html.tld of the struts-taglib-1.3.10 jar you will find
&lt;uri&gt;http://struts.apache.org/tags-html&lt;/uri&gt;

so i use
&lt;%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%&gt;

mas

davargas123 wrote:
&gt; When I change the standard HTML tags of my .jsp page into the Struts tags,
&gt; the page loads up completely blank, aside from what is loaded by the
&gt; tiles-def. What could be causing this? I'm thinking that's why my page
&gt; doesn't submit data to the actionform, but I don't see why it wouldn't be
&gt; rendering the struts tags at all. For instance, if I even add ONE struts tag
&gt; in the middle of my working code that isn't the html:form tag, the entire
&gt; jsp page will not be rendered at all. It's driving me nuts, I've been
&gt; working on figuring this out for far too long and would greatly appreciate
&gt; some input.
&gt; 
&gt; 
&gt; ---------------------------JSP---------------------------------------
&gt; &lt;%@taglib uri="/taglib/struts-html" prefix="html"%&gt;
&gt; &lt;%@taglib uri="/taglib/struts-bean" prefix="bean"%&gt;
&gt; &lt;%@page import="com.thomson.west.pubrec.optout.ui.servlet.SSNLookupAction"
&gt; %&gt;
&gt; 			
&gt; &lt;script&gt;
&gt; function encryptSSN(){
&gt;         document.ssnLookupForm.submit();
&gt; }
&gt; 
&gt; 
&gt; function showError(){
&gt;         document.getElementById('error').style.display='block';
&gt;         document.getElementById('box1').style.display='none';
&gt; }
&gt; 
&gt; function validateSSN(){
&gt;         var ssn = document.ssnLookupForm.ssn.value;
&gt;     if( /^\d{3}-\d{2}-\d{4}$/.test(ssn) == false ){
&gt;                 showError();
&gt;     }else{
&gt;        encryptSSN();
&gt;     }
&gt; }
&gt; &lt;/script&gt;
&gt; &lt;html:form method="post" action="/SSNLookupEncrypt"&gt;
&gt;         &lt;div style="text-align: center; font-family: arial;"&gt;
&gt;       &lt;div class="productsdiv" style="margin: 0 auto; padding: 5px;
&gt; text-align: left; width: 43%"&gt;
&gt;          &lt;div&gt;
&gt;             SSN: &lt;input type="text" name="ssn"
&gt; value="&lt;%=ssnLookupForm.getSSN()%&gt;"/&gt;
&gt;             &lt;div class="spacer"&gt; &lt;/div&gt;
&gt;             Format: XXX-XX-XXXX
&gt;          &lt;/div&gt;
&gt;          &lt;div class="spacer"&gt; &lt;/div&gt;
&gt;          &lt;div style="text-align: center;"&gt;
&gt;            &lt;input type="button" value="Encrypt" onclick="validateSSN()"/&gt;
&gt;          &lt;/div&gt;
&gt;          &lt;div class="textBox" id="box1" style="text-align: center;
&gt; display:block"&gt;
&gt;          &lt;div class="spacer"&gt; &lt;/div&gt;
&gt;            Encrypted Value: &lt;%=ssnLookupForm.getEncryptedSSN()%&gt;
&gt;        &lt;/div&gt;
&gt;       &lt;/div&gt;
&gt;       &lt;div class="spacer"&gt; &lt;/div&gt;
&gt;    &lt;/div&gt;
&gt; &lt;/html:form&gt;
&gt; ------------------------------------------------------
&gt; This is the corresponding ActionForm:
&gt; 
&gt; public class SSNLookupForm extends ActionForm{
&gt; 
&gt;         private static Logger log =
&gt;               Logger.getLogger(SSNLookupForm.class.getName());
&gt;                
&gt;         private String ssn = "XXX-XX-XXXX";
&gt;         private String encryptedSSN = "[Encrypted Value]";
&gt;        
&gt;         public String getSSN(){
&gt;                 return ssn;
&gt;         }
&gt;        
&gt;         public void setSSN(String ssn){
&gt;                 this.ssn = ssn;
&gt;         }
&gt;        
&gt;         public String getEncryptedSSN(){
&gt;                 return encryptedSSN;
&gt;         }
&gt;        
&gt;         public void setEncryptedSSN(String encryptedSSN){
&gt;                 this.encryptedSSN = encryptedSSN;
&gt;         }
&gt;        
&gt;         public void reset(ActionMapping mapping, HttpServletRequest request)
&gt; {
&gt;             this.ssn = "XXX-XX-XXXX";
&gt;             this.encryptedSSN= "[Encrypted Value]";
&gt;         }
&gt;                
&gt; }
&gt; 
&gt; 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: S2 Type conversion error and validation problem</title>
<author><name>Marsman &lt;mars.man@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c26635934.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26635934-post@talk-nabble-com%3e</id>
<updated>2009-12-04T16:05:07Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>


Wes Wannemacher wrote:
&gt; 
&gt; 
&gt; I would start here -
&gt; 
&gt; http://struts.apache.org/2.x/docs/type-conversion.html#TypeConversion-TypeConversionErrorHandling
&gt; 
&gt; 

Thn*ks for this link. But I've read it before and I'm not should
understanding clearly how to proceed:

"...To keep conversion errors from reporting globally, change the
interceptor stack, and add additional validation rules."

Should I build my own interceptor stack without the conversion error
interceptor and use the type conversion validator only?

Titus


-- 
View this message in context: http://old.nabble.com/S2-Type-conversion-error-and-validation-problem-tp26609676p26635934.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Struts HTML taglib vs. Standard HTML tags</title>
<author><name>davargas123 &lt;davargas123@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c26635930.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26635930-post@talk-nabble-com%3e</id>
<updated>2009-12-04T15:48:54Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

When I change the standard HTML tags of my .jsp page into the Struts tags,
the page loads up completely blank, aside from what is loaded by the
tiles-def. What could be causing this? I'm thinking that's why my page
doesn't submit data to the actionform, but I don't see why it wouldn't be
rendering the struts tags at all. For instance, if I even add ONE struts tag
in the middle of my working code that isn't the html:form tag, the entire
jsp page will not be rendered at all. It's driving me nuts, I've been
working on figuring this out for far too long and would greatly appreciate
some input.


---------------------------JSP---------------------------------------
&lt;%@taglib uri="/taglib/struts-html" prefix="html"%&gt;
&lt;%@taglib uri="/taglib/struts-bean" prefix="bean"%&gt;
&lt;%@page import="com.thomson.west.pubrec.optout.ui.servlet.SSNLookupAction"
%&gt;
			
&lt;script&gt;
function encryptSSN(){
        document.ssnLookupForm.submit();
}


function showError(){
        document.getElementById('error').style.display='block';
        document.getElementById('box1').style.display='none';
}

function validateSSN(){
        var ssn = document.ssnLookupForm.ssn.value;
    if( /^\d{3}-\d{2}-\d{4}$/.test(ssn) == false ){
                showError();
    }else{
       encryptSSN();
    }
}
&lt;/script&gt;
&lt;html:form method="post" action="/SSNLookupEncrypt"&gt;
        &lt;div style="text-align: center; font-family: arial;"&gt;
      &lt;div class="productsdiv" style="margin: 0 auto; padding: 5px;
text-align: left; width: 43%"&gt;
         &lt;div&gt;
            SSN: &lt;input type="text" name="ssn"
value="&lt;%=ssnLookupForm.getSSN()%&gt;"/&gt;
            &lt;div class="spacer"&gt; &lt;/div&gt;
            Format: XXX-XX-XXXX
         &lt;/div&gt;
         &lt;div class="spacer"&gt; &lt;/div&gt;
         &lt;div style="text-align: center;"&gt;
           &lt;input type="button" value="Encrypt" onclick="validateSSN()"/&gt;
         &lt;/div&gt;
         &lt;div class="textBox" id="box1" style="text-align: center;
display:block"&gt;
         &lt;div class="spacer"&gt; &lt;/div&gt;
           Encrypted Value: &lt;%=ssnLookupForm.getEncryptedSSN()%&gt;
       &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="spacer"&gt; &lt;/div&gt;
   &lt;/div&gt;
&lt;/html:form&gt;
------------------------------------------------------
This is the corresponding ActionForm:

public class SSNLookupForm extends ActionForm{

        private static Logger log =
              Logger.getLogger(SSNLookupForm.class.getName());
               
        private String ssn = "XXX-XX-XXXX";
        private String encryptedSSN = "[Encrypted Value]";
       
        public String getSSN(){
                return ssn;
        }
       
        public void setSSN(String ssn){
                this.ssn = ssn;
        }
       
        public String getEncryptedSSN(){
                return encryptedSSN;
        }
       
        public void setEncryptedSSN(String encryptedSSN){
                this.encryptedSSN = encryptedSSN;
        }
       
        public void reset(ActionMapping mapping, HttpServletRequest request)
{
            this.ssn = "XXX-XX-XXXX";
            this.encryptedSSN= "[Encrypted Value]";
        }
               
}


-- 
View this message in context: http://old.nabble.com/Struts-HTML-taglib-vs.-Standard-HTML-tags-tp26635930p26635930.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Problem with Struts2 JSON RPC using simple HTTP Post</title>
<author><name>Prasenjit Bhadra &lt;prbhadra@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c17a3e0cb0912040740x7ea31be0rde3d8f910aa74bef@mail.gmail.com%3e"/>
<id>urn:uuid:%3c17a3e0cb0912040740x7ea31be0rde3d8f910aa74bef@mail-gmail-com%3e</id>
<updated>2009-12-04T15:40:13Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt; I have developed a native client interface which calls struts2 JSON RPC
&gt; using post method. I have set content type, content length as suggested in
&gt; the spec. The request body looks like as follows : {"method":
&gt; "uploadTxpAssignment","id": "txpUploadRequest",
&gt; "params":{"addressByDestAddrId":{"addrLine1":"test home","addrLine2":"7th
&gt; ave","addressId":2,"aptRoomNo":5,"city":"queens","phone":"435-577-4567","state":"NY","zipCode":10183},"atDestTime":null,"callRcvdTime":"2009-11-26T08:01:00","comments":"comments1","dateCreated":"2009-11-26T00:00:00","dateModified":null,"user":{"dateCreated":null,"dateModified":null,"dob":"1956-09-18T00:00:00","firstName":"passfname","gender":"Male","lastName":"patient1lname","mi":null,"ssn":null,"userId":10000}}}
&gt; The struts.xml configurations are : &lt;action name="UploadAction"
&gt; class="com.actions.upload.UploadAction" method="smd"&gt; &lt;interceptor-ref
&gt; name="json"&gt; &lt;param name="enableSMD"&gt;true&lt;/param&gt; &lt;param
&gt; name="ignoreSMDMethodInterfaces"&gt;false&lt;/param&gt; &lt;/interceptor-ref&gt; &lt;result
&gt; type="json"&gt; &lt;param name="enableSMD"&gt;true&lt;/param&gt; &lt;param
&gt; name="ignoreInterfaces"&gt;false&lt;/param&gt; &lt;param
&gt; name="contentType"&gt;text/plain&lt;/param&gt; &lt;param name="bufferSize"&gt;1024&lt;/param&gt;
&gt; &lt;param name="allowCaching"&gt;false&lt;/param&gt; &lt;param
&gt; name="contentCharSet"&gt;UTF-8&lt;/param&gt; &lt;/result&gt; &lt;/action&gt; The simple
action
&gt; code body : public class UploadCallreportAction { private
&gt; TransportAssignmentVO transport; /** * @return the transport */ public
&gt; TransportAssignmentVO getTransport() { return transport; } /** * @param
&gt; transport the transport to set */ public void
&gt; setTransport(TransportAssignmentVO transport) { this.transport = transport;
&gt; } public String smd() { return Action.SUCCESS; } @SMDMethod public void
&gt; uploadTxpAssignment(TransportAssignmentVO txpVO) { setTransport(txpVO);
&gt; System.out.println("The Tansport assignment is for Run #:"+
&gt; transport.getRunNumber()); } } When I run the client the call reaches the
&gt; server and returns me an exception : :35,013 ERROR [RPCError]
&gt; java.util.HashMap cannot be cast to java.util.List
&gt; java.lang.ClassCastException: java.util.HashMap cannot be cast to
&gt; java.util.List at
&gt; org.apache.struts2.json.JSONInterceptor.invoke(JSONInterceptor.java:204) at
&gt; org.apache.struts2.json.JSONInterceptor.intercept(JSONInterceptor.java:131)
&gt; at
&gt; com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
&gt; at
&gt; org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
&gt; at
&gt; org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
&gt; at
&gt; org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
&gt; I am also using Spring 2.5 and Hibernate JPA in the same app.... Not sure if
&gt; there is any conflict.I have followed the simple rules to set up the JSON
&gt; RPC.However I am not able to resolve the problem. Please let me know if
&gt; anyone has a solution for this.
&gt;
&gt; Jeet
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: RequiredFieldValidator and error message from property file via	key</title>
<author><name>Greg Lindholm &lt;greg.lindholm@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c74a2042d0912040704i1e4e6583g3ab00c87de8ef88b@mail.gmail.com%3e"/>
<id>urn:uuid:%3c74a2042d0912040704i1e4e6583g3ab00c87de8ef88b@mail-gmail-com%3e</id>
<updated>2009-12-04T15:04:47Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
You may have a different problem then you think;

The @RequiredFieldValidator does not make any sense on a int
(primitive) field as an int cannot be null. The validation interceptor
checks the values on the fields after params interceptor sets the
fields. The RequiredFieldValidator checks if the field is null which
will never be the case for a primitive field.


On Fri, Dec 4, 2009 at 5:25 AM, Per Johansson &lt;perjoha@gmail.com&gt; wrote:
&gt; Hi,
&gt;
&gt; I'm trying to get error messages from a resource bundle.
&gt;
&gt; This is the code for my action class:
&gt;
&gt; @RequiredFieldValidator(type=ValidatorType.FIELD,
&gt; key="myFieldErrorMsg", message="Error!!!!")
&gt; public void setMyField(int myField) {
&gt;    this.myField = myField;
&gt; }
&gt;
&gt; @Override
&gt; public void validate() {
&gt;    if (!isMyFieldValid(myField)) {
&gt;        addFieldError("myField", getText("myFieldErrorMsg"));
&gt;    }
&gt; }
&gt;
&gt; When validation fails for setMyField I don't get the expected error
&gt; message from my resource bundle.
&gt; Instead I get a struts default error message "Invalid field value for field ..."
&gt;
&gt; But when i call getText from the validate method, I get the expected
&gt; error message.
&gt;
&gt; How can I get a message from a resource bundle using the annotation
&gt; based validator?
&gt; I'm using weblogic 10.0.
&gt;
&gt;
&gt; /Best regards, Per Johansson
&gt;
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
&gt; For additional commands, e-mail: user-help@struts.apache.org
&gt;
&gt;

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Check out our CMS please</title>
<author><name>Saeed Iqbal &lt;saeedcs@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c579bc170912040629h4a581470lcb8eee9875199f38@mail.gmail.com%3e"/>
<id>urn:uuid:%3c579bc170912040629h4a581470lcb8eee9875199f38@mail-gmail-com%3e</id>
<updated>2009-12-04T14:29:22Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
:)

On Friday, December 4, 2009, Brian Thompson &lt;elephantium@gmail.com&gt; wrote:
&gt; Well, sure you could -- you just said you have $500!
&gt;
&gt; Buying food?  Paying rent?  Nah, these trivialities are much less important
&gt; than sending money to strangers on the Internet :P
&gt;
&gt; -Brian
&gt;
&gt;
&gt;
&gt; On Fri, Dec 4, 2009 at 6:39 AM, Saeed Iqbal &lt;saeedcs@gmail.com&gt; wrote:
&gt;
&gt;&gt; I did this work and my fellow mates to contribute to Open Source world. I
&gt;&gt; am
&gt;&gt; poor less than $500 in bank. I cannot offer you any money :(
&gt;&gt;
&gt;&gt; On Fri, Dec 4, 2009 at 5:27 PM, Martin Gainty &lt;mgainty@hotmail.com&gt; wrote:
&gt;&gt;
&gt;&gt; &gt;
&gt;&gt; &gt; how much money will you provide for this enormous task?
&gt;&gt; &gt;
&gt;&gt; &gt; Martin Gainty
&gt;&gt; &gt; ______________________________________________
&gt;&gt;
&gt;

-- 
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Check out our CMS please</title>
<author><name>Brian Thompson &lt;elephantium@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c7d3e1a010912040621j3cf16cd9s36d827cf10432359@mail.gmail.com%3e"/>
<id>urn:uuid:%3c7d3e1a010912040621j3cf16cd9s36d827cf10432359@mail-gmail-com%3e</id>
<updated>2009-12-04T14:21:45Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Well, sure you could -- you just said you have $500!

Buying food?  Paying rent?  Nah, these trivialities are much less important
than sending money to strangers on the Internet :P

-Brian



On Fri, Dec 4, 2009 at 6:39 AM, Saeed Iqbal &lt;saeedcs@gmail.com&gt; wrote:

&gt; I did this work and my fellow mates to contribute to Open Source world. I
&gt; am
&gt; poor less than $500 in bank. I cannot offer you any money :(
&gt;
&gt; On Fri, Dec 4, 2009 at 5:27 PM, Martin Gainty &lt;mgainty@hotmail.com&gt; wrote:
&gt;
&gt; &gt;
&gt; &gt; how much money will you provide for this enormous task?
&gt; &gt;
&gt; &gt; Martin Gainty
&gt; &gt; ______________________________________________
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>RE: [Struts 2 + EJB 3] injection of EJBs into struts 2 actions</title>
<author><name>Haroon Rafique &lt;haroon.rafique@utoronto.ca&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3cPine.LNX.4.64.0912040811400.16208@haroon.sis.utoronto.ca%3e"/>
<id>urn:uuid:%3cPine-LNX-4-64-0912040811400-16208@haroon-sis-utoronto-ca%3e</id>
<updated>2009-12-04T13:13:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Today at 11:58am, JC=&gt;James Cook &lt;James.Cook@wecomm.com&gt; wrote:

JC&gt; EJB's can only be injected into other EJB's or Servlets, a struts 2
JC&gt; action is essentially a pojo not a servlet. So you would either have to
JC&gt; do a lookup in the context, or if you are using Spring look at using a
JC&gt; jndi lookup and inject that reference into your class.
JC&gt; 
JC&gt; Cookie

Celinio,

You can also use a Servlet simply for the purpose of invoking EJBs (let's 
call it EJBInvokerServlet) and then use the @Resource notation to bring 
any local EJB into your Action. See:
http://osdir.com/ml/user-struts.apache.org/2009-07/msg00842.html

Hope that helps.

JC&gt; 
JC&gt; -----Original Message-----
JC&gt; From: Fernandes Celinio [mailto:cfernandes@sopragroup.com] 
JC&gt; Sent: 04 December 2009 11:37
JC&gt; To: user@struts.apache.org
JC&gt; Subject: [Struts 2 + EJB 3] injection of EJBs into struts 2 actions
JC&gt; 
JC&gt; Hi,
JC&gt; I know that it is not possible to inject EJB in Struts 2 actions.
JC&gt; The following annotation would not work :
JC&gt; @EJB
JC&gt; MyBeanLocal mybean;
JC&gt;  
JC&gt; But how come ? Since a Struts action is a servlet and injection works in
JC&gt; a servlet, injection should work.
JC&gt;  
JC&gt; Thanks for enlightening me.
JC&gt;  
JC&gt; 
JC&gt; ---------------------------------------------------------------------
JC&gt; To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
JC&gt; For additional commands, e-mail: user-help@struts.apache.org
JC&gt; 
JC&gt; 

--
Haroon Rafique
&lt;haroon.rafique@utoronto.ca&gt;


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Check out our CMS please</title>
<author><name>Saeed Iqbal &lt;saeedcs@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c579bc170912040439w2eadd57ua84d3a98eb702bd0@mail.gmail.com%3e"/>
<id>urn:uuid:%3c579bc170912040439w2eadd57ua84d3a98eb702bd0@mail-gmail-com%3e</id>
<updated>2009-12-04T12:39:26Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I did this work and my fellow mates to contribute to Open Source world. I am
poor less than $500 in bank. I cannot offer you any money :(

On Fri, Dec 4, 2009 at 5:27 PM, Martin Gainty &lt;mgainty@hotmail.com&gt; wrote:

&gt;
&gt; how much money will you provide for this enormous task?
&gt;
&gt; Martin Gainty
&gt; ______________________________________________
&gt; Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
&gt;
&gt; Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
&gt; Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte
&gt; Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht
&gt; dient lediglich dem Austausch von Informationen und entfaltet keine
&gt; rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
&gt; E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
&gt; Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
&gt; destinataire prévu, nous te demandons avec bonté que pour satisfaire
&gt; informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie
&gt; de ceci est interdite. Ce message sert à l'information seulement et n'aura
&gt; pas n'importe quel effet légalement obligatoire. Étant donné que les email
&gt; peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
&gt; aucune responsabilité pour le contenu fourni.
&gt;
&gt;
&gt;
&gt;
&gt; &gt; Date: Fri, 4 Dec 2009 14:17:27 +0500
&gt; &gt; Subject: Re: Check out our CMS please
&gt; &gt; From: saeedcs@gmail.com
&gt; &gt; To: user@struts.apache.org
&gt; &gt;
&gt; &gt; http://code.google.com/p/ic-cms/
&gt; &gt;
&gt; &gt; It has i8nl built in so you can easily convert to Japanese.
&gt; &gt;
&gt; &gt; On Fri, Dec 4, 2009 at 1:53 PM, Nguyen Xuan Son &lt;yamacom@gmail.com&gt;
&gt; wrote:
&gt; &gt;
&gt; &gt; &gt; couldnt find your project
&gt; &gt; &gt; im in japan now, using both of japanese google code and us google code
&gt; &gt; &gt;
&gt; &gt; &gt; 2009/12/4 Frans Thamura &lt;frans@meruvian.org&gt;
&gt; &gt; &gt;
&gt; &gt; &gt; &gt; cool
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; will work on it :0
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; F
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; On Fri, Dec 4, 2009 at 3:07 PM, Saeed Iqbal &lt;saeedcs@gmail.com&gt;
&gt; wrote:
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; Hi Folks,
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; Would it be OK if I ask you guys to kindly test the Content
&gt; Management
&gt; &gt; &gt; &gt; &gt; System
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; that I and my fellow mates have written in Struts-Spring-Hibernate
&gt; &gt; &gt; &gt; please.
&gt; &gt; &gt; &gt; &gt; It
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; is an Open Source Software. Just search for ic-cms on Google Code.
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; &gt; Thanks,
&gt; &gt; &gt; &gt; &gt; -saeed
&gt; &gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt; &gt; --
&gt; &gt; &gt; =======================================================================
&gt; &gt; &gt; Ritsumeikan University, Asia JinZai Project
&gt; &gt; &gt; Master of Information Science
&gt; &gt; &gt; Nguyen Xuan Son
&gt; &gt; &gt;
&gt; &gt; &gt; Add       : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18
&gt; &gt; &gt; ShiteiHaimu
&gt; &gt; &gt; Rien, Room 103
&gt; &gt; &gt; Tel/Fax  : 81-(0)90-3976 2246
&gt; &gt; &gt; Email    : nr0003xx@ed.ritsumei.ac.jp
&gt; &gt; &gt; Mobile   : 81-(0)90-3976 2246          URL  : http://www.ritsumei.jp
&gt; &gt; &gt; =======================================================================
&gt; &gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt; --
&gt; &gt; Saeed Iqbal
&gt; &gt; Independant Consultant
&gt; &gt; J2EE - Application Architect / Developer
&gt;
&gt; _________________________________________________________________
&gt; Windows Live Hotmail gives you a free,exclusive  gift.
&gt;
&gt; http://www.microsoft.com/windows/windowslive/hotmail_bl1/hotmail_bl1.aspx?ocid=PID23879::T:WLMTAGL:ON:WL:en-ww:WM_IMHM_7:092009
&gt;



-- 
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer


</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Check out our CMS please</title>
<author><name>Martin Gainty &lt;mgainty@hotmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3cBLU142-W87918F245EAF17722A698AE930@phx.gbl%3e"/>
<id>urn:uuid:%3cBLU142-W87918F245EAF17722A698AE930@phx-gbl%3e</id>
<updated>2009-12-04T12:27:52Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

how much money will you provide for this enormous task?

Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten
wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist
unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet
keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen
wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu,
nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion
non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement
et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent
facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour
le contenu fourni.




&gt; Date: Fri, 4 Dec 2009 14:17:27 +0500
&gt; Subject: Re: Check out our CMS please
&gt; From: saeedcs@gmail.com
&gt; To: user@struts.apache.org
&gt; 
&gt; http://code.google.com/p/ic-cms/
&gt; 
&gt; It has i8nl built in so you can easily convert to Japanese.
&gt; 
&gt; On Fri, Dec 4, 2009 at 1:53 PM, Nguyen Xuan Son &lt;yamacom@gmail.com&gt; wrote:
&gt; 
&gt; &gt; couldnt find your project
&gt; &gt; im in japan now, using both of japanese google code and us google code
&gt; &gt;
&gt; &gt; 2009/12/4 Frans Thamura &lt;frans@meruvian.org&gt;
&gt; &gt;
&gt; &gt; &gt; cool
&gt; &gt; &gt;
&gt; &gt; &gt; will work on it :0
&gt; &gt; &gt;
&gt; &gt; &gt; F
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt; &gt; On Fri, Dec 4, 2009 at 3:07 PM, Saeed Iqbal &lt;saeedcs@gmail.com&gt; wrote:
&gt; &gt; &gt;
&gt; &gt; &gt; &gt; Hi Folks,
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Would it be OK if I ask you guys to kindly test the Content Management
&gt; &gt; &gt; &gt; System
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; that I and my fellow mates have written in Struts-Spring-Hibernate
&gt; &gt; &gt; please.
&gt; &gt; &gt; &gt; It
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; is an Open Source Software. Just search for ic-cms on Google Code.
&gt; &gt; &gt; &gt;
&gt; &gt; &gt; &gt; Thanks,
&gt; &gt; &gt; &gt; -saeed
&gt; &gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt; --
&gt; &gt; =======================================================================
&gt; &gt; Ritsumeikan University, Asia JinZai Project
&gt; &gt; Master of Information Science
&gt; &gt; Nguyen Xuan Son
&gt; &gt;
&gt; &gt; Add       : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18
&gt; &gt; ShiteiHaimu
&gt; &gt; Rien, Room 103
&gt; &gt; Tel/Fax  : 81-(0)90-3976 2246
&gt; &gt; Email    : nr0003xx@ed.ritsumei.ac.jp
&gt; &gt; Mobile   : 81-(0)90-3976 2246          URL  : http://www.ritsumei.jp
&gt; &gt; =======================================================================
&gt; &gt;
&gt; 
&gt; 
&gt; 
&gt; -- 
&gt; Saeed Iqbal
&gt; Independant Consultant
&gt; J2EE - Application Architect / Developer
 		 	   		  
_________________________________________________________________
Windows Live Hotmail gives you a free,exclusive  gift.
http://www.microsoft.com/windows/windowslive/hotmail_bl1/hotmail_bl1.aspx?ocid=PID23879::T:WLMTAGL:ON:WL:en-ww:WM_IMHM_7:092009

</pre>
</div>
</content>
</entry>
<entry>
<title>Re: S2 Type conversion error and validation problem</title>
<author><name>Marsman &lt;mars.man@gmx.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c26635875.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26635875-post@talk-nabble-com%3e</id>
<updated>2009-12-04T12:16:05Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>


Wes Wannemacher wrote:
&gt; 
&gt; 
&gt; I would start here -
&gt; 
&gt; http://struts.apache.org/2.x/docs/type-conversion.html#TypeConversion-TypeConversionErrorHandling
&gt; 
&gt; 

Thanks for this link. But I've read it before and I'm not should
understanding clearly how to proceed:

"...To keep conversion errors from reporting globally, change the
interceptor stack, and add additional validation rules."

Should I build my own interceptor stack without the conversion interceptor
and use the type conversion validator only?

Titus




-- 
View this message in context: http://old.nabble.com/S2-Type-conversion-error-and-validation-problem-tp26609676p26635875.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: [Struts 2 + EJB 3] injection of EJBs into struts 2 actions</title>
<author><name>&quot;James Cook&quot; &lt;James.Cook@wecomm.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c4FDDA327A6C64D4BB6B4670122AA8D4201C79277@lonex01.weComm.local%3e"/>
<id>urn:uuid:%3c4FDDA327A6C64D4BB6B4670122AA8D4201C79277@lonex01-weComm-local%3e</id>
<updated>2009-12-04T11:58:19Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
EJB's can only be injected into other EJB's or Servlets, a struts 2
action is essentially a pojo not a servlet. So you would either have to
do a lookup in the context, or if you are using Spring look at using a
jndi lookup and inject that reference into your class.

Cookie

-----Original Message-----
From: Fernandes Celinio [mailto:cfernandes@sopragroup.com] 
Sent: 04 December 2009 11:37
To: user@struts.apache.org
Subject: [Struts 2 + EJB 3] injection of EJBs into struts 2 actions

Hi,
I know that it is not possible to inject EJB in Struts 2 actions.
The following annotation would not work :
@EJB
MyBeanLocal mybean;
 
But how come ? Since a Struts action is a servlet and injection works in
a servlet, injection should work.
 
Thanks for enlightening me.
 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>[Struts 2 + EJB 3] injection of EJBs into struts 2 actions</title>
<author><name>&quot;Fernandes Celinio&quot; &lt;cfernandes@sopragroup.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c31246_1259926611_4B18F453_31246_1759564_3_B4AC254DCE906D488333FD39FCD5DD628512AB@WBE01.ptx.fr.sopra%3e"/>
<id>urn:uuid:%3c31246_1259926611_4B18F453_31246_1759564_3_B4AC254DCE906D488333FD39FCD5DD628512AB@WBE01-ptx-fr-sopra%3e</id>
<updated>2009-12-04T11:36:37Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,
I know that it is not possible to inject EJB in Struts 2 actions.
The following annotation would not work :
@EJB
MyBeanLocal mybean;
 
But how come ? Since a Struts action is a servlet and injection works in
a servlet, injection should work.
 
Thanks for enlightening me.
 


</pre>
</div>
</content>
</entry>
<entry>
<title>[REST] PackageLocator find nothing if in a EAR</title>
<author><name>David Canos &lt;davidcanos@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3cf9d5b1b10912040326y7b105f28h1ffdea335551d855@mail.gmail.com%3e"/>
<id>urn:uuid:%3cf9d5b1b10912040326y7b105f28h1ffdea335551d855@mail-gmail-com%3e</id>
<updated>2009-12-04T11:26:04Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi folks
are anyone using Struts2 + Rest plugin in a EAR environment?

We are confused, It works in a independent project but after you put it in a
EAR project, the packagelocator doesnt find any Controller action.

any idea?

thank u

Struts 2.1.8.1
Glassfish 2.1

-- 
David CanÃ³s
www.david-canos.net


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: What may cause ognl.InappropriateExpressionException warning ?</title>
<author><name>bjornw &lt;bjorn.wessman@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c26635839.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c26635839-post@talk-nabble-com%3e</id>
<updated>2009-12-04T10:27:48Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hi, I have the very same problem. But I don't want to exclude these params
from the request. I fetch them "manually" in my action class, not using
OGNL, and this works perfectly. But I don't want my log cluttered with OGNL
warning. Is there a way of supressing only the OGNL warnings and not all
warnings in the application?

BR
BjÃ¶rn



Oscar CalderÃ³n-2 wrote:
&gt; 
&gt; As Musachy says, you could ignore it in the params interceptor in this
&gt; way:
&gt; 
&gt; &lt;interceptor-ref name="sampleInterceptorStackIncludingDefaultStack"&gt;
&gt;               
&gt;                  d-\d+?-[sop]
&gt;               
&gt;             &lt;/interceptor-ref&gt;
&gt; 
&gt;&gt;
&gt;&gt;
&gt;&gt; Musachy Barroso escribiÃ³:
&gt;&gt;&gt; try adding quotes around it 'd-6836677-p' then it will be interpreted
&gt;&gt;&gt; as a string, or try to ignore it in the params interceptor.
&gt;&gt;&gt;
&gt;&gt;&gt; On Mon, Nov 23, 2009 at 8:27 AM, jsubei &lt;jsubei@yahoo.fr&gt; wrote:
&gt;&gt;&gt;   
&gt;&gt;&gt;&gt; Dear all,
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; I'm using struts 2.1.8 with displaytag 1.2
&gt;&gt;&gt;&gt; and, of course, I have the same problem.
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; Have you found a solution ?
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; Thank you,
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; Norbert
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; jctovarueda wrote:
&gt;&gt;&gt;&gt;     
&gt;&gt;&gt;&gt;&gt; Lu Ying,
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt; I could detect the problem, it's apparently a bug from Struts 2
&gt;&gt;&gt;&gt;&gt; (XWorks).
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt; It seems to be that OGNL Utils setValue confuses the "d-6836677-p"
&gt;&gt;&gt;&gt;&gt; expression as substract operation, it means, the expression is
&gt;&gt;&gt;&gt;&gt; evaluated
&gt;&gt;&gt;&gt;&gt; like ( d - 6836677 ) - p as mathematical operation.
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt; I will try to find a solution to this problem, if you have some
&gt;&gt;&gt;&gt;&gt; solution,
&gt;&gt;&gt;&gt;&gt; pls write to me.
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt; Regards,
&gt;&gt;&gt;&gt;&gt; JC
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt; luy wrote:
&gt;&gt;&gt;&gt;&gt;       
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; params interceptor doesn't like parameters with spaces
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; in the name (this was fixed in xwork already), to fix it,
set
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; "acceptedParamNames" to "[[\p{Graph}\s]&amp;&amp;[^,#:=]]*"
in your param
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; interceptor.
&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;             
&gt;&gt;&gt;&gt;&gt;&gt;&gt; Right, I am using displayTag(displaytag-1.2.jar). The parameter
&gt;&gt;&gt;&gt;&gt;&gt;&gt; looks
&gt;&gt;&gt;&gt;&gt;&gt;&gt; like:
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt; https://info/ProcessBrowse.action?d-6836677-p=7
&gt;&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;&gt; "d-6836677-p=7" caused the problem. Is there any way that
&gt;&gt;&gt;&gt;&gt;&gt;&gt; "d-6836677-p=7" can be accepted?
&gt;&gt;&gt;&gt;&gt;&gt;&gt;           
&gt;&gt;&gt;&gt;&gt;&gt; Ok, I did a hack to disable warning message as a temporal solution:
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt; log4j.logger.com.opensymphony.xwork2.util.logging.commons.CommonsLogger=ERROR
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt; --
&gt;&gt;&gt;&gt;&gt;&gt; Lu Ying
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt; ---------------------------------------------------------------------
&gt;&gt;&gt;&gt;&gt;&gt; To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
&gt;&gt;&gt;&gt;&gt;&gt; For additional commands, e-mail: user-help@struts.apache.org
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;&gt;         
&gt;&gt;&gt;&gt;&gt;       
&gt;&gt;&gt;&gt; --
&gt;&gt;&gt;&gt; View this message in context:
&gt;&gt;&gt;&gt; http://old.nabble.com/What-may-cause---ognl.InappropriateExpressionException--warning---tp21818620p26481347.html
&gt;&gt;&gt;&gt; Sent from the Struts - User mailing list archive at Nabble.com.
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; ---------------------------------------------------------------------
&gt;&gt;&gt;&gt; To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
&gt;&gt;&gt;&gt; For additional commands, e-mail: user-help@struts.apache.org
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;     
&gt;&gt;&gt;
&gt;&gt;&gt; ---------------------------------------------------------------------
&gt;&gt;&gt; To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
&gt;&gt;&gt; For additional commands, e-mail: user-help@struts.apache.org
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt;   
&gt; 
&gt; ---------------------------------------------------------------------
&gt; To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
&gt; For additional commands, e-mail: user-help@struts.apache.org
&gt; 
&gt; 
&gt; 

-- 
View this message in context: http://old.nabble.com/What-may-cause---ognl.InappropriateExpressionException--warning---tp21818620p26635839.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>RequiredFieldValidator and error message from property file via key</title>
<author><name>Per Johansson &lt;perjoha@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c8141dfcc0912040225n2abfb1d6h435533b154d15bfa@mail.gmail.com%3e"/>
<id>urn:uuid:%3c8141dfcc0912040225n2abfb1d6h435533b154d15bfa@mail-gmail-com%3e</id>
<updated>2009-12-04T10:25:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,

I'm trying to get error messages from a resource bundle.

This is the code for my action class:

@RequiredFieldValidator(type=ValidatorType.FIELD,
key="myFieldErrorMsg", message="Error!!!!")
public void setMyField(int myField) {
    this.myField = myField;
}

@Override
public void validate() {
    if (!isMyFieldValid(myField)) {
        addFieldError("myField", getText("myFieldErrorMsg"));
    }
}

When validation fails for setMyField I don't get the expected error
message from my resource bundle.
Instead I get a struts default error message "Invalid field value for field ..."

But when i call getText from the validate method, I get the expected
error message.

How can I get a message from a resource bundle using the annotation
based validator?
I'm using weblogic 10.0.


/Best regards, Per Johansson

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Check out our CMS please</title>
<author><name>Saeed Iqbal &lt;saeedcs@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c579bc170912040117m3f7c9f4kc86a809252a21246@mail.gmail.com%3e"/>
<id>urn:uuid:%3c579bc170912040117m3f7c9f4kc86a809252a21246@mail-gmail-com%3e</id>
<updated>2009-12-04T09:17:27Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
http://code.google.com/p/ic-cms/

It has i8nl built in so you can easily convert to Japanese.

On Fri, Dec 4, 2009 at 1:53 PM, Nguyen Xuan Son &lt;yamacom@gmail.com&gt; wrote:

&gt; couldnt find your project
&gt; im in japan now, using both of japanese google code and us google code
&gt;
&gt; 2009/12/4 Frans Thamura &lt;frans@meruvian.org&gt;
&gt;
&gt; &gt; cool
&gt; &gt;
&gt; &gt; will work on it :0
&gt; &gt;
&gt; &gt; F
&gt; &gt;
&gt; &gt;
&gt; &gt; On Fri, Dec 4, 2009 at 3:07 PM, Saeed Iqbal &lt;saeedcs@gmail.com&gt; wrote:
&gt; &gt;
&gt; &gt; &gt; Hi Folks,
&gt; &gt; &gt;
&gt; &gt; &gt; Would it be OK if I ask you guys to kindly test the Content Management
&gt; &gt; &gt; System
&gt; &gt; &gt;
&gt; &gt; &gt; that I and my fellow mates have written in Struts-Spring-Hibernate
&gt; &gt; please.
&gt; &gt; &gt; It
&gt; &gt; &gt;
&gt; &gt; &gt; is an Open Source Software. Just search for ic-cms on Google Code.
&gt; &gt; &gt;
&gt; &gt; &gt; Thanks,
&gt; &gt; &gt; -saeed
&gt; &gt; &gt;
&gt; &gt;
&gt;
&gt;
&gt;
&gt; --
&gt; =======================================================================
&gt; Ritsumeikan University, Asia JinZai Project
&gt; Master of Information Science
&gt; Nguyen Xuan Son
&gt;
&gt; Add       : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18
&gt; ShiteiHaimu
&gt; Rien, Room 103
&gt; Tel/Fax  : 81-(0)90-3976 2246
&gt; Email    : nr0003xx@ed.ritsumei.ac.jp
&gt; Mobile   : 81-(0)90-3976 2246          URL  : http://www.ritsumei.jp
&gt; =======================================================================
&gt;



-- 
Saeed Iqbal
Independant Consultant
J2EE - Application Architect / Developer


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Check out our CMS please</title>
<author><name>Nguyen Xuan Son &lt;yamacom@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c214da5160912040053o742af30fg7fc389282cedd281@mail.gmail.com%3e"/>
<id>urn:uuid:%3c214da5160912040053o742af30fg7fc389282cedd281@mail-gmail-com%3e</id>
<updated>2009-12-04T08:53:35Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
couldnt find your project
im in japan now, using both of japanese google code and us google code

2009/12/4 Frans Thamura &lt;frans@meruvian.org&gt;

&gt; cool
&gt;
&gt; will work on it :0
&gt;
&gt; F
&gt;
&gt;
&gt; On Fri, Dec 4, 2009 at 3:07 PM, Saeed Iqbal &lt;saeedcs@gmail.com&gt; wrote:
&gt;
&gt; &gt; Hi Folks,
&gt; &gt;
&gt; &gt; Would it be OK if I ask you guys to kindly test the Content Management
&gt; &gt; System
&gt; &gt;
&gt; &gt; that I and my fellow mates have written in Struts-Spring-Hibernate
&gt; please.
&gt; &gt; It
&gt; &gt;
&gt; &gt; is an Open Source Software. Just search for ic-cms on Google Code.
&gt; &gt;
&gt; &gt; Thanks,
&gt; &gt; -saeed
&gt; &gt;
&gt;



-- 
=======================================================================
Ritsumeikan University, Asia JinZai Project
Master of Information Science
Nguyen Xuan Son

Add       : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18 ShiteiHaimu
Rien, Room 103
Tel/Fax  : 81-(0)90-3976 2246
Email    : nr0003xx@ed.ritsumei.ac.jp
Mobile   : 81-(0)90-3976 2246          URL  : http://www.ritsumei.jp
=======================================================================


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Check out our CMS please</title>
<author><name>Frans Thamura &lt;frans@meruvian.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c3a71add70912040024l7da39c1dx61ccd6c39d05a623@mail.gmail.com%3e"/>
<id>urn:uuid:%3c3a71add70912040024l7da39c1dx61ccd6c39d05a623@mail-gmail-com%3e</id>
<updated>2009-12-04T08:24:54Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
cool

will work on it :0

F


On Fri, Dec 4, 2009 at 3:07 PM, Saeed Iqbal &lt;saeedcs@gmail.com&gt; wrote:

&gt; Hi Folks,
&gt;
&gt; Would it be OK if I ask you guys to kindly test the Content Management
&gt; System
&gt;
&gt; that I and my fellow mates have written in Struts-Spring-Hibernate please.
&gt; It
&gt;
&gt; is an Open Source Software. Just search for ic-cms on Google Code.
&gt;
&gt; Thanks,
&gt; -saeed
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Check out our CMS please</title>
<author><name>Saeed Iqbal &lt;saeedcs@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3c579bc170912040007p14002bb2q816ac0f98f57491@mail.gmail.com%3e"/>
<id>urn:uuid:%3c579bc170912040007p14002bb2q816ac0f98f57491@mail-gmail-com%3e</id>
<updated>2009-12-04T08:07:31Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi Folks,

Would it be OK if I ask you guys to kindly test the Content Management
System

that I and my fellow mates have written in Struts-Spring-Hibernate please.
It

is an Open Source Software. Just search for ic-cms on Google Code.

Thanks,
-saeed


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Problem with Struts 2 JSON RPC using simple HTTP Post (not using	DOJO)</title>
<author><name>Musachy Barroso &lt;musachy@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3cd8bdeb6f0912031634p725d5f82qf603fe902d94bd6e@mail.gmail.com%3e"/>
<id>urn:uuid:%3cd8bdeb6f0912031634p725d5f82qf603fe902d94bd6e@mail-gmail-com%3e</id>
<updated>2009-12-04T00:34:45Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
it is a list in the v1 of the spec http://json-rpc.org/wiki/specification

"params - An Array of objects to pass as arguments to the method."

the name of the parameters is irrelevant, only the order is.

musachy

On Thu, Dec 3, 2009 at 4:31 PM, Musachy Barroso &lt;musachy@gmail.com&gt; wrote:
&gt; I take it back, sorry. The problem is that JSON RPC expects "params"
&gt; to be a list, and it is coming as a map, I haven't kept up with the
&gt; "spec", is it a map these days?
&gt;
&gt; musachy
&gt;
&gt; On Thu, Dec 3, 2009 at 4:28 PM, Musachy Barroso &lt;musachy@gmail.com&gt; wrote:
&gt;&gt; It seems like one of the fields of TransportAssignmentVO is a list,
&gt;&gt; and what is coming from the JSON objects looks more like a map, can
&gt;&gt; you set a  break point on ClassCastException exceptions and tell us
&gt;&gt; what the field is? or post the setter/getters of
&gt;&gt; TransportAssignmentVO.
&gt;&gt;
&gt;&gt; musahcy
&gt;&gt;
&gt;&gt; On Thu, Dec 3, 2009 at 4:05 PM, Jeet08 &lt;prbhadra@gmail.com&gt; wrote:
&gt;&gt;&gt;
&gt;&gt;&gt; I have developed a native client interface which calls struts2 JSON RPC using
&gt;&gt;&gt; post method. I have set content type, content length as suggested in the
&gt;&gt;&gt; spec. The request body looks like as follows :
&gt;&gt;&gt; {"method": "uploadTxpAssignment","id": "txpUploadRequest",
&gt;&gt;&gt; "params":{"addressByDestAddrId":{"addrLine1":"test home","addrLine2":"7th
&gt;&gt;&gt; ave","addressId":2,"aptRoomNo":5,"city":"queens","phone":"435-577-4567","state":"NY","zipCode":10183},"atDestTime":null,"callRcvdTime":"2009-11-26T08:01:00","comments":"comments1","dateCreated":"2009-11-26T00:00:00","dateModified":null,"user":{"dateCreated":null,"dateModified":null,"dob":"1956-09-18T00:00:00","firstName":"passfname","gender":"Male","lastName":"patient1lname","mi":null,"ssn":null,"userId":10000}}}
&gt;&gt;&gt;
&gt;&gt;&gt; The struts.xml configurations are :
&gt;&gt;&gt; &lt;action name="UploadAction" class="com.actions.upload.UploadAction"
&gt;&gt;&gt; method="smd"&gt;
&gt;&gt;&gt;          &lt;interceptor-ref name="json"&gt;
&gt;&gt;&gt;      true
&gt;&gt;&gt;      false
&gt;&gt;&gt;   &lt;/interceptor-ref&gt;
&gt;&gt;&gt;   &lt;result type="json"&gt;
&gt;&gt;&gt;      true
&gt;&gt;&gt;        false
&gt;&gt;&gt;             text/plain
&gt;&gt;&gt;                                1024
&gt;&gt;&gt;                                false
&gt;&gt;&gt;                                UTF-8
&gt;&gt;&gt;        &lt;/result&gt;
&gt;&gt;&gt;    &lt;/action&gt;
&gt;&gt;&gt;
&gt;&gt;&gt; The simple action code body :
&gt;&gt;&gt; public class UploadCallreportAction {
&gt;&gt;&gt;        private TransportAssignmentVO transport;
&gt;&gt;&gt;        /**
&gt;&gt;&gt;         * @return the transport
&gt;&gt;&gt;         */
&gt;&gt;&gt;        public TransportAssignmentVO getTransport() {
&gt;&gt;&gt;                return transport;
&gt;&gt;&gt;        }
&gt;&gt;&gt;
&gt;&gt;&gt;        /**
&gt;&gt;&gt;         * @param transport the transport to set
&gt;&gt;&gt;         */
&gt;&gt;&gt;        public void setTransport(TransportAssignmentVO transport) {
&gt;&gt;&gt;                this.transport = transport;
&gt;&gt;&gt;        }
&gt;&gt;&gt;
&gt;&gt;&gt;        public String smd() {
&gt;&gt;&gt;        return Action.SUCCESS;
&gt;&gt;&gt;    }
&gt;&gt;&gt;
&gt;&gt;&gt;    @SMDMethod
&gt;&gt;&gt;    public void uploadTxpAssignment(TransportAssignmentVO txpVO) {
&gt;&gt;&gt;        setTransport(txpVO);
&gt;&gt;&gt;      System.out.println("The Tansport assignment is for Run #:"+
&gt;&gt;&gt; transport.getRunNumber());
&gt;&gt;&gt;      }
&gt;&gt;&gt; }
&gt;&gt;&gt;
&gt;&gt;&gt; When I run the client the call reaches the server and returns me an
&gt;&gt;&gt; exception :
&gt;&gt;&gt; :35,013 ERROR [RPCError] java.util.HashMap cannot be cast to java.util.List
&gt;&gt;&gt; java.lang.ClassCastException: java.util.HashMap cannot be cast to
&gt;&gt;&gt; java.util.List
&gt;&gt;&gt;        at org.apache.struts2.json.JSONInterceptor.invoke(JSONInterceptor.java:204)
&gt;&gt;&gt;        at
&gt;&gt;&gt; org.apache.struts2.json.JSONInterceptor.intercept(JSONInterceptor.java:131)
&gt;&gt;&gt;        at
&gt;&gt;&gt; com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
&gt;&gt;&gt;        at
&gt;&gt;&gt; org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
&gt;&gt;&gt;        at
&gt;&gt;&gt; org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
&gt;&gt;&gt;        at
&gt;&gt;&gt; org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
&gt;&gt;&gt;
&gt;&gt;&gt; I am also using Spring 2.5 and Hibernate JPA in the same app.... Not sure if
&gt;&gt;&gt; there is any conflict.I have followed the simple rules to set up the JSON
&gt;&gt;&gt; RPC.However I am not able to resolve the problem. Please let me know if
&gt;&gt;&gt; anyone has a solution for this.
&gt;&gt;&gt; --
&gt;&gt;&gt; View this message in context: http://old.nabble.com/Problem-with-Struts-2-JSON-RPC-using-simple-HTTP-Post-%28not-using-DOJO%29-tp26635563p26635563.html
&gt;&gt;&gt; Sent from the Struts - User mailing list archive at Nabble.com.
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt; ---------------------------------------------------------------------
&gt;&gt;&gt; To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
&gt;&gt;&gt; For additional commands, e-mail: user-help@struts.apache.org
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;
&gt;

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Problem with Struts 2 JSON RPC using simple HTTP Post (not using	DOJO)</title>
<author><name>Musachy Barroso &lt;musachy@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/struts-user/200912.mbox/%3cd8bdeb6f0912031631nf82fdc3jc6f3cf36444e98f9@mail.gmail.com%3e"/>
<id>urn:uuid:%3cd8bdeb6f0912031631nf82fdc3jc6f3cf36444e98f9@mail-gmail-com%3e</id>
<updated>2009-12-04T00:31:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I take it back, sorry. The problem is that JSON RPC expects "params"
to be a list, and it is coming as a map, I haven't kept up with the
"spec", is it a map these days?

musachy

On Thu, Dec 3, 2009 at 4:28 PM, Musachy Barroso &lt;musachy@gmail.com&gt; wrote:
&gt; It seems like one of the fields of TransportAssignmentVO is a list,
&gt; and what is coming from the JSON objects looks more like a map, can
&gt; you set a  break point on ClassCastException exceptions and tell us
&gt; what the field is? or post the setter/getters of
&gt; TransportAssignmentVO.
&gt;
&gt; musahcy
&gt;
&gt; On Thu, Dec 3, 2009 at 4:05 PM, Jeet08 &lt;prbhadra@gmail.com&gt; wrote:
&gt;&gt;
&gt;&gt; I have developed a native client interface which calls struts2 JSON RPC using
&gt;&gt; post method. I have set content type, content length as suggested in the
&gt;&gt; spec. The request body looks like as follows :
&gt;&gt; {"method": "uploadTxpAssignment","id": "txpUploadRequest",
&gt;&gt; "params":{"addressByDestAddrId":{"addrLine1":"test home","addrLine2":"7th
&gt;&gt; ave","addressId":2,"aptRoomNo":5,"city":"queens","phone":"435-577-4567","state":"NY","zipCode":10183},"atDestTime":null,"callRcvdTime":"2009-11-26T08:01:00","comments":"comments1","dateCreated":"2009-11-26T00:00:00","dateModified":null,"user":{"dateCreated":null,"dateModified":null,"dob":"1956-09-18T00:00:00","firstName":"passfname","gender":"Male","lastName":"patient1lname","mi":null,"ssn":null,"userId":10000}}}
&gt;&gt;
&gt;&gt; The struts.xml configurations are :
&gt;&gt; &lt;action name="UploadAction" class="com.actions.upload.UploadAction"
&gt;&gt; method="smd"&gt;
&gt;&gt;          &lt;interceptor-ref name="json"&gt;
&gt;&gt;      true
&gt;&gt;      false
&gt;&gt;   &lt;/interceptor-ref&gt;
&gt;&gt;   &lt;result type="json"&gt;
&gt;&gt;      true
&gt;&gt;        false
&gt;&gt;             text/plain
&gt;&gt;                                1024
&gt;&gt;                                false
&gt;&gt;                                UTF-8
&gt;&gt;        &lt;/result&gt;
&gt;&gt;    &lt;/action&gt;
&gt;&gt;
&gt;&gt; The simple action code body :
&gt;&gt; public class UploadCallreportAction {
&gt;&gt;        private TransportAssignmentVO transport;
&gt;&gt;        /**
&gt;&gt;         * @return the transport
&gt;&gt;         */
&gt;&gt;        public TransportAssignmentVO getTransport() {
&gt;&gt;                return transport;
&gt;&gt;        }
&gt;&gt;
&gt;&gt;        /**
&gt;&gt;         * @param transport the transport to set
&gt;&gt;         */
&gt;&gt;        public void setTransport(TransportAssignmentVO transport) {
&gt;&gt;                this.transport = transport;
&gt;&gt;        }
&gt;&gt;
&gt;&gt;        public String smd() {
&gt;&gt;        return Action.SUCCESS;
&gt;&gt;    }
&gt;&gt;
&gt;&gt;    @SMDMethod
&gt;&gt;    public void uploadTxpAssignment(TransportAssignmentVO txpVO) {
&gt;&gt;        setTransport(txpVO);
&gt;&gt;      System.out.println("The Tansport assignment is for Run #:"+
&gt;&gt; transport.getRunNumber());
&gt;&gt;      }
&gt;&gt; }
&gt;&gt;
&gt;&gt; When I run the client the call reaches the server and returns me an
&gt;&gt; exception :
&gt;&gt; :35,013 ERROR [RPCError] java.util.HashMap cannot be cast to java.util.List
&gt;&gt; java.lang.ClassCastException: java.util.HashMap cannot be cast to
&gt;&gt; java.util.List
&gt;&gt;        at org.apache.struts2.json.JSONInterceptor.invoke(JSONInterceptor.java:204)
&gt;&gt;        at
&gt;&gt; org.apache.struts2.json.JSONInterceptor.intercept(JSONInterceptor.java:131)
&gt;&gt;        at
&gt;&gt; com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)
&gt;&gt;        at
&gt;&gt; org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
&gt;&gt;        at
&gt;&gt; org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
&gt;&gt;        at
&gt;&gt; org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
&gt;&gt;
&gt;&gt; I am also using Spring 2.5 and Hibernate JPA in the same app.... Not sure if
&gt;&gt; there is any conflict.I have followed the simple rules to set up the JSON
&gt;&gt; RPC.However I am not able to resolve the problem. Please let me know if
&gt;&gt; anyone has a solution for this.
&gt;&gt; --
&gt;&gt; View this message in context: http://old.nabble.com/Problem-with-Struts-2-JSON-RPC-using-simple-HTTP-Post-%28not-using-DOJO%29-tp26635563p26635563.html
&gt;&gt; Sent from the Struts - User mailing list archive at Nabble.com.
&gt;&gt;
&gt;&gt;
&gt;&gt; ---------------------------------------------------------------------
&gt;&gt; To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
&gt;&gt; For additional commands, e-mail: user-help@struts.apache.org
&gt;&gt;
&gt;&gt;
&gt;

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



</pre>
</div>
</content>
</entry>
</feed>
