Author Login
Post Reply
user Digest 8 Feb 2008 23:13:44 -0000 Issue 7854
Topics (messages 182380 through 182397):
Re: open new window using Struts action
182380 by: Frank W. Zammetti
Re: Is Multiple Forms(s:form) in one Jsp possible?
182381 by: Jeromy Evans
Trouble configuring spring plugin
182382 by: Toni Lyytikäinen
using disabled attributes in <s:submit> tag
182383 by: Johnson nickel
182386 by: Okan Özeren
Re: Struts 2 and Weblogic 9.2 -
java.net.ConnectException 182384 by: Vigneswar
182385 by: Vigneswar
182387 by: Dave Newton
182388 by: Randy Burgess
Re: File upload issues when maxFileSize is exceeded.
182389 by: James Sanders
182391 by: Laurie Harper
182395 by: James Sanders
setTableList(List<String> tableList) not working?
182390 by: swaddee
What cd be wrong?
182392 by: Sam Karl
Re: html:hidden as a collection not String
182393 by: Laurie Harper
Re: Struts 2 Spring sitemesh hangs on tomcat 6 and jboss
182394 by: Emil.I
Struts 2 Validation issue
182396 by: dfaulcon
j4 and retrotranslator
182397 by: Brian Relph
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_182380.ezm (zipped)http://wiki.apache.org/struts/OpenWindowFromAction
--
Frank W. Zammetti
Author of "Practical Ajax Projects With Java Technology"
(2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
(2007, Apress, ISBN 1-59059-816-4)
and "Practical DWR 2 Projects"
(2008, Apress, ISBN 1-59059-941-1)
Java Web Parts - http://javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!
jeppy wrote:
> Hi I'm using Struts 1.2.9,
>
> what i want is,
> if it's failed on validation then the error message display on the same
> page, but if the validation success then I want the result display in new
> window.
>
> Question:
> how can I trigger open new window using Struts (I don't want to open new
> window using form target or windows open).
>
>
> can anyone help me? thanks
>
> Regards,
> jeppy

Attachment:
user_182381.ezm (zipped)Dave Newton wrote:
> --- Jeromy Evans <jeromy.evans@(protected):
>
>> The commenting effect is something one of the browsers does when viewing
>> invalid html (forget which browser). It comments out the html for nodes
>> that were impossible to include in the DOM. I've seen it when forms are
>> accidentally nested as the OP must have done.
>>
>
> Oh, interesting; I've never seen that.
>
> This, of course, leads to the obvious conclusion that my HTML is always
> perfect.
>
> On a related note, watch for my auction of my bridge on e-bay Real Soon Now
> (tm).
>
> Dave
>
lol :-)

Attachment:
user_182382.ezm (zipped)Hi,
I recently started converting an older project to Struts 2.0.11 and maven.
The project uses spring plugin for injecting certain dependencies into the
actions. The problem is, that I would like to use the constructor
autowiring, as described in the configuration file (struts.properties):
### specifies the autoWiring logic when using the SpringObjectFactory.
### valid values are: name, type, auto, and constructor (name is the default)
struts.objectFactory.spring.autoWire = constructor
However, this results in an exception when instantiating the Struts actions:
javax.servlet.ServletException: Unable to instantiate Action,
net.x.y.web.Login, defined for 'Login' in namespace '/'Just constants
AUTOWIRE_BY_NAME and AUTOWIRE_BY_TYPE allowed - action -
file:/**/WEB-INF/classes/struts-base.xml:20:68
If I change the autoWire setting to type, I get an
javax.servlet.ServletException: Unable to intantiate Action!
type exception, because the action has constructor arguments that really
need to be injected there somehow.
Am I missing some dependency, or have the spring folks dropped support for
the auto and constructor settings while I was away?

