Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 6 Jan 2010 16:22:36 -0000 Issue 8974

user-digest-help

2010-01-06


Author LoginPost Reply

user Digest 6 Jan 2010 16:22:36 -0000 Issue 8974

Topics (messages 204496 through 204520):

Accessing Static Constants from JSP in Struts 2.0.14
 204496 by: DavidZaz
 204497 by: DavidZaz

Displaying an image in JSP in struts+tiles project
 204498 by: Aruna Ponaka
 204506 by: Kawczynski, David

struts 1.3.8 trying to get the rendered output of a struts page from a plain servlet
 204499 by: Jason Novotny

Re: OT- Versioning in Struts
 204500 by: Antonio Petrelli

Beginner Query on Struts tiles
 204501 by: steff_uk
 204502 by: Antonio Petrelli

Struts 1.3.9 validation oddity - If non-default bundle specified for 'msg', 'arg' must also define bundle attribute
 204503 by: Baljeet Nijjhar

Re: Problem Infinite recursion detected
 204504 by: Marc Eckart
 204505 by: Marc Eckart

problems with struts2 and session
 204507 by: Sergio
 204508 by: Sergio
 204514 by: Pawe³ Wielgus
 204515 by: Sergio
 204518 by: Pawe³ Wielgus

Dispatcher with precompiled JSP
 204509 by: java.leeclemens.net

Re: How is the max file size controlled for file uploads in Struts 1.3.8?
 204510 by: Frank Russo

[SOLVED] RE: Dispatcher with precompiled JSP
 204511 by: java.leeclemens.net

Why optionscollection doesn't persist the clicked value
 204512 by: Hanen Ben Rhouma
 204513 by: Kawczynski, David
 204517 by: Kawczynski, David
 204519 by: Hanen Ben Rhouma
 204520 by: Kawczynski, David

Re: struts 2 validation error
 204516 by: Greg Lindholm

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_204496.ezm (zipped)

I'm trying to access a static constant from a JSP page in Struts 2.0.14, but
it is not working.

My JSP page:

<s:select list="@org.my.company.myClass@(protected)" />

Java code:

package org.my.company;

import java.util.ArrayList;
import java.util.List;

