Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 6 Feb 2008 17:25:34 -0000 Issue 7851

user-digest-help

2008-02-06


Author LoginPost Reply

user Digest 6 Feb 2008 17:25:34 -0000 Issue 7851

Topics (messages 182296 through 182325):

Re: chaining validation errors
 182296 by: chubi
 182300 by: Laurie Harper
 182313 by: chubi
 182314 by: chubi
 182315 by: chubi

Re: Custom OGNL PropertyAccessor
 182297 by: Jeromy Evans
 182312 by: Tommy Becker

Re: Struts 2 and Weblogic 9.2 - java.net.ConnectException
 182298 by: Wes Wannemacher
 182305 by: Vigneswar
 182317 by: Randy Burgess
 182319 by: Randy Burgess

Struts 2 Bootstrap Tutorial: Using Tags
 182299 by: Rostom Aghanian
 182309 by: Nils-Helge Garli Hegvik

s:property for s:textarea value
 182301 by: Raghuveer Rawat
 182302 by: Dave Newton
 182304 by: Raghuveer Rawat

Re: Editing an entity in Struts2
 182303 by: Jeromy Evans

Re: [OT] Re: Best Tool to develop html pages
 182306 by: mohammed hussain
 182307 by: Jeromy Evans
 182308 by: bhaarat Sharma

Re: dispaytag + Struts 2.1.x: encoding parameters into requestURI
 182310 by: Giovanni Azua

How can I validate a composed object in my action?(Struts 2)
 182311 by: slideharmony

Problem s:select in IE and Firefox
 182316 by: Marc Eckart

STRUTS 2: fail to retrieve values without repost
 182318 by: Nushi

Re: Losing Session Attributes
 182320 by: daveck
 182321 by: daveck
 182324 by: daveck
 182325 by: Musachy Barroso

Re: jQuery plugin for Struts 2?
 182322 by: matt.payne
 182323 by: Dave Newton

Administrivia:

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

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

Attachment: user_182296.ezm (zipped)

Thank you Dave for helping,

Below is the fragment in struts.xml where editLicense should submit to
saveLicense, which in return should redirect to editLicense again. That is
the call to saveLicense is transparent.
Submit to saveLicense was intercepted by validation. Errors were found!
What happens next? How do I preserve the error stack?

Thank you for support.

pst: I am using struts2/spring/hibernate.



<action name="editLicense" class="orgAdminLicenseAction" method="edit">
 <result>/WEB-INF/pages/lms/orgAdmin/licenseForm.jsp</result>
 <result name="error">/WEB-INF/pages/lms/orgAdmin/licenseList.jsp</result>
</action>
<action name="saveLicense" class="orgAdminLicenseAction" method="save">
 <result name="success" type="redirect">licenses.html</result>
 <result name="cancel" type="redirect">licenses.html</result>
 <result name="delete" type="redirect">licenses.html</result>
 <result name="input" type="redirect-action">
   editLicense.html
   true
   ${license.dkey}
 </result>
</action>
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_182300.ezm (zipped)
chubi wrote:
> Thank you Dave for helping,
>
> Below is the fragment in struts.xml where editLicense should submit to
> saveLicense, which in return should redirect to editLicense again. That is
> the call to saveLicense is transparent.
> Submit to saveLicense was intercepted by validation. Errors were found!
> What happens next? How do I preserve the error stack?
>
> Thank you for support.
>
> pst: I am using struts2/spring/hibernate.
>
>
>
> <action name="editLicense" class="orgAdminLicenseAction" method="edit">
>  <result>/WEB-INF/pages/lms/orgAdmin/licenseForm.jsp</result>
>  <result name="error">/WEB-INF/pages/lms/orgAdmin/licenseList.jsp</result>
> </action>
> <action name="saveLicense" class="orgAdminLicenseAction" method="save">
>  <result name="success" type="redirect">licenses.html</result>
>  <result name="cancel" type="redirect">licenses.html</result>
>  <result name="delete" type="redirect">licenses.html</result>
>  <result name="input" type="redirect-action">
>    editLicense.html
>    true
>    ${license.dkey}
>  </result>
> </action>

Validation error messages are stored in request scope, so a redirect
loses them. Adding the Message Store interceptor to the saveLicense
action can solve that problem for you, but you'll need to tweak the
interceptor stack for editLicense too so that the workflow interceptor
doesn't try to react to the error messages coming from saveLicense.

L.

[1] http://struts.apache.org/2.0.11/docs/message-store-interceptor.html


Attachment: user_182313.ezm (zipped)

Thanks again,
It is not working, sometimes I get NullPointerException
Plz show me how to use it.
Below is the modified fragment of struts.xml
Thanks for the support

<action name="editLicense"
class="com.intelligile.lms.webapp.action.LicenseAction" method="edit">
 <interceptor-ref name="defaultStack" />
 <interceptor-ref name="store">
   RETRIEVE
 </interceptor-ref>
 <result>/WEB-INF/pages/licenseForm.jsp</result>
 <result name="error">/WEB-INF/pages/licenseList.jsp</result>
</action>

<action name="saveLicense"
class="com.intelligile.lms.webapp.action.LicenseAction" method="save">
 <interceptor-ref name="defaultStack" />
 <interceptor-ref name="store">
   STORE
 </interceptor-ref>
 <result type="redirect">licenses.html</result>
 <result name="cancel" type="redirect">licenses.html</result>
 <result name="delete" type="redirect">licenses.html</result>
 <result name="input" type="redirect-action">
   editLicense.html
   true
   ${license.dkey}
 </result>
</action>
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_182314.ezm (zipped)

Thanks again,
It is not working, sometimes I get NullPointerException
Plz show me how to use it.
Below is the modified fragment of struts.xml
Thanks for the support

<action name="editLicense"
class="com.intelligile.lms.webapp.action.LicenseAction" method="edit">
 <interceptor-ref name="defaultStack" />
 <interceptor-ref name="store">
 RETRIEVE
 </interceptor-ref>

 <result>/WEB-INF/pages/licenseForm.jsp</result>
 <result name="error">/WEB-INF/pages/licenseList.jsp</result>
</action>