Attachment:
user_182383.ezm (zipped)
Hi all,
How to use enable and disable attributes in <s:submit
value="save" method="save" name="savebutton" disabled="true"> but it's not
working.
what wrong with this, i tried onclick event using html drop down
<select name="user_id" size="9" STYLE="width:-300px" align="left"
onclick="javascript:enable();"> .
// Javascript function
function enable()
{
formname.savebutton.disabled="true"
}
Give me a suggestion for this problem.
Regards,
Johnson
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_182386.ezm (zipped)Hi,
This is a bug for old version of strust 2, but fixed on 2.0.8 version.
You should create a solution with javascript. Presumably your js function is
wrong.
Probably your tag name is wrong. You should look its source code on browser
for tags real name.
Okan.
On Feb 8, 2008 3:32 PM, Johnson nickel <saravanan@(protected):
>
> Hi all,
>
> How to use enable and disable attributes in <s:submit
> value="save" method="save" name="savebutton" disabled="true"> but it's not
> working.
>
> what wrong with this, i tried onclick event using html drop down
> <select name="user_id" size="9" STYLE="width:-300px" align="left"
> onclick="javascript:enable();"> .
>
> // Javascript function
>
> function enable()
> {
> formname.savebutton.disabled="true"
> }
>
> Give me a suggestion for this problem.
>
> Regards,
> Johnson
> --
> View this message in context:
> http://www.nabble.com/using-disabled-attributes-in-%3Cs%3Asubmit%3E-tag-tp15355261p15355261.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_182384.ezm (zipped)Hey Randy,
It is not a problem with the web-app. There is a firewall block
in my proxy server. So, I couldn't connect outside my network.
At the same time, it looks crazy as it works for Struts 1.1 DTD.
As a temporary fix, I have provided my local machine path for
the DTD. I'm not facing the ConnectException now.
My whole idea is migration from Struts 1.1 to Struts 2.0.11. The
configuration setup is over.
When the application is loaded, it shows the old( struts 1.1) flows properly
but the new Struts2.0.11 flows take me to "404" page.
To add some more valuye to my question :
I have struts-config.xml as well as struts.xml under the WEB-INF folder.
Also, the web.xml is holding the normal configuration details for both.
In old JSP, I'm providing action="/HelloWorld" in the html:link tag but when
I click the link it shows "404" page.
Kindly, let me know if there is a problem in any of my
configuration/setup
Thanks
Vigneswar Nagarathinam
Randy Burgess-3 wrote:
>
> 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.
>
> ---------------------------------------------------------------------
> 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_182385.ezm (zipped)Hey Randy,
It is not a problem with the web-app. There is a firewall block
in my proxy server. So, I couldn't connect outside my network.
At the same time, it looks crazy as it works for Struts 1.1 DTD.
As a temporary fix, I have provided my local machine path for
the DTD. I'm not facing the ConnectException now.
My whole idea is migration from Struts 1.1 to Struts 2.0.11. The
configuration setup is over.
When the application is loaded, it shows the old( struts 1.1) flows properly
but the new Struts2.0.11 flows take me to "404" page.
To add some more valuye to my question :
I have struts-config.xml as well as struts.xml under the WEB-INF folder.
Also, the web.xml is holding the normal configuration details for both.
In old JSP, I'm providing action="/HelloWorld" in the html:link tag but when
I click the link it shows "404" page.
Kindly, let me know if there is a problem in any of my
configuration/setup
Regards,
Vigneswar Nagarathinam
Randy Burgess-3 wrote:
>
> 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.
>
> ---------------------------------------------------------------------
> 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_182387.ezm (zipped)--- Vigneswar <vigneswardn@(protected):
> I have struts-config.xml as well as struts.xml under the WEB-INF folder.
The S2 configuration files need to be on the classpath, normally
/WEB-INF/classes.
> In old JSP, I'm providing action="/HelloWorld" in the html:link tag but
> when I click the link it shows "404" page.
A link to an S2 action? I don't really know how the Struts 1 plugin works (or
if you're using it) but I'm not sure that the S1 tags would know how to build
a URL for an S2 action. It (the tag) would need to know the configured S2
extension and IIRC the S1 tags would look up the action to make sure it was
configured.
You may need to create the URLs to S2 actions manually in your S1 pages.
Dave