public Class myClass {

public static final List<String> AVAILABLE_STATES = getStates();

public static final List<String> getStates() {
List<String> states = new ArrayList<String>();
states.add("New York");
return states;
}

When I try to access my jsp page, I receive the following error message:

Caused by: tag 'select', field 'list': The requested list key
'@org.my.company.myClass@(protected)
collection/array/map/enumeration/iterator type. Example: people or
people.{name} - [unknown location]

Does anyone have any suggestion about what needs to be changed?

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



Attachment: user_204497.ezm (zipped)

I figured it out.

In myClass, I have an enum listing the different state values. My
AVAILABLE_STATES variable was placed inside the curly braces for the enum.
This inadvertently placed the AVAILABLE_STATES variable inside the enum and
caused Struts 2 to throw an error message.


DavidZaz wrote:
>
> I'm trying to access a static constant from a JSP page in Struts 2.0.14,
> but it is not working.
>
> My JSP page:
>
> <s:select list="@org.my.company.myClass@(protected)" />
>
> Java code:
>
> package org.my.company;
>
> import java.util.ArrayList;
> import java.util.List;
>
> public Class myClass {
>
> public static final List<String> AVAILABLE_STATES = getStates();
>
> public static final List<String> getStates() {
> List<String> states = new ArrayList<String>();
> states.add("New York");
> return states;
> }
>
> When I try to access my jsp page, I receive the following error message:
>
> Caused by: tag 'select', field 'list': The requested list key
> '@org.my.company.myClass@(protected)
> collection/array/map/enumeration/iterator type. Example: people or
> people.{name} - [unknown location]
>
> Does anyone have any suggestion about what needs to be changed?
>
> Thanks!
>

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



Attachment: user_204498.ezm (zipped)

Hi,

Am building an application in struts2 and tiles. My requirement is to
retrieve an image blob from mysql database and display the image in a jsp
using img tag as below..

img src="<s:url action="myAction"/>"

Part of my struts.xml is as below:

<package name="default" extends="struts-default">
    <result-types>
       <result-type name="tiles"
class="org.apache.struts2.views.tiles.TilesResult" />
       <result-type name="myBytesResult"
class="com.icensa.action.MyBytesResult" ></result-type><br>
    </result-types>
     <action name="myAction" class="com.icensa.action.MyAction">
         <result name="myImageResult" type="myBytesResult" />
     </action>
</package>
My MyBytesResult class is:

public class MyBytesResult implements Result {

 private static final long serialVersionUID = 1L;
 

 public void execute(ActionInvocation invocation) throws Exception {
   
   MyAction action = (MyAction) invocation.getAction();
   HttpServletResponse response = ServletActionContext.getResponse();

    response.setContentType("image/jpeg");
   //response.setContentLength(action.getMyContentLength());

   response.getOutputStream().write(action.getMyImageInBytes());
   response.getOutputStream().flush();
 }

}

And MyAction class is:

public class MyAction extends ActionSupport {
 
 private static final long serialVersionUID = 1L;
 Blob image = null;
  Connection con = null;
  Statement stmt = null;
  ResultSet rs = null;
  byte[] imgData = null;
  OutputStream o = null;
  HttpServletResponse response = ServletActionContext.getResponse();
 public String doDefault() {
   System.out.println("doDefault()");
   try {
       Class.forName("com.mysql.jdbc.Driver");
       con =
DriverManager.getConnection("jdbc:mysql://localhost:3306/project","root","pass");
       stmt = con.createStatement();
       rs = stmt.executeQuery("select * from books_tb where
category='General' order by publish_date desc");
       while (rs.next()) {
          image = rs.getBlob(11);
          imgData = image.getBytes(1,(int)image.length());          
      }
     }
   catch (Exception e) {
          System.out.println(e.getMessage());        
      }
    return "myImageResult";
  }

  public byte[] getMyImageInBytes() {
    System.out.println("getMyImageInBytes()");
    try{
   
    }
    catch (Exception e) {
        System.out.println(e.getMessage());
       
    }
    return imgData;
  }

 // public String getMyContentType() { }
 // public String getMyContentDisposition() {}
 // public int getMyContentLength() { }
 // public int getMyBufferSize() { }

 }

when i run the code the image is not displayed and I get an error saying
No result defined for action com.action.MyAction and result success

In struts.xml is I provide reslut name="success" and the jsp, it does not
throw an error but not displaying the image. However in any case it is not
going to MyAction.java. What could i do to rectify this?
Could provide you with required code if necessary..

Thanks,
Aruna

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



Attachment: user_204506.ezm (zipped)
Being a fan of the KISS policy... I played around with
this but didn't have the time to figure it out, so I
made the URL spat out by struts2 points to a servlet
instead of struts2.

(Note that my web.xml has struts2 configured to listen
for *.action rather then slash-star)

Good luck & please let me know what your solution is.

Thanks!
-dave


> -----Original Message-----
> From: Aruna Ponaka [mailto:aruna.hcu@(protected)]
> Sent: Monday, January 04, 2010 5:09 PM
> To: user@(protected)
> Subject: Displaying an image in JSP in struts+tiles project
>
>
> Hi,
>
> Am building an application in struts2 and tiles. My requirement is to
> retrieve an image blob from mysql database and display the
> image in a jsp
> using img tag as below..
>
> img src="<s:url action="myAction"/>"
>
> Part of my struts.xml is as below:
>
> <package name="default" extends="struts-default">
>      <result-types>
>         <result-type name="tiles"
> class="org.apache.struts2.views.tiles.TilesResult" />
>         <result-type name="myBytesResult"
> class="com.icensa.action.MyBytesResult" ></result-type><br>
>      </result-types>
>       <action name="myAction" class="com.icensa.action.MyAction">
>           <result name="myImageResult" type="myBytesResult" />
>       </action>
> </package>
> My MyBytesResult class is:
>
> public class MyBytesResult implements Result {
>
>  private static final long serialVersionUID = 1L;
>  
>
>  public void execute(ActionInvocation invocation) throws
> Exception {
>    
>    MyAction action = (MyAction) invocation.getAction();
>    HttpServletResponse response =
> ServletActionContext.getResponse();
>
>      response.setContentType("image/jpeg");
>    
> //response.setContentLength(action.getMyContentLength());
>
>    
> response.getOutputStream().write(action.getMyImageInBytes());
>    response.getOutputStream().flush();
>  }
>
> }
>
> And MyAction class is:
>
> public class MyAction extends ActionSupport {
>  
>  private static final long serialVersionUID = 1L;
>  Blob image = null;
>   Connection con = null;
>   Statement stmt = null;
>   ResultSet rs = null;
>   byte[] imgData = null;
>   OutputStream o = null;
>   HttpServletResponse response = ServletActionContext.getResponse();
>  public String doDefault() {
>    System.out.println("doDefault()");
>    try {
>        Class.forName("com.mysql.jdbc.Driver");
>        con =
> DriverManager.getConnection("jdbc:mysql://localhost:3306/proje
> ct","root","pass");
>        stmt = con.createStatement();
>        rs = stmt.executeQuery("select * from
> books_tb where
> category='General' order by publish_date desc");
>        while (rs.next()) {
>           image = rs.getBlob(11);
>           imgData =
> image.getBytes(1,(int)image.length());          
>       }
>      }
>    catch (Exception e) {
>           System.out.println(e.getMessage());  
>      
>       }
>     return "myImageResult";
>   }
>
>   public byte[] getMyImageInBytes() {
>     System.out.println("getMyImageInBytes()");
>     try{
>    
>     }
>     catch (Exception e) {
>         System.out.println(e.getMessage());
>        
>     }
>     return imgData;
>   }
>
>  // public String getMyContentType() { }
>  // public String getMyContentDisposition() {}
>  // public int getMyContentLength() { }
>  // public int getMyBufferSize() { }
>
>  }
>
> when i run the code the image is not displayed and I get an
> error saying
> No result defined for action com.action.MyAction and result success
>
> In struts.xml is I provide reslut name="success" and the jsp,
> it does not
> throw an error but not displaying the image. However in any
> case it is not
> going to MyAction.java. What could i do to rectify this?
> Could provide you with required code if necessary..
>
> Thanks,
> Aruna
>
> --
> View this message in context:
> http://old.nabble.com/Displaying-an-image-in-JSP-in-struts%2Bt
iles-project-tp27020146p27020146.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)
>
>
Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates Direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.



Attachment: user_204499.ezm (zipped)
Hi,

  I have a plain vanilla servlet and I want to "include" via the
RequestDispatcher mechanism the rendered output of a struts page. Here's
the code I have:

  ServletContext ctx = servletConfig.getServletContext();
    RequestDispatcher rd =
ctx.getRequestDispatcher("/modules/foo/Home.do?myparam=value");
    if (rd != null) {

      StringWriter stringWriter = new StringWriter();
      MyResponse myresponse = new MyResponse(response, stringWriter);
      rd.include(request, myresponse);
      System.err.println(stringWriter.toString());

    }

I created MyResponse as a wrapper on ServletResponse that contains a
buffer so I can pull out the contents. However, I'm not getting anything....

Has anyone done this before? Or is there some easy way to do this?

Thanks, Jason



Attachment: user_204500.ezm (zipped)
2010/1/4 Paul Benedict <pbenedict@(protected)>:
> 1 = Struts 1

IOW, the old famous and, sigh, obsolete framework for web application.

> 2 = Struts 2

IOW, the framework that has been imported from the OpenSymphony's
WebWork framework codebase.

As you can see, they are not two versions of the same framework, but
two different products, connected only by their name.

Antonio


Attachment: user_204501.ezm (zipped)

Hi ,
Iam new to struts,currently iam migrating existing app to struts2
Iam having 2 web application running in server
I need to call 2nd web app in 1st
currently iam using Iframes & frame sets ,
is there any other way do this?
Is it possible to use Struts Tiles for this ?
Kindly reply
Thanks in advance,

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

Attachment: user_204502.ezm (zipped)
2010/1/5 steff_uk <aravindns@(protected)>:
> I need to call 2nd web app in 1st
> currently iam using Iframes & frame sets ,
> is there any other way do this?

Yes, you could extract the 2nd webapp response's body and insert it
into the 1st. For this, take a look at Sitemesh:
http://www.opensymphony.com/sitemesh/

> Is it possible to use Struts Tiles for this ?

You can use Tiles and Frames together, you should use the normal HTML
tags for frames and insert attributes using Tiles JSP tags. Notice
that Tiles may work only under a single webapp, currently it cannot
extract content from an external resource.
For questions about Tiles, please ask the Tiles Users mailing list:
http://tiles.apache.org/mail.html

Antonio


Attachment: user_204503.ezm (zipped)

Hi
I am using Struts 1.3.9 and validator_1_3_0.dtd. I have defined some message
resources in my struts-moduleX.xml as follows:




I then define a field validation for e.g. propertyX in my
validation-moduleX.xml as follows:


 
 


In this case, I place both 'label.propertyX' and 'errors.mask.propertyX' in
ApplicationResources, both are found ok, and the message displays the text
of both keys correctly.
If I place both in ModuleXResources, and define the validation without
specifying a bundle as follows:


 
 


the message also displays correctly.
If I place the arg key 'label.propertyX' in ApplicationResources and the msg
key 'errors.mask.propertyX' in ModuleXResources, and define the validation
as follows:


 
 


the message also displays correctly.
HOWEVER, if I place the arg key 'label.propertyX' in ModuleXResources and
the msg key 'errors.mask.propertyX' in ApplicationResources, and define the
validation as follows:


 
 


then I get '??label.propertyX??' in my message - i.e. label.propertyX is not
located.
Basically, it seems that if I specify a bundle attribute for the msg key,
then I must specify a bundle attribute for the arg key (even if it is a
different bundle) - it cannot find the arg key if it is left in the default
bundle.
As I would like the flexibility of choosing where to put my keys, I would
appreciate some explanation as to why this is so, or whether it is a bug.
thanks, Baljeet.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment: user_204504.ezm (zipped)
Hi,

We have an action which causes an Infinite recursion detection. I
don't have any idea why this is happening. When we call the action the
first time everything is ok. But when we call this the second time we
get this exception:

05.01.2010 13:45:00 org.apache.catalina.core.StandardWrapperValve invoke
SCHWERWIEGEND: Servlet.service() for servlet default threw exception
Infinite recursion detected: [/rmr/calcSumsAndSavePersonData!calcSums,
/rmr/iwa.error, /rmr/iwa.error] - [unknown location]
 at com.opensymphony.xwork2.ActionChainResult.execute (ActionChainResult.java:207)
 at com.opensymphony.xwork2.DefaultActionInvocation.executeResult (DefaultActionInvocation.java:348)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:253)
 at org.apache.struts2.impl.StrutsActionProxy.execute (StrutsActionProxy.java:50)
 at com.opensymphony.xwork2.ActionChainResult.execute (ActionChainResult.java:229)
 at com.opensymphony.xwork2.DefaultActionInvocation.executeResult (DefaultActionInvocation.java:348)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:253)
 at org.apache.struts2.impl.StrutsActionProxy.execute (StrutsActionProxy.java:50)
 at org.apache.struts2.dispatcher.Dispatcher.serviceAction (Dispatcher.java:504)
 at org.apache.struts2.dispatcher.FilterDispatcher.doFilter (FilterDispatcher.java:422)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206)
 at de.seb.iwa.view.sec.UserResourcesFilter.doFilter(UserResourcesFilter.java:76)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206)
 at de.seb.iwa.view.user.UserInfoFilter.doFilter(UserInfoFilter.java:67)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206)
 at de.seb.iwa.view.login.LoginFilter.doFilter(LoginFilter.java:124)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206)
 at de.seb.portal.signature.IIWSignatureFilter.doFilter(IIWSignatureFilter.java:144)
 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:191)
 at org.apache.catalina.valves.AccessLogValve.invoke (AccessLogValve.java:567)
 at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:128)