<action name="saveLicense"
class="com.intelligile.lms.webapp.action.LicenseAction" method="save">
 <interceptor-ref name="defaultStack" />
 <interceptor-ref name="store">
 STORE
 </interceptor-ref>

 <result type="redirect">licenses.html</result>
 <result name="cancel" type="redirect">licenses.html</result>
 <result name="delete" type="redirect">licenses.html</result>
 <result name="input" type="redirect-action">
 editLicense.html
 true
 ${license.dkey}
 </result>
</action>
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_182315.ezm (zipped)

Thanks again,
It is not working, sometimes I get NullPointerException
Plz show me how to use it.
Below is the modified fragment of struts.xml
pst: the param tag doesn't show when this reply is post.:-/
Thanks for the support

<action name="editLicense"
class="com.intelligile.lms.webapp.action.LicenseAction" method="edit">
 <interceptor-ref name="defaultStack" />
 <interceptor-ref name="store">
   RETRIEVE
 </interceptor-ref>
 <result>/WEB-INF/pages/licenseForm.jsp</result>
 <result name="error">/WEB-INF/pages/licenseList.jsp</result>
</action>

<action name="saveLicense"
class="com.intelligile.lms.webapp.action.LicenseAction" method="save">
 <interceptor-ref name="defaultStack" />
 <interceptor-ref name="store">
   STORE
 </interceptor-ref>
 <result type="redirect">licenses.html</result>
 <result name="cancel" type="redirect">licenses.html</result>
 <result name="delete" type="redirect">licenses.html</result>
 <result name="input" type="redirect-action">
   editLicense.html
   true
   ${license.dkey}
 </result>
</action>
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_182297.ezm (zipped)
My guess, and it is just a guess, is that your bean is being
instantiated by the Struts2 container but it's not being injected anywhere.

Based on my almost-non-existent understanding of OGNL, the OgnlRuntime
contains a static synchronized map of Class->PropertyAccessor which you
can see being setup in OgnlRuntime.java

The static method OgnlRuntime.setPropertyAccessor(Class,
PropertyAccessor) looks like what you're after. A quick usage search
shows it's not used in Struts2 or XWrok anywhere so I think you'll have
to make a static call from you application to register your
PropertyAccessor instance yourself. That means you don't need to define
a struts2 bean at all (unless you want to access it though the container)

Personally, I think you're setting yourself up for a world of pain
creating a custom PropertyAccessor. I'd go the simplified bean & service
façade route so to ensure I'm not locked into any particular expression
language/library.

cheers,
Jeromy Evans

Tommy Becker wrote:
> I have a question about using OGNL PropertyAccessors. We have an
> object on the value stack that we expose to JSP pages that does not
> have standard JavaBeans getter/setter methods. From what I can tell,
> this leaves us 2 options. We can either call the getter methods
> explicitly via OGNL method calls in the pages, or we can wrap the
> object in a JavaBean-like object. The second option is unworkable in
> all but the simplest of cases when you realize that the method calls
> can themselves return another object that needs to be wrapped, or even
> a collection of them. So we've been using method calls in the pages
> (yeah I know).
>
> Reading through the OGNL docs, it seems that what we need is a
> PropertyAccessor that knows how to operate on our object. So we
> implemented one, and attempted to register it by placing this in our
> struts.xml:
>
> <bean type="ognl.PropertyAccessor" name="class.we.need.access.to"
> class="our.property.accessor.PropertyAccessor"/>
>
> Unfortunately it doesn't work. Can someone tell me what we're doing
> wrong, or even if what we're trying to do is possible? Thanks!
>
> <http://www.motricity.com>
>
>
> NOTICE: This e-mail message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged information
> of Motricity. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the intended recipient,
> please contact the sender by reply e-mail and destroy all copies of
> the original message.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
>


Attachment: user_182312.ezm (zipped)
Thanks a lot for the info, it worked. I saw a Struts bean definition
like that somewhere that led me to believe that that was how it was
done, but as you said, it appears that the accessor never actually gets
registered that way. As for the wisdom of doing this....in my view the
real pain is being stuck with the class we're using the PropertyAccessor
*for*, but unfortunately that's reality for now. Using the
PropertyAccessor just makes our pages much cleaner.
<http://www.motricity.com>

Regards,
Tommy Becker

Jeromy Evans wrote:
> My guess, and it is just a guess, is that your bean is being
> instantiated by the Struts2 container but it's not being injected
> anywhere.
>
> Based on my almost-non-existent understanding of OGNL, the OgnlRuntime
> contains a static synchronized map of Class->PropertyAccessor which
> you can see being setup in OgnlRuntime.java
>
> The static method OgnlRuntime.setPropertyAccessor(Class,
> PropertyAccessor) looks like what you're after. A quick usage search
> shows it's not used in Struts2 or XWrok anywhere so I think you'll
> have to make a static call from you application to register your
> PropertyAccessor instance yourself. That means you don't need to
> define a struts2 bean at all (unless you want to access it though the
> container)
>
> Personally, I think you're setting yourself up for a world of pain
> creating a custom PropertyAccessor. I'd go the simplified bean &
> service façade route so to ensure I'm not locked into any particular
> expression language/library.
>
> cheers,
> Jeromy Evans
>
> Tommy Becker wrote:
>> I have a question about using OGNL PropertyAccessors. We have an
>> object on the value stack that we expose to JSP pages that does not
>> have standard JavaBeans getter/setter methods. From what I can tell,
>> this leaves us 2 options. We can either call the getter methods
>> explicitly via OGNL method calls in the pages, or we can wrap the
>> object in a JavaBean-like object. The second option is unworkable in
>> all but the simplest of cases when you realize that the method calls
>> can themselves return another object that needs to be wrapped, or
>> even a collection of them. So we've been using method calls in the
>> pages (yeah I know).
>>
>> Reading through the OGNL docs, it seems that what we need is a
>> PropertyAccessor that knows how to operate on our object. So we
>> implemented one, and attempted to register it by placing this in our
>> struts.xml:
>>
>> <bean type="ognl.PropertyAccessor" name="class.we.need.access.to"
>> class="our.property.accessor.PropertyAccessor"/>
>>
>> Unfortunately it doesn't work. Can someone tell me what we're doing
>> wrong, or even if what we're trying to do is possible? Thanks!
>>
>> <http://www.motricity.com>
>>
>>
>> NOTICE: This e-mail message is for the sole use of the intended
>> recipient(s) and may contain confidential and privileged information
>> of Motricity. Any unauthorized review, use, disclosure or
>> distribution is prohibited. If you are not the intended recipient,
>> please contact the sender by reply e-mail and destroy all copies of
>> the original message.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>