Attachment:
user_182388.ezm (zipped)From the Struts 1 plugin page:
The Struts 1 plugin is currently only intended to allow you to run Strust 1
actions inside a Struts 2 application. It DOES NOT allow you to continue to
use the Struts 1 tag libraries in your JSPs. Your JSPs must be converted to
use the Struts 2 tag library.
Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications
> From: Dave Newton <newton.dave@(protected)>
> Reply-To: Struts Users Mailing List <user@(protected)>
> Date: Fri, 8 Feb 2008 06:17:42 -0800 (PST)
> To: Struts Users Mailing List <user@(protected)>
> Subject: Re: Struts 2 and Weblogic 9.2 -
java.net.ConnectException>
> --- Vigneswar <vigneswardn@(protected):
>> I have struts-config.xml as well as struts.xml under the WEB-INF folder.
>
> The S2 configuration files need to be on the classpath, normally
> /WEB-INF/classes.
>
>> In old JSP, I'm providing action="/HelloWorld" in the html:link tag but
>> when I click the link it shows "404" page.
>
> A link to an S2 action? I don't really know how the Struts 1 plugin works (or
> if you're using it) but I'm not sure that the S1 tags would know how to build
> a URL for an S2 action. It (the tag) would need to know the configured S2
> extension and IIRC the S1 tags would look up the action to make sure it was
> configured.
>
> You may need to create the URLs to S2 actions manually in your S1 pages.
>
> Dave
>
>
>
> ---------------------------------------------------------------------
> 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_182389.ezm (zipped)Thanks for your response Martin, but as Dave pointed out, we do not have
that interface available as we are using 1.2.9. Does anybody know at what
point the framework begins to actually save a FormFile and if there is any
way to hook into that and check the length before that happens?
On Feb 7, 2008 5:44 PM, Dave Newton <newton.dave@(protected):
> --- Martin Gainty <mgainty@(protected):
> > take a look at implementing FileUploadAction
> >
>
> http://jsourcery.com/api/apache/struts/2.0.6/org/apache/struts2/showcase/fil
> > eupload/FileUploadAction.html
>
> "Adam Gordon" <adam.gordon@(protected):
> > > We're using Struts 1.2.9
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_182391.ezm (zipped)Adam Gordon wrote:
> We're using Struts 1.2.9 and the problem we're seeing is that if a user
> tries to upload a file that does not exist or upload a file that exceeds
> the maxFileSize attribute the FormFile object on the ActionForm is null
> and so we cannot distinguish between the two.
>
> We thought about removing the maxFileSize parameter and doing the check
> ourselves in the ActionForm, but it appears that the file upload has
> already begun at that point and while we can look at the Content-Length
> header from the HttpServletRequest object in the Struts Action, it's a
> moot step because the file has already begun to upload.
Couldn't you keep the maxFileSize parameter then use the Content-Length
header to distinguish the two cases? Short of writing your own
implementation of MultipartRequestHandler, I don't think there's anyway
to hook into the file upload handling.
L.