The ftl which causes the error when the action is triggered the second time:


<div id="jahrFormFields" class="fieldset">
<h1>Gueltigkeit</h1>
<div class="addcontent">
 <label class="medium result">Jahr</label>
 <@(protected)
result" tabindex="10"/>
 <span class="spacer">&nbsp;</span>
<br />
</div>
</div>
<br />

<div id="aktivaFormFields" class="fieldset">
<h1>Aktiva</h1>
<div class="content">

<label class="medium">Immobilien</label>
<@(protected)"
value="%{getText('format.amount',{privatBilanz.summeImmobilien})}"
cssClass="small numeric" tabindex="10"/>
<span class="euro spacer">&euro;</span>
<br/>


</div> <!-- content -->
</div> <!-- fieldset -->
<br/>

<!-- ---------------------------------------------------------------------------
-->
<!-- Bind SaveButton with onclick
<!-- ---------------------------------------------------------------------------
-->

<@(protected)"
includeParams="none">
 <@(protected)>
</@(protected)>

<script language="JavaScript" type="text/javascript">
 var saveButton = $('#saveButton');
 saveButton.unbind("click");
 saveButton.click(function() {
   alert('${privatBilanzUrl}');
   showMask('privatBilanzWF', '${privatBilanzUrl}')
 });  
</script>

The Javascript:

 function showMask(workflowItemName, url) {
   var params = $("form").serialize();
   updateDiv('sitecontent', url, params);
   
 }

function updateDiv(div, actionUrl, params) {
 $('#'+div).load(actionUrl, params);
}

Struts.xml

   <action name="calcSumsAndSavePersonData" method="calcSums"
class="de.seb.rmr.view.action.EditPerson">
     <result name="success" type="tiles">rmr.Overview</result>
     <result name="privatBilanz" type="freemarker"
>/de/seb/rmr/view/ftl/hardfacts/privatBilanz.ftl</result>
     <result name="bilanzAktiva" type="freemarker"
>/de/seb/rmr/view/ftl/hardfacts/bilanzAktiva.ftl</result>
     <result name="bilanzPassiva" type="freemarker"
>/de/seb/rmr/view/ftl/hardfacts/bilanzPassiva.ftl</result>
     <result name="bilanzKennziffern" type="freemarker"
>/de/seb/rmr/view/ftl/hardfacts/bilanzKennziffern.ftl</result>
   </action>


I have no clue. No chained actions nothing. When I trigger the action
the second time, the action is not reached anymore.
I have never seen anything like this before.

I guess it has something to do with the form data.

Anyone any idea?

/Marc


Attachment: user_204505.ezm (zipped)
Hi,

We have an action which causes an Infinite recursion detection. I
don't have any idea why this is happening. When we call the action the
first time everything is ok. But when we call this the second time we
get this exception:

05.01.2010 13:45:00 org.apache.catalina.core.StandardWrapperValve invoke
SCHWERWIEGEND: Servlet.service() for servlet default threw exception
Infinite recursion detected: [/rmr/calcSumsAndSavePersonData!calcSums,
/rmr/iwa.error, /rmr/iwa.error] - [unknown location]
 at com.opensymphony.xwork2.ActionChainResult.execute (ActionChainResult.java:207)
 at com.opensymphony.xwork2.DefaultActionInvocation.executeResult (DefaultActionInvocation.java:348)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:253)
 at org.apache.struts2.impl.StrutsActionProxy.execute (StrutsActionProxy.java:50)
 at com.opensymphony.xwork2.ActionChainResult.execute (ActionChainResult.java:229)
 at com.opensymphony.xwork2.DefaultActionInvocation.executeResult (DefaultActionInvocation.java:348)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke (DefaultActionInvocation.java:253)
 at org.apache.struts2.impl.StrutsActionProxy.execute (StrutsActionProxy.java:50)
 at org.apache.struts2.dispatcher.Dispatcher.serviceAction (Dispatcher.java:504)
 at org.apache.struts2.dispatcher.FilterDispatcher.doFilter (FilterDispatcher.java:422)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206)
 at de.seb.iwa.view.sec.UserResourcesFilter.doFilter(UserResourcesFilter.java:76)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206)
 at de.seb.iwa.view.user.UserInfoFilter.doFilter(UserInfoFilter.java:67)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206)
 at de.seb.iwa.view.login.LoginFilter.doFilter(LoginFilter.java:124)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter (ApplicationFilterChain.java:206)
 at de.seb.portal.signature.IIWSignatureFilter.doFilter(IIWSignatureFilter.java:144)
 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:191)
 at org.apache.catalina.valves.AccessLogValve.invoke (AccessLogValve.java:567)
 at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:128)


The ftl which causes the error when the action is triggered the second time:


<div id="jahrFormFields" class="fieldset">
<h1>Gueltigkeit</h1>
<div class="addcontent">
 <label class="medium result">Jahr</label>
 <@(protected)
result" tabindex="10"/>
 <span class="spacer">&nbsp;</span>
<br />
</div>
</div>
<br />

<div id="aktivaFormFields" class="fieldset">
<h1>Aktiva</h1>
<div class="content">

<label class="medium">Immobilien</label>
<@(protected)"
value="%{getText('format.amount',{privatBilanz.summeImmobilien})}"
cssClass="small numeric" tabindex="10"/>
<span class="euro spacer">&euro;</span>
<br/>


</div> <!-- content -->
</div> <!-- fieldset -->
<br/>

<!-- ---------------------------------------------------------------------------
-->
<!-- Bind SaveButton with onclick
<!-- ---------------------------------------------------------------------------
-->

<@(protected)"
includeParams="none">
 <@(protected)>
</@(protected)>

<script language="JavaScript" type="text/javascript">
 var saveButton = $('#saveButton');
 saveButton.unbind("click");
 saveButton.click(function() {
   alert('${privatBilanzUrl}');
   showMask('privatBilanzWF', '${privatBilanzUrl}')
 });  
</script>


Attachment: user_204507.ezm (zipped)
Hi people,

i'm a newbie to struts2. I'm having too many problems modifing session
parameters. I use <%= session.getAttribute( "variable" ) %> to gain
access to "variable" and that works when i modify "variable" into a jsp
page, but not inside a struts action.

struts.xml:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
 "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
 "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>

 <constant name="struts.enable.DynamicMethodInvocation" value="false" />
 <constant name="struts.devMode" value="true" />

<package name="tads" namespace="/" extends="struts-default">

<action name="HolaMundo" class="tads.HolaMundo">
<result>/holaMundo.jsp</result>
</action>

<action name="Catalogo" class="tads.Catalogo">
  <result name="error">/ErrorCatalogo.jsp</result>
  <result>/Catalogo.jsp</result>
 </action>

<action name="Actualiza" class="tads.Actualiza">
  <result>/Actualiza.jsp</result>
 </action>



</package>

</struts>

extract from a jsp page, result from an ajax action working:

<s:form id="form" >
          <s:textfield name="politico" label="politico"/><br>  
          <s:hidden name="prueba" value="escondido" />
         </s:form>
         <s:url id="actualiza" value="/Actualiza.action" />

<sx:submit type="button" label="dale" href="%{actualiza}" formId="form"
align="center" targets="secondaryContent"/>

i see "politico" and "prueba" into Actualiza.action so the action
Actualiza works.

Actualiza.java:

package tads;
import java.util.*;

import javax.servlet.http.HttpSession;
import com.opensymphony.xwork2.ActionSupport;
import org.apache.struts2.interceptor.SessionAware;
import com.opensymphony.xwork2.ActionContext;


@SuppressWarnings("serial")
public class Actualiza extends ActionSupport implements SessionAware {
 private String politico;
 private String prueba;
 private Map session;
  public String execute() throws Exception {

    this.getSession().put("variable","pruebamil");
    return SUCCESS;
    }
 public String getPolitico() {
    return politico;
 }

 public void setPolitico(String politico) {
    this.politico = politico;
 }

 public String getPrueba() {
    return prueba;
 }

 public void setPrueba(String prueba) {
    this.prueba = prueba;
 }
 public void setSession(Map session) {
    this.session = session;
  }
     public Map getSession() {
    return session;
  }
}

in that situation. Actualiza.jsp doesn't show "variable" atribute from
session, using "<%= session.getAttribute( "variable" ) %>". It shows null.

can anybody help me? I'm doing exactly what struts2 FAQ say (How do we
get access to the session).

thanks in advance.

--
Sergio