NOTICE: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information of Motricity. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

Attachment: user_182298.ezm (zipped)
It appears that weblogic is trying to download a DTD while parsing some
XML. I would imagine there are probably a few solutions -
1. try to configure weblogic to not validate the xml
2. try to configure weblogic to use another xml parser

I am not a weblogic user though, so that's about as far as I can help
you.

-Wes

On Tue, 2008-02-05 at 17:09 +0530, Vigneswar Nagarathinam wrote:
> Hi All,
>      I'm trying to implement Struts2 with Weblogic 9.2. I'm getting the
> following error while running the Weblogic server. Can you please help me by
> providing a solution:
>
> stack trace:
> -------------------
> <Feb 5, 2008 3:51:35 PM GMT+05:30> <Error> <HTTP> <BEA-101165> <Could not
> load user defined filter in web.xml:
> org.apache.struts2.dispatcher.FilterDispatcher.
> Class: weblogic.net.http.HttpClient
> File: HttpClient.java
> Method: openServer
> Line: 320 - weblogic/net/http/HttpClient.java:320:-1
>      at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles
> (XmlConfigurationProvider.java:835)
>      at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments
> (XmlConfigurationProvider.java:131)
>      at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(
> XmlConfigurationProvider.java:100)
>      at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(
> DefaultConfiguration.java:130)
>      at
> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(
> ConfigurationManager.java:52)
>      Truncated. see log file for complete stacktrace
> Tried all: '1' addresses, but could not connect over HTTP to server: '
> struts.apache.org', port: '80' - Class: weblogic.net.http.HttpClient
> File: HttpClient.java
> Method: openServer
> Line: 320 - weblogic/net/http/HttpClient.java:320:-1
>      at com.opensymphony.xwork2.util.DomHelper.parse (DomHelper.java:123)
>      at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles
> (XmlConfigurationProvider.java:830)
>      at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments
> (XmlConfigurationProvider.java:131)
>      at
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(
> XmlConfigurationProvider.java:100)
>      at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(
> DefaultConfiguration.java:130)
>      Truncated. see log file for complete stacktrace
> java.net.ConnectException: Tried all: '1' addresses, but could not connect
> over HTTP to server: 'struts.apache.org', port: '80'
>      at weblogic.net.http.HttpClient.openServer(HttpClient.java:320)
>      at weblogic.net.http.HttpClient.openServer(HttpClient.java:375)
>      at weblogic.net.http.HttpClient.<init>(HttpClient.java:149)
>      at weblogic.net.http.HttpClient.New(HttpClient.java:245)
>      at weblogic.net.http.HttpURLConnection.connect(
> HttpURLConnection.java:160)
>      Truncated. see log file for complete stacktrace>
>
> Thanks in advance,
> Vigneswar Nagarathinam


Attachment: user_182305.ezm (zipped)

Randy,
here is my web.xml

<!DOCTYPE web-app
 PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
<display-name>Sample Project</display-name>
<description>Sample Project to Work with Struts2.</description>
<context-param>
  <param-name>webmaster</param-name>
  <param-value>myaddress@(protected)>
  <description>
   The EMAIL address of the administrator to whom questions
   and comments about this application should be addressed.
  </description>
</context-param>
<!-- Filter Mappings -->
<!-- Added for Struts 2 testing - Start -->
  <filter>
    <filter-name>action2</filter-name>
    <filter-class>
       org.apache.struts2.dispatcher.FilterDispatcher
    </filter-class>
  </filter>
  <filter-mapping>
    <filter-name>action2</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
<!-- Added for Struts 2 testing - End -->
<listener>
 <listener-class>
   org.springframework.web.context.ContextLoaderListener
 </listener-class>
</listener>  
<context-param>
 <param-name>contextConfigLocation</param-name>
 <param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
</web-app>

Thanks & Regards.
Vigneswar Nagarathinam


Randy Burgess-3 wrote:
>
> We need to see your web.xml. I'm running Struts 2 projects on WebLogic 9.2
> without any problems.
>
> Regards,
> Randy Burgess
> Sr. Web Applications Developer
> Nuvox Communications
>
>
>
>> From: Vigneswar Nagarathinam <vigneswardn@(protected)>
>> Reply-To: Struts Users Mailing List <user@(protected)>
>> Date: Tue, 5 Feb 2008 17:09:23 +0530
>> To: <user@(protected)>
>> Subject: Struts 2 and Weblogic 9.2 - java.net.ConnectException
>>
>> Hi All,
>>      I'm trying to implement Struts2 with Weblogic 9.2. I'm getting
>> the
>> following error while running the Weblogic server. Can you please help me
>> by
>> providing a solution:
>>
>> stack trace:
>> -------------------
>> <Feb 5, 2008 3:51:35 PM GMT+05:30> <Error> <HTTP> <BEA-101165> <Could not
>> load user defined filter in web.xml:
>> org.apache.struts2.dispatcher.FilterDispatcher.
>> Class: weblogic.net.http.HttpClient
>> File: HttpClient.java
>> Method: openServer
>> Line: 320 - weblogic/net/http/HttpClient.java:320:-1
>>      at
>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigur
>> ationFiles
>> (XmlConfigurationProvider.java:835)
>>      at
>>
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocument>
> s
>> (XmlConfigurationProvider.java:131)
>>      at
>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(
>> XmlConfigurationProvider.java:100)
>>      at
>> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(
>> DefaultConfiguration.java:130)
>>      at
>> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(
>> ConfigurationManager.java:52)
>>      Truncated. see log file for complete stacktrace
>> Tried all: '1' addresses, but could not connect over HTTP to server: '
>> struts.apache.org', port: '80' - Class: weblogic.net.http.HttpClient
>> File: HttpClient.java
>> Method: openServer
>> Line: 320 - weblogic/net/http/HttpClient.java:320:-1
>>      at
>> com.opensymphony.xwork2.util.DomHelper.parse (DomHelper.java:123)
>>      at
>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigur
>> ationFiles
>> (XmlConfigurationProvider.java:830)
>>      at
>>
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocument>
> s
>> (XmlConfigurationProvider.java:131)
>>      at
>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(
>> XmlConfigurationProvider.java:100)
>>      at
>> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(
>> DefaultConfiguration.java:130)
>>      Truncated. see log file for complete stacktrace
>> java.net.ConnectException: Tried all: '1' addresses, but could not
>> connect
>> over HTTP to server: 'struts.apache.org', port: '80'
>>      at weblogic.net.http.HttpClient.openServer(HttpClient.java:320)
>>      at weblogic.net.http.HttpClient.openServer(HttpClient.java:375)
>>      at weblogic.net.http.HttpClient.<init>(HttpClient.java:149)
>>      at weblogic.net.http.HttpClient.New(HttpClient.java:245)
>>      at weblogic.net.http.HttpURLConnection.connect(
>> HttpURLConnection.java:160)
>>      Truncated. see log file for complete stacktrace>
>>
>> Thanks in advance,
>> Vigneswar Nagarathinam
>
>
>
> This email and any attachments ("Message") may contain legally privileged
> and/or confidential information. If you are not the addressee, or if this
> Message has been addressed to you in error, you are not authorized to
> read, copy, or distribute it, and we ask that you please delete it
> (including all copies) and notify the sender by return email. Delivery of
> this Message to any person other than the intended recipient(s) shall not
> be deemed a waiver of confidentiality and/or a privilege.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

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


