Re: Upgradation from 2.0.8 to 2.0.11

2007-11-27 Thread Shoaib Gauhar
Thanks. it works fine now. From now on i will be reading the trouble-shooting 
first before migrating anything.

Regards,
Shoaib

- Original Message 
From: Jeromy Evans <[EMAIL PROTECTED]>
To: Struts Users Mailing List 
Sent: Wednesday, November 28, 2007 12:12:04 PM
Subject: Re: Upgradation from 2.0.8 to 2.0.11

All interceptor names have been converted to camelcase.  eg. 
token-session to tokenSession

Take a look at the migration trouble-shooting guide:

http://cwiki.apache.org/confluence/display/S2WIKI/Troubleshooting+guide+migrating+from+Struts+2.0.x+to+2.1.x

and contribute to the notes if you've solved some other issues :-)

regards,
Jeromy Evans

Shoaib Gauhar wrote:
> Regarding my previous mail, i have some how narrowed down the problem. Below 
> is my action as described in my struts.xml.
>
> class="com.netsol.action.LibraryItemFormAction">
> name="input">/WEB-INF/jsp/netsol/LibraryItemForm.jsp
> name="error">/WEB-INF/jsp/netsol/LibraryItemForm.jsp
> type="redirect">/WEB-INF/jsp/netsol/LibraryItemForm.jsp
>
>
> name="invalid.token">/WEB-INF/jsp/netsol/LibraryItemForm.jsp
>  
> /WEB-INF/jsp/netsol/LibraryItemForm.jsp
>  
>
> When i remove the statement "" from 
> the above actions it works but token implementation doesnt work. But, when i 
> add it, it doesnt.
>
> Hello, 
> I have been using version 2.0.8 for the last couple of months. It was running 
> quite fine. But, now, i need to upgrade it to 2.1.0. I have downloaded the 
> struts-2.1 ZIP file from http://people.apache.org/builds/struts/2.1.0/ 
> I only replaced freemarker,xwork and struts-2-core jar from the downloaded 
> zip file. But it didnt work. So, i copied all of the jar files and then 
> checked but it failed again and gave the same error. 
> "SEVERE: Error filterStart 
> SEVERE: Context [/library] startup failed due to previous errors" 
> (/library is my projects path.) 
> The surprising thing is that the blank application which i downloaded from 
> the same URL is working fine so it must be something wrong with my settings 
> but somehow i have been unable to track it down. That is why i need your 
> help. My application also runs with struts 2.0.11 version perfectly. 
> Regards, 
> Shoaib Ahmad
>
>
>  
> 
> Be a better sports nut!  Let your teams follow you 
> with Yahoo Mobile. Try it now.   
> http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
>  


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  

Be a better pen pal. 
Text or chat with friends inside Yahoo! Mail. See how.  
http://overview.mail.yahoo.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Upgradation from 2.0.8 to 2.0.11

2007-11-27 Thread Jeromy Evans
All interceptor names have been converted to camelcase.  eg. 
token-session to tokenSession


Take a look at the migration trouble-shooting guide:

http://cwiki.apache.org/confluence/display/S2WIKI/Troubleshooting+guide+migrating+from+Struts+2.0.x+to+2.1.x

and contribute to the notes if you've solved some other issues :-)

regards,
Jeromy Evans

Shoaib Gauhar wrote:

Regarding my previous mail, i have some how narrowed down the problem. Below is 
my action as described in my struts.xml.


/WEB-INF/jsp/netsol/LibraryItemForm.jsp
/WEB-INF/jsp/netsol/LibraryItemForm.jsp
/WEB-INF/jsp/netsol/LibraryItemForm.jsp


/WEB-INF/jsp/netsol/LibraryItemForm.jsp
  
/WEB-INF/jsp/netsol/LibraryItemForm.jsp
  

When i remove the statement "" from the 
above actions it works but token implementation doesnt work. But, when i add it, it doesnt.

Hello, 
I have been using version 2.0.8 for the last couple of months. It was running quite fine. But, now, i need to upgrade it to 2.1.0. I have downloaded the struts-2.1 ZIP file from http://people.apache.org/builds/struts/2.1.0/ 
I only replaced freemarker,xwork and struts-2-core jar from the downloaded zip file. But it didnt work. So, i copied all of the jar files and then checked but it failed again and gave the same error. 
"SEVERE: Error filterStart 
SEVERE: Context [/library] startup failed due to previous errors" 
(/library is my projects path.) 
The surprising thing is that the blank application which i downloaded from the same URL is working fine so it must be something wrong with my settings but somehow i have been unable to track it down. That is why i need your help. My application also runs with struts 2.0.11 version perfectly. 
Regards, 
Shoaib Ahmad



  

Be a better sports nut!  Let your teams follow you 
with Yahoo Mobile. Try it now.  http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Upgradation from 2.0.8 to 2.0.11

2007-11-27 Thread Shoaib Gauhar
Regarding my previous mail, i have some how narrowed down the problem. Below is 
my action as described in my struts.xml.


/WEB-INF/jsp/netsol/LibraryItemForm.jsp
/WEB-INF/jsp/netsol/LibraryItemForm.jsp
/WEB-INF/jsp/netsol/LibraryItemForm.jsp


/WEB-INF/jsp/netsol/LibraryItemForm.jsp
  
/WEB-INF/jsp/netsol/LibraryItemForm.jsp
  

When i remove the statement "" from the 
above actions it works but token implementation doesnt work. But, when i add 
it, it doesnt.

Hello, 
I have been using version 2.0.8 for the last couple of months. It was running 
quite fine. But, now, i need to upgrade it to 2.1.0. I have downloaded the 
struts-2.1 ZIP file from http://people.apache.org/builds/struts/2.1.0/ 
I only replaced freemarker,xwork and struts-2-core jar from the downloaded zip 
file. But it didnt work. So, i copied all of the jar files and then checked but 
it failed again and gave the same error. 
"SEVERE: Error filterStart 
SEVERE: Context [/library] startup failed due to previous errors" 
(/library is my projects path.) 
The surprising thing is that the blank application which i downloaded from the 
same URL is working fine so it must be something wrong with my settings but 
somehow i have been unable to track it down. That is why i need your help. My 
application also runs with struts 2.0.11 version perfectly. 
Regards, 
Shoaib Ahmad


  

Be a better sports nut!  Let your teams follow you 
with Yahoo Mobile. Try it now.  
http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: similar applications - tomcat deployment

2007-11-27 Thread Leonidas Papadakis
ok so at  the end of the day you are in favor of one instance of tomcat 
per application...


I think i will adapt this solution since although you can restart an 
application from tomcat's manager, i have the feeling that a "corrupted" 
jvm will not "clear" correctly...


Regarding the virtual hosts, i think apache is not interfered at all 
(connecting via different workers) so you can set any virtual host ...


Regards,

Leonidas

Gary Affonso wrote:

Leonidas Papadakis wrote:

Also if apart from the dependency libraries, if you gather all your 
classes in a jar file isn't it easier to overwrite one file so that 
all apps will receive the update at once ?


In our case we rarely want each instance to be updated at the same 
time.  We're typically running slightly different versions of each app 
(a staging version, a testing version, etc.)


We've found it *way* better for developer sanity (in this case) just 
to treat each app as a little atomic unit.  If we update the staging 
server's Hibernate version from 3.1 to 3.2 we almost certainly do 
*not* want to apply that update to the production server at the same 
time.  We want to test the update within the confines of the staging 
server instance before we roll out that change.


If this was a cluster of all the *exact* same app I might be tempted 
to consolidate shared resources.  But in our case it's the wrong 
optimization.


Finally what about having one instance of tomcat per app ? What about 
this case ? Here we can be very autonomous (although increases 
support work)


There's a mode in Tomcat called "multiple instance mode" or something 
like that.  It allows you to have a central Tomcat install dir and 
then create "config" dirs for each additional tomcat instance.


A good tutorial on how to set this up is here...

  http://azeditech.com/tomcat/multiple-tomcat-instances.html

(As it sounds like you know, this is different than running each *app* 
as an instance inside a single tomcat server.  This allows you to run 
multiple *tomcat* instances in which you can run one or more apps.)


We've been running our various app versions (staging, testing, dev) 
this way for awhile (dedicating one tomcat instance to each app) and 
we really like it.


One benefit is that you can restart the entire Tomcat server for one 
app without affecting the others.  It also gives us more "peace of 
mind" knowing that each app is running under a separate JVM.


But I find the added complexity of the "multiple" instance 
configuration to be more of a pain than it's worth.


I'd rather just install 3 full tomcat "runtime" binaries (and 
associated directory tree) and do a normal config of each.


Consolidating to one Tomcat directory with supplemental config dirs 
for each tomcat instance buys us nothing practical over just running 
three instances of Tomcat each with it's own "full" installation 
directory.


And running the "multiple instance" configuration (from a central 
binary) is fairly uncommon (in my experience) which just tends to 
confuse new Tomcat administrators that you introduce to the system.


In short: I like having one Tomcat instance per app.  That's been 
really helpful for us.  But I'm not particularly impressed with using 
Tomcat's "multiple instance from a common binary" configuration option 
to achieve that.  Better, IMO, just to create those multiple instances 
with "full" installation directories for each instance.


- Gary

P.S.  Hopefully it's obvious that any multiple Tomcat instance 
solution (whether a shared binary or a single-binary-per-instance) 
will require that each instance (and therefore each app) listens on a 
unique port. The ability to do "virtual" hosts goes away (as far as I 
know).


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Upgradation problem from 2.0.8 to 2.1.0