Attachment: user_204508.ezm (zipped)
Sergio escribió:
> Hi people,
>
> i'm a newbie to struts2. I'm having too many problems modifing session
> parameters. I use <%= session.getAttribute( "variable" ) %> to gain
> access to "variable" and that works when i modify "variable" into a
> jsp page, but not inside a struts action.
>
> struts.xml:
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE struts PUBLIC
>  "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>  "http://struts.apache.org/dtds/struts-2.0.dtd">
>
> <struts>
>
>  <constant name="struts.enable.DynamicMethodInvocation" value="false" />
>  <constant name="struts.devMode" value="true" />
>
> <package name="tads" namespace="/" extends="struts-default">
>
> <action name="HolaMundo" class="tads.HolaMundo">
> <result>/holaMundo.jsp</result>
> </action>
>
> <action name="Catalogo" class="tads.Catalogo">
>   <result name="error">/ErrorCatalogo.jsp</result>
>   <result>/Catalogo.jsp</result>
>  </action>
>
> <action name="Actualiza" class="tads.Actualiza">
>   <result>/Actualiza.jsp</result>
>  </action>
>
>
>
> </package>
>
> </struts>
>
> extract from a jsp page, result from an ajax action working:
>
> <s:form id="form" >
>           <s:textfield name="politico" label="politico"/><br>  
>           <s:hidden name="prueba" value="escondido" />
>          </s:form>
>          <s:url id="actualiza" value="/Actualiza.action" />
>
> <sx:submit type="button" label="dale" href="%{actualiza}"
> formId="form" align="center" targets="secondaryContent"/>
>
> i see "politico" and "prueba" into Actualiza.action so the action
> Actualiza works.
>
> Actualiza.java:
>
> package tads;
> import java.util.*;
>
> import javax.servlet.http.HttpSession;
> import com.opensymphony.xwork2.ActionSupport;
> import org.apache.struts2.interceptor.SessionAware;
> import com.opensymphony.xwork2.ActionContext;
>
>
> @SuppressWarnings("serial")
> public class Actualiza extends ActionSupport implements SessionAware {
>  private String politico;
>  private String prueba;
>  private Map session;
>   public String execute() throws Exception {
>
>     this.getSession().put("variable","pruebamil");
>     return SUCCESS;
>     }
>  public String getPolitico() {
>     return politico;
>  }
>
>  public void setPolitico(String politico) {
>     this.politico = politico;
>  }
>
>  public String getPrueba() {
>     return prueba;
>  }
>
>  public void setPrueba(String prueba) {
>     this.prueba = prueba;
>  }
>  public void setSession(Map session) {
>     this.session = session;
>   }
>      public Map getSession() {
>     return session;
>   }
> }
>
> in that situation. Actualiza.jsp doesn't show "variable" atribute from
> session, using "<%= session.getAttribute( "variable" ) %>". It shows
> null.
>
> can anybody help me? I'm doing exactly what struts2 FAQ say (How do we
> get access to the session).
>
> thanks in advance.
>
i've tried with

   <%= session.getAttribute( "variable" ) %>
 
and

   <s:property value="#session.variable"></s:property>

and surprise, both works. After closing and opening eclipse 3.4.0 works.
I think this is a bad memory managing of eclipse. Does anybody knows
something about this?

--
Sergio



Attachment: user_204514.ezm (zipped)
Hi Sergio,
add SessionAware interface to your action.

Best greetings,
Pawel Wielgus.

2010/1/5, Sergio <killing-is-my-business@(protected)>:
> Sergio escribió:
>> Hi people,
>>
>> i'm a newbie to struts2. I'm having too many problems modifing session
>> parameters. I use <%= session.getAttribute( "variable" ) %> to gain
>> access to "variable" and that works when i modify "variable" into a
>> jsp page, but not inside a struts action.
>>
>> struts.xml:
>>
>> <?xml version="1.0" encoding="UTF-8" ?>
>> <!DOCTYPE struts PUBLIC
>>  "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>>  "http://struts.apache.org/dtds/struts-2.0.dtd">
>>
>> <struts>
>>
>>  <constant name="struts.enable.DynamicMethodInvocation" value="false" />
>>  <constant name="struts.devMode" value="true" />
>>
>> <package name="tads" namespace="/" extends="struts-default">
>>
>> <action name="HolaMundo" class="tads.HolaMundo">
>> <result>/holaMundo.jsp</result>
>> </action>
>>
>> <action name="Catalogo" class="tads.Catalogo">
>>   <result name="error">/ErrorCatalogo.jsp</result>
>>   <result>/Catalogo.jsp</result>
>>  </action>
>>
>> <action name="Actualiza" class="tads.Actualiza">
>>   <result>/Actualiza.jsp</result>
>>  </action>
>>
>>
>>
>> </package>
>>
>> </struts>
>>
>> extract from a jsp page, result from an ajax action working:
>>
>> <s:form id="form" >
>>           <s:textfield name="politico" label="politico"/><br>
>>           <s:hidden name="prueba" value="escondido" />
>>          </s:form>
>>          <s:url id="actualiza" value="/Actualiza.action" />
>>
>> <sx:submit type="button" label="dale" href="%{actualiza}"
>> formId="form" align="center" targets="secondaryContent"/>
>>
>> i see "politico" and "prueba" into Actualiza.action so the action
>> Actualiza works.
>>
>> Actualiza.java:
>>
>> package tads;
>> import java.util.*;
>>
>> import javax.servlet.http.HttpSession;
>> import com.opensymphony.xwork2.ActionSupport;
>> import org.apache.struts2.interceptor.SessionAware;
>> import com.opensymphony.xwork2.ActionContext;
>>
>>
>> @SuppressWarnings("serial")
>> public class Actualiza extends ActionSupport implements SessionAware {
>>  private String politico;
>>  private String prueba;
>>  private Map session;
>>   public String execute() throws Exception {
>>
>>     this.getSession().put("variable","pruebamil");
>>     return SUCCESS;
>>     }
>>  public String getPolitico() {
>>     return politico;
>>  }
>>
>>  public void setPolitico(String politico) {
>>     this.politico = politico;
>>  }
>>
>>  public String getPrueba() {
>>     return prueba;
>>  }
>>
>>  public void setPrueba(String prueba) {
>>     this.prueba = prueba;
>>  }
>>  public void setSession(Map session) {
>>     this.session = session;
>>   }
>>      public Map getSession() {
>>     return session;
>>   }
>> }
>>
>> in that situation. Actualiza.jsp doesn't show "variable" atribute from
>> session, using "<%= session.getAttribute( "variable" ) %>". It shows
>> null.
>>
>> can anybody help me? I'm doing exactly what struts2 FAQ say (How do we
>> get access to the session).
>>
>> thanks in advance.
>>
> i've tried with
>
>     <%= session.getAttribute( "variable" ) %>
>
> and
>
>     <s:property value="#session.variable"></s:property>
>
> and surprise, both works. After closing and opening eclipse 3.4.0 works.
> I think this is a bad memory managing of eclipse. Does anybody knows
> something about this?
>
> --
> Sergio
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_204515.ezm (zipped)
Paweł Wielgus escribió:
> Hi Sergio,
> add SessionAware interface to your action.
>
> Best greetings,
> Pawel Wielgus.
>
> 2010/1/5, Sergio <killing-is-my-business@(protected)>:
>  
>> Sergio escribió:
>>  
>>> Hi people,
>>>
>>> i'm a newbie to struts2. I'm having too many problems modifing session
>>> parameters. I use <%= session.getAttribute( "variable" ) %> to gain
>>> access to "variable" and that works when i modify "variable" into a
>>> jsp page, but not inside a struts action.
>>>
>>> struts.xml:
>>>
>>> <?xml version="1.0" encoding="UTF-8" ?>
>>> <!DOCTYPE struts PUBLIC
>>>  "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>>>  "http://struts.apache.org/dtds/struts-2.0.dtd">
>>>
>>> <struts>
>>>
>>>  <constant name="struts.enable.DynamicMethodInvocation" value="false" />
>>>  <constant name="struts.devMode" value="true" />
>>>
>>> <package name="tads" namespace="/" extends="struts-default">
>>>
>>> <action name="HolaMundo" class="tads.HolaMundo">
>>> <result>/holaMundo.jsp</result>
>>> </action>
>>>
>>> <action name="Catalogo" class="tads.Catalogo">
>>>   <result name="error">/ErrorCatalogo.jsp</result>
>>>   <result>/Catalogo.jsp</result>
>>>  </action>
>>>
>>> <action name="Actualiza" class="tads.Actualiza">
>>>   <result>/Actualiza.jsp</result>
>>>  </action>
>>>
>>>
>>>
>>> </package>
>>>
>>> </struts>
>>>
>>> extract from a jsp page, result from an ajax action working:
>>>
>>> <s:form id="form" >
>>>           <s:textfield name="politico" label="politico"/><br>
>>>           <s:hidden name="prueba" value="escondido" />
>>>          </s:form>
>>>          <s:url id="actualiza" value="/Actualiza.action" />
>>>
>>> <sx:submit type="button" label="dale" href="%{actualiza}"
>>> formId="form" align="center" targets="secondaryContent"/>
>>>
>>> i see "politico" and "prueba" into Actualiza.action so the action
>>> Actualiza works.
>>>
>>> Actualiza.java:
>>>
>>> package tads;
>>> import java.util.*;
>>>
>>> import javax.servlet.http.HttpSession;
>>> import com.opensymphony.xwork2.ActionSupport;
>>> import org.apache.struts2.interceptor.SessionAware;
>>> import com.opensymphony.xwork2.ActionContext;
>>>
>>>
>>> @SuppressWarnings("serial")
>>> public class Actualiza extends ActionSupport implements SessionAware {
>>>  private String politico;
>>>  private String prueba;
>>>  private Map session;
>>>   public String execute() throws Exception {
>>>
>>>     this.getSession().put("variable","pruebamil");
>>>     return SUCCESS;
>>>     }
>>>  public String getPolitico() {
>>>     return politico;
>>>  }
>>>
>>>  public void setPolitico(String politico) {
>>>     this.politico = politico;
>>>  }
>>>
>>>  public String getPrueba() {
>>>     return prueba;
>>>  }
>>>
>>>  public void setPrueba(String prueba) {
>>>     this.prueba = prueba;
>>>  }
>>>  public void setSession(Map session) {
>>>     this.session = session;
>>>   }
>>>      public Map getSession() {
>>>     return session;
>>>   }
>>> }
>>>
>>> in that situation. Actualiza.jsp doesn't show "variable" atribute from
>>> session, using "<%= session.getAttribute( "variable" ) %>". It shows
>>> null.
>>>
>>> can anybody help me? I'm doing exactly what struts2 FAQ say (How do we
>>> get access to the session).
>>>
>>> thanks in advance.
>>>
>>>    
>> i've tried with
>>
>>     <%= session.getAttribute( "variable" ) %>
>>
>> and
>>
>>     <s:property value="#session.variable"></s:property>
>>
>> and surprise, both works. After closing and opening eclipse 3.4.0 works.
>> I think this is a bad memory managing of eclipse. Does anybody knows
>> something about this?
>>
>> --
>> Sergio
>>
>>
>> ---------------------------------------------------------------------
>> 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)
>
>
>
>  

