Re: Data-sources using struts:Tomcat's or NOT?

2006-04-20 Thread Dan Jas
I saw a comment earlier that the Struts data-source is deprecated and should 
not be used.



- Original Message - 
From: M.Liang Liu  [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Thursday, April 20, 2006 9:45 PM
Subject: Data-sources using struts:Tomcat's or NOT?



I am a freshman to struts.
And now I got a problem to make my decision which data-source should I
choose.

The  point is as following:
 I created a project via myeclipse using Tomcat 5.5.X as the web
server.Asa result,I can use the Tomcat data-source related to JNDI:
Step1.define the Resource in the Server.xml under the folder
%Tomcat_Home%\conf\
Step2.define the Resource-ref in the web.xml of the very project I
created .
And I find  it works well.

When I started to learn struts,I found that I can define the data-source 
in

the struts-config.xml.What has confused me is that it is an absolutely new
one different from Tomcat's.


My question is that: Which one is better namely more effective?Which one 
is

deprecated?Or both are OK?


Any pointers would be appreciated.




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



Re: Drawing of Struts web application

2006-04-01 Thread Dan Jas

Exadel Studio at http://exadel.com/web/portal/products/ExadelStudio
is free and will read your Struts-Config.xml file and display a mapping.

I don't know if you can print from it but it is a start.


- Original Message - 
From: Adam Hardy [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Saturday, April 01, 2006 11:46 AM
Subject: Re: Drawing of Struts web application



chuanjiang lo on 31/03/06 13:56, wrote:

Hi all,

I've recently developed a struts web application and with all the 
mappings

here and there..i think it would be good for me to have some visual
documentation on how the web application flows from a  page to another.

Is there any good open source tool or plugins to netbeans or eclipse i 
can

use to draw the mappings? It would be great if reverse engineering is
possible  so that it can just read all my struts-config files and come 
out

with the diagram.


Hi Chuan,
try argouml. I'm not sure about the reverse engineering capabilities, but 
it's good for UML.


Adam

-
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: Getting list of values from checkboxes

2006-03-30 Thread Dan Jas

I doubt this is optimized and was done in Struts 1.1.

I used a map with each entry holding the key for given record in the 
database.
Then all the check boxes mapped to the same map, each checkbox with a unique 
key.


My input form in the JSP has

input type=checkbox name=updateLastMtg(%= member.getId() %)/td

There is probably a way to get this to work as a Struts Tag.
The value in parens after updateLastMtg is what is stored in the map.

My Struts-Config has:

   form-bean name=MembershipSetLastMeetingForm
  type=com.jsfg.struts.form.MembershipSetLastMeetingForm
   form-property name=updateLastMtg type=java.lang.String /
   form-property name=needMembBadge type=java.lang.String /
   form-property name=meetingMonth type=java.lang.String /
   form-property name=meetingDay type=java.lang.String /
   form-property name=meetingYear type=java.lang.String /
   /form-bean

My Form bean has:

   private final Map updateLastMtg = new HashMap();
   public void setNeedMembBadge(String key, Object value) { 
needMembBadge.put(key, value);}
   public Object getNeedMembBadge(String key) {return 
needMembBadge.get(key);}

   public Map getMapNeedMembBadge (){return needMembBadge;}


Then the action just retrieves the map by calling getMapNeedMembBadge () and 
iterates through it to get the values.


Dan

- Original Message - 
From: Gary Feidt [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Thursday, March 30, 2006 11:15 AM
Subject: Re: Getting list of values from checkboxes



I had used a javascript function to gather all the checked checkbox ids
on the Form into a pipe delimited string and saved that in a hidden
field.  And then pulled that apart in the Action to deside which ones I
needed to delete.  It worked for me.

Gary

chuanjiang lo wrote:

Hi all,

I have this list of students display on a table.
Every record would have a checkbox beside it.
If the checkbox is checked and user press delete, the action form is

suppose

to collect all the checkbox values and delete the records in the

database.


Can anyone enlighten me on getting the list of values from the

checkbox that

is being checked?

Appreciate any help



__

Confidentiality Statement:
This email/fax, including attachments, may include confidential and/or 
proprietary information and may be used only by the person or entity to 
which it is addressed. If the reader of this email/fax is not the intended 
recipient or his or her agent, the reader is hereby notified that any 
dissemination, distribution or copying of this email/fax is prohibited. If 
you have received this email/fax in error, please notify the sender by 
replying to this message and deleting this email or destroying this 
facsimile immediately.


-
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: Problem with character encoding.

2006-03-21 Thread Dan Jas

Are you using WSAD on Windows and Tomcat on Unix/Linux?


- Original Message - 
From: Anjishnu Bandyopadhyay [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Tuesday, March 21, 2006 5:51 AM
Subject: Problem with character encoding.



Hi all,



I am generating a MS Word document through a JSP, by setting the JSP's
content type as application/msword;.

The .doc that is generated contains accentuated French characters
(special French characters).



I use Websphere (WSAD) to develop the code, but use Tomcat server for
deployment  final testing.

In WSAD, the .doc file that is generated properly displays the special
characters. But, in Tomcat, these characters are broken (distorted).



The code snippet (in JSP) is as follows:

%@ page language=java contentType=application/msword; charset=UTF-8
pageEncoding=UTF-8 %

%

 String fileName = abc.doc;

 response.setContentType(application/msword);

 response.setLocale(java.util.Locale.FRENCH);

 response.setHeader(Content-Disposition,attachment;filename=+
fileName);

%



Can anyone give me some pointer, regarding the problem might be? Am I
missing out something?



Thanks for your time.



With best regards,

Anjishnu.





 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, 
please notify the sender by e-mail and delete the original message. Further, 
you are not to copy, disclose, or distribute this e-mail or its contents to 
any other person and any such actions are unlawful. This e-mail may contain 
viruses. Infosys has taken every reasonable precaution to minimize this 
risk, but is not liable for any damage you may sustain as a result of any 
virus in this e-mail. You should carry out your own virus checks before 
opening the e-mail or attachment. Infosys reserves the right to monitor and 
review the content of all messages sent to or from this e-mail address. 
Messages sent to or from this e-mail address may be stored on the Infosys 
e-mail system.
***INFOSYS End of Disclaimer INFOSYS*** 



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



Re: Using saveToken and isTokenValid

2006-03-14 Thread Dan Jas
I would assume that you would see only the server response to your last 
click on submit, that the browser has thrown away the responses from the 
server for the first and second clicks on submit.


Dan

- Original Message - 
From: starki78 [EMAIL PROTECTED]

To: user user@struts.apache.org
Sent: Tuesday, March 14, 2006 10:53 AM
Subject: RE: Using saveToken and isTokenValid


Hi Thanks but my goal is just to tell
the user that only the first submit shall be processed!
My example works only partially

Nice greetings





-- Initial Header ---


From  : Kalcevich, Daniel [EMAIL PROTECTED]

To  : Struts Users Mailing List user@struts.apache.org
Cc  :
Date  : Tue, 14 Mar 2006 07:12:32 -0800
Subject : RE: Using  saveToken and  isTokenValid








What about putting the saveToken(request) at the bottom of the second
action as well?  This will put a new token into the request in the event
you want to submit again.

Dan

-Original Message-
From: starki78 [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 14, 2006 7:08 AM
To: user
Subject: Using saveToken and isTokenValid

Hi, I try to create a solution that prevents several
submits.

Therefore I place at the end of the first action:

   saveToken(request);

and in the second:

 if (!isTokenValid(request,true)) {
  // duplicate submit, return some error message to user

   ActionMessage msg = new
ActionMessage(errors.DuplicateSubmit,bDon't submit twice/b);

 messages.add(msg, msg);
 saveMessages(request, messages);
 return mapping.findForward(error);

   }
else {
  normal processing

}

The result is that then I click three times I get the warning
that I would like to know but
the first request isn't executed excecuted anymore.

Can you help me? Has someone a similar solution?

Nice greetings
Starky








-
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]