Attachment:
user_182395.ezm (zipped)Thanks Laurie! That's a pretty good idea, and quite possibly what we'll do.
The problem with it is that the file is sent along with other form
parameters, and if I remember correctly, the Content-Length header is the
full length of the body of the post, which would include all the text for
those parameters as well, making it difficult to tell which portion of that
length is the file and which is the other parameters. Hmmm, anybody see a
solution to that issue?
On Feb 8, 2008 12:20 PM, Laurie Harper <laurie@(protected):
> Adam Gordon wrote:
> > We're using Struts 1.2.9 and the problem we're seeing is that if a user
> > tries to upload a file that does not exist or upload a file that exceeds
> > the maxFileSize attribute the FormFile object on the ActionForm is null
> > and so we cannot distinguish between the two.
> >
> > We thought about removing the maxFileSize parameter and doing the check
> > ourselves in the ActionForm, but it appears that the file upload has
> > already begun at that point and while we can look at the Content-Length
> > header from the HttpServletRequest object in the Struts Action, it's a
> > moot step because the file has already begun to upload.
>
> Couldn't you keep the maxFileSize parameter then use the Content-Length
> header to distinguish the two cases? Short of writing your own
> implementation of MultipartRequestHandler, I don't think there's anyway
> to hook into the file upload handling.
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_182390.ezm (zipped)
I have the following code in 3 files + struts.xml and the .ftl page displays
[errors, mobile, non-parsed] as text unless I remove the comments in file 1.
I am expecting an actual 3 element list to display on the second action.
(see the partial struts.xml file below) Do I have the wrong code, idea, or
what?
Thank you for any suggestions!
========== file 1 .java =============
public class UserAgentViewsForm {
private Date startDate;
private Date endDate;
private List<String> tableList;
private String table;
public UserAgentViewsForm() {
}
public UserAgentViewsForm(Date startDate, Date endDate, List<String>
tableList, String table) {
this.startDate = startDate;
this.endDate = endDate;
this.tableList = tableList;
this.table = table;
}
public Date getStartDate() {
return startDate;
}
public Date getEndDate() {
return endDate;
}
public List<String> getTableList() {
return tableList;
}
public String getTable() {
return table;
}
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
public void setTableList(List<String> tableList) {
/* these are the comments
if (tableList.size() == 1) {
String stringList = tableList.get(0);
String subStringList = stringList.substring(1,
stringList.length() - 1);
String[] tList = subStringList.split(",\\s+");
tableList = new ArrayList<String>();
for (int i = 0; i < tList.length; i++) {
tableList.add(tList[i]);
}
}
*/
this.tableList = tableList;
}
public void setTable(String table) {
this.table = table;
}
}
========== partial of file 2 =================
public class TableViewAction extends ActionSupport {
private RegisterDrivers registerDrivers = new RegisterDrivers();
private List<TableRecord> recordList;
private UserAgentViewsForm userAgentViewsForm;
private String startDate;
private String endDate;
@SkipValidation
public String executeInitial() {
long oneDay = 1000L * 24L * 60L * 60L;
GregorianCalendar cal = new GregorianCalendar();
long calInMillis = cal.getTimeInMillis();
//userAgentViewsForm = new UserAgentViewsForm(new Date(calInMillis -
91L * oneDay), new Date(calInMillis - oneDay), "mobile", "day");
List<String> tL = new ArrayList<String>();
tL.add("errors"); tL.add("mobile"); tL.add("non-parsed");
userAgentViewsForm = new UserAgentViewsForm(new Date(calInMillis -
oneDay), new Date(calInMillis - oneDay), tL, "mobile", "day");
startDate = String.format("%1$tY-%1$tm-%1$td",
userAgentViewsForm.getStartDate());
endDate = String.format("%1$tY-%1$tm-%1$td",
userAgentViewsForm.getEndDate());
setRecordList(userAgentViewsForm.getTable());
return SUCCESS;
}
public String execute() {
startDate = String.format("%1$tY-%1$tm-%1$td",
userAgentViewsForm.getStartDate());
endDate = String.format("%1$tY-%1$tm-%1$td",
userAgentViewsForm.getEndDate());
if (!validateExecute()) {
return INPUT;
}
setRecordList(userAgentViewsForm.getTable());
return SUCCESS;
}
======= end partial of file 2
======== partial of userAgentViewsForm.ftl ====================
<html>
<head>
<title>User Agent Views Report</title>
</head>
<@(protected)/>
<body>
<h1>User Agent Views Report</h1>
<@(protected) />
<@(protected)
id="userAgentViewsForm"
cssStyle="border: 1px solid white; width: 1260px; background: #CCCC99"
action="runUserAgentViews"
method="post">
<@(protected)
label="Start Date"
name="userAgentViewsForm.startDate"
id="pickerStart"
tooltip="Select a Start Date after 08/07/2007"
displayFormat="MM/dd/yyyy"
/>
<@(protected)
label="End Date"
name="userAgentViewsForm.endDate"
id="pickerEnd"
tooltip="Select an End Date before today"
displayFormat="MM/dd/yyyy"
/>
<@(protected)
label="Table"
id="tableId"
tooltip="Select the Table to Display"
size="3"
list="userAgentViewsForm.tableList" ******* what displays is [errors,
moble, non-parsed] on the
name="userAgentViewsForm.table"
/>
<@(protected)" />
<@(protected)" />
</@(protected)>
http://devbox.ccbill.com:8080/browserInfo/ Home
${userAgentViewsForm.tableList}
========== end of partial of file userAgentViewsForm.ftl ==========
===== partial of struts.xml ==============
<!-- userAgent Views -->
<action name="runUserAgentViewsInitial" method="executeInitial"
class="com.ccbill.chart.userAgentViews.action.TableViewAction">
<result
type="freemarker">/pages/userAgentViews/userAgentViewsForm.ftl</result>
</action>
<action name="runUserAgentViews"
class="com.ccbill.chart.userAgentViews.action.TableViewAction">
<result
type="freemarker">/pages/userAgentViews/userAgentViewsForm.ftl</result>
<result type="freemarker"
name="input">/pages/userAgentViews/userAgentViewsForm.ftl</result>
</action>
===== end partial of struts.xml
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_182392.ezm (zipped)Hi,
I'm new to struts and portlets. I tried out the this tutorial as a
start.
http://struts.apache.org/2.x/docs/struts-2-portlet-tutorial.html
After implementing all functionalities described in that tutorial, the
"editBookMark" option doesn't work. I get the following exception when I
try to edit the newly added link
javax.portlet.PortletException: Error executing action editBookmark
Caused by:
java.lang.IllegalArgumentException: Null object: Preference key
My EditBookmarkAction class does implement PortletPreferencesAware and has a
setter for the preference and everything. So I'm guessing the reason is the
edit action class gets called before it loads the jsp if that makes sense.
But I'm not sure how to fix it :) Or is it a different issue? Could any one
shed some light on that?
Thanks,
Sam