public class Actualiza extends ActionSupport implements SessionAware

is that?

thanks for replying


--
Sergio



Attachment: user_204518.ezm (zipped)
Hi,
sorry for too fast response,
i see that it is implementing it,
another thing to notice is that
in action You have access to session field which is a map constructed
by struts, not real session object - as far as i remember.
In jsp you can do < s:property value="session.get('variable')" > to
show key from session in jsp.

Hope that it will help,
Pawel Wielgus.

2010/1/6, Sergio <killing-is-my-business@(protected)>:
> Paweł Wielgus escribió:
>> Hi Sergio,
>> add SessionAware interface to your action.
>>
>> Best greetings,
>> Pawel Wielgus.
>>
>> 2010/1/5, Sergio <killing-is-my-business@(protected)>:
>>
>>> Sergio escribió:
>>>
>>>> Hi people,
>>>>
>>>> i'm a newbie to struts2. I'm having too many problems modifing session
>>>> parameters. I use <%= session.getAttribute( "variable" ) %> to gain
>>>> access to "variable" and that works when i modify "variable" into a
>>>> jsp page, but not inside a struts action.
>>>>
>>>> struts.xml:
>>>>
>>>> <?xml version="1.0" encoding="UTF-8" ?>
>>>> <!DOCTYPE struts PUBLIC
>>>>  "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
>>>>  "http://struts.apache.org/dtds/struts-2.0.dtd">
>>>>
>>>> <struts>
>>>>
>>>>  <constant name="struts.enable.DynamicMethodInvocation" value="false"
>>>> />
>>>>  <constant name="struts.devMode" value="true" />
>>>>
>>>> <package name="tads" namespace="/" extends="struts-default">
>>>>
>>>> <action name="HolaMundo" class="tads.HolaMundo">
>>>> <result>/holaMundo.jsp</result>
>>>> </action>
>>>>
>>>> <action name="Catalogo" class="tads.Catalogo">
>>>>   <result name="error">/ErrorCatalogo.jsp</result>
>>>>   <result>/Catalogo.jsp</result>
>>>>  </action>
>>>>
>>>> <action name="Actualiza" class="tads.Actualiza">
>>>>   <result>/Actualiza.jsp</result>
>>>>  </action>
>>>>
>>>>
>>>>
>>>> </package>
>>>>
>>>> </struts>
>>>>
>>>> extract from a jsp page, result from an ajax action working:
>>>>
>>>> <s:form id="form" >
>>>>           <s:textfield name="politico" label="politico"/><br>
>>>>           <s:hidden name="prueba" value="escondido" />
>>>>          </s:form>
>>>>          <s:url id="actualiza" value="/Actualiza.action" />
>>>>
>>>> <sx:submit type="button" label="dale" href="%{actualiza}"
>>>> formId="form" align="center" targets="secondaryContent"/>
>>>>
>>>> i see "politico" and "prueba" into Actualiza.action so the action
>>>> Actualiza works.
>>>>
>>>> Actualiza.java:
>>>>
>>>> package tads;
>>>> import java.util.*;
>>>>
>>>> import javax.servlet.http.HttpSession;
>>>> import com.opensymphony.xwork2.ActionSupport;
>>>> import org.apache.struts2.interceptor.SessionAware;
>>>> import com.opensymphony.xwork2.ActionContext;
>>>>
>>>>
>>>> @SuppressWarnings("serial")
>>>> public class Actualiza extends ActionSupport implements SessionAware {
>>>>  private String politico;
>>>>  private String prueba;
>>>>  private Map session;
>>>>   public String execute() throws Exception {
>>>>
>>>>     this.getSession().put("variable","pruebamil");
>>>>     return SUCCESS;
>>>>     }
>>>>  public String getPolitico() {
>>>>     return politico;
>>>>  }
>>>>
>>>>  public void setPolitico(String politico) {
>>>>     this.politico = politico;
>>>>  }
>>>>
>>>>  public String getPrueba() {
>>>>     return prueba;
>>>>  }
>>>>
>>>>  public void setPrueba(String prueba) {
>>>>     this.prueba = prueba;
>>>>  }
>>>>  public void setSession(Map session) {
>>>>     this.session = session;
>>>>   }
>>>>      public Map getSession() {
>>>>     return session;
>>>>   }
>>>> }
>>>>
>>>> in that situation. Actualiza.jsp doesn't show "variable" atribute from
>>>> session, using "<%= session.getAttribute( "variable" ) %>". It shows
>>>> null.
>>>>
>>>> can anybody help me? I'm doing exactly what struts2 FAQ say (How do we
>>>> get access to the session).
>>>>
>>>> thanks in advance.
>>>>
>>>>
>>> i've tried with
>>>
>>>     <%= session.getAttribute( "variable" ) %>
>>>
>>> and
>>>
>>>     <s:property value="#session.variable"></s:property>
>>>
>>> and surprise, both works. After closing and opening eclipse 3.4.0 works.
>>> I think this is a bad memory managing of eclipse. Does anybody knows
>>> something about this?
>>>
>>> --
>>> Sergio
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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)
>>
>>
>>
>>
>
> public class Actualiza extends ActionSupport implements SessionAware
>
> is that?
>
> thanks for replying
>
>
> --
> Sergio
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