2007-11-27 Thread Shoaib Gauhar
Hello,

I have been using version 2.0.8 for the last couple of months. It was running 
quite fine. But, now, i need to upgrade it to 2.1.0. I have downloaded the 
struts-2.1 ZIP file from http://people.apache.org/builds/struts/2.1.0/

I only replaced freemarker,xwork and struts-2-core jar from the downloaded zip 
file. But it didnt work. So, i copied all of the jar files and then checked but 
it failed again and gave the same error.

"SEVERE: Error filterStart
SEVERE: Context [/library] startup failed due to previous errors"

(/library is my projects path.)

The surprising thing is that the blank application which i downloaded from the 
same URL is working fine so it must be something wrong with my settings but 
somehow i have been unable to track it down. That is why i need your help. My 
application also runs with struts 2.0.11 version perfectly.

Regards,
Shoaib Ahmad


  

Be a better sports nut!  Let your teams follow you 
with Yahoo Mobile. Try it now.  
http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: similar applications - tomcat deployment

2007-11-27 Thread Gary Affonso

Leonidas Papadakis wrote:

Also if apart from the dependency libraries, if you gather all your 
classes in a jar file isn't it easier to overwrite one file so that all 
apps will receive the update at once ?


In our case we rarely want each instance to be updated at the same time. 
 We're typically running slightly different versions of each app (a 
staging version, a testing version, etc.)


We've found it *way* better for developer sanity (in this case) just to 
treat each app as a little atomic unit.  If we update the staging 
server's Hibernate version from 3.1 to 3.2 we almost certainly do *not* 
want to apply that update to the production server at the same time.  We 
want to test the update within the confines of the staging server 
instance before we roll out that change.


If this was a cluster of all the *exact* same app I might be tempted to 
consolidate shared resources.  But in our case it's the wrong optimization.


Finally what about having one instance of tomcat per app ? What about 
this case ? Here we can be very autonomous (although increases support 
work)


There's a mode in Tomcat called "multiple instance mode" or something 
like that.  It allows you to have a central Tomcat install dir and then 
create "config" dirs for each additional tomcat instance.


A good tutorial on how to set this up is here...

  http://azeditech.com/tomcat/multiple-tomcat-instances.html

(As it sounds like you know, this is different than running each *app* 
as an instance inside a single tomcat server.  This allows you to run 
multiple *tomcat* instances in which you can run one or more apps.)


We've been running our various app versions (staging, testing, dev) this 
way for awhile (dedicating one tomcat instance to each app) and we 
really like it.


One benefit is that you can restart the entire Tomcat server for one app 
without affecting the others.  It also gives us more "peace of mind" 
knowing that each app is running under a separate JVM.


But I find the added complexity of the "multiple" instance configuration 
to be more of a pain than it's worth.


I'd rather just install 3 full tomcat "runtime" binaries (and associated 
directory tree) and do a normal config of each.


Consolidating to one Tomcat directory with supplemental config dirs for 
each tomcat instance buys us nothing practical over just running three 
instances of Tomcat each with it's own "full" installation directory.


And running the "multiple instance" configuration (from a central 
binary) is fairly uncommon (in my experience) which just tends to 
confuse new Tomcat administrators that you introduce to the system.


In short: I like having one Tomcat instance per app.  That's been really 
helpful for us.  But I'm not particularly impressed with using Tomcat's 
"multiple instance from a common binary" configuration option to achieve 
that.  Better, IMO, just to create those multiple instances with "full" 
installation directories for each instance.


- Gary

P.S.  Hopefully it's obvious that any multiple Tomcat instance solution 
(whether a shared binary or a single-binary-per-instance) will require 
that each instance (and therefore each app) listens on a unique port. 
The ability to do "virtual" hosts goes away (as far as I know).


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tree ui component with each node having a checkbox (struts 2.0.9)

2007-11-27 Thread akash agrawal
Hi,

Can someone tell me how to build a tree with each node having a check box, so 
that user can input their choices by selecting/unchecking each node in the tree 
and input can be collected in the action?

Thanks in advance,

-Akash

   
-
Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how.

Re: Using Ajax components in Struts 2.0.11 problem

2007-11-27 Thread Serge Bornow

Dave,