Attachment:
user_182393.ezm (zipped)Shanna7463 wrote:
> Is it possible to assign a collection to a html:hidden component, rather than
> a string?
> Basically my webapp allows the user to select different options for access
> control. I would like to add these selections to a collection and pass that
> to my Action class.
A hidden input will submit a single string value. To submit a set of
values you either need to use multiple hidden inputs (i.e. one per
collection entry) or manually marshal the collection into a single
string (e.g. a comma separated list of values) the unmarshal it again
when it's submitted. Multiple hidden inputs is probably the
easier/cleaner approach.
L.

Attachment:
user_182394.ezm (zipped)Hello guys,
it turned out that app is whats hanging the server responded to other
request not related
to this webapp. i had : list.addAll(JobService.retrieveRecent());
after a couple of request it hanged,
then i assigned it
list = JobService.retrieveRecent();
no its fine
list.clear(); also did the trick before the call.:-)
Emil.I wrote:
>
> Hello,
> You guys had this, happen when i deploy my war file to tomcat, the
> application hangs seems waiting for
> reply forever. I deployed it on jboss ok for a while, then again after a
> while just hangs. Increasing memory
> in tomcat to 512 did not help.
> I got some params interceptor errors (setting action properties) and
>
>
org.springframework.beans.factory.UnsatisfiedDependencyException: Error
> creating bean with name
> '
org.apache.struts2.dispatcher.ServletDispatcherResult': Unsatisfied
> dependency expressed through constructor argument with index 0 of type
> [
java.lang.String]: No unique bean of type [
java.lang.String] is defined:
> Unsatisfied dependency of type [class
java.lang.String]: expected at least
> 1 matching bean
>
> could those errors hang the web app?
> In my jboss console i see the following
>
> http-127.0.0.1-8080
>
> Max threads: 250 Current thread count: 9 Current thread busy: 7
> Max processing time: 5598 ms Processing time: 40.755 s Request count: 191
> Error count: 74 Bytes received: 0.00 MB Bytes sent: 7.90 MB
> Stage Time B Sent B Recv Client VHost Request
> S 976784 ms 0 KB 0 KB 127.0.0.1 localhost GET /web-console/ServerInfo.jsp
> HTTP/1.1
> S 1059384 ms 0 KB 0 KB 127.0.0.1 localhost GET
> /JobSearch-1.0/job/home.action HTTP/1.1
> S 1115877 ms 0 KB 0 KB 127.0.0.1 localhost GET
> /JobSearch-1.0/job/showCustomerRegistration.action HTTP/1.1
> S 708182 ms 0 KB 0 KB 127.0.0.1 localhost GET
> /JobSearch-1.0/job/home.action HTTP/1.1
> S 773187 ms 0 KB 0 KB 127.0.0.1 localhost GET
> /JobSearch-1.0/job/search.action HTTP/1.1
> S 701843 ms 0 KB 0 KB 127.0.0.1 localhost GET
> /JobSearch-1.0/job/home.action HTTP/1.1
> S 0 ms 0 KB 0 KB 127.0.0.1 localhost GET
> /web-console/status?full=true&jsessionid=69486E0BE0C24698F891065A3DC42CC3
> HTTP/1.1
> R ? ? ? ? ? ?
> R ? ? ? ? ? ?
>
>
> any suggestions?
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_182396.ezm (zipped)
I have an interesting problem that I'm dealing with in regards to struts 2
validation. I have XML validation setup throughout my application that
appear to work fine. The validation returns the appropriate error messages
when needed. However I have a user object that is created when a person
logs into this application. This object contains their login, business,
etc. When any page loads the business name and login are displayed at the
top of the page. The code snippet below shows how I'm displaying the user
information using the property tag:
<s:property value="user.getBusiness()"/><br />
User: <s:property value="user.getLogin()"/> </td>
However when a user is returned to that page due to an error caught by the
validation logic the "user" information is never displayed. In my action
form the "user" object has getter and setter methods defined. If I validate
any data in the action class and set the actionError the error message is
displayed along with the user object information. Is there anything I
missed why the "user" object information will now show up when XML
validation is used? Thanks.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_182397.ezm (zipped)Has anyone built a java 1.4 compatible struts2 application with maven2 using
the translated jars? I installed the j4 struts2-core and xwork jars in my
repository. But, I am still this error when installing my project using
maven:
...
INFO] war:war
[INFO] Packaging webapp
[INFO] Assembling webapp[healthe-user-claim-portlet] in
[C:\workspaces\hin-portal-test\healthe-user-claim-portlet\target\healthe-
user-claim-portlet-1.1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Webapp assembled in[266 msecs]
[INFO] Building war:
C:\workspaces\hin-portal-test\healthe-user-claim-portlet\target\healthe-
user-claim-portlet-1.1.0-SNAPSHOT.war
[INFO] source:jar
[INFO] Building jar:
C:\workspaces\hin-portal-test\healthe-user-claim-portlet\target\healthe-
user-claim-portlet-1.1.0-SNAPSHOT-sources.jar
[INFO] retrotranslator:translate-war
[INFO]
----------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
----------------------------------------------------------------------------
[INFO]
java.lang.String incompatible with
java.lang.Boolean...
Here are the relevant parts of my pom.xml:
...
<!-- Struts 2 -->
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core-j4</artifactId>
<version>2.0.11</version>
</dependency>
<dependency>
<groupId>com.opensymphony</groupId>
<artifactId>xwork-j4</artifactId>
<version>2.0.4</version>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>2.0.11</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
</exclusion>
</exclusions>
</dependency>
...
...
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>retrotranslator-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>translate-war</goal>
</goals>
<configuration>
<classifier>jdk1.4</classifier>
<attach>true</attach>
</configuration>
</execution>
</executions>
</plugin>
...
Any suggestions?
--
Brian