Attachment: user_204509.ezm (zipped)
Hello,

I have an action result type dispatcher with param name location equal to the path to the JSP, but I have precompiled the JSPs and it now seems the dispatcher cannot locate the JSP class. I tried changing the location to the fully qualified class name of the compiled JSP with the same result: There is no Action mapped for action name MyAction (unknown location)

Is there a way to reference the precompiled JSP in the dispatcher?

Any help would be appreciated.

Thanks,
Lee



Attachment: user_204510.ezm (zipped)
I guess the main problem is that the request params are gone. So not only if the file not submitted, but none of the params are submitted. The rest of the params need to be made available, imo...

----------------------------------------------------------------------------------------------------------------
Frank Russo
Developer ▪ Financial Services Division
SAS® … THE POWER TO KNOW®


-----Original Message-----
From: paulus.benedictus@(protected)
Sent: Saturday, October 03, 2009 9:20 PM
To: Struts Users Mailing List
Subject: Re: How is the max file size controlled for file uploads in Struts 1.3.8?

Frank,

Do you prefer an exception? What would you do with it?

Paul

On Thu, Jul 9, 2009 at 8:17 AM, Frank Russo <Frank.Russo@(protected):
> org.apache.struts.util.RequestUtils has the following at lines 408-415:
>
>                Boolean maxLengthExceeded =
>                    (Boolean) request.getAttribute(MultipartRequestHandler.ATTRIBUTE_MAX_LENGTH_EXCEEDED);
>
>                if ((maxLengthExceeded != null)
>                    && (maxLengthExceeded.booleanValue())) {
>                    ((ActionForm) bean).setMultipartRequestHandler(multipartHandler);
>                    return;
>                }
>
> Why would it just return? Shouldn't it throw some kind of exception? When my action is called, I have no way to know that the max file size was exceeded, and my request params are empty, so the correct DispatchAction method isn't being called.
>
> Has anyone else seen this behavior?
>
> ----------------------------------------------------------------------------------------------------------------
> Frank Russo
> Developer ▪ Financial Services Division
> SAS® … THE POWER TO KNOW®
>
>

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



Attachment: user_204511.ezm (zipped)
My mistake, there needs to be a slash after the context, otherwise the page
was not loading completely (still not exactly sure way, probably due to
mod_jk - part of the page loaded, but not the s:action tag/dispatcher)

-----Original Message-----
From: java@(protected)]
Sent: Tuesday, January 05, 2010 4:57 PM
To: user@(protected)
Subject: Dispatcher with precompiled JSP

Hello,

I have an action result type dispatcher with param name location equal to
the path to the JSP, but I have precompiled the JSPs and it now seems the
dispatcher cannot locate the JSP class. I tried changing the location to
the fully qualified class name of the compiled JSP with the same result:
There is no Action mapped for action name MyAction (unknown location)

Is there a way to reference the precompiled JSP in the dispatcher?

Any help would be appreciated.

Thanks,
Lee


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





Attachment: user_204512.ezm (zipped)
Hello,

I don't understand why optionscollection doesn't persist the clicked value.

I'm using many of them: second one is filled after selecting one parameter
from the first one and so on but the thing is that after each selection it
reloads the jsp page without persisting the first clicked value in the drop
down list.

Do someone know the reason or even a tricky workaround ?

Thanks in advance

Attachment: user_204513.ezm (zipped)
Is the scope of the corresponding action-form "session"?


> -----Original Message-----
> From: Hanen Ben Rhouma [mailto:hanen105@(protected)]
> Sent: Wednesday, January 06, 2010 5:26 AM
> To: Struts Users Mailing List
> Subject: Why optionscollection doesn't persist the clicked value
>
> Hello,
>
> I don't understand why optionscollection doesn't persist the
> clicked value.
>
> I'm using many of them: second one is filled after selecting
> one parameter
> from the first one and so on but the thing is that after each
> selection it
> reloads the jsp page without persisting the first clicked
> value in the drop
> down list.
>
> Do someone know the reason or even a tricky workaround ?
>
> Thanks in advance
>
Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates Direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.



