Author Login
Post Reply
user Digest 24 Jul 2008 15:36:54 -0000 Issue 8158
Topics (messages 189276 through 189285):
struts2 validation, tiles definition in input result type, problem!
189276 by: Halil Aðýn
189278 by: Antonio Petrelli
189280 by: Halil Aðýn
189281 by: Antonio Petrelli
189282 by: Dave Newton
Re: [s2] Making textfield input optional
189277 by: Gabriel Belingueres
189279 by: Milan Milanovic
189283 by: Gabriel Belingueres
189285 by: Milan Milanovic
Re: [S2] Using SSL, HTTP, HTTPS and invoking Action classes
189284 by: Anastasios Patrikis
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_189276.ezm (zipped)Hello List;
I am trying to implement validation in struts2.
My action is as follow:
<action name="ProjectStatus_*"
class="tr.com.portakalteknoloji.action.projectstatus.ProjectStatusAction"
method="{1}" >
<result name="{1}" type="tiles" >tvq.projectstatus.{1}</result>
<result name="input" type="tiles"
>tvq.projectstatus.{1}</result>
<result name="error" type="tiles">tvq.projectstatus.{1}</result>
<result name="ADDSUCCEED"
type="redirect">/ProjectStatus_list.action</result>
</action>
Since when validation process returns false, i want struts to show the same
page. I search the web, and saw some solution like above. But, when i try to
implement, i could not succeed.
Here are my tiles definitions:
<definition name="tvq.projectstatus.showAddPage"
extends="tvq.template.default">
<put-attribute name="title" value="Add A Project Status" />
<put-attribute name="content" value="/jsp/projectstatus/AddPage.jsp"
/>
</definition>
<definition name="tvq.projectstatus.ListPage"
extends="tvq.template.default">
<put-attribute name="title" value="Add A Project Status" />
<put-attribute name="content"
value="/jsp/projectstatus/ListPage.jsp" />
</definition>
<definition name="tvq.projectstatus.list"
extends="tvq.template.default">
<put-attribute name="title" value="Add A Project Status" />
<put-attribute name="content"
value="/jsp/projectstatus/ListPage.jsp" />
</definition>
I call the page ass follows :
http://localhost:8080/TVQ/ProjectStatus_showAddPage.action
(the ProjectStatusAction.java has showAddPage, list, and add functions and
these functions returns the correct strings.)
Then, struts looks the action definition and it finds showAddPage function
in ProjectStatus.
In result list, there is tvq.projectstatus.showAddPage, and i have this
definition in my tiles.xml.
Therefore, it shows the page. The problem occures after i press the add
button in tvq.projectstatus.showAddPage.
here is the content of the
tvq.projectstatus.showAddPage(meanly,/jsp/projectstatus/AddPage.jsp)
<s:form action="ProjectStatus" validate="true" >
<s:fielderror />
<jsp:include page="AddUpdateTemplate.jsp"/>
<br/>
<table>
<tr><td colspan="2"><s:submit method="add" value="Add" /></td></tr>
</table>
</s:form>
And i have a required field validator on a field in my form(this field is
listed in AddUpdateTemplate.jsp)
ProjectStatus action has add function which returns the "ADDSUCCEED" string
on success.
When i press the add button without filling the required field, there occure
a validation error(which is expected)
At this level, i expect struts that it enters the input result which is
defined in my action as a result.
Here is the result definition.
<result name="input" type="tiles" >tvq.projectstatus.{1}</result>
I expect the struts to enter in input result, and it does. but it cannot
produces the tiles definition, it leaves {1} as empty and produce
"tvq.projectstatus." unlike "tvq.projectstatus.showAddPage".
What is the problem, i know i am doing something wrong, i read the book
"struts2 in action", and searched the web, but could not find such an
example. Meanly, i am using method action, tiles and validation together, i
could not find such an example.
Please help me,
Thanks in advance,
-Halil Agin
the stack trace is below (i am using global exception handler, therefore i
copied the html content and paste it here, you may want the output of error
console, but please be sure that this is the exact error. i see this error
in the console too)
Error Message
tvq.projectstatus.
------------------------------
Technical Details
org.apache.tiles.definition.NoSuchDefinitionException: tvq.projectstatus. at
org.apache.tiles.impl.BasicTilesContainer.render (
BasicTilesContainer.java:394)
at
org.apache.tiles.impl.BasicTilesContainer.render (
BasicTilesContainer.java:370)
at
org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105)
at
org.apache.struts2.dispatcher.StrutsResultSupport.execute (
StrutsResultSupport.java:186)
at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult (
DefaultActionInvocation.java:355)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:259)
at
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept (
ValidationInterceptor.java:248)
at
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept (
AnnotationValidationInterceptor.java:49)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (
MethodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
at
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept (
ConversionErrorInterceptor.java:124)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (
ParametersInterceptor.java:170)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (
MethodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (
ParametersInterceptor.java:170)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (
MethodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
at
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept (
StaticParametersInterceptor.java:104)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
at
org.apache.struts2.interceptor.CheckboxInterceptor.intercept (
CheckboxInterceptor.java:84)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
at
org.apache.struts2.interceptor.FileUploadInterceptor.intercept (
FileUploadInterceptor.java:208)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
at
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept (
ModelDrivenInterceptor.java:88)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
at
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept (
ScopedModelDrivenInterceptor.java:127)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
at
org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept (
ProfilingActivationInterceptor.java:104)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
at
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept (
DebuggingInterceptor.java:267)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
at
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept (
ChainingInterceptor.java:130)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
at
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept (
I18nInterceptor.java:143)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
at
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept (
PrepareInterceptor.java:137)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (
MethodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
at
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept (
ServletConfigInterceptor.java:164)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
at
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept (
AliasInterceptor.java:130)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
at
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept (
ExceptionMappingInterceptor.java:176)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
at
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
at
org.apache.struts2.impl.StrutsActionProxy.execute (
StrutsActionProxy.java:52)
at
org.apache.struts2.dispatcher.Dispatcher.serviceAction (
Dispatcher.java:477)
at
org.apache.struts2.dispatcher.FilterDispatcher.doFilter (
FilterDispatcher.java:467)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (
ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter (
ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke (
StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke (
StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke (
StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke (
ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke (
StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service (
CoyoteAdapter.java:286)
at
org.apache.coyote.http11.Http11Processor.process (
Http11Processor.java:844)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at
java.lang.Thread.run (
Thread.java:619)

Attachment:
user_189278.ezm (zipped)
Attachment:
user_189280.ezm (zipped)
Attachment:
user_189281.ezm (zipped)2008/7/24 Halil Ağın <halil.agin@(protected)>:
> tomcat : apache-tomcat-6.0.16.tar.gz
>
>
> WEB-INF/lib content:
>
> tiles-api-2.0.5.jar
> tiles-core-2.0.5.jar
> tiles-defs.xml
> tiles-jsp-2.0.5.jar
> struts2-config-browser-plugin-2.1.2.jar
> struts2-core-2.1.2.jar
> struts2-tiles-plugin-2.1.2.jar
It seems that you are pretty up-to-date :-) (except Tiles, where the
latest version is 2.0.6, but this is not important in this case).
Can you open a JIRA issue, along with a test case (read: WAR file with sources)?
https://issues.apache.org/struts/browse/WW
Thanks
Antonio

Attachment:
user_189282.ezm (zipped)Your action is submitting to "ProjectStatus"; is that action defined?
Dave
--- On Thu, 7/24/08, Halil Ağın <halil.agin@(protected):
> From: Halil Ağın <halil.agin@(protected)>
> Subject: struts2 validation, tiles definition in input result type, problem!
> To: user@(protected)
> Date: Thursday, July 24, 2008, 10:58 AM
> Hello List;
>
> I am trying to implement validation in struts2.
>
> My action is as follow:
>
> <action name="ProjectStatus_*"
>
> class="tr.com.portakalteknoloji.action.projectstatus.ProjectStatusAction"
> method="{1}" >
>
> <result name="{1}"
> type="tiles"
> >tvq.projectstatus.{1}</result>
> <result name="input"
> type="tiles"
> >tvq.projectstatus.{1}</result>
> <result name="error"
> type="tiles">tvq.projectstatus.{1}</result>
>
> <result name="ADDSUCCEED"
> type="redirect">/ProjectStatus_list.action</result>
> </action>
>
>
>
> Since when validation process returns false, i want struts
> to show the same
> page. I search the web, and saw some solution like above.
> But, when i try to
> implement, i could not succeed.
>
> Here are my tiles definitions:
>
> <definition
> name="tvq.projectstatus.showAddPage"
> extends="tvq.template.default">
> <put-attribute name="title"
> value="Add A Project Status" />
> <put-attribute name="content"
> value="/jsp/projectstatus/AddPage.jsp"
> />
> </definition>
>
> <definition
> name="tvq.projectstatus.ListPage"
> extends="tvq.template.default">
> <put-attribute name="title"
> value="Add A Project Status" />
> <put-attribute name="content"
> value="/jsp/projectstatus/ListPage.jsp" />
> </definition>
>
> <definition name="tvq.projectstatus.list"
> extends="tvq.template.default">
> <put-attribute name="title"
> value="Add A Project Status" />
> <put-attribute name="content"
> value="/jsp/projectstatus/ListPage.jsp" />
> </definition>
>
>
>
> I call the page ass follows :
> http://localhost:8080/TVQ/ProjectStatus_showAddPage.action
>
> (the ProjectStatusAction.java has showAddPage, list, and
> add functions and
> these functions returns the correct strings.)
>
>
> Then, struts looks the action definition and it finds
> showAddPage function
> in ProjectStatus.
>
> In result list, there is tvq.projectstatus.showAddPage, and
> i have this
> definition in my tiles.xml.
>
> Therefore, it shows the page. The problem occures after i
> press the add
> button in tvq.projectstatus.showAddPage.
>
> here is the content of the
> tvq.projectstatus.showAddPage(meanly,/jsp/projectstatus/AddPage.jsp)
>
>
>
>
> <s:form action="ProjectStatus"
> validate="true" >
>
> <s:fielderror />
>
> <jsp:include page="AddUpdateTemplate.jsp"/>
> <br/>
>
> <table>
> <tr><td colspan="2"><s:submit
> method="add" value="Add"
> /></td></tr>
> </table>
>
> </s:form>
>
>
>
>
> And i have a required field validator on a field in my
> form(this field is
> listed in AddUpdateTemplate.jsp)
>
>
> ProjectStatus action has add function which returns the
> "ADDSUCCEED" string
> on success.
>
>
> When i press the add button without filling the required
> field, there occure
> a validation error(which is expected)
>
> At this level, i expect struts that it enters the input
> result which is
> defined in my action as a result.
>
> Here is the result definition.
>
> <result name="input" type="tiles"
> >tvq.projectstatus.{1}</result>
>
>
> I expect the struts to enter in input result, and it does.
> but it cannot
> produces the tiles definition, it leaves {1} as empty and
> produce
> "tvq.projectstatus." unlike
> "tvq.projectstatus.showAddPage".
>
> What is the problem, i know i am doing something wrong, i
> read the book
> "struts2 in action", and searched the web, but
> could not find such an
> example. Meanly, i am using method action, tiles and
> validation together, i
> could not find such an example.
>
>
> Please help me,
>
>
> Thanks in advance,
>
>
> -Halil Agin
>
>
> the stack trace is below (i am using global exception
> handler, therefore i
> copied the html content and paste it here, you may want the
> output of error
> console, but please be sure that this is the exact error. i
> see this error
> in the console too)
>
>
> Error Message
>
> tvq.projectstatus.
> ------------------------------
> Technical Details
>
>
org.apache.tiles.definition.NoSuchDefinitionException:
> tvq.projectstatus. at
>
org.apache.tiles.impl.BasicTilesContainer.render (
BasicTilesContainer.java:394)
> at
>
org.apache.tiles.impl.BasicTilesContainer.render (
BasicTilesContainer.java:370)
> at
> org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105)
> at
>
org.apache.struts2.dispatcher.StrutsResultSupport.execute (
StrutsResultSupport.java:186)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.executeResult (
DefaultActionInvocation.java:355)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:259)
> at
>
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept (
ValidationInterceptor.java:248)
> at
>
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept (
AnnotationValidationInterceptor.java:49)
> at
>
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (
MethodFilterInterceptor.java:86)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
> at
>
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
> at
>
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept (
ConversionErrorInterceptor.java:124)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
> at
>
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
> at
>
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (
ParametersInterceptor.java:170)
> at
>
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (
MethodFilterInterceptor.java:86)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
> at
>
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
> at
>
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (
ParametersInterceptor.java:170)
> at
>
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (
MethodFilterInterceptor.java:86)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
> at
>
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
> at
>
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept (
StaticParametersInterceptor.java:104)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
> at
>
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
> at
>
org.apache.struts2.interceptor.CheckboxInterceptor.intercept (
CheckboxInterceptor.java:84)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
> at
>
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
> at
>
org.apache.struts2.interceptor.FileUploadInterceptor.intercept (
FileUploadInterceptor.java:208)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
> at
>
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
> at
>
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept (
ModelDrivenInterceptor.java:88)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
> at
>
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
> at
>
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept (
ScopedModelDrivenInterceptor.java:127)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
> at
>
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
> at
>
org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept (
ProfilingActivationInterceptor.java:104)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
> at
>
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
> at
>
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept (
DebuggingInterceptor.java:267)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
> at
>
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
> at
>
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept (
ChainingInterceptor.java:130)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
> at
>
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
> at
>
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept (
I18nInterceptor.java:143)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
> at
>
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
> at
>
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept (
PrepareInterceptor.java:137)
> at
>
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (
MethodFilterInterceptor.java:86)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
> at
>
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
> at
>
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept (
ServletConfigInterceptor.java:164)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
> at
>
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
> at
>
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept (
AliasInterceptor.java:130)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
> at
>
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
> at
>
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept (
ExceptionMappingInterceptor.java:176)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)
> at
>
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile (
UtilTimerStack.java:456)
> at
>
com.opensymphony.xwork2.DefaultActionInvocation.invoke (
DefaultActionInvocation.java:227)
> at
>
org.apache.struts2.impl.StrutsActionProxy.execute (
StrutsActionProxy.java:52)
> at
>
org.apache.struts2.dispatcher.Dispatcher.serviceAction (
Dispatcher.java:477)
> at
>
org.apache.struts2.dispatcher.FilterDispatcher.doFilter (
FilterDispatcher.java:467)
> at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (
ApplicationFilterChain.java:235)
> at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter (
ApplicationFilterChain.java:206)
> at
>
org.apache.catalina.core.StandardWrapperValve.invoke (
StandardWrapperValve.java:233)
> at
>
org.apache.catalina.core.StandardContextValve.invoke (
StandardContextValve.java:175)
> at
>
org.apache.catalina.core.StandardHostValve.invoke (
StandardHostValve.java:128)
> at
>
org.apache.catalina.valves.ErrorReportValve.invoke (
ErrorReportValve.java:102)
> at
>
org.apache.catalina.core.StandardEngineValve.invoke (
StandardEngineValve.java:109)
> at
>
org.apache.catalina.connector.CoyoteAdapter.service (
CoyoteAdapter.java:286)
> at
>
org.apache.coyote.http11.Http11Processor.process (
Http11Processor.java:844)
> at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> at
>
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> at
java.lang.Thread.run (
Thread.java:619)

Attachment:
user_189277.ezm (zipped)instead of:
public vlid setInValue(BigDecimal x) {
this.x = x;
}
test with this:
public vlid setInValue(String s) {
this.x = new BigDecimal(s);
}
2008/7/24 Milan Milanovic <milanmilanovich@(protected)>:
>
> Hi Jim,
>
> no, I have that method.
>
> --
> Thx, Milan
>
>
> Jim Kiley wrote:
>>
>> Doesn't that exception usually get thrown when, in this case, ViewAction
>> doesn't have a setInValue() method?
>>
>> jk
>>
>> On Thu, Jul 24, 2008 at 10:31 AM, Gabriel Belingueres
>> <belingueres@(protected)>
>> wrote:
>>
>>> Which is the data type of inValue?
>>>
>>> 2008/7/24 Milan Milanovic <milanmilanovich@(protected)>:
>>> >
>>> > Hi,
>>> >
>>> > I have one form with multiple textfields, and I want to one of that
>>> > textfield be optional for user, i.e., he doesn't need to enter
>>> information
>>> > in that particular field. Now, when user don't enter I get this in my
>>> log:
>>> >
>>> > ERROR
com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 -
>>> > ParametersInterceptor - [setParameters]: Unexpected Exception caught
>>> setting
>>> > 'inValue' on 'class com.myProject.action.ViewAction: Error setting
>>> > expression 'inValue' with value '[Ljava.lang.String;@(protected)'
>>> >
>>> > How can I enable this but without getting this error ?
>>> >
>>> > --
>>> > Thx, Milan
>>> > --
>>> > View this message in context:
>>> http://www.nabble.com/-s2--Making-textfield-input-optional-tp18632806p18632806.html
>>> > Sent from the Struts - User mailing list archive at Nabble.com.
>>> >
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> > For additional commands, e-mail: user-help@(protected)
>>> >
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>
>>
>> --
>> Jim Kiley
>> Technical Consultant | Summa
>> [p] 412.258.3346 [m] 412.445.1729
>> http://www.summa-tech.com
>>
>>
>
> --
> View this message in context: http://www.nabble.com/-s2--Making-textfield-input-optional-tp18632806p18633474.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_189279.ezm (zipped)Hi Gabriel,
no I cannot do this because my field is of type BigDecimal and I must have
get/set methods for it.
--
Thx, Milan
Gabriel Belingueres-2 wrote:
>
> instead of:
>
> public vlid setInValue(BigDecimal x) {
> this.x = x;
> }
>
> test with this:
>
> public vlid setInValue(String s) {
> this.x = new BigDecimal(s);
> }
>
>
> 2008/7/24 Milan Milanovic <milanmilanovich@(protected)>:
>>
>> Hi Jim,
>>
>> no, I have that method.
>>
>> --
>> Thx, Milan
>>
>>
>> Jim Kiley wrote:
>>>
>>> Doesn't that exception usually get thrown when, in this case, ViewAction
>>> doesn't have a setInValue() method?
>>>
>>> jk
>>>
>>> On Thu, Jul 24, 2008 at 10:31 AM, Gabriel Belingueres
>>> <belingueres@(protected)>
>>> wrote:
>>>
>>>> Which is the data type of inValue?
>>>>
>>>> 2008/7/24 Milan Milanovic <milanmilanovich@(protected)>:
>>>> >
>>>> > Hi,
>>>> >
>>>> > I have one form with multiple textfields, and I want to one of that
>>>> > textfield be optional for user, i.e., he doesn't need to enter
>>>> information
>>>> > in that particular field. Now, when user don't enter I get this in my
>>>> log:
>>>> >
>>>> > ERROR
com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 -
>>>> > ParametersInterceptor - [setParameters]: Unexpected Exception caught
>>>> setting
>>>> > 'inValue' on 'class com.myProject.action.ViewAction: Error setting
>>>> > expression 'inValue' with value '[Ljava.lang.String;@(protected)'
>>>> >
>>>> > How can I enable this but without getting this error ?
>>>> >
>>>> > --
>>>> > Thx, Milan
>>>> > --
>>>> > View this message in context:
>>>> http://www.nabble.com/-s2--Making-textfield-input-optional-tp18632806p18632806.html
>>>> > Sent from the Struts - User mailing list archive at Nabble.com.
>>>> >
>>>> >
>>>> > ---------------------------------------------------------------------
>>>> > To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>> > For additional commands, e-mail: user-help@(protected)
>>>> >
>>>> >
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>> For additional commands, e-mail: user-help@(protected)
>>>>
>>>>
>>>
>>>
>>> --
>>> Jim Kiley
>>> Technical Consultant | Summa
>>> [p] 412.258.3346 [m] 412.445.1729
>>> http://www.summa-tech.com
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/-s2--Making-textfield-input-optional-tp18632806p18633474.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189283.ezm (zipped)Please make sure that the input string is according the BigDecimal format:
http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigDecimal.html#BigDecimal(
java.lang.String)
2008/7/24 Milan Milanovic <milanmilanovich@(protected)>:
>
> Hi Gabriel,
>
> no I cannot do this because my field is of type BigDecimal and I must have
> get/set methods for it.
>
> --
> Thx, Milan
>
>
> Gabriel Belingueres-2 wrote:
>>
>> instead of:
>>
>> public vlid setInValue(BigDecimal x) {
>> this.x = x;
>> }
>>
>> test with this:
>>
>> public vlid setInValue(String s) {
>> this.x = new BigDecimal(s);
>> }
>>
>>
>> 2008/7/24 Milan Milanovic <milanmilanovich@(protected)>:
>>>
>>> Hi Jim,
>>>
>>> no, I have that method.
>>>
>>> --
>>> Thx, Milan
>>>
>>>
>>> Jim Kiley wrote:
>>>>
>>>> Doesn't that exception usually get thrown when, in this case, ViewAction
>>>> doesn't have a setInValue() method?
>>>>
>>>> jk
>>>>
>>>> On Thu, Jul 24, 2008 at 10:31 AM, Gabriel Belingueres
>>>> <belingueres@(protected)>
>>>> wrote:
>>>>
>>>>> Which is the data type of inValue?
>>>>>
>>>>> 2008/7/24 Milan Milanovic <milanmilanovich@(protected)>:
>>>>> >
>>>>> > Hi,
>>>>> >
>>>>> > I have one form with multiple textfields, and I want to one of that
>>>>> > textfield be optional for user, i.e., he doesn't need to enter
>>>>> information
>>>>> > in that particular field. Now, when user don't enter I get this in my
>>>>> log:
>>>>> >
>>>>> > ERROR
com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 -
>>>>> > ParametersInterceptor - [setParameters]: Unexpected Exception caught
>>>>> setting
>>>>> > 'inValue' on 'class com.myProject.action.ViewAction: Error setting
>>>>> > expression 'inValue' with value '[Ljava.lang.String;@(protected)'
>>>>> >
>>>>> > How can I enable this but without getting this error ?
>>>>> >
>>>>> > --
>>>>> > Thx, Milan
>>>>> > --
>>>>> > View this message in context:
>>>>> http://www.nabble.com/-s2--Making-textfield-input-optional-tp18632806p18632806.html
>>>>> > Sent from the Struts - User mailing list archive at Nabble.com.
>>>>> >
>>>>> >
>>>>> > ---------------------------------------------------------------------
>>>>> > To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>>> > For additional commands, e-mail: user-help@(protected)
>>>>> >
>>>>> >
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>>> For additional commands, e-mail: user-help@(protected)
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Jim Kiley
>>>> Technical Consultant | Summa
>>>> [p] 412.258.3346 [m] 412.445.1729
>>>> http://www.summa-tech.com
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/-s2--Making-textfield-input-optional-tp18632806p18633474.html
>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/-s2--Making-textfield-input-optional-tp18632806p18633888.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_189285.ezm (zipped)Dear Gabriel,
no, my actual question is related to the issue when user doesn't enter
anything to the textfield which is connected to BigDecimal in my action
class.
--
Thx, Milan
Gabriel Belingueres-2 wrote:
>
> Please make sure that the input string is according the BigDecimal format:
> http://java.sun.com/j2se/1.5.0/docs/api/java/math/BigDecimal.html#BigDecimal(
java.lang.String)
>
> 2008/7/24 Milan Milanovic <milanmilanovich@(protected)>:
>>
>> Hi Gabriel,
>>
>> no I cannot do this because my field is of type BigDecimal and I must
>> have
>> get/set methods for it.
>>
>> --
>> Thx, Milan
>>
>>
>> Gabriel Belingueres-2 wrote:
>>>
>>> instead of:
>>>
>>> public vlid setInValue(BigDecimal x) {
>>> this.x = x;
>>> }
>>>
>>> test with this:
>>>
>>> public vlid setInValue(String s) {
>>> this.x = new BigDecimal(s);
>>> }
>>>
>>>
>>> 2008/7/24 Milan Milanovic <milanmilanovich@(protected)>:
>>>>
>>>> Hi Jim,
>>>>
>>>> no, I have that method.
>>>>
>>>> --
>>>> Thx, Milan
>>>>
>>>>
>>>> Jim Kiley wrote:
>>>>>
>>>>> Doesn't that exception usually get thrown when, in this case,
>>>>> ViewAction
>>>>> doesn't have a setInValue() method?
>>>>>
>>>>> jk
>>>>>
>>>>> On Thu, Jul 24, 2008 at 10:31 AM, Gabriel Belingueres
>>>>> <belingueres@(protected)>
>>>>> wrote:
>>>>>
>>>>>> Which is the data type of inValue?
>>>>>>
>>>>>> 2008/7/24 Milan Milanovic <milanmilanovich@(protected)>:
>>>>>> >
>>>>>> > Hi,
>>>>>> >
>>>>>> > I have one form with multiple textfields, and I want to one of that
>>>>>> > textfield be optional for user, i.e., he doesn't need to enter
>>>>>> information
>>>>>> > in that particular field. Now, when user don't enter I get this in
>>>>>> my
>>>>>> log:
>>>>>> >
>>>>>> > ERROR
com.opensymphony.xwork2.interceptor.ParametersInterceptor:204
>>>>>> -
>>>>>> > ParametersInterceptor - [setParameters]: Unexpected Exception
>>>>>> caught
>>>>>> setting
>>>>>> > 'inValue' on 'class com.myProject.action.ViewAction: Error setting
>>>>>> > expression 'inValue' with value '[Ljava.lang.String;@(protected)'
>>>>>> >
>>>>>> > How can I enable this but without getting this error ?
>>>>>> >
>>>>>> > --
>>>>>> > Thx, Milan
>>>>>> > --
>>>>>> > View this message in context:
>>>>>> http://www.nabble.com/-s2--Making-textfield-input-optional-tp18632806p18632806.html
>>>>>> > Sent from the Struts - User mailing list archive at Nabble.com.
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> ---------------------------------------------------------------------
>>>>>> > To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>>>> > For additional commands, e-mail: user-help@(protected)
>>>>>> >
>>>>>> >
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>>>> For additional commands, e-mail: user-help@(protected)
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Jim Kiley
>>>>> Technical Consultant | Summa
>>>>> [p] 412.258.3346 [m] 412.445.1729
>>>>> http://www.summa-tech.com
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/-s2--Making-textfield-input-optional-tp18632806p18633474.html
>>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>>> For additional commands, e-mail: user-help@(protected)
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/-s2--Making-textfield-input-optional-tp18632806p18633888.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_189284.ezm (zipped)Hi Nuwan,
this is the stuff I was looking for. Just some configuration in struts.xml and a few annotations.
The Struts PlugIs is easy to use, and now everything works as expected.
Thanks a lot,
regards,
Anastasios.
-----Ursprüngliche Nachricht-----
Von: Nuwan Chandrasoma [mailto:mymailnot@(protected)]
Gesendet: Mittwoch, 23. Juli 2008 14:21
An: Struts Users Mailing List
Betreff: Re: [S2] Using SSL, HTTP, HTTPS and invoking Action classes
Hi,
Have a look at this plug-in, it may help you
http://code.google.com/p/struts2-ssl-plugin/
Thanks,
Nuwan
Anastasios Patrikis wrote:
> Hi,
>
> I have problem in switching my application context from http to https an
> back again.
> Because I am new to Struts I am not sure if I use the framework the
> right way, so any help or hint is greatly appreciated
>
> Here is the task: I have some pages in my application which are
> available via http. There is a step in which the user is requested to
> enter some personal data, and the user can create a account. This page
> should be secured using SSL on a https site. Later on, the user should
> be redirected back to http.
>
>
> First problem: I do not know if the setup for using SSL is "the Struts
> way" because it is quiet hard to find information in how to use SSL and
> Struts.
> However, this is how I configured the application.
>
> - in web.xml I added the action which causes the switch from http to
> https:
> <security-constraint>
> <web-resource-collection>
> <!-- login -->
> <url-pattern>/Login.action</url-pattern>
> </web-resource-collection>
> <user-data-constraint>
> <transport-guarantee>CONFIDENTIAL</transport-guarantee>
> </user-data-constraint>
> </security-constraint>
>
> - in struts.xml I have a definition for the action:
> <action name="Login" class="com.action.CustomerLoginAction"
> method="userLogin">
> <result name="error">/ErrorPage.jsp</result>
> <result>/LoginPage.jsp</result>
> </action>
>
> - as all following request are made in the secured context I wrote a
> simple action class for redirecting back to http.
>
> First question is if this is the right way. It seems to be a quiet
> complicated solution for a common task.
>
>
> Second problem: without changing into a secure context (no
> "security-constraint" in web.xml) I can call my action class and some
> properties are set by the framework calling the appropriate "set"
> methods. After applying the "security-constraint" in the web.xml file
> the "set" methods are not invoked any more.
>
> Second question: is this the behavior by design? How should I set the
> necessary properties, by using session variables? I found an article
> which describes a problem by using a session variable in combination
> with SSL: http://forums.opensymphony.com/thread.jspa?messageID=130588.
> Once again I think my solution is to complicated and this task is
> supported by the framework without me knowing how to do it a better way.
>
> Best regards,
>
> Anastasios.
>
>
> ---------------------------------------------------------------------
> 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)