I had the filter mapping set to /*.action
and did not have that property.

It works now, thank you kindly.

Serge

Dave Newton wrote:

The usual cause of not finding the JavaScript files is
that your S2 filter isn't mapped to "/*" or that the
"struts.serve.static" property is set to "false".

d.

--- Serge Bornow
<[EMAIL PROTECTED]> wrote:

  

Hello All,

I am quite new to Struts 2, i cannot figure out a
problem i am having, i 
hope someone might give me a hint.


I took this code from a Tutorial:

|

  
This is the first panel.
RoseIndia.nt
JavaJazzUp.com
NewsTrackIndia.com
  

  
This is the second panel.
  
  
  

This is the third panel.
Java Tutorial
PHP Tutorial
Linux Tutorial
  

  
This is the forth panel.
  

 


Which is supposed to show Tabs on a page (JSP).

Now the header contains:

|| 

Which is supposed to inject all the javaScript files
that Dojo requires 
and it does however those .js files ARE NOT FOUND.


Struts Docs keep referring to AJAX being CONFIGURED.
What does it mean? I read that core jar contains all
the dojo javascript 
files.


Is this a bug related to 2.0.11 , any suggestions?

I really appreciate it any comment on this.

Serge
|





-
  

To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Configuring Struts to use UTF-8 character encoding

2007-11-27 Thread Adam Gordon
Anyone know if there's a configuration parameter somewhere in Struts 
1.2.9 that configures the requests to use UTF-8 character encoding?


Everything I've found on the web says that Tomcat uses ISO-8859-1 as the 
default character encoding and that the "fix" is to add a filter that 
simply sets the character encoding on every request and it works, but it 
seems a bit heavy-handed.  Reading the Tomcat configuration pages (for 
5.5) talks about setting the URIEncoding attribute on the Connector 
element but that doesn't appear to have any effect in my sandbox 
application.  It's possible it's needed for when running Tomcat behind 
Apache.


What about adding the afore mentioned code to our webapp's action 
servlet or is this basically a glorified filter in the case where a 
webapp is really only using Struts - which our webapp is?


Thoughts?

--adam

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using Ajax components in Struts 2.0.11 problem

2007-11-27 Thread Dave Newton
The usual cause of not finding the JavaScript files is
that your S2 filter isn't mapped to "/*" or that the
"struts.serve.static" property is set to "false".

d.

--- Serge Bornow
<[EMAIL PROTECTED]> wrote:

> Hello All,
> 
> I am quite new to Struts 2, i cannot figure out a
> problem i am having, i 
> hope someone might give me a hint.
> 
> I took this code from a Tutorial:
> 
> |
> 
>labelposition="top" >
> This is the first panel.
> RoseIndia.nt
> JavaJazzUp.com
> NewsTrackIndia.com
>   
> 
>   
> This is the second panel.
>   
>   
>   
> This is the third panel.
> Java Tutorial
> PHP Tutorial
> Linux Tutorial
>   
> 
>   
> This is the forth panel.
>   
> 
>  
> 
> 
> Which is supposed to show Tabs on a page (JSP).
> 
> Now the header contains:
> 
> || 
> 
> Which is supposed to inject all the javaScript files
> that Dojo requires 
> and it does however those .js files ARE NOT FOUND.
> 
> Struts Docs keep referring to AJAX being CONFIGURED.
> What does it mean? I read that core jar contains all
> the dojo javascript 
> files.
> 
> Is this a bug related to 2.0.11 , any suggestions?
> 
> I really appreciate it any comment on this.
> 
> Serge
> |
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [ANN] Practical Apache Struts2 Web 2.0 Projects

2007-11-27 Thread Dave Newton
--- Ian Roughley <[EMAIL PROTECTED]> wrote on Sat Nov 24:
> Sure:
> 
> * ISBN10: 1-59059-903-9
> * ISBN13: 978-1-59059-903-7
> 

--- Martin Gainty <[EMAIL PROTECTED]> wrote:

> Massimo can you tell us the ISBN?
> 
> thx
> M--
> - Original Message -
> From: "MassimoH" <[EMAIL PROTECTED]>
> To: 
> Sent: Tuesday, November 27, 2007 4:18 PM
> Subject: Re: [ANN] Practical Apache Struts2 Web 2.0
> Projects
> 
> 
> >
> > My copy arrived in the mail over the weekend after
> having it on pre-order
> for
> > months.
> >
> > So far, so good! Great job!
> >
> >
> > Ian Roughley wrote:
> > >
> > > I'm pleased to announce the release of my newest
> book, "Practical Apache
> > > Struts2 Web 2.0 project".  And, no, I didn't
> pick the name :-)
> > >
> >
> > --
> > View this message in context:
>
http://www.nabble.com/-ANN--Practical-Apache-Struts2-Web-2.0-Projects-tf4845
> 559.html#a13980088
> > Sent from the Struts - User mailing list archive
> at Nabble.com.
> >
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Using Ajax components in Struts 2.0.11 problem

2007-11-27 Thread Serge Bornow

Hello All,

I am quite new to Struts 2, i cannot figure out a problem i am having, i 
hope someone might give me a hint.


I took this code from a Tutorial:

|

 
   This is the first panel.
   RoseIndia.nt
   JavaJazzUp.com
   NewsTrackIndia.com
 

 
   This is the second panel.
 
 
 

   This is the third panel.
   Java Tutorial
   PHP Tutorial
   Linux Tutorial
 

 
   This is the forth panel.
 




Which is supposed to show Tabs on a page (JSP).

Now the header contains:

|| 

Which is supposed to inject all the javaScript files that Dojo requires 
and it does however those .js files ARE NOT FOUND.


Struts Docs keep referring to AJAX being CONFIGURED.
What does it mean? I read that core jar contains all the dojo javascript 
files.


Is this a bug related to 2.0.11 , any suggestions?

I really appreciate it any comment on this.

Serge
|


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [ANN] Practical Apache Struts2 Web 2.0 Projects

2007-11-27 Thread Martin Gainty
Massimo can you tell us the ISBN?

thx
M--
- Original Message -
From: "MassimoH" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, November 27, 2007 4:18 PM
Subject: Re: [ANN] Practical Apache Struts2 Web 2.0 Projects


>
> My copy arrived in the mail over the weekend after having it on pre-order
for
> months.
>
> So far, so good! Great job!
>
>
> Ian Roughley wrote:
> >
> > I'm pleased to announce the release of my newest book, "Practical Apache
> > Struts2 Web 2.0 project".  And, no, I didn't pick the name :-)
> >
>
> --
> View this message in context:
http://www.nabble.com/-ANN--Practical-Apache-Struts2-Web-2.0-Projects-tf4845
559.html#a13980088
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



dynamic form action

2007-11-27 Thread Kate Fox

I have a lot of pages that have the same form fields included on them.
I would like this to be very simple and for it to be simple to add more 
pages like this.


I was thinking that I could have the form be embedded in the super class 
that all the pages implement, but I get an exception when I try to put 
in a dynamic value for the form action:


"According to TLD or attribute directive in tag file, attribute action 
does not accept any expressions"


Is there a better way to do what I want to accomplish?

Thanks,

Kate

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[OT] Re: Problem opening a file in Mozilla using window.open()

2007-11-27 Thread Dave Newton
You might want to try asking on a forum focused on
browser issues.

d.

--- Varun Ratra <[EMAIL PROTECTED]> wrote:

> 
> Hello,
> 
> I hope someone can help me on this. 
> I am using Struts version 2.0.9 in my project. 
> Using struts tags in JSP I am trying to open a doc
> from a file system. The
> tag is as follows:
> 
> 
> ${pageContext.request.contextPath}/ name= /"
>
onclick='window.open("file://c:/RightFax.doc")'/>
> 
> where,
> RightFax.doc is a file outside the web application
> contained in my local
> c:drive(just for testing puposes).
> 
> When I run the JSP with the above-mentioned struts
> tag in Interner Explorer,
> the application successfully opens the word document
> from my local c: drive.
> But,
> When I do the same in Mozilla Firefox, the
> application seems to just bypass
> the onclick() event in the JSP and does NOT open the
> word document from my
> local c: drive.
> 
> I would really appreciate if someone can help me
> resolve this problem I am
> having to open a document using Firefox.
> 
> -- 
> View this message in context:
>
http://www.nabble.com/Problem-opening-a-file-in-Mozilla-using-window.open%28%29-tf4884494.html#a13980090
> Sent from the Struts - User mailing list archive at
> Nabble.com.
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: similar applications - tomcat deployment

2007-11-27 Thread Leonidas Papadakis

Dear Gary,

thanks for your answer.

Actually my main concern is memory usage. I recently had 
java.lang.OutOfMemory issues when i had in total 7 similar apps. 
Unfortunately i had java 1.4.2. + tomcat 5.0.28 that made difficult to 
run a profiler. I switched to java 6 + tomcat 5.5.25 and the system 
seems to be more stable now. I tried to add jvm parameters to increase 
the memory heap -Xms , -Xmx but i noticed that it got better when i 
added |-XX:Permsize| and |-XX:MaxPermSize . The last parameters indicate 
more memory for loading the classes (correct me if i am wrong). I know 
that it might be a memory leak (i.e. from hibernate) but could it also 
be that it loaded all these classes separately and that was causing the 
problem ?


Of course i agree that hard space is not an issue at all. The issue now 
days is what to do with all the space that we have ;)

|
Also if apart from the dependency libraries, if you gather all your 
classes in a jar file isn't it easier to overwrite one file so that all 
apps will receive the update at once ?


Finally what about having one instance of tomcat per app ? What about 
this case ? Here we can be very autonomous (although increases support work)


Regards,

Leonidas

Gary Affonso wrote:

Leonidas Papadakis wrote:

Greetings to all,

i have the following scenario. I want to deploy 5 apps that have 
exactly the same classes (in jars). Only db access, static files and 
property files change. In short all WEB-INF/lib jar files are the 
same. So the question is : option1) If i put the jars under the 
common/endorsed directory logically they will be loaded once in the 
jvm so that all the applications will find them (common classpath). 
option 2) If i keep the WEB-INF/lib structure for each web 
application then the classes will be loaded for each application thus 
resulting in consuming more memory from the jvm ? I think from my 
experience in the second scenario if i do not put the jars in the 
WEB-INF folder the application does not start (of course since the 
libs are not in classpath) ...


So is it better practice and probably performance wise to place all 
jars to tomcat's directory ?


This has not been our practice.  We often run separate instances of 
the same webapp with only property/config files being different 
between the instances.


Having to tear-apart each packaged war just to consolidate the 
central/common .jar files just hasn't been worth it.


We keep each app instance (no matter how similar) as a separate 
deployable web-application under Tomcat and don't attempt to "share" 
common resources via Tomcat's central lib directory (or other 
mechanisms).


Now, as for the *effect* of that choice on our part... so far so good.

There's a disk-space hit, I suppose, in having duplicate copies of 
most files/libs in each of the webapps.  But, jeez, disk space is so 
cheap and the file sizes are so small that (to us) it doesn't even 
merit concern.


As for JVM memory consumption, you might be right.  Each tomcat webapp 
gets its own classloader (in general a "very good thing") and I 
suppose consolidating shared libs into Tomcat's common classloader 
might provide some memory-consumption benefit.  I've never looked into 
this so I can't answer that definitively one way or the other.  For us 
the answer is still the same as the disk-space issue: I'd rather buy 
more memory than start tearing apart my packaged webapps just to try 
and consolidate a few libs and save a few megs.  But that's us.


It's really an optimization choice.  Do you want to optimize for 
disk-space usage/memory usage, or do you want to optimize for ease of 
build/installation?


We vastly prefer to optimize for ease-of-build/installation.  
Disk-space and memory resources are far *less* precious than our own 
developer time.  But again, that's us.


- Gary

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Problem opening a file in Mozilla using window.open()

2007-11-27 Thread Varun Ratra

Hello,

I hope someone can help me on this. 
I am using Struts version 2.0.9 in my project. 
Using struts tags in JSP I am trying to open a doc from a file system. The
tag is as follows:

 ${pageContext.request.contextPath}/"
onclick='window.open("file://c:/RightFax.doc")'/> 
where,
RightFax.doc is a file outside the web application contained in my local
c:drive(just for testing puposes).

When I run the JSP with the above-mentioned struts tag in Interner Explorer,
the application successfully opens the word document from my local c: drive.
But,
When I do the same in Mozilla Firefox, the application seems to just bypass
the onclick() event in the JSP and does NOT open the word document from my
local c: drive.

I would really appreciate if someone can help me resolve this problem I am
having to open a document using Firefox.

-- 
View this message in context: 
http://www.nabble.com/Problem-opening-a-file-in-Mozilla-using-window.open%28%29-tf4884494.html#a13980090
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [ANN] Practical Apache Struts2 Web 2.0 Projects

2007-11-27 Thread MassimoH

My copy arrived in the mail over the weekend after having it on pre-order for
months.

So far, so good! Great job!


Ian Roughley wrote:
> 
> I'm pleased to announce the release of my newest book, "Practical Apache 
> Struts2 Web 2.0 project".  And, no, I didn't pick the name :-)
> 

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


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: similar applications - tomcat deployment

2007-11-27 Thread Gary Affonso

Leonidas Papadakis wrote:

Greetings to all,

i have the following scenario. I want to deploy 5 apps that have exactly 
the same classes (in jars). Only db access, static files and property 
files change. In short all WEB-INF/lib jar files are the same. So the 
question is : option1) If i put the jars under the common/endorsed 
directory logically they will be loaded once in the jvm so that all the 
applications will find them (common classpath). option 2) If i keep the 
WEB-INF/lib structure for each web application then the classes will be 
loaded for each application thus resulting in consuming more memory from 
the jvm ? I think from my experience in the second scenario if i do not 
put the jars in the WEB-INF folder the application does not start (of 
course since the libs are not in classpath) ...


So is it better practice and probably performance wise to place all jars 
to tomcat's directory ?


This has not been our practice.  We often run separate instances of the 
same webapp with only property/config files being different between the 
instances.


Having to tear-apart each packaged war just to consolidate the 
central/common .jar files just hasn't been worth it.


We keep each app instance (no matter how similar) as a separate 
deployable web-application under Tomcat and don't attempt to "share" 
common resources via Tomcat's central lib directory (or other mechanisms).


Now, as for the *effect* of that choice on our part... so far so good.

There's a disk-space hit, I suppose, in having duplicate copies of most 
files/libs in each of the webapps.  But, jeez, disk space is so cheap 
and the file sizes are so small that (to us) it doesn't even merit concern.


As for JVM memory consumption, you might be right.  Each tomcat webapp 
gets its own classloader (in general a "very good thing") and I suppose 
consolidating shared libs into Tomcat's common classloader might provide 
some memory-consumption benefit.  I've never looked into this so I can't 
answer that definitively one way or the other.  For us the answer is 
still the same as the disk-space issue: I'd rather buy more memory than 
start tearing apart my packaged webapps just to try and consolidate a 
few libs and save a few megs.  But that's us.


It's really an optimization choice.  Do you want to optimize for 
disk-space usage/memory usage, or do you want to optimize for ease of 
build/installation?


We vastly prefer to optimize for ease-of-build/installation.  Disk-space 
and memory resources are far *less* precious than our own developer 
time.  But again, that's us.


- Gary

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



similar applications - tomcat deployment

2007-11-27 Thread Leonidas Papadakis

Greetings to all,

i have the following scenario. I want to deploy 5 apps that have exactly 
the same classes (in jars). Only db access, static files and property 
files change. In short all WEB-INF/lib jar files are the same. So the 
question is : option1) If i put the jars under the common/endorsed 
directory logically they will be loaded once in the jvm so that all the 
applications will find them (common classpath). option 2) If i keep the 
WEB-INF/lib structure for each web application then the classes will be 
loaded for each application thus resulting in consuming more memory from 
the jvm ? I think from my experience in the second scenario if i do not 
put the jars in the WEB-INF folder the application does not start (of 
course since the libs are not in classpath) ...


So is it better practice and probably performance wise to place all jars 
to tomcat's directory ?


Thank you very much

Leonidas

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: S2: Struts2 @SkipValidation does not work

2007-11-27 Thread Bionicoder

Hi Ted,

Thanks for reply. Actually there is no validation XML for list method. Also
I delete validation XML files for other method too. However the validation
still take effect. that is the thing confuse me.

Thanks again,

BC


Ted Husted wrote:
> 
> How is the validation for the list alias being declared? Is there also
> an XML file?
> 
> -Ted.
> 
> On Nov 27, 2007 3:16 AM, Bionicoder <[EMAIL PROTECTED]> wrote:
>>
>> Hi,
>>
>> I want to disable validation for certain Struts 2 method. For example, in
>> the following action class,
>>
>> public class CustomerAction extends ActionSupport  {
>>private Customer customer;
>>
>>public String input() {
>>  return INPUT;
>>}
>>
>>public String save() {
>>  return SUCCESS;
>>}
>>
>>@SkipValidation
>>public String  list() {
>>  List l = new ArrayList();
>>  l = getCustomerList();
>>
>>  return "list";
>>}
>>
>>public String execute() throws Exception {
>> return SUCCESS;
>> }
>>
>> }
>>
>> I want to disable validation for 'list' method. However, the validation
>> still takes effect. The symptom is if there is no input in the form
>> before
>> clicking "List" button to execute 'list' method, it will return to
>> 'INPUT"
>> result which is not what I want. If there is some input, for example,
>> checking a checkbox before clicking the 'List" button, then it will run
>> into
>> 'list" method and give a right result.
>>
>> Obviously, it still try to validate before executing 'list' method even
>> there is @SkipValidation annotation. Has anybody come cross the similiar
>> problem before? The struts version is 2.0.9.
>>
>> Thanks!
>>
>> BC
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/S2%3A-Struts2-%40SkipValidation-does-not-work-tf4880341.html#a13979133
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can struts2 tag embeded inside javascript

2007-11-27 Thread Martin Gainty
an available option is to treat your content as Character Data

/*  */