Attachment: user_182317.ezm (zipped)
I've rearranged your web.xml to the correct order below. Context params come
first, then listeners and then filters/filter mappings, servlets/servlet
mappings, etc.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: Vigneswar <vigneswardn@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Tue, 5 Feb 2008 21:15:38 -0800 (PST)
> To: <user@(protected)>
> Subject: Re: Struts 2 and Weblogic 9.2 - java.net.ConnectException
>
>
> Randy,
> here is my web.xml
>
> <!DOCTYPE web-app
> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd">
>
> <web-app>
>  <display-name>Sample Project</display-name>
>  <description>Sample Project to Work with Struts2.</description>
>  <context-param>
>   <param-name>webmaster</param-name>
>   <param-value>myaddress@(protected)>
>   <description>
>     The EMAIL address of the administrator to whom questions
>     and comments about this application should be addressed.
>   </description>
>  </context-param>

> <context-param>
> <param-name>contextConfigLocation</param-name>
> <param-value>/WEB-INF/applicationContext.xml</param-value>
> </context-param>

> <listener>
> <listener-class>
> org.springframework.web.context.ContextLoaderListener
> </listener-class>
> </listener>  

>  <!-- Filter Mappings -->
>  <!-- Added for Struts 2 testing - Start -->
>   <filter>
>      <filter-name>action2</filter-name>
>      <filter-class>
>         org.apache.struts2.dispatcher.FilterDispatcher
>      </filter-class>
>   </filter>
>   <filter-mapping>
>      <filter-name>action2</filter-name>
>      <url-pattern>/*</url-pattern>
>   </filter-mapping>
> <!-- Added for Struts 2 testing - End -->

> </web-app>
>
> Thanks & Regards.
> Vigneswar Nagarathinam
>
>
> Randy Burgess-3 wrote:
>>
>> We need to see your web.xml. I'm running Struts 2 projects on WebLogic 9.2
>> without any problems.
>>
>> Regards,
>> Randy Burgess
>> Sr. Web Applications Developer
>> Nuvox Communications
>>
>>
>>
>>> From: Vigneswar Nagarathinam <vigneswardn@(protected)>
>>> Reply-To: Struts Users Mailing List <user@(protected)>
>>> Date: Tue, 5 Feb 2008 17:09:23 +0530
>>> To: <user@(protected)>
>>> Subject: Struts 2 and Weblogic 9.2 - java.net.ConnectException
>>>
>>> Hi All,
>>>      I'm trying to implement Struts2 with Weblogic 9.2. I'm getting
>>> the
>>> following error while running the Weblogic server. Can you please help me
>>> by
>>> providing a solution:
>>>
>>> stack trace:
>>> -------------------
>>> <Feb 5, 2008 3:51:35 PM GMT+05:30> <Error> <HTTP> <BEA-101165> <Could not
>>> load user defined filter in web.xml:
>>> org.apache.struts2.dispatcher.FilterDispatcher.
>>> Class: weblogic.net.http.HttpClient
>>> File: HttpClient.java
>>> Method: openServer
>>> Line: 320 - weblogic/net/http/HttpClient.java:320:-1
>>>      at
>>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfig
>>> ur
>>> ationFiles
>>> (XmlConfigurationProvider.java:835)
>>>      at
>>>
>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocumen
>> t>
>> s
>>> (XmlConfigurationProvider.java:131)
>>>      at
>>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(
>>> XmlConfigurationProvider.java:100)
>>>      at
>>> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(
>>> DefaultConfiguration.java:130)
>>>      at
>>> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(
>>> ConfigurationManager.java:52)
>>>      Truncated. see log file for complete stacktrace
>>> Tried all: '1' addresses, but could not connect over HTTP to server: '
>>> struts.apache.org', port: '80' - Class: weblogic.net.http.HttpClient
>>> File: HttpClient.java
>>> Method: openServer
>>> Line: 320 - weblogic/net/http/HttpClient.java:320:-1
>>>      at
>>> com.opensymphony.xwork2.util.DomHelper.parse (DomHelper.java:123)
>>>      at
>>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfig
>>> ur
>>> ationFiles
>>> (XmlConfigurationProvider.java:830)
>>>      at
>>>
>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocumen
>> t>
>> s
>>> (XmlConfigurationProvider.java:131)
>>>      at
>>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(
>>> XmlConfigurationProvider.java:100)
>>>      at
>>> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(
>>> DefaultConfiguration.java:130)
>>>      Truncated. see log file for complete stacktrace
>>> java.net.ConnectException: Tried all: '1' addresses, but could not
>>> connect
>>> over HTTP to server: 'struts.apache.org', port: '80'
>>>      at weblogic.net.http.HttpClient.openServer(HttpClient.java:320)
>>>      at weblogic.net.http.HttpClient.openServer(HttpClient.java:375)
>>>      at weblogic.net.http.HttpClient.<init>(HttpClient.java:149)
>>>      at weblogic.net.http.HttpClient.New(HttpClient.java:245)
>>>      at weblogic.net.http.HttpURLConnection.connect(
>>> HttpURLConnection.java:160)
>>>      Truncated. see log file for complete stacktrace>
>>>
>>> Thanks in advance,
>>> Vigneswar Nagarathinam
>>
>>
>>
>> This email and any attachments ("Message") may contain legally privileged
>> and/or confidential information. If you are not the addressee, or if this
>> Message has been addressed to you in error, you are not authorized to
>> read, copy, or distribute it, and we ask that you please delete it
>> (including all copies) and notify the sender by return email. Delivery of
>> this Message to any person other than the intended recipient(s) shall not
>> be deemed a waiver of confidentiality and/or a privilege.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Struts-2-and-Weblogic-9.2---java.net.ConnectException-tp
> 15288395p15305654.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>



This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

Attachment: user_182319.ezm (zipped)
I just noticed another thing, you are using the 2.3 DTD, I'm using the 2.4
XSD.

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

I would use the 2.4 XSD.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: Vigneswar <vigneswardn@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Tue, 5 Feb 2008 21:15:38 -0800 (PST)
> To: <user@(protected)>
> Subject: Re: Struts 2 and Weblogic 9.2 - java.net.ConnectException
>
>
> Randy,
> here is my web.xml
>
> <!DOCTYPE web-app
> PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd">
>
> <web-app>
>  <display-name>Sample Project</display-name>
>  <description>Sample Project to Work with Struts2.</description>
>  <context-param>
>   <param-name>webmaster</param-name>
>   <param-value>myaddress@(protected)>
>   <description>
>     The EMAIL address of the administrator to whom questions
>     and comments about this application should be addressed.
>   </description>
>  </context-param>
>  <!-- Filter Mappings -->
>  <!-- Added for Struts 2 testing - Start -->
>   <filter>
>      <filter-name>action2</filter-name>
>      <filter-class>
>         org.apache.struts2.dispatcher.FilterDispatcher
>      </filter-class>
>   </filter>
>   <filter-mapping>
>      <filter-name>action2</filter-name>
>      <url-pattern>/*</url-pattern>
>   </filter-mapping>
> <!-- Added for Struts 2 testing - End -->
> <listener>
> <listener-class>
> org.springframework.web.context.ContextLoaderListener
> </listener-class>
> </listener>
> <context-param>
> <param-name>contextConfigLocation</param-name>
> <param-value>/WEB-INF/applicationContext.xml</param-value>
> </context-param>
> </web-app>
>
> Thanks & Regards.
> Vigneswar Nagarathinam
>
>
> Randy Burgess-3 wrote:
>>
>> We need to see your web.xml. I'm running Struts 2 projects on WebLogic 9.2
>> without any problems.
>>
>> Regards,
>> Randy Burgess
>> Sr. Web Applications Developer
>> Nuvox Communications
>>
>>
>>
>>> From: Vigneswar Nagarathinam <vigneswardn@(protected)>
>>> Reply-To: Struts Users Mailing List <user@(protected)>
>>> Date: Tue, 5 Feb 2008 17:09:23 +0530
>>> To: <user@(protected)>
>>> Subject: Struts 2 and Weblogic 9.2 - java.net.ConnectException
>>>
>>> Hi All,
>>>      I'm trying to implement Struts2 with Weblogic 9.2. I'm getting
>>> the
>>> following error while running the Weblogic server. Can you please help me
>>> by
>>> providing a solution:
>>>
>>> stack trace:
>>> -------------------
>>> <Feb 5, 2008 3:51:35 PM GMT+05:30> <Error> <HTTP> <BEA-101165> <Could not
>>> load user defined filter in web.xml:
>>> org.apache.struts2.dispatcher.FilterDispatcher.
>>> Class: weblogic.net.http.HttpClient
>>> File: HttpClient.java
>>> Method: openServer
>>> Line: 320 - weblogic/net/http/HttpClient.java:320:-1
>>>      at
>>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfig
>>> ur
>>> ationFiles
>>> (XmlConfigurationProvider.java:835)
>>>      at
>>>
>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocumen
>> t>
>> s
>>> (XmlConfigurationProvider.java:131)
>>>      at
>>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(
>>> XmlConfigurationProvider.java:100)
>>>      at
>>> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(
>>> DefaultConfiguration.java:130)
>>>      at
>>> com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(
>>> ConfigurationManager.java:52)
>>>      Truncated. see log file for complete stacktrace
>>> Tried all: '1' addresses, but could not connect over HTTP to server: '
>>> struts.apache.org', port: '80' - Class: weblogic.net.http.HttpClient
>>> File: HttpClient.java
>>> Method: openServer
>>> Line: 320 - weblogic/net/http/HttpClient.java:320:-1
>>>      at
>>> com.opensymphony.xwork2.util.DomHelper.parse (DomHelper.java:123)
>>>      at
>>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfig
>>> ur
>>> ationFiles
>>> (XmlConfigurationProvider.java:830)
>>>      at
>>>
>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocumen
>> t>
>> s
>>> (XmlConfigurationProvider.java:131)
>>>      at
>>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(
>>> XmlConfigurationProvider.java:100)
>>>      at
>>> com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(
>>> DefaultConfiguration.java:130)
>>>      Truncated. see log file for complete stacktrace
>>> java.net.ConnectException: Tried all: '1' addresses, but could not
>>> connect
>>> over HTTP to server: 'struts.apache.org', port: '80'
>>>      at weblogic.net.http.HttpClient.openServer(HttpClient.java:320)
>>>      at weblogic.net.http.HttpClient.openServer(HttpClient.java:375)
>>>      at weblogic.net.http.HttpClient.<init>(HttpClient.java:149)
>>>      at weblogic.net.http.HttpClient.New(HttpClient.java:245)
>>>      at weblogic.net.http.HttpURLConnection.connect(
>>> HttpURLConnection.java:160)
>>>      Truncated. see log file for complete stacktrace>
>>>
>>> Thanks in advance,
>>> Vigneswar Nagarathinam
>>
>>
>>
>> This email and any attachments ("Message") may contain legally privileged
>> and/or confidential information. If you are not the addressee, or if this
>> Message has been addressed to you in error, you are not authorized to
>> read, copy, or distribute it, and we ask that you please delete it
>> (including all copies) and notify the sender by return email. Delivery of
>> this Message to any person other than the intended recipient(s) shall not
>> be deemed a waiver of confidentiality and/or a privilege.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Struts-2-and-Weblogic-9.2---java.net.ConnectException-tp
> 15288395p15305654.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>



This email and any attachments ("Message") may contain legally privileged and/or confidential information. If you are not the addressee, or if this Message has been addressed to you in error, you are not authorized to read, copy, or distribute it, and we ask that you please delete it (including all copies) and notify the sender by return email. Delivery of this Message to any person other than the intended recipient(s) shall not be deemed a waiver of confidentiality and/or a privilege.

Attachment: user_182299.ezm (zipped)
Hello,
I am new to Struts and going through the Struts 2 tutorial found at http://struts.apache.org/2.0.11/docs/using-tags.html

I am having a problem with the Wildcard Mapping section, where it specifies to use the following entry in struts.xml:
<action name="*" >
<result>/tutorial/{1}.jsp</result>
</action>
If I use this action definition and go to http://localhost:8080/tutorial/Logon.action, Tomcat attempts to redirect to /tutorial/tutorial/Logon.jsp, which obviously fails because /tutorial is referenced twice. If I remove the /tutorial part from the definition, then it works fine.

Please let me know if this tutorial is erroneous in this aspect or if I'm doing something wrong. Thanks in advance.

rostom



   ____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs

Attachment: user_182309.ezm (zipped)
"tutorial" is most likely the context of your web application, so it
will always be a part of the URL to the resources in your app. All
jsps you reference in the configuration, starting with a '/' will
point to the root of the context for your application. So the
behaviour you see is expected.

Nils-H

On Feb 6, 2008 1:51 AM, Rostom Aghanian <rostom_a@(protected):
> Hello,
> I am new to Struts and going through the Struts 2 tutorial found at http://struts.apache.org/2.0.11/docs/using-tags.html
>
> I am having a problem with the Wildcard Mapping section, where it specifies to use the following entry in struts.xml:
> <action name="*" >
>  <result>/tutorial/{1}.jsp</result>
> </action>
> If I use this action definition and go to http://localhost:8080/tutorial/Logon.action, Tomcat attempts to redirect to /tutorial/tutorial/Logon.jsp, which obviously fails because /tutorial is referenced twice. If I remove the /tutorial part from the definition, then it works fine.
>
> Please let me know if this tutorial is erroneous in this aspect or if I'm doing something wrong. Thanks in advance.
>
> rostom
>
>
>
>     ____________________________________________________________________________________
> Never miss a thing. Make Yahoo your home page.
> http://www.yahoo.com/r/hs
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_182301.ezm (zipped)
Hi, I want to user to preview s:textarea value before sending to db.
but when I am displaying <s:textarea> value using <s:property> it is not
formatting it correctly and wrapping it.
Is there anyone who faced this problem? Is this correct way to display Text
Area value?

<s:textarea name="articleDesc" cols="58" rows="10" />

<s:property value="article.articleDesc"/>

Thanks in advance..

Attachment: user_182302.ezm (zipped)
--- Raghuveer Rawat <techhelp07@(protected):
> Hi, I want to user to preview s:textarea value before sending to db.
> but when I am displaying <s:textarea> value using <s:property> it is not
> formatting it correctly and wrapping it.
> <s:textarea name="articleDesc" cols="58" rows="10" />
>
> <s:property value="article.articleDesc"/>

I'm not sure what you mean by the <s:property.../> tag isn't formatting the
value correctly etc.

You won't be able to use <s:property.../> to display a value before you've
filled its property in the action. Above you're using two different
properties, one in the <s:textarea.../> and one in the <s:property.../>.

Do you mean you want to submit the form, then show the information on a new
page, and submit the information to the DB from the second page?

If so, you need to understand that <s:property.../> is just going to display
the text as HTML. In other words if there are carriage returns, lots of
spaces, tabs, etc. the browser will not display them in the same way an HTML
<textarea...> would.

If you want to preserve the formatting from a <textarea...> tag you'll need
to wrap it in an HTML <pre> tag or something similar.

Dave



Attachment: user_182304.ezm (zipped)
Thanks Dave, i am sorry, I didn't explain it properly.
Yes, you understood it correctly. I am submitting form and then displaying
form values in new page.
<pre> is working for me.
Thanks once again.

On Feb 5, 2008 10:08 PM, Dave Newton <newton.dave@(protected):

> --- Raghuveer Rawat <techhelp07@(protected):
> > Hi, I want to user to preview s:textarea value before sending to db.
> > but when I am displaying <s:textarea> value using <s:property> it is not
> > formatting it correctly and wrapping it.
> > <s:textarea name="articleDesc" cols="58" rows="10" />
> >
> > <s:property value="article.articleDesc"/>
>
> I'm not sure what you mean by the <s:property.../> tag isn't formatting
> the
> value correctly etc.
>
> You won't be able to use <s:property.../> to display a value before you've
> filled its property in the action. Above you're using two different
> properties, one in the <s:textarea.../> and one in the <s:property.../>.
>
> Do you mean you want to submit the form, then show the information on a
> new
> page, and submit the information to the DB from the second page?
>
> If so, you need to understand that <s:property.../> is just going to
> display
> the text as HTML. In other words if there are carriage returns, lots of
> spaces, tabs, etc. the browser will not display them in the same way an
> HTML
> <textarea...> would.
>
> If you want to preserve the formatting from a <textarea...> tag you'll
> need
> to wrap it in an HTML <pre> tag or something similar.
>
> Dave
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_182303.ezm (zipped)
Loading an Entity in the prepare method is a common use-case.
If you're allowing an Entity to be updated directly from the JSP you'll
probably need the prepare-params-prepare
(set params including entity's ID, params loads the existing entity,
prepare sets the params on the entity instance)

I prefer not to do that because you're dirtying an Entity and
consequently need to rollback the entire transaction in the case of a
validation error or exception.
ie. you dirty the Entity before S2 validation so it will be committed
when the EntityManager/Session commits.

It is however a productive way to work if you can control that as you
don't need to double-handle anything (ie. write to a bean, validate,
update entities(s) behind a service layer). I prefer this more-effort
approach except in the simplest of cases.

GF wrote:
> I want to edit an entity, i.e. a Message
> i would set the .jsp field this way
>
> <s:textfield name="message.title" />
>
> on the MessageAction i would have a "edit" method that takes the
> messageID and then call the business service to load the Message
> object, so in the .jsp the file the textfield are loaded with the
> current value.
> when I submit the form, Struts2 will try to call
> getMessage.setTitle("...") and so on, and it try to instatiate a new
> Message object.
> My idea is to create the object (loading it from hibernate calls on
> the business service) in the prepare method, in this way when struts
> will call getMessage.setTitle, it will set the new values on the
> object loaded from the DB.
> My worry is that this idea rely on the fact that the prepare
> interceptor is called before the parameters interceptor.
> What you think?
> any better idea?
>
> thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
>
>  


Attachment: user_182306.ezm (zipped)
hi
i need a WYSIWYG editor , ya ineed to use in my application



On Feb 5, 2008 6:36 PM, Antonio Petrelli <antonio.petrelli@(protected):

> 2008/2/5, mohammed hussain <muzaffar.struts@(protected)>:
> > Hi anybody knowing the best tools to develop to html page,pls let me
> know
> > thanx
>
> Now seriously, Mohammed, your question is too generic.
> Do you need a WYSIWYG editor? Do you need to use it in your
> application (i.e. using a Javascript editor)?
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_182307.ezm (zipped)
Hi Mohammed, it really depends on whether you're working with html/php,
or jsp/asp/etc, and whether you're a developer or a designer.
As far as I know the most popular commercial product is still
Dreamweaver. I think coders tend to prefer their favourite IDE because
context-sensitivity and refactoring is more important than than
drag-and-drop when working with JSP or ASP.

mohammed hussain wrote:
> hi
> i need a WYSIWYG editor , ya ineed to use in my application
>
>
>
> On Feb 5, 2008 6:36 PM, Antonio Petrelli <antonio.petrelli@(protected):
>
>  
>> 2008/2/5, mohammed hussain <muzaffar.struts@(protected)>:
>>  
>>> Hi anybody knowing the best tools to develop to html page,pls let me
>>>    
>> know
>>  
>>> thanx
>>>    
>> Now seriously, Mohammed, your question is too generic.
>> Do you need a WYSIWYG editor? Do you need to use it in your
>> application (i.e. using a Javascript editor)?
>>
>> Antonio
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>  
>
>  
> ------------------------------------------------------------------------
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.516 / Virus Database: 269.19.20/1261 - Release Date: 5/02/2008 8:57 PM
>  


Attachment: user_182308.ezm (zipped)
kind of OT but i'm one of those developers who tries to stick with the
currently used IDE for html pages. I am using NB 6.0 these days and
support for html really blows. I work with a lot of legacy code so
html pages are using some deprecated tags. NB acts extremely slow
because it is too busy trying to determine the deprecated tags. Dont
think there is a way to turn off this feature either..

On Feb 6, 2008 1:36 AM, Jeromy Evans <jeromy.evans@(protected):
> Hi Mohammed, it really depends on whether you're working with html/php,
> or jsp/asp/etc, and whether you're a developer or a designer.
> As far as I know the most popular commercial product is still
> Dreamweaver. I think coders tend to prefer their favourite IDE because
> context-sensitivity and refactoring is more important than than
> drag-and-drop when working with JSP or ASP.
>
>
> mohammed hussain wrote:
> > hi
> > i need a WYSIWYG editor , ya ineed to use in my application
> >
> >
> >
> > On Feb 5, 2008 6:36 PM, Antonio Petrelli <antonio.petrelli@(protected):
> >
> >
> >> 2008/2/5, mohammed hussain <muzaffar.struts@(protected)>:
> >>
> >>> Hi anybody knowing the best tools to develop to html page,pls let me
> >>>
> >> know
> >>
> >>> thanx
> >>>
> >> Now seriously, Mohammed, your question is too generic.
> >> Do you need a WYSIWYG editor? Do you need to use it in your
> >> application (i.e. using a Javascript editor)?
> >>
> >> Antonio
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> For additional commands, e-mail: user-help@(protected)
> >>
> >>
> >>
> >
> >
> > ------------------------------------------------------------------------
> >
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.5.516 / Virus Database: 269.19.20/1261 - Release Date: 5/02/2008 8:57 PM
>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_182310.ezm (zipped)
hi Randy,

You're right! many thanks!

Best regards,
Giovanni

Randy Burgess wrote:
> All you should need is a getter in your action for simulationKey and then
>
>  
>> <display:table name="statistics" id="statistics" defaultorder="descending"
>>  requestURI="/SimulationReport.action?simulationKey=${simulationKey}"
>>  
>
>
> Regards,
> Randy Burgess
> Sr. Web Applications Developer
> Nuvox Communications
>  


Attachment: user_182311.ezm (zipped)

Hello!
I have to validate a composed object in my action, this is my action:


public class UserAction extends ActionSupport{

private User usr;

public User getUser() {return usr;}
public void setUser(User usr) {this.usr = usr;}

}




and this is User class:

public class User{

 private String usrId;
 
 public String getUsrId(){
    return usrId;
}

 public void setUsrId(String usrId){
    this.usrId = usrId;
 }


}


How can I validate usrId property with annotations or xml
without putting annotations inside User class?

Any help would be appreciate!

Thanks in advance,
Riccardo
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_182316.ezm (zipped)
Hi,

I have a <s:select> tag which behaves different in IE 6.0 and firefox. In
Firefox the underlying property in my struts action is filled in IE not.

This is my code?

<s:form id="searchAdvisorIdsForm" action="searchAdvisorIds" method="post" >

.....

<s:select name="branchSearch"
      headerKey=""
      headerValue="-- Bitte wählen --"
      list="branchNameList"
      cssClass="medium"
   />

....

  <s:submit theme="ajax" targets="organizersearch" key="button.search"
value="Suchen" cssClass="pushbutton" />

....

</s:form>

I have no idea why it works in Firefox and not in IE. Because there is no
JavaScript involved (or am I wrong).

Best regards.

Marc

Attachment: user_182318.ezm (zipped)

I only seem to get my values of my form when i repost.

CODE

<%@(protected)" %>
<html>
<head>
<title>File Upload Example</title>
<link href="<s:url value="/css/main.css"/>" rel="stylesheet"
type="text/css"/>

</head>

<body>

<s:actionerror />
<s:fielderror />
<s:form action="doUpload" method="POST" enctype="multipart/form-data">
<tr>
<td colspan="2"><h1>File Upload Example</h1></td>
</tr>

<s:textfield name="title" label="Title" id="title"/>
<s:submit />
</s:form>
</body>
</html>


<s:property value="title" /></td>


 <package name="example" extends="struts-default">


   

   <action name="showUpload" method="input">
     <result>pages/upload.jsp</result>
   
   </action>

   <action name="doUpload"
     class="Upload" >
     <result name="input">showUpload</result>
<result>pages/upload-success.jsp</result>
   </action>
 </package>


I get nothing, until I refresh my page, and then it fills my values.

Thx in advance!

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


Attachment: user_182320.ezm (zipped)

I'm losing the quest-input.jsp form attributes. Probably 3 out of 4 times.
Session ID remains the same throughout the process. Here is part of my
applicationContext.xml

<bean id="myInterceptor" scope="singleton"
class="com.helpme.struts.interceptors.billing.MyInterceptor"/>

I'm not quite sure what you mean by needing to configure in session
attributes.


mgainty wrote:
>
> you'll definitely need configure in session attributes as in
>     <interceptor name="sessionAutowiring"
>
> class="org.apache.struts2.spring.interceptor.SessionContextAutowiringInterce
> ptor"/>
>
> which session attributes are you losing?
> M--
>

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


Attachment: user_182321.ezm (zipped)


Laurie Harper wrote:
>
>
> Are you sure? Have you confirmed that the session is the same in both
> requests?
>

Yes, by checking the session id throughout the process.


Laurie Harper wrote:
>
>
> getSession(true) will create a session if one doesn't exist on the
> request. If the session got lost somehow, this will mask that fault. You
> might want to use getSession(false) and add a guard to ensure the
> session is really there.
>
>

I've tried this with no luck.


Laurie Harper wrote:
>
>>
>>         // save input form attributes to session
>>         session.setAttribute("PARMS", request.getParameterMap());
>
> Assuming the session really is the same, I'm guessing this is the
> problem. You're saving a reference to a map owned by the current
> request. There's no guarantee the underlying HttpServletRequest instance
> wont have been reused by the time you try to access the map.
>
> Try making a copy of the request parameter map and storing that instead.
>
>


Made copy but didn't solve the problem.

Map parameterMap - request.getParameterMap();
session.setAttribute("PARMS", parameterMap);



Laurie Harper wrote:
>
> Also, you don't show any code that's removing the data you placed in the
> session. Do you have clean-up code you didn't show and, if so, could it
> be getting called out of sequence?
>

I haven't implemented it yet.

Anymore thoughts would be very helpful!

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


Attachment: user_182324.ezm (zipped)

In case I wasn't clear... the attribute "PARMS" exists but loses it value.
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_182325.ezm (zipped)
Is the value in the session null or an empty map? If it is an empty
map, the reason might be that when you set the value in the session
between requests, the request doesn't have any parameters, setting the
value to an empty map.

musachy

On Feb 6, 2008 11:55 AM, daveck <deck@(protected):
>
> In case I wasn't clear... the attribute "PARMS" exists but loses it value.
> --
> View this message in context: http://www.nabble.com/Losing-Session-Attributes-tp15298791p15307254.html
>
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>



--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment: user_182322.ezm (zipped)

+1 here.

Highly looking forward to using this over current Dojo plugin.
Any progress being made?

Matt



nuwan chandrasoma-2 wrote:
>
> i would like to see one :)
>
> emartin24 wrote:
>> Ted Husted wrote:
>>  
>>> On Nov 20, 2007 1:53 PM, <name withheld> wrote:
>>>  
>>>> I've been working with Struts 2 for a few months and have some
>>>> questions
>>>> that I was hoping you would be interested in discussing with me.
>>>>
>>>> I see that Struts 2 uses Dojo for it's Ajax capabilities. I prefer
>>>> jQuery
>>>> and have contemplated
>>>> making a jQuery plugin for Struts 2, to use instead of Dojo. I'd also
>>>> like to utilize JSON as
>>>> the interchange for my Ajax transactions.
>>>>
>>>> I checked out your presentation about the YUI plugin...which is why I'm
>>>> sending this
>>>> question to you. What all is required to create a plugin? Do you think
>>>> it
>>>> is worth the time and
>>>> effort to create a jQuery plugin? Or, do you think that I'd be better
>>>> off just using the Dojo for
>>>> the core stuff and then using jQuery on top of that?
>>>>
>>>> I'm just trying to get a feel for what all is involved and if it would
>>>> be
>>>> something useful. I know
>>>> you are a very busy person and I appreciate any input you'd be willing
>>>> to
>>>> give.
>>>>
>>>> Regards,
>>>>    
>>> The Ajax plugin approach is useful when someone wants to keep Ajax at
>>> arms-length and let a magical taglib handle the JavaScript vodoo. But,
>>> a plugin is NOT required to use Ajax with Struts 2!
>>>
>>> Struts 2 works just fine with plain Ajax library out-of-the-box. We
>>> updated the Ajax page recently to help make this point more clear.
>>>
>>> * http://struts.apache.org/2.x/docs/ajax.html
>>>
>>> The bottom line is that if you're savvy enough to even have a Ajax
>>> preference, then you probably want to just use JQuery and Struts
>>> without the "training wheels".
>>>
>>> -Ted.
>>>
>>>  
>>
>> Thanks Ted.
>>
>> Anyone else out there interested in a jQuery plugin? =) If so, I'd love
>> to
>> hear from you!
>>
>>  
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

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


Attachment: user_182323.ezm (zipped)
--- "matt.payne" <matthew.b.payne@(protected):
> +1 here.
>
> Highly looking forward to using this over current Dojo plugin.
> Any progress being made?

Not really; I'm completely overwhelmed by my TODO list at the moment.

It's over at GoogleCode and I'm happy to bring people on board. There's a
working example of <sq:a.../> which will update a <div...>.

http://code.google.com/p/s2jquery

We ended up writing the bulk of our JavaScript by hand, so my input kinda
petered out. I'm scheduling it for a minimum of four hrs/week moving forward,
so probably a bit more will be done, including a small pamphlet documenting
the process.

If there are specific tags you'd like to see or specific functionality file
improvements etc. and I'll try to prioritize them as best as I can, with the
caveat that if I'm the only one working on it the priorities will look...
very suspiciously like mine.

Dave


©2008 gg3721.com - Jax Systems, LLC, U.S.A.