Attachment: user_204517.ezm (zipped)
To further clarify:
Is the optionscollection inside an <html:select> element?
Is the scope of the corresponding action-form "session"?

> -----Original Message-----
> From: Kawczynski, David
> Sent: Wednesday, January 06, 2010 9:46 AM
> To: Struts Users Mailing List
> Subject: RE: Why optionscollection doesn't persist the clicked value
>
> Is the scope of the corresponding action-form "session"?
>
>
> > -----Original Message-----
> > From: Hanen Ben Rhouma [mailto:hanen105@(protected)]
> > Sent: Wednesday, January 06, 2010 5:26 AM
> > To: Struts Users Mailing List
> > Subject: Why optionscollection doesn't persist the clicked value
> >
> > Hello,
> >
> > I don't understand why optionscollection doesn't persist the
> > clicked value.
> >
> > I'm using many of them: second one is filled after selecting
> > one parameter
> > from the first one and so on but the thing is that after each
> > selection it
> > reloads the jsp page without persisting the first clicked
> > value in the drop
> > down list.
> >
> > Do someone know the reason or even a tricky workaround ?
> >
> > Thanks in advance
> >
Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates Direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.



Attachment: user_204519.ezm (zipped)
Yes it is.

On Wed, Jan 6, 2010 at 4:19 PM, Kawczynski, David <
david_kawczynski@(protected):

> To further clarify:
> Is the optionscollection inside an <html:select> element?
> Is the scope of the corresponding action-form "session"?
>
> > -----Original Message-----
> > From: Kawczynski, David
> > Sent: Wednesday, January 06, 2010 9:46 AM
> > To: Struts Users Mailing List
> > Subject: RE: Why optionscollection doesn't persist the clicked value
> >
> > Is the scope of the corresponding action-form "session"?
> >
> >
> > > -----Original Message-----
> > > From: Hanen Ben Rhouma [mailto:hanen105@(protected)]
> > > Sent: Wednesday, January 06, 2010 5:26 AM
> > > To: Struts Users Mailing List
> > > Subject: Why optionscollection doesn't persist the clicked value
> > >
> > > Hello,
> > >
> > > I don't understand why optionscollection doesn't persist the
> > > clicked value.
> > >
> > > I'm using many of them: second one is filled after selecting
> > > one parameter
> > > from the first one and so on but the thing is that after each
> > > selection it
> > > reloads the jsp page without persisting the first clicked
> > > value in the drop
> > > down list.
> > >
> > > Do someone know the reason or even a tricky workaround ?
> > >
> > > Thanks in advance
> > >
> Notice: This e-mail message, together with any attachments, contains
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New
> Jersey, USA 08889), and/or its affiliates Direct contact information for
> affiliates is available at http://www.merck.com/contact/contacts.html)
> that may be confidential, proprietary copyrighted and/or legally privileged.
> It is intended solely for the use of the individual or entity named on this
> message. If you are not the intended recipient, and have received this
> message in error, please notify us immediately by reply e-mail and then
> delete it from your system.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_204520.ezm (zipped)
That's odd.

If you were to <struts:write> the actionform's property
when the page is re-rendered, what does it contain?



> -----Original Message-----
> From: Hanen Ben Rhouma [mailto:hanen105@(protected)]
> Sent: Wednesday, January 06, 2010 10:54 AM
> To: Struts Users Mailing List
> Subject: Re: Why optionscollection doesn't persist the clicked value
>
> Yes it is.
>
> On Wed, Jan 6, 2010 at 4:19 PM, Kawczynski, David <
> david_kawczynski@(protected):
>
> > To further clarify:
> > Is the optionscollection inside an <html:select> element?
> > Is the scope of the corresponding action-form "session"?
> >
> > > -----Original Message-----
> > > From: Kawczynski, David
> > > Sent: Wednesday, January 06, 2010 9:46 AM
> > > To: Struts Users Mailing List
> > > Subject: RE: Why optionscollection doesn't persist the
> clicked value
> > >
> > > Is the scope of the corresponding action-form "session"?
> > >
> > >
> > > > -----Original Message-----
> > > > From: Hanen Ben Rhouma [mailto:hanen105@(protected)]
> > > > Sent: Wednesday, January 06, 2010 5:26 AM
> > > > To: Struts Users Mailing List
> > > > Subject: Why optionscollection doesn't persist the clicked value
> > > >
> > > > Hello,
> > > >
> > > > I don't understand why optionscollection doesn't persist the
> > > > clicked value.
> > > >
> > > > I'm using many of them: second one is filled after selecting
> > > > one parameter
> > > > from the first one and so on but the thing is that after each
> > > > selection it
> > > > reloads the jsp page without persisting the first clicked
> > > > value in the drop
> > > > down list.
> > > >
> > > > Do someone know the reason or even a tricky workaround ?
> > > >
> > > > Thanks in advance
> > > >
> > Notice: This e-mail message, together with any
> attachments, contains
> > information of Merck & Co., Inc. (One Merck Drive,
> Whitehouse Station, New
> > Jersey, USA 08889), and/or its affiliates Direct contact
> information for
> > affiliates is available at
> http://www.merck.com/contact/contacts.html)
> > that may be confidential, proprietary copyrighted and/or
> legally privileged.
> > It is intended solely for the use of the individual or
> entity named on this
> > message. If you are not the intended recipient, and have
> received this
> > message in error, please notify us immediately by reply
> e-mail and then
> > delete it from your system.
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates Direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system.



Attachment: user_204516.ezm (zipped)
See the FAQ

http://struts.apache.org/2.x/docs/how-do-we-repopulate-controls-when-validation-fails.html

On Mon, Jan 4, 2010 at 2:40 AM, Rakesh K nair <rakeshknair84@(protected):
>
> Hi
>
> In my struts2 jsp page there is a "selection list".I am populating the
> "list" from action class before rendering the page.I have some validation in
> the page.After submitting it calls the same page.If validation is successful
> it enters the action class and initializes the "list" , but if it is failure
> then it will go to "input" result from there to jsp page without entering
> action class then raising an null pointer exception.I need that "list" even
> if the validation fails.
>
> Please help me to get out of this problem
>
> expecting your kind interaction
>
> thanks in advance
>
> rakesh
> --
> View this message in context: http://old.nabble.com/struts-2-validation-error-tp27009670p27009670.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)
>
>

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