Interestingly enough the JavascriptValidatorTag has a cdata attribute
available for JS methods when XHTML="true"
http://struts.apache.org/1.x/struts-taglib/apidocs/org/apache/struts/taglib/
html/JavascriptValidatorTag.html

HTH
M--
- Original Message -
From: "panpan" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, November 27, 2007 9:59 AM
Subject: Re: Can struts2 tag embeded inside javascript


>
> Hi Richard, thank you!  I have a seperate main.js for those functions.
I've
> posted my code in my other post. I'll try to use single quotes. Thanks
> again.
>
>
> Richard Sayre wrote:
> >
> > I don't see any javascript in your post but if you are creating an
> > imput element this should work as long as the javascript is on your
> > jsp page in 

Re: [S2] Image Generation

2007-11-27 Thread Martin Gainty

agreed

If you want a simple, easy to configure and works great in Tomcat PDF
Rendering Engine use FOP 0.94
http://www.eu.apache.org/dist/xmlgraphics/fop/source/

Ping me offline if you have any questions with fop..

M--
- Original Message -
From: "Ted Husted" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, November 27, 2007 9:34 AM
Subject: Re: [S2] Image Generation


> There's also an example on the Ajax page.
>
>  * http://struts.apache.org/2.x/docs/ajax.html
>
> The Ajax example is returning text, but it could just as easily stream
> back a PDF.
>
> --  HTH, Ted
> 
>
> On Nov 27, 2007 6:37 AM, Omkar Patil <[EMAIL PROTECTED]> wrote:
> >
> > I'm sorry the example is messed up as it contains xml. Here is the link
for
> > it -
> >
> > http://struts.apache.org/2.x/docs/stream-result.html
> >
> >
> >
> > Omkar Patil wrote:
> > >
> > > Julien,
> > >
> > > I could be completely off-mark here. If I understand correctly you are
> > > planning to generate a PDF (or an image) and then send it to the
browser.
> > > This can be achieved using the Stream Result. Here is the code snippet
> > > from the S2 documentation -
> > >
> > > 
> > >   image/jpeg
> > >   imageStream
> > >   filename="document.pdf"
> > >   1024
> > > 
> > >
> > > Hope this helps.
> > >
> > > - Omkar
> > >
> > >
> > > Julien Leonard-2 wrote:
> > >>
> > >> Hello all,
> > >>
> > >> I want to develop an action that return an image. This image is based
on
> > >> a image file and a text put in the middle of the image.
> > >> I've look at JasperReports and I think that is to complicated for my
> > >> use.
> > >> I think that I can do this with a simple xslt-fo and FOP to create a
> > >> PDF, but I don't see how to plug FOP in Struts2...
> > >> Maybe, I have to create a custom result type that use FOP?
> > >>
> > >> Can somebody help me?
> > >>
> > >> Julien
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: S2: concat doesn't work.

2007-11-27 Thread panpan

Thanks, Dave. That explains the problem I had for this example. 

newton.dave wrote:
> 
> --- panpan <[EMAIL PROTECTED]> wrote:
>> But the below is not working if replace 1 with a
>> variable
>> 
>>  
>> var number = 1;
>>  var name = '>
> value="additionalInterests['+number.toString()+'].bankName"/>';
>>  alert("Name: " + name);
>>  
> 
> JavaScript is executed *AFTER* your JSP is compiled.
> 
> I'd recommend looking in to the way browsers/HTTP work
> a bit.
> 
> d.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/S2%3A-concat-doesn%27t-work.-tf4883302.html#a13976588
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: S2: concat doesn't work.

2007-11-27 Thread panpan

Hi David,

Thank you for your explaination. I just started to work on Javascript
recently and have lots of things to learn.

Why is the first example working? It's a Struts2 tag insice the Javascript.
There are not much differences between the first example and the second
example except the second example replace 1 with a variable. But the
variable belongs to javascript. I guess i'm really confused.

appreciate your time,
panpan

Hernandez, David wrote:
> 
> 
> You're getting confused about the role of Javascript in your
> application, panpan. Javascript does not execute at the same time as
> Java. Java can generate dynamic javascript on the server and send it to
> a client. The javascript then executes on the client (web browser). You
> cannot have javascript code evaluated inside your Java expressions as
> per your example.
> 
> -Original Message-
> From: panpan [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, November 27, 2007 12:47 PM
> To: user@struts.apache.org
> Subject: S2: concat doesn't work.
> 
> 
> In one of my JSP page, I have javascript sectiontype="text/javascript">
>  var name = '';
>  alert("Name: " + name);
>  
> It's working. I can see the valud of the Name.
> 
> 
> But the below is not working if replace 1 with a variable 
> 
> var number = 1;
>  var name = ' value="additionalInterests['+number.toString()+'].bankName"/>';
>  alert("Name: " + name);
>  
> 
> The result is empty.
> 
> Thanks for your helps!
> --
> View this message in context:
> http://www.nabble.com/S2%3A-concat-doesn%27t-work.-tf4883302.html#a13975
> 923
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - - - -
> 
> This message is intended only for the personal and confidential use of the
> designated recipient(s) named above.  If you are not the intended
> recipient of this message you are hereby notified that any review,
> dissemination, distribution or copying of this message is strictly
> prohibited.  This communication is for information purposes only and
> should not be regarded as an offer to sell or as a solicitation of an
> offer to buy any financial product, an official confirmation of any
> transaction, or as an official statement of Lehman Brothers.  Email
> transmission cannot be guaranteed to be secure or error-free.  Therefore,
> we do not represent that this information is complete or accurate and it
> should not be relied upon as such.  All information is subject to change
> without notice.
> 
> 
> IRS Circular 230 Disclosure:
> Please be advised that any discussion of U.S. tax matters contained within
> this communication (including any attachments) is not intended or written
> to be used and cannot be used for the purpose of (i) avoiding U.S. tax
> related penalties or (ii) promoting, marketing or recommending to another
> party any transaction or matter addressed herein.
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/S2%3A-concat-doesn%27t-work.-tf4883302.html#a13976563
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: download button displays 2.1.0 ?

2007-11-27 Thread Dave Newton
No.

--- Giovanni Azua <[EMAIL PROTECTED]> wrote:

> hi,
> 
> I was surprised to see under
> http://struts.apache.org/2.x/ the download
> button is already displaying 2.1.0 ... is that
> correct? or is it in the 
> process
> of being correct? :)
> 
> regards,
> Giovanni
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: S2: concat doesn't work.

2007-11-27 Thread Dave Newton
--- panpan <[EMAIL PROTECTED]> wrote:
> But the below is not working if replace 1 with a
> variable
> 
>  
> var number = 1;
>  var name = '
value="additionalInterests['+number.toString()+'].bankName"/>';
>  alert("Name: " + name);
>  

JavaScript is executed *AFTER* your JSP is compiled.

I'd recommend looking in to the way browsers/HTTP work
a bit.

d.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: S2: concat doesn't work.

2007-11-27 Thread Hernandez, David

You're getting confused about the role of Javascript in your
application, panpan. Javascript does not execute at the same time as
Java. Java can generate dynamic javascript on the server and send it to
a client. The javascript then executes on the client (web browser). You
cannot have javascript code evaluated inside your Java expressions as
per your example.

-Original Message-
From: panpan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 27, 2007 12:47 PM
To: user@struts.apache.org
Subject: S2: concat doesn't work.


In one of my JSP page, I have javascript section   
 var name = '';
 alert("Name: " + name);
 
It's working. I can see the valud of the Name.


But the below is not working if replace 1 with a variable 

var number = 1;
 var name = '';
 alert("Name: " + name);
 

The result is empty.

Thanks for your helps!
--
View this message in context:
http://www.nabble.com/S2%3A-concat-doesn%27t-work.-tf4883302.html#a13975
923
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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

This message is intended only for the personal and confidential use of the 
designated recipient(s) named above.  If you are not the intended recipient of 
this message you are hereby notified that any review, dissemination, 
distribution or copying of this message is strictly prohibited.  This 
communication is for information purposes only and should not be regarded as an 
offer to sell or as a solicitation of an offer to buy any financial product, an 
official confirmation of any transaction, or as an official statement of Lehman 
Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  
Therefore, we do not represent that this information is complete or accurate 
and it should not be relied upon as such.  All information is subject to change 
without notice.


IRS Circular 230 Disclosure:
Please be advised that any discussion of U.S. tax matters contained within this 
communication (including any attachments) is not intended or written to be used 
and cannot be used for the purpose of (i) avoiding U.S. tax related penalties 
or (ii) promoting, marketing or recommending to another party any transaction 
or matter addressed herein.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



download button displays 2.1.0 ?

2007-11-27 Thread Giovanni Azua

hi,

I was surprised to see under http://struts.apache.org/2.x/ the download
button is already displaying 2.1.0 ... is that correct? or is it in the 
process

of being correct? :)

regards,
Giovanni

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



S2: concat doesn't work.

2007-11-27 Thread panpan

In one of my JSP page, I have javascript section

 
 var name = '';
 alert("Name: " + name);
 
It's working. I can see the valud of the Name.


But the below is not working if replace 1 with a variable

 
var number = 1;
 var name = '';
 alert("Name: " + name);
 

The result is empty.

Thanks for your helps!
-- 
View this message in context: 
http://www.nabble.com/S2%3A-concat-doesn%27t-work.-tf4883302.html#a13975923
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Unnecessary onsubmit

2007-11-27 Thread Martin Gilday
Sorry ignore.  Someone had been using a theme written for WebWork which
had this customOnsubmit in.  It seems to have changed in the new
form.ftl in 2.0.11 to be simply "return true;", which is better.


- Original message -
From: "Martin Gilday" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Date: Tue, 27 Nov 2007 16:29:11 +
Subject: Re: Unnecessary onsubmit

I've not used a validation attribute.  An example:
<@s.form namespace="/" action="registration!save" method="post">

The stack just has the standard interceptor ref 
Is this an old issue, I get the same alert in JIRA all the time
(WebWork?)

- Original message -
From: "Dave Newton" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Date: Tue, 27 Nov 2007 08:16:42 -0800 (PST)
Subject: Re: Unnecessary onsubmit

With the regular  tag without the
"validation" attribute set?!

d.

--- Martin Gilday <[EMAIL PROTECTED]> wrote:

> We are using the validaiton interceptor but not
> client side javascript
> validation.  However we are still seeing lots of
> onsubmit="customOnsubmit_registration(); return
> true;" appearing in the
> views.  On form submission you get a js error as the
> function does not
> exist.  Why is this appearing and is there a simple
> way to prevent it?
> 
> Thanks,
> Martin.
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Unnecessary onsubmit

2007-11-27 Thread Martin Gilday
I've not used a validation attribute.  An example:
<@s.form namespace="/" action="registration!save" method="post">

The stack just has the standard interceptor ref 
Is this an old issue, I get the same alert in JIRA all the time
(WebWork?)

- Original message -
From: "Dave Newton" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Date: Tue, 27 Nov 2007 08:16:42 -0800 (PST)
Subject: Re: Unnecessary onsubmit

With the regular  tag without the
"validation" attribute set?!

d.

--- Martin Gilday <[EMAIL PROTECTED]> wrote:

> We are using the validaiton interceptor but not
> client side javascript
> validation.  However we are still seeing lots of
> onsubmit="customOnsubmit_registration(); return
> true;" appearing in the
> views.  On form submission you get a js error as the
> function does not
> exist.  Why is this appearing and is there a simple
> way to prevent it?
> 
> Thanks,
> Martin.
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Unnecessary onsubmit

2007-11-27 Thread Dave Newton
With the regular  tag without the
"validation" attribute set?!

d.

--- Martin Gilday <[EMAIL PROTECTED]> wrote:

> We are using the validaiton interceptor but not
> client side javascript
> validation.  However we are still seeing lots of
> onsubmit="customOnsubmit_registration(); return
> true;" appearing in the
> views.  On form submission you get a js error as the
> function does not
> exist.  Why is this appearing and is there a simple
> way to prevent it?
> 
> Thanks,
> Martin.
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Retrieving last inserted ID

2007-11-27 Thread Gary Affonso

Unnikrishnan wrote:
Hi 


I am new to Struts 2. I would like to know how to retrieve last inserted id.

I have  page called "welcome" where I have 3 fields (name, telephone, email) 
my execute method is as follows. 


 public String execute() throws Exception {
CustomerFacadeLocal customerFacedeLocalObj= lookupCustomerFacade();
Customer customerObj = new Customer();
customerObj.setName(getName());
customerObj.setTelephone(getTelephone());
customerObj.setEmail(getEmail());
customerFacedeLocalObj.create(customerObj);
return SUCCESS;
}

So after this insertion happens , i need to take the last inserted id.


This has little to do with S2, it has to do with your DAO layer (in your 
case your CustomerFacade).


If it were me, I'd probably change the create() method to return the ID 
of the inserted object.  So the last lines would read something like this...



...
Long newId = customerFacedeLocalObj.create(customerObj);
return SUCCESS;
  }

Now the work of retrieving the Id is inside the create() method.  Still 
doesn't answer how to do the work of getting the last-inserted-id, though.


And that answer is typically database specific (and going to be effected 
by other dao-middleware like hibernate).  You do it one way with 
JDBC/MySQL.  You do it a completely different way with Hibernate/Oracle.


You should find some example code for grabbing the ID if you google a bit.

- Gary

P.S.  And let me add that you could completely do away with the facade 
lookup if you were using Spring.


P.P.S.  And let me also add that S2 could be directly injecting the 
name, telephone, and email data right your customerObj without having to 
call 3 additional "set" methods (or even create the customerObj at all). 
 Checkout the docs for ModelDriven and read some of the posts about 
direct-model-injection.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can struts2 tag embeded inside javascript

2007-11-27 Thread panpan

David, that is a good idea. I'll try it.


Hernandez, David wrote:
> 
> 
> Sorry panpan, I didn't see the original msg.
> Most easily, you can change your .js file to .jsp
> And 
> I don't see any reason that wouldn't work. Kind of cheesy though.
> You can map the URL ("/whatever.js") to a servlet which forwards to the
> "whatever.jsp" file if you want it to be a little cleaner.
> 
> -Original Message-
> From: panpan [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, November 27, 2007 9:51 AM
> To: user@struts.apache.org
> Subject: Re: Can struts2 tag embeded inside javascript
> 
> 
> Thank you Dave. Ok, I see.
> 
> Do you anyway I can do to solve my problem?
> 
> thanks!
> 
> 
> newton.dave wrote:
>> 
>> --- panpan <[EMAIL PROTECTED]> wrote:
>>> I've been struggling for this problem for several days. Please help 
>>> me out.
>> 
>> Okay.
>> 
>> Non-JSP pages aren't compiled into servlets.
>> 
>> A JavaScript file isn't a JSP page, hence is not compiled into a 
>> servlet, hence has zero notion of "custom tags".
>> 
>> d.
>> 
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> --
> View this message in context:
> http://www.nabble.com/Can-struts2-tag-embeded-inside-javascript-tf488208
> 2.html#a13972247
> Sent from the Struts - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - - - -
> 
> This message is intended only for the personal and confidential use of the
> designated recipient(s) named above.  If you are not the intended
> recipient of this message you are hereby notified that any review,
> dissemination, distribution or copying of this message is strictly
> prohibited.  This communication is for information purposes only and
> should not be regarded as an offer to sell or as a solicitation of an
> offer to buy any financial product, an official confirmation of any
> transaction, or as an official statement of Lehman Brothers.  Email
> transmission cannot be guaranteed to be secure or error-free.  Therefore,
> we do not represent that this information is complete or accurate and it
> should not be relied upon as such.  All information is subject to change
> without notice.
> 
> 
> IRS Circular 230 Disclosure:
> Please be advised that any discussion of U.S. tax matters contained within
> this communication (including any attachments) is not intended or written
> to be used and cannot be used for the purpose of (i) avoiding U.S. tax
> related penalties or (ii) promoting, marketing or recommending to another
> party any transaction or matter addressed herein.
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Can-struts2-tag-embeded-inside-javascript-tf4882082.html#a13973889
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Unnecessary onsubmit

2007-11-27 Thread Martin Gilday
We are using the validaiton interceptor but not client side javascript
validation.  However we are still seeing lots of
onsubmit="customOnsubmit_registration(); return true;" appearing in the
views.  On form submission you get a js error as the function does not
exist.  Why is this appearing and is there a simple way to prevent it?

Thanks,
Martin.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Empty pages returned for actions - how do I debug this?

2007-11-27 Thread Joachim Ansorg

Hi all,
I'm still new to Struts 2. I like the framework as a whole. A part which 
I find quite difficult to use is the debugging support. 
But I guess I'm missing something.


I have sometime the problem that Struts returns an empty page. Nothing, 
no html at all.
No exception in the log, even using the DEBUG level of Log4J. I even 
stepped through the whole struts action method invocation including all 
interceptors. Couldn't find it.


Several tries later to guess the reason it's usually a tag with wrong 
params or something similair.


How do I debug this kind of problem?
devMode is set. I'm using 2.1.1-SNAPSHOT, but also tried 2.1.0 and 
2.0.11. I'm also using Spring.


An example which I could not figure out so far:
This form makes the page to display empty.
After removing the  tag it displays just fine, with or without 
the TokenInterceptor enabled for the action.



   
   
  
   <%-- Basic information --%>

   
   
   
   

   
   theme="simple" requiredposition="right"/>

   
   


Thank you for hints or solutions!
Joachim

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can struts2 tag embeded inside javascript

2007-11-27 Thread panpan

Hi Richard, thank you!  I have a seperate main.js for those functions. I've
posted my code in my other post. I'll try to use single quotes. Thanks
again.


Richard Sayre wrote:
> 
> I don't see any javascript in your post but if you are creating an
> imput element this should work as long as the javascript is on your
> jsp page in 

RE: Can struts2 tag embeded inside javascript

2007-11-27 Thread panpan

David, thank you. How to redirect "whatever.js" to a dynamically generated
whatever.jsp file.
I have a main.js which has my function for this purpose

 function createInput(name,value,id,size,adressLine2,className) {
   var newInput = document.createElement('input');
   newInput.type="text";
   newInput.size=size;
   newInput.name=name;
   newInput.value=value;
   newInput.id=id;
   if(className) {newInput.className=className;}
   if(adressLine2 == true) {
$(newInput).observe("focus", function(event){
   isAddress2();
});
   }
   if(adressLine2 == false) {
$(newInput).observe("focus", function(event){
   notAddress2();
});
   }
   
   return newInput;
 
}


the Calling function addNewForm(){
  ...
  var part2 = document.createElement('fieldset'); part2.className = "part2";

part2.appendChild(createInput("additionalInterests["+newAreaNo+"].loanNumber",
" 
> 
> Dave is right as usual, but you could always redirect "whatever.js" to a
> dynamically generated whatever.jsp file.
> Additionally, there's no reason you can't write:
> 
>   var x = ;
> 
> inside a JSP file.
> You're going to have to be more specific, panpan . . .
> 
> -Original Message-
> From: Dave Newton [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, November 27, 2007 9:44 AM
> To: Struts Users Mailing List
> Subject: Re: Can struts2 tag embeded inside javascript
> 
> --- panpan <[EMAIL PROTECTED]> wrote:
>> I've been struggling for this problem for several days. Please help me
> 
>> out.
> 
> Okay.
> 
> Non-JSP pages aren't compiled into servlets.
> 
> A JavaScript file isn't a JSP page, hence is not compiled into a
> servlet, hence has zero notion of "custom tags".
> 
> d.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - - - -
> 
> This message is intended only for the personal and confidential use of the
> designated recipient(s) named above.  If you are not the intended
> recipient of this message you are hereby notified that any review,
> dissemination, distribution or copying of this message is strictly
> prohibited.  This communication is for information purposes only and
> should not be regarded as an offer to sell or as a solicitation of an
> offer to buy any financial product, an official confirmation of any
> transaction, or as an official statement of Lehman Brothers.  Email
> transmission cannot be guaranteed to be secure or error-free.  Therefore,
> we do not represent that this information is complete or accurate and it
> should not be relied upon as such.  All information is subject to change
> without notice.
> 
> 
> IRS Circular 230 Disclosure:
> Please be advised that any discussion of U.S. tax matters contained within
> this communication (including any attachments) is not intended or written
> to be used and cannot be used for the purpose of (i) avoiding U.S. tax
> related penalties or (ii) promoting, marketing or recommending to another
> party any transaction or matter addressed herein.
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Can-struts2-tag-embeded-inside-javascript-tf4882082.html#a13972258
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can struts2 tag embeded inside javascript

2007-11-27 Thread Hernandez, David

Sorry panpan, I didn't see the original msg.
Most easily, you can change your .js file to .jsp
And 
I don't see any reason that wouldn't work. Kind of cheesy though.
You can map the URL ("/whatever.js") to a servlet which forwards to the
"whatever.jsp" file if you want it to be a little cleaner.

-Original Message-
From: panpan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 27, 2007 9:51 AM
To: user@struts.apache.org
Subject: Re: Can struts2 tag embeded inside javascript


Thank you Dave. Ok, I see.

Do you anyway I can do to solve my problem?

thanks!


newton.dave wrote:
> 
> --- panpan <[EMAIL PROTECTED]> wrote:
>> I've been struggling for this problem for several days. Please help 
>> me out.
> 
> Okay.
> 
> Non-JSP pages aren't compiled into servlets.
> 
> A JavaScript file isn't a JSP page, hence is not compiled into a 
> servlet, hence has zero notion of "custom tags".
> 
> d.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

--
View this message in context:
http://www.nabble.com/Can-struts2-tag-embeded-inside-javascript-tf488208
2.html#a13972247
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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

This message is intended only for the personal and confidential use of the 
designated recipient(s) named above.  If you are not the intended recipient of 
this message you are hereby notified that any review, dissemination, 
distribution or copying of this message is strictly prohibited.  This 
communication is for information purposes only and should not be regarded as an 
offer to sell or as a solicitation of an offer to buy any financial product, an 
official confirmation of any transaction, or as an official statement of Lehman 
Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  
Therefore, we do not represent that this information is complete or accurate 
and it should not be relied upon as such.  All information is subject to change 
without notice.


IRS Circular 230 Disclosure:
Please be advised that any discussion of U.S. tax matters contained within this 
communication (including any attachments) is not intended or written to be used 
and cannot be used for the purpose of (i) avoiding U.S. tax related penalties 
or (ii) promoting, marketing or recommending to another party any transaction 
or matter addressed herein.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can struts2 tag embeded inside javascript

2007-11-27 Thread panpan

Thank you Dave. Ok, I see.

Do you anyway I can do to solve my problem?

thanks!


newton.dave wrote:
> 
> --- panpan <[EMAIL PROTECTED]> wrote:
>> I've been struggling for this problem for several
>> days. Please help me out.
> 
> Okay.
> 
> Non-JSP pages aren't compiled into servlets.
> 
> A JavaScript file isn't a JSP page, hence is not
> compiled into a servlet, hence has zero notion of
> "custom tags".
> 
> d.
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Can-struts2-tag-embeded-inside-javascript-tf4882082.html#a13972247
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can struts2 tag embeded inside javascript

2007-11-27 Thread Hernandez, David

Dave is right as usual, but you could always redirect "whatever.js" to a
dynamically generated whatever.jsp file.
Additionally, there's no reason you can't write:

var x = ;

inside a JSP file.
You're going to have to be more specific, panpan . . .

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 27, 2007 9:44 AM
To: Struts Users Mailing List
Subject: Re: Can struts2 tag embeded inside javascript

--- panpan <[EMAIL PROTECTED]> wrote:
> I've been struggling for this problem for several days. Please help me

> out.

Okay.

Non-JSP pages aren't compiled into servlets.

A JavaScript file isn't a JSP page, hence is not compiled into a
servlet, hence has zero notion of "custom tags".

d.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

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

This message is intended only for the personal and confidential use of the 
designated recipient(s) named above.  If you are not the intended recipient of 
this message you are hereby notified that any review, dissemination, 
distribution or copying of this message is strictly prohibited.  This 
communication is for information purposes only and should not be regarded as an 
offer to sell or as a solicitation of an offer to buy any financial product, an 
official confirmation of any transaction, or as an official statement of Lehman 
Brothers.  Email transmission cannot be guaranteed to be secure or error-free.  
Therefore, we do not represent that this information is complete or accurate 
and it should not be relied upon as such.  All information is subject to change 
without notice.


IRS Circular 230 Disclosure:
Please be advised that any discussion of U.S. tax matters contained within this 
communication (including any attachments) is not intended or written to be used 
and cannot be used for the purpose of (i) avoiding U.S. tax related penalties 
or (ii) promoting, marketing or recommending to another party any transaction 
or matter addressed herein.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can struts2 tag embeded inside javascript

2007-11-27 Thread Richard Sayre
I don't see any javascript in your post but if you are creating an
imput element this should work as long as the javascript is on your
jsp page in 

Re: Can struts2 tag embeded inside javascript

2007-11-27 Thread Dave Newton
--- panpan <[EMAIL PROTECTED]> wrote:
> I've been struggling for this problem for several
> days. Please help me out.

Okay.

Non-JSP pages aren't compiled into servlets.

A JavaScript file isn't a JSP page, hence is not
compiled into a servlet, hence has zero notion of
"custom tags".

d.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Can struts2 tag embeded inside javascript

2007-11-27 Thread panpan

I've been struggling for this problem for several days. Please help me out.

I'm using Javascript to dynamically generate something like below:

 

It works if it's directly in the JSP page.
But seems like Javascript doesn't recognice the Struts2 tag  So in the page, the input field got "" instead of value of this
variable.

I have to dynamically generate those INPUTs and also get the value from the
variable 'additionalInterests[0].addressLine2'. How to solve this problem?

Appreciate any inputs!
-- 
View this message in context: 
http://www.nabble.com/Can-struts2-tag-embeded-inside-javascript-tf4882082.html#a13971786
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] Image Generation

2007-11-27 Thread Ted Husted
There's also an example on the Ajax page.

 * http://struts.apache.org/2.x/docs/ajax.html

The Ajax example is returning text, but it could just as easily stream
back a PDF.

--  HTH, Ted


On Nov 27, 2007 6:37 AM, Omkar Patil <[EMAIL PROTECTED]> wrote:
>
> I'm sorry the example is messed up as it contains xml. Here is the link for
> it -
>
> http://struts.apache.org/2.x/docs/stream-result.html
>
>
>
> Omkar Patil wrote:
> >
> > Julien,
> >
> > I could be completely off-mark here. If I understand correctly you are
> > planning to generate a PDF (or an image) and then send it to the browser.
> > This can be achieved using the Stream Result. Here is the code snippet
> > from the S2 documentation -
> >
> > 
> >   image/jpeg
> >   imageStream
> >   filename="document.pdf"
> >   1024
> > 
> >
> > Hope this helps.
> >
> > - Omkar
> >
> >
> > Julien Leonard-2 wrote:
> >>
> >> Hello all,
> >>
> >> I want to develop an action that return an image. This image is based on
> >> a image file and a text put in the middle of the image.
> >> I've look at JasperReports and I think that is to complicated for my
> >> use.
> >> I think that I can do this with a simple xslt-fo and FOP to create a
> >> PDF, but I don't see how to plug FOP in Struts2...
> >> Maybe, I have to create a custom result type that use FOP?
> >>
> >> Can somebody help me?
> >>
> >> Julien

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Issue with Type Conversion and Select Boxes

2007-11-27 Thread mgainty
Hi Gunnar-

Are you implementing with com.opensymphony.xwork2.ValidationAwareSupport..if
so could you post the code?
Also Could you post struts.xml, struts-validation.xml and any
ActionClass-validation.xml as well as struts-conversion.xml?
Also in struts-default.xml please display the interceptor defined for
conversionError

Thanks
Martin-
- Original Message -
Wrom: GSWZIDREXCAXZOWCONEUQZAAFXISHJEXXIMQZ
To: 
Sent: Monday, November 26, 2007 9:20 PM
Subject: RE: Issue with Type Conversion and Select Boxes


>
> Thanks for your answer. But my issue quite Struts2 specific. Also, it
works
> quite well if I don't use struts 2 type converters (and specify
> listKey/listValue explicitly in that case).
>
> Gunnar
>
>
> mgainty wrote:
> >
> >
> > I dont believe that is not necessary for V1
> > ashttp://struts.apache.org/1.x/struts-taglib/tagreference.html#select
> > suggests 'value' as the name to compare for marking the option as
> > *selected*
> > If the preselection has not changed for V2..then I would suggest using
the
> > value attribute as preselected
> > Martin__Disclaimer and
> > confidentiality noteEverything in this e-mail and any attachments
relates
> > to the official business of Sender. This transmission is of a
confidential
> > nature and Sender does not endorse distribution to any party other than
> > intended recipient. Sender does not necessarily endorse content
contained
> > within this transmission.> > > Hi,> > I am using Struts 2.0.11.> > I am
> > running into an issue when using type converters and pre-populating>
> > corresponding select boxes. I defined a type converter in>
> > xwork-conversion.properties and everything works for normal text fields>
> > (converter is called perfectly). The problem I have occurs when>
> > pre-populating select boxes. > > Let's assume that I have a class Foo
that
> > has a field 'id'. In my converter> method 'convertToString' will return
a
> > String representation of the id field> (integer) and method
> > 'convertFromString' will set the 'id' field of Foo.> > This works fine
for
> > text fields (I know the setup may not make perfect> business sense but I
> > hope it illustrates the problem)> > Let's further assume that I have a
> > select box with a list of Foos. > > > >
> > To illustrate my propblem I left off the attributes 'listValue' and>
> > 'listKey'. In this particuliar case shouldn't the type converter>
> > (implicitly) be called for both value and key?> > Unfortunately the
> > converter is only called for the 'labels'. The 'values'> are retrieved
by
> > calling toString() on the Foo class which I did not> anticipate to
> > happen.> > As another work-around I tried this: > >  > name="foo" listKey="id">> > Now my list of foos is populated correctly
BUT
> > no value in the select box is> pre-selected, although the field 'foo'
has
> > a matching entry in 'foos'. I am> assuming that the problem might be
that
> > name="foo" is using the converter> and the key is populated by calling
> > foo.getId() and therefore returning an> integer?> > Is this possibly an
> > issue and worth opening a Jira ticket or do I miss> something here in my
> > setup?> > Thanks a lot in advance!> > Regards,> > Gunnar Hillert> > > >
>
> > > > > > > > > -- > View this message in context:
> >
http://www.nabble.com/Issue-with-Type-Conversion-and-Select-Boxes-tf4864875.
html#a13921943>
> > Sent from the Struts - User mailing list archive at Nabble.com.> > >
> > ->
To
> > unsubscribe, e-mail: [EMAIL PROTECTED]> For additional
> > commands, e-mail: [EMAIL PROTECTED]>
> > _
> > Connect and share in new ways with Windows Live.
> >
http://www.windowslive.com/connect.html?ocid=TXT_TAGLM_Wave2_newways_112007
> >
>
> --
> View this message in context:
http://www.nabble.com/-S2--Issue-with-Type-Conversion-and-Select-Boxes-tf486
4875.html#a13963484
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: bean:write on a Collection

2007-11-27 Thread Dave Newton
JSTL's  or, if you must,
.

d.

--- Minghui Yu <[EMAIL PROTECTED]> wrote:

> struts 1.
> 
> I barely made it work by using jsp and bean:define.
> 
>  type="org.lonetree.tc.core.Book" />
>   <%
>   Iterator itr=test.getAuthors().iterator();
>   while (itr.hasNext())
>   {
> out.println(itr.next());
> out.println("");
>   }
> %>
> 
> I'd like to know how to do in in a nice way.
> 
> Thanks.
> 
> On Nov 27, 2007 3:57 AM, Omkar Patil
> <[EMAIL PROTECTED]> wrote:
> >
> > Are you using struts1 or struts2?
> >
> > - Omkar
> >
> >
> > Minghui Yu wrote:
> > >
> > > In my Action, I have:
> request.setAttribute("book", book);
> > >
> > > book is a Book object, which has a getAuthors
> method. getAuthors
> > > returns a collection (Set)
> > >
> > > in JSP page, I want to list authors one by one.
> How shall I do?
> > >
> > > 
> does not work as I want.
> > >
> > > Thanks,
> > >
> > > --
> > > Thanks & Have a good day,
> > >
> > > YU, Minghui
> > >
> > >
>
-
> > > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > >
> > >
> > >
> >
> > --
> > View this message in context:
>
http://www.nabble.com/bean%3Awrite-on-a-Collection-tf4881224.html#a13969461
> > Sent from the Struts - User mailing list archive
> at Nabble.com.
> >
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> 
> 
> 
> -- 
> Thanks & Have a good day,
> 
> YU, Minghui
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: bean:write on a Collection

2007-11-27 Thread Minghui Yu
struts 1.

I barely made it work by using jsp and bean:define.


  <%
  Iterator itr=test.getAuthors().iterator();
  while (itr.hasNext())
  {
  out.println(itr.next());
  out.println("");
  }
  %>

I'd like to know how to do in in a nice way.

Thanks.

On Nov 27, 2007 3:57 AM, Omkar Patil <[EMAIL PROTECTED]> wrote:
>
> Are you using struts1 or struts2?
>
> - Omkar
>
>
> Minghui Yu wrote:
> >
> > In my Action, I have: request.setAttribute("book", book);
> >
> > book is a Book object, which has a getAuthors method. getAuthors
> > returns a collection (Set)
> >
> > in JSP page, I want to list authors one by one. How shall I do?
> >
> >  does not work as I want.
> >
> > Thanks,
> >
> > --
> > Thanks & Have a good day,
> >
> > YU, Minghui
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/bean%3Awrite-on-a-Collection-tf4881224.html#a13969461
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Thanks & Have a good day,

YU, Minghui

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: bean:write on a Collection

2007-11-27 Thread Omkar Patil

Are you using struts1 or struts2? 

- Omkar

Minghui Yu wrote:
> 
> In my Action, I have: request.setAttribute("book", book);
> 
> book is a Book object, which has a getAuthors method. getAuthors
> returns a collection (Set)
> 
> in JSP page, I want to list authors one by one. How shall I do?
> 
>  does not work as I want.
> 
> Thanks,
> 
> -- 
> Thanks & Have a good day,
> 
> YU, Minghui
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/bean%3Awrite-on-a-Collection-tf4881224.html#a13969461
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



bean:write on a Collection

2007-11-27 Thread Minghui Yu
In my Action, I have: request.setAttribute("book", book);

book is a Book object, which has a getAuthors method. getAuthors
returns a collection (Set)

in JSP page, I want to list authors one by one. How shall I do?

 does not work as I want.

Thanks,

-- 
Thanks & Have a good day,

YU, Minghui

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] Image Generation

2007-11-27 Thread Omkar Patil

I'm sorry the example is messed up as it contains xml. Here is the link for
it - 

http://struts.apache.org/2.x/docs/stream-result.html


Omkar Patil wrote:
> 
> Julien,
> 
> I could be completely off-mark here. If I understand correctly you are
> planning to generate a PDF (or an image) and then send it to the browser.
> This can be achieved using the Stream Result. Here is the code snippet
> from the S2 documentation - 
> 
> 
>   image/jpeg
>   imageStream
>   filename="document.pdf"
>   1024
> 
> 
> Hope this helps. 
> 
> - Omkar
> 
> 
> Julien Leonard-2 wrote:
>> 
>> Hello all,
>>  
>> I want to develop an action that return an image. This image is based on
>> a image file and a text put in the middle of the image.
>> I've look at JasperReports and I think that is to complicated for my
>> use.
>> I think that I can do this with a simple xslt-fo and FOP to create a
>> PDF, but I don't see how to plug FOP in Struts2...
>> Maybe, I have to create a custom result type that use FOP?
>>  
>> Can somebody help me?
>>  
>> Julien
>> 
>> 
>> This e-mail, any attachments and the information contained therein ("this
>> message") are confidential and intended solely for the use of the
>> addressee(s). If you have received this message in error please send it
>> back to the sender and delete it. Unauthorized publication, use,
>> dissemination or disclosure of this message, either in whole or in part
>> is strictly prohibited.
>> ** 
>> Ce message electronique et tous les fichiers joints ainsi que  les
>> informations contenues dans ce message ( ci apres "le message" ), sont
>> confidentiels et destines exclusivement a l'usage de la  personne a
>> laquelle ils sont adresses. Si vous avez recu ce message par erreur,
>> merci  de le renvoyer a son emetteur et de le detruire. Toutes diffusion,
>> publication, totale ou partielle ou divulgation sous quelque forme que se
>> soit non expressement autorisees de ce message, sont interdites.
>> ** 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--Image-Generation-tf4880807.html#a13969168
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [S2] Image Generation

2007-11-27 Thread Omkar Patil

Julien,

I could be completely off-mark here. If I understand correctly you are
planning to generate a PDF (or an image) and then send it to the browser.
This can be achieved using the Stream Result. Here is the code snippet from
the S2 documentation - 


  image/jpeg
  imageStream
  filename="document.pdf"
  1024


Hope this helps. 

- Omkar


Julien Leonard-2 wrote:
> 
> Hello all,
>  
> I want to develop an action that return an image. This image is based on
> a image file and a text put in the middle of the image.
> I've look at JasperReports and I think that is to complicated for my
> use.
> I think that I can do this with a simple xslt-fo and FOP to create a
> PDF, but I don't see how to plug FOP in Struts2...
> Maybe, I have to create a custom result type that use FOP?
>  
> Can somebody help me?
>  
> Julien
> 
> 
> This e-mail, any attachments and the information contained therein ("this
> message") are confidential and intended solely for the use of the
> addressee(s). If you have received this message in error please send it
> back to the sender and delete it. Unauthorized publication, use,
> dissemination or disclosure of this message, either in whole or in part is
> strictly prohibited.
> ** 
> Ce message electronique et tous les fichiers joints ainsi que  les
> informations contenues dans ce message ( ci apres "le message" ), sont
> confidentiels et destines exclusivement a l'usage de la  personne a
> laquelle ils sont adresses. Si vous avez recu ce message par erreur, merci 
> de le renvoyer a son emetteur et de le detruire. Toutes diffusion,
> publication, totale ou partielle ou divulgation sous quelque forme que se
> soit non expressement autorisees de ce message, sont interdites.
> ** 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-S2--Image-Generation-tf4880807.html#a13969166
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



how do i auto resize the dropdown part of s:select in IE

2007-11-27 Thread Vijay SM

how do i auto resize the dropdown part of s:select in IE because its wrking
file in Mozilla but in IE the dropdowns parts cuts the records

I am usibf the following code :



Fast help will be appreciated 
-- 
View this message in context: 
http://www.nabble.com/how-do-i-auto-resize-the-dropdown-part-of-s%3Aselect-in-IE-tf4880860.html#a13968206
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[S2] Image Generation

2007-11-27 Thread LEONARD Julien (Consulting for ACCOR Hotels)
Hello all,
 
I want to develop an action that return an image. This image is based on
a image file and a text put in the middle of the image.
I've look at JasperReports and I think that is to complicated for my
use.
I think that I can do this with a simple xslt-fo and FOP to create a
PDF, but I don't see how to plug FOP in Struts2...
Maybe, I have to create a custom result type that use FOP?
 
Can somebody help me?
 
Julien


This e-mail, any attachments and the information contained therein ("this 
message") are confidential and intended solely for the use of the addressee(s). 
If you have received this message in error please send it back to the sender 
and delete it. Unauthorized publication, use, dissemination or disclosure of 
this message, either in whole or in part is strictly prohibited.
** 
Ce message electronique et tous les fichiers joints ainsi que  les informations 
contenues dans ce message ( ci apres "le message" ), sont confidentiels et 
destines exclusivement a l'usage de la  personne a laquelle ils sont adresses. 
Si vous avez recu ce message par erreur, merci  de le renvoyer a son emetteur 
et de le detruire. Toutes diffusion, publication, totale ou partielle ou 
divulgation sous quelque forme que se soit non expressement autorisees de ce 
message, sont interdites.
** 



Re: S2: Struts2 @SkipValidation does not work

2007-11-27 Thread Ted Husted
How is the validation for the list alias being declared? Is there also
an XML file?

-Ted.

On Nov 27, 2007 3:16 AM, Bionicoder <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I want to disable validation for certain Struts 2 method. For example, in
> the following action class,
>
> public class CustomerAction extends ActionSupport  {
>private Customer customer;
>
>public String input() {
>  return INPUT;
>}
>
>public String save() {
>  return SUCCESS;
>}
>
>@SkipValidation
>public String  list() {
>  List l = new ArrayList();
>  l = getCustomerList();
>
>  return "list";
>}
>
>public String execute() throws Exception {
> return SUCCESS;
> }
>
> }
>
> I want to disable validation for 'list' method. However, the validation
> still takes effect. The symptom is if there is no input in the form before
> clicking "List" button to execute 'list' method, it will return to 'INPUT"
> result which is not what I want. If there is some input, for example,
> checking a checkbox before clicking the 'List" button, then it will run into
> 'list" method and give a right result.
>
> Obviously, it still try to validate before executing 'list' method even
> there is @SkipValidation annotation. Has anybody come cross the similiar
> problem before? The struts version is 2.0.9.
>
> Thanks!
>
> BC

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Retrieving last inserted ID

2007-11-27 Thread Omkar Patil

Unni,

I'm not sure if this is related to Struts2. CustomerFacadeLocal looks like
an application specific class for your application. You'll need to find out
what api this class provides within your application

- Omkar


Unnikrishnan wrote:
> 
> Hi 
> 
> I am new to Struts 2. I would like to know how to retrieve last inserted
> id.
> 
> I have  page called "welcome" where I have 3 fields (name, telephone,
> email)  my execute method is as follows. 
> 
>  public String execute() throws Exception {
> CustomerFacadeLocal customerFacedeLocalObj=
> lookupCustomerFacade();
> Customer customerObj = new Customer();
> customerObj.setName(getName());
> customerObj.setTelephone(getTelephone());
> customerObj.setEmail(getEmail());
> customerFacedeLocalObj.create(customerObj);
> return SUCCESS;
> }
> 
> So after this insertion happens , i need to take the last inserted id.
> 
> Please help 
> 
> Thanks in advance
> Unni
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Retrieving-last-inserted-ID-tf4880006.html#a13966734
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



S2: Struts2 @SkipValidation does not work

2007-11-27 Thread Bionicoder

Hi,

I want to disable validation for certain Struts 2 method. For example, in
the following action class,

public class CustomerAction extends ActionSupport  {
   private Customer customer;

   public String input() {
 return INPUT;
   }

   public String save() {
 return SUCCESS;
   }
  
   @SkipValidation
   public String  list() {
 List l = new ArrayList();
 l = getCustomerList();

 return "list";
   }

   public String execute() throws Exception {
return SUCCESS;
}

}

I want to disable validation for 'list' method. However, the validation
still takes effect. The symptom is if there is no input in the form before
clicking "List" button to execute 'list' method, it will return to 'INPUT"
result which is not what I want. If there is some input, for example,
checking a checkbox before clicking the 'List" button, then it will run into
'list" method and give a right result. 

Obviously, it still try to validate before executing 'list' method even
there is @SkipValidation annotation. Has anybody come cross the similiar
problem before? The struts version is 2.0.9.

Thanks!

BC
-- 
View this message in context: 
http://www.nabble.com/S2%3A-Struts2-%40SkipValidation-does-not-work-tf4880341.html#a13966505
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]