Re: getDataSource() in JSP

2004-10-07 Thread brenmcguire
getDataSource is a protected method inside the class Action, so you
cannot use it directly. Anyway I suggest to copy the code from the source
of Action, because it simply takes an object (i.e. the DataSource) from
the application scope.
Ciao
Antonio Petrelli

Shailender Jain wrote:

Hello,

I want to use the method getDataSource() from my JSP page.
I want to use this since  i am using some tag library to do some generic
things.

Can somebody let me know how i can use this function to get  connection
so that i can use them in tag library.
In this tag i will pass some sql query and it will generate some combo
box, table.


Thanks,
Shailender Jain



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



Re: Page Navigation in Struts

2004-10-07 Thread brenmcguire
Found on SourceForge:
http://valuelist.sourceforge.net/
It has nothing to do with Struts, it is usable in simple JSP pages.
Ciao
Antonio Petrelli

Shabada, Gnaneshwer wrote:

Hello All,

I am planning to implement a Page Navigation functionality to navigate
through search results in my project. I read about ValueListHandler
pattern
and thought that would be the best approach. But am not sure if Struts
has
any inbuilt navigation functionality or if I can adopt any other methods
that I am not aware of and that fits well with Struts. Can you guys
suggest
me on this?

Thanks
Gnan




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



Inserting a BLOB

2004-10-07 Thread Arundhati Kalia
Hi All,

Can anyone please guide me to the most efficient way of inserting a BLOB in
Oracle database thro Java ?

TIA
Arundhati

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



Struts and XML

2004-10-07 Thread Tito Eritja
Anyone knows some document or book of struts and XML?

We are working in application done with struts, but we have a provider
that gives us some xml response that we have to parse with xslt. We
would like to use the generated html with an ActionForm. Is it possible?


Thanks in advance.


tito
-- 
_

 Tito Eritja
 GnuPG key: FD022DAF ( http://www.keyserver.net/ )
 Key fingerprint = 31E3 7E17 3C59 DEEC 51AC  635C FF95 CC05 FD02 2DAF
_


signature.asc
Description: PGP signature


Struts and XML

2004-10-07 Thread Tito Eritja
Anyone knows some document or book of struts and XML?

We are working in application done with struts, but we have a provider
that gives us some xml response that we have to parse with xslt. We
would like to use the generated html with an ActionForm. Is it possible?


Thanks in advance.


tito
-- 
_

 Tito Eritja
 GnuPG key: FD022DAF ( http://www.keyserver.net/ )
 Key fingerprint = 31E3 7E17 3C59 DEEC 51AC  635C FF95 CC05 FD02 2DAF
_


signature.asc
Description: PGP signature


RE: cleaning session

2004-10-07 Thread Paul McCulloch
That isn't the purpose of the (confusingly named) reset method. Reset is
there to, typically, deal with the html forms submit checkbox fields (they
don't submit anything if they are null).

Paul

 -Original Message-
 From: Leandro Melo [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 06, 2004 5:43 PM
 To: Struts Users Mailing List
 Subject: Re: cleaning session
 
 
 If you have your action in HttpSession, why don`t you
 just call reset whenever a user clicks on the button
 supposed to start this wizard?
 
 
 
  --- struts lover [EMAIL PROTECTED] escreveu: 
  Hello everyone,
  I am facing this problem of session. I have my
  action
  form in session(a wizard like thing). Now if the
  user
  starts filling in values  and clicks on the NEXT
  button, to go on to the next screen and then instead
  of completing the process of application, clicks on
  some other link.
  Again he wants to start with the application
  process,
  the form get pre-populated with the previous values,
  as the form in still in session. I want a clean
  form.
  How to overcome this problem???
  Any ideas???
  Thanks. 
  
  
  
  ___
  Do you Yahoo!?
  Declare Yourself - Register online to vote today!
  http://vote.yahoo.com
  
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
  
   
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.
**


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



R: Inserting a BLOB

2004-10-07 Thread Amleto Di Salle
Hi,
This is an example.

Note the SQL statements.
Furthermore, if you have a table with data and after you want to add a
NULL BLOB column you have a problem in order to update the old rows. 
You have to delete these rows and re-insert using the empty_blob
function. You cannot update the old rows, i.e. I haven't succeed! :-)


BR
/Amleto

P.S.: Sorry for the spaghetti code! This is only an example.

--
SQL:

CREATE TABLE TEST.TEST (
ID NUMBER ( 20 ) NOT NULL,
IMAGE BLOB
);
--
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.OutputStream;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import javax.sql.DataSource;

import oracle.jdbc.pool.OracleConnectionPoolDataSource;

public class TestBlob {
public static void main( String[] args ) {

String databaseUrl =
jdbc:oracle:thin:@127.0.0.1:1521:OracleDB;
String databaseUser = system;
String databasePassword = manager;

try {
DataSource dataSource = getDataSource( databaseUrl,
oracle.jdbc.driver.OracleDriver, databaseUser, databasePassword );
Connection connection =  dataSource.getConnection();
connection.setAutoCommit( false );
PreparedStatement preparedStatement =
connection.prepareStatement( INSERT INTO TEST.TEST (ID, IMAGE) VALUES
(?, empty_blob()) );
preparedStatement.setInt( 1, 1 );
preparedStatement.executeUpdate();

PreparedStatement ps = connection.prepareStatement(SELECT *
FROM TEST.TEST WHERE ID=? FOR UPDATE);
ps.setInt( 1, 1);
ResultSet rs = ps.executeQuery();
rs.next();

oracle.sql.BLOB image =
((oracle.jdbc.driver.OracleResultSet)rs).getBLOB(IMAGE);
BufferedInputStream bufferedIn = new BufferedInputStream(new
FileInputStream(C:\\Images\\image.jpg));
OutputStream os = null;
os = image.getBinaryOutputStream();
int buffSize = image.getBufferSize();
byte[] buffer = new byte[buffSize];
int length = -1;

while ((length = bufferedIn.read(buffer)) != -1) {
os.write(buffer, 0, length);
}

bufferedIn.close();
os.flush();
os.close();
connection.commit();

}
catch ( Exception e ) {
e.printStackTrace();
}


}


public static OracleConnectionPoolDataSource getDataSource( String
URL,
String
driverType, String user, String password ) throws
InstantiationException, Exception {
if ( ( URL == null ) || ( URL.length() == 0 ) || ( driverType ==
null ) || ( driverType.length() == 0 ) || ( user == null ) || (
user.length() == 0 ) || ( password == null ) || ( password.length() == 0
) ) {
throw new InstantiationException( Error!! );
}

OracleConnectionPoolDataSource dataSource = null;
try {
dataSource = new OracleConnectionPoolDataSource();
dataSource.setURL( URL );
dataSource.setDriverType( driverType );
dataSource.setUser( user );
dataSource.setPassword( password );
}
catch ( SQLException ex ) {
throw new Exception( Error!!, ex );
}
return dataSource;
}
}

-Messaggio originale-
Da: Arundhati Kalia [mailto:[EMAIL PROTECTED] 
Inviato: giovedì 7 ottobre 2004 9.21
A: [EMAIL PROTECTED]
Oggetto: Inserting a BLOB


Hi All,

Can anyone please guide me to the most efficient way of inserting a BLOB
in Oracle database thro Java ?

TIA
Arundhati

-
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: cleaning session

2004-10-07 Thread Paul McCulloch
What a nonsense sentence! What I meant to say was:

That isn't the purpose of the (confusingly named) reset method. Reset is
there to, typically, deal with the way html forms submit checkbox fields
(they don't submit anything if they are null).

Paul

 -Original Message-
 From: Paul McCulloch [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 07, 2004 9:27 AM
 To: 'Struts Users Mailing List'
 Subject: RE: cleaning session
 
 
 That isn't the purpose of the (confusingly named) reset 
 method. Reset is
 there to, typically, deal with the html forms submit checkbox 
 fields (they
 don't submit anything if they are null).
 
 Paul
 
  -Original Message-
  From: Leandro Melo [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, October 06, 2004 5:43 PM
  To: Struts Users Mailing List
  Subject: Re: cleaning session
  
  
  If you have your action in HttpSession, why don`t you
  just call reset whenever a user clicks on the button
  supposed to start this wizard?
  
  
  
   --- struts lover [EMAIL PROTECTED] escreveu: 
   Hello everyone,
   I am facing this problem of session. I have my
   action
   form in session(a wizard like thing). Now if the
   user
   starts filling in values  and clicks on the NEXT
   button, to go on to the next screen and then instead
   of completing the process of application, clicks on
   some other link.
   Again he wants to start with the application
   process,
   the form get pre-populated with the previous values,
   as the form in still in session. I want a clean
   form.
   How to overcome this problem???
   Any ideas???
   Thanks. 
   
   
 
   ___
   Do you Yahoo!?
   Declare Yourself - Register online to vote today!
   http://vote.yahoo.com
   
  
  
 -
   To unsubscribe, e-mail:
   [EMAIL PROTECTED]
   For additional commands, e-mail:
   [EMAIL PROTECTED]
   

  
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam protection around 
  http://mail.yahoo.com 
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 **
 Axios Email Confidentiality Footer
 Privileged/Confidential Information may be contained in this 
 message. If you are not the addressee indicated in this 
 message (or responsible for delivery of the message to such 
 person), you may not copy or deliver this message to anyone. 
 In such case, you should destroy this message, and notify us 
 immediately. If you or your employer does not consent to 
 Internet email messages of this kind, please advise us 
 immediately. Opinions, conclusions and other information 
 expressed in this message are not given or endorsed by my 
 Company or employer unless otherwise indicated by an 
 authorised representative independent of this message.
 WARNING:
 While Axios Systems Ltd takes steps to prevent computer 
 viruses from being transmitted via electronic mail 
 attachments we cannot guarantee that attachments do not 
 contain computer virus code.  You are therefore strongly 
 advised to undertake anti virus checks prior to accessing the 
 attachment to this electronic mail.  Axios Systems Ltd grants 
 no warranties regarding performance use or quality of any 
 attachment and undertakes no liability for loss or damage 
 howsoever caused.
 **
 
 
 -
 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: Struts and XML

2004-10-07 Thread Yoni . RACHOVITCH
Hi,

Have a look to the struts-example.war file from the jakarta-struts package
It is struts-mailreader.war in the struts 1.2.4

that one deals with data stored in a XML database (database.xml).
then this xml file is open, read, updated and finally closed by the
application.

good example.

 


-Message d'origine-
De : Tito Eritja [mailto:[EMAIL PROTECTED]
Envoyé : jeudi 7 octobre 2004 10:06
À : struts
Objet : Struts and XML


Anyone knows some document or book of struts and XML?

We are working in application done with struts, but we have a provider
that gives us some xml response that we have to parse with xslt. We
would like to use the generated html with an ActionForm. Is it possible?


Thanks in advance.


tito
-- 
_

 Tito Eritja
 GnuPG key: FD022DAF ( http://www.keyserver.net/ )
 Key fingerprint = 31E3 7E17 3C59 DEEC 51AC  635C FF95 CC05 FD02 2DAF
_

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



RE: Internationalizing a Struts project

2004-10-07 Thread Hiran.Chaudhuri
Hi, Jason.

Have you tried using setCharacterEncoding(...)? For me on Tomcat 4.1.30 it showed no 
result at all, and other solutions available on the web state that 
setCharacterEncoding should work but has problems on many servlet containers. 
Therefore all I found refers to creating new strings from getParameter()

Hiran

-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99


 

 -Original Message-
 From: Jason Lea [mailto:[EMAIL PROTECTED] 
 Sent: Mittwoch, 6. Oktober 2004 22:01
 To: Struts Users Mailing List
 Subject: Re: Internationalizing a Struts project
 
 You should only need to do the following:
 
  request.setCharacterEncoding(UTF-8)
 
 before the form is populated.  I think you can do this by 
 overriding the RequestProcessor.  I use a filter to do this instead.
 
 [EMAIL PROTECTED] wrote:
 
 Hi, Craig.
 
 You hit the bull's eye. No I claim this not only to be a 
 JSP/Servlet problem.
 The way you describe will cause the browser to encode all 
 form data with UTF-8.
 Unfortunately the servlet container (Tomcat in my case) does 
 not know about this.
 
 To obtain the correct parameter values, someone has to call 
 (beware of 
 Nullpointers and UnsupportedEncodingExceptions)
 
 new 
 String(request.getParameter(...).getBytes(ISO-8859-1), UTF-8)
 
 This conversion must be applied to all parameter values. 
 Either it is done once in Struts, or each and every Action 
 has to convert the values Struts provides, breaking this 
 really nice architecture of FormBeans. In Cocoon I see this 
 type of conversion can be turned on and off by configuration.
 
 I recommend changing the RequestUtils' populate method 
 (which I did for me), or enhancing the RequestProcessor to 
 allow RequestUtils to be replaced by subclasses thereof so 
 people like me can plug in their own RequestUtils. What do you think?
 
 Hiran
 
 -
 Hiran Chaudhuri
 SAG Systemhaus GmbH
 Elsenheimer Straße 11
 80867 München
 Phone +49-89-54 74 21 34
 Fax   +49-89-54 74 21 99
 
 
  
 
   
 
 -Original Message-
 From: Craig McClanahan [mailto:[EMAIL PROTECTED]
 Sent: Dienstag, 5. Oktober 2004 23:47
 To: Struts Users Mailing List
 Subject: Re: Internationalizing a Struts project
 
 On Tue, 5 Oct 2004 16:31:14 +0200,
 [EMAIL PROTECTED] 
 [EMAIL PROTECTED] wrote:
 
 
 Hi there.
 
 I'm working on i18n of a Struts based project. All
   
 
 references I find about this topic deal with using messages 
 depending 
 on the user's locale. Has anyone ever experienced problems with 
 national special characters (such as currency symbols for 
 sterling or 
 euro?
 
 
 Hiran
 
   
 
 This issue is more related to the way JSP works than Struts, but 
 here's a summary.
 
 The most important consideration for national characters is the 
 character encoding that will be used to send the response 
 back to the 
 browser.  Unless you ask for something different 
 explicitly, JSP pages 
 are always sent back in ISO-8859-1 (basically 7-bit ASCII), 
 which will 
 create problems with characters outside the 7-bit range.
 
 To ask for the content encoding to be set differently, you use the 
 page directive at the top of your JSP pages, for example, to select
 UTF-8:
 
 %@ page contentType=text/html;charset=UTF-8 %
 
 If all of your national characters are produced by custom 
 tags (such 
 as bean:write or html:input in the case of Struts), 
 this should be 
 all you need.  If you also want to use literal characters in the 
 template text of your JSP page, you have to go one step further -- 
 actually store the source code of your JSP page in an appropriate 
 encoding, and tell the JSP compiler what that encoding is.  The 
 details of how you save pages in a particular encoding will 
 depend on 
 the text editor or IDE you are using, but the mechanism to tell JSP 
 about it is standard.  So, if you also use UTF-8 encoding for your 
 source page, you'd say:
 
   %@ page pageEncoding=UTF-8 
 contentType=text/html;charset=UTF-8 T%
 
 Craig McClanahan
 
 
 -
 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]
 
 
   
 
 
 
 --
 Jason Lea
 
 
 

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



RE: [OT] free javascript htmlEditor

2004-10-07 Thread VAN BROECK Jimmy
I've tried out the htmlarea in a php project and is pretty decent.
It works with additional plugins you can install.

Only minpoint is that it works on textarea's and it does the conversion after the page 
is loaded, so you can sometimes see the switch. Also standard way it works on all the 
textarea's it finds on the page, but this can be tweaked by yourself.

-Original Message-
From: David G. Friedman [mailto:[EMAIL PROTECTED]
Sent: donderdag 7 oktober 2004 3:45
To: Struts Users Mailing List
Subject: RE: [OT] free javascript htmlEditor


+1 on FCKEditor.  I'm putting it in a current webapp project.

-David

-Original Message-
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 06, 2004 1:54 PM
To: Struts Users Mailing List; Sergey Livanov
Subject: Re: [OT] free javascript htmlEditor


I have tried out the FCKeditor (Tag version) and looks good to me, the other
I haven't

http://www.fckeditor.net/

http://www.interactivetools.com/products/htmlarea/


Niall

- Original Message -
From: Sergey Livanov [EMAIL PROTECTED]
To: Struts Mailing List [EMAIL PROTECTED]
Sent: Wednesday, October 06, 2004 6:29 PM
Subject: [OT] free javascript htmlEditor



 Can you help me to find free javascript htmlEditor.


 --
 regards,
  Sergey  mailto:[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]



STRICTLY PERSONAL AND CONFIDENTIAL
This message may contain confidential and proprietary material for the sole use of the 
intended recipient. Any review or distribution by others is strictly prohibited. If 
you are not the intended recipient please contact the sender and delete all copies.

Ce Message est uniquement destiné aux destinataires indiqués et peut contenir des 
informations confidentielles. Si vous n'êtes pas le destinataire, vous ne devez pas 
révéler le contenu de ce message ou en prendre copie. Si vous avez reçu ce message par 
erreur, veuillez en informer l'expéditeur, ou La Poste immédiatement, avant de le 
supprimer.

Dit bericht is enkel bestemd voor de aangeduide ontvangers en kan vertrouwelijke 
informatie bevatten. Als u niet de ontvanger bent, dan mag u de inhoud van dit bericht 
niet bekendmaken noch kopiëren. Als u dit bericht per vergissing heeft ontvangen, 
gelieve er de afzender of De Post onmiddellijk van op de hoogte te brengen en het 
bericht vervolgens te verwijderen.


RE: cleaning session

2004-10-07 Thread Freddy Villalba A.
Hi,

I have never implemented anything like this (with Struts), but this is the
first thing I can think of...

Assuming your wizard is one-way (by this, I mean you have a linear graph -
1-2-3... -, no bifurcations and /or intersections and / or parallelism),
you could define your workflow by tagging the pages it is made of...
then, manage the wizard from a filter that is able to detect your getting
into one and your leaving it. Once it detects someone's left a wizard, and
knowing its components, it could have them cleaned off the corresponding
Session.

I believe, however, that this approach wouldn't work if the graph is not
linear.

I'll be glad to here your feedback (everybody).

HTH,
Freddy.

-Mensaje original-
De: Paul McCulloch [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 07 de octubre de 2004 10:27
Para: 'Struts Users Mailing List'
Asunto: RE: cleaning session


That isn't the purpose of the (confusingly named) reset method. Reset is
there to, typically, deal with the html forms submit checkbox fields (they
don't submit anything if they are null).

Paul

 -Original Message-
 From: Leandro Melo [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 06, 2004 5:43 PM
 To: Struts Users Mailing List
 Subject: Re: cleaning session


 If you have your action in HttpSession, why don`t you
 just call reset whenever a user clicks on the button
 supposed to start this wizard?



  --- struts lover [EMAIL PROTECTED] escreveu:
  Hello everyone,
  I am facing this problem of session. I have my
  action
  form in session(a wizard like thing). Now if the
  user
  starts filling in values  and clicks on the NEXT
  button, to go on to the next screen and then instead
  of completing the process of application, clicks on
  some other link.
  Again he wants to start with the application
  process,
  the form get pre-populated with the previous values,
  as the form in still in session. I want a clean
  form.
  How to overcome this problem???
  Any ideas???
  Thanks.
 
 
 
  ___
  Do you Yahoo!?
  Declare Yourself - Register online to vote today!
  http://vote.yahoo.com
 
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
 
 

 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com

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



**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you
are not the addressee indicated in this message (or responsible for delivery
of the message to such person), you may not copy or deliver this message to
anyone. In such case, you should destroy this message, and notify us
immediately. If you or your employer does not consent to Internet email
messages of this kind, please advise us immediately. Opinions, conclusions
and other information expressed in this message are not given or endorsed by
my Company or employer unless otherwise indicated by an authorised
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being
transmitted via electronic mail attachments we cannot guarantee that
attachments do not contain computer virus code.  You are therefore strongly
advised to undertake anti virus checks prior to accessing the attachment to
this electronic mail.  Axios Systems Ltd grants no warranties regarding
performance use or quality of any attachment and undertakes no liability for
loss or damage howsoever caused.
**


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



Browser page break with ms/word myme

2004-10-07 Thread Paulo Alvim
Hi!

I've read that the easier way to print using page break and Browser is to
send the ordinary text/html contents with proprietary MS-Word's page break
tags and tell the Browser to open that html using MS-Word. (In this case,
we know the users will have Word installed).

I couldn't make the Browser open my html using word. I've tried to set the
content type response in the Request Processor (my descendent) without
success...

Any one could help with the best approach using Struts? Is there any other
easier and light solution for page break (with specific header in each page,
etc...) using Browser (no .PDF and .DOCs!)?

Thanks in advance

Paulo Alvim
Powerlogic - Brazil


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



html:link parameter passing

2004-10-07 Thread M. Onur Tokan
hi,

I have a arraylist of BolgeDTO in request scope. I am iterating this
arraylist in the code below. The problem is I want to add a edit
button on the column. And I want to pass the whole properties to the
next form so The form will contain the data from the selected row. I
look at the html:link doc. It says that:


If you prefer to specify a java.util.Map that contains all of the
request parameters to be added to the hyperlink, use one of the
following techniques:Specify only the name attribute - The named JSP
bean (optionally scoped by the value of the scope attribute) must
identify a java.util.Map containing the parameters.


I tried this method by adding a Map property to the DTO and set it
from its constructor. But it didn't work. Any suggestions please?

logic:iterate id=b name=bolgeler
tr
td
bean:write name=b property=bolge/
/td
td
bean:write name=b property=bolge_kodu_s/
/td
td
bean:write name=b property=bolge_kodu_t/
/td
td
bean:write name=b property=bolge_adi/
/td
td
html:link action=edit
name=b
Düzenle
/html:link
/td   
/tr
/logic:iterate
-- 
Regards,
M. Onur Tokan

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



Re: Internationalizing a Struts project

2004-10-07 Thread Jason Lea
Yes, I use the setCharacterEncoding(...) in a filter on Tomcat 4.1.28 to 
handle UTF-8 encoded pages (mainly for communicating in Japanese, which 
should be a good a test as any for UTF-8).  I set the encoding to UTF-8 
on each page as Craig suggested so the browser knows the encoding, and 
use a Filter to force the requests to be UTF-8 encoded before struts 
reads the parameters.

I don't know about other servlet containers.  Perhaps those other 
containers are not complying to the specification.

There used to be a good resource *Struts i18n* 
http://www.anassina.com/struts/i18n/i18n.html by Aaron Rustad. which 
was at http://www.anassina.com/struts/i18n/i18n.html

But it no longer appears to exist that showed some easy steps to make 
everything work nicely.

[EMAIL PROTECTED] wrote:
Hi, Jason.
Have you tried using setCharacterEncoding(...)? For me on Tomcat 4.1.30 it showed no 
result at all, and other solutions available on the web state that 
setCharacterEncoding should work but has problems on many servlet containers. 
Therefore all I found refers to creating new strings from getParameter()
Hiran
-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99

 

-Original Message-
From: Jason Lea [mailto:[EMAIL PROTECTED] 
Sent: Mittwoch, 6. Oktober 2004 22:01
To: Struts Users Mailing List
Subject: Re: Internationalizing a Struts project

You should only need to do the following:
request.setCharacterEncoding(UTF-8)
before the form is populated.  I think you can do this by 
overriding the RequestProcessor.  I use a filter to do this instead.

[EMAIL PROTECTED] wrote:
   

Hi, Craig.
You hit the bull's eye. No I claim this not only to be a 
 

JSP/Servlet problem.
   

The way you describe will cause the browser to encode all 
 

form data with UTF-8.
   

Unfortunately the servlet container (Tomcat in my case) does 
 

not know about this.
   

To obtain the correct parameter values, someone has to call 
 

(beware of 
   

Nullpointers and UnsupportedEncodingExceptions)
new 
 

String(request.getParameter(...).getBytes(ISO-8859-1), UTF-8)
   

This conversion must be applied to all parameter values. 
 

Either it is done once in Struts, or each and every Action 
has to convert the values Struts provides, breaking this 
really nice architecture of FormBeans. In Cocoon I see this 
type of conversion can be turned on and off by configuration.
   

I recommend changing the RequestUtils' populate method 
 

(which I did for me), or enhancing the RequestProcessor to 
allow RequestUtils to be replaced by subclasses thereof so 
people like me can plug in their own RequestUtils. What do you think?
   

Hiran
-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99


 

-Original Message-
From: Craig McClanahan [mailto:[EMAIL PROTECTED]
Sent: Dienstag, 5. Oktober 2004 23:47
To: Struts Users Mailing List
Subject: Re: Internationalizing a Struts project
On Tue, 5 Oct 2004 16:31:14 +0200,
[EMAIL PROTECTED] 
   

[EMAIL PROTECTED] wrote:
   

  

   

Hi there.
I'm working on i18n of a Struts based project. All


 

references I find about this topic deal with using messages 
   

depending 
   

on the user's locale. Has anyone ever experienced problems with 
national special characters (such as currency symbols for 
   

sterling or 
   

euro?
  

   

Hiran


 

This issue is more related to the way JSP works than Struts, but 
here's a summary.

The most important consideration for national characters is the 
character encoding that will be used to send the response 
   

back to the 
   

browser.  Unless you ask for something different 
   

explicitly, JSP pages 
   

are always sent back in ISO-8859-1 (basically 7-bit ASCII), 
   

which will 
   

create problems with characters outside the 7-bit range.
To ask for the content encoding to be set differently, you use the 
page directive at the top of your JSP pages, for example, to select
UTF-8:

  %@ page contentType=text/html;charset=UTF-8 %
If all of your national characters are produced by custom 
   

tags (such 
   

as bean:write or html:input in the case of Struts), 
   

this should be 
   

all you need.  If you also want to use literal characters in the 
template text of your JSP page, you have to go one step further -- 
actually store the source code of your JSP page in an appropriate 
encoding, and tell the JSP compiler what that encoding is.  The 
details of how you save pages in a particular encoding will 
   

depend on 
   

the text editor or IDE you are using, but the mechanism to tell JSP 
about it is standard.  So, if you also use UTF-8 encoding for your 
source page, you'd say:

%@ page pageEncoding=UTF-8 

[Fwd: Error 500 on Websphere - Missing message for key header.title]

2004-10-07 Thread Simon Charette
Hi
I'm trying to install on WAS 5.1 a struts application developped on 
apache tomcat.

The application does work on tomcat but on websphere I keep getting the 
following error:

Error 500: Missing message for key header.title
I made sure my struts-config.xml contained message-resources 
parameter=resources.ApplicationResources/

I also tried to put in web.xml
init-param
param-nameapplication/param-name
param-valueresources.ApplicationResources/param-value
/init-param
I've put my ApplicationResources.properties in /WEB-INF/classes/resources
I also tried putting it in one of my jar file under /WEB-INF/lib.
And it does contain the line header.title=Application Title
Here's the workflow before the error:
The welcome page makes a logic:redirect forward=home/
My struts-config.xml has the following config:
global-forwards
forward name=home path=/index.do/
/global-forwards
action-mappings
action path=/index forward=/pages/index.jsp/
/action-mappings
And the /pages/index.jsp is just:
html
bodybean:message key=header.title/
/body
/html
Did I miss something? What did I do wrong?
Thanks in advance.
Simon

--
Simon Charette
Professional Services
Kaidara
15 rue Soufflot, 75005 Paris, France
phone : +33 1 53 73 23 30
fax   : +33 1 53 73 23 01
email : [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] free javascript htmlEditor

2004-10-07 Thread Amit Gupta
Plz visit my homepage. if you find pWYSIWYG interesting , Then I may send
you code.

Amit Gupta
Mobile: 91-9891062552
Email: [EMAIL PROTECTED]
http://amit-gupta.prudence-india.com

A request - given the barrage of spam these days, there is a non-zero
probability that I  accidentally delete important emails. If a response is
necessary to your email, rest assured that I will respond in time.
Ifhowever, you have not received a response in a reasonable period, please
don't hesitate to resend.

- Original Message -
From: VAN BROECK Jimmy [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, October 07, 2004 12:50 PM
Subject: RE: [OT] free javascript htmlEditor


 I've tried out the htmlarea in a php project and is pretty decent.
 It works with additional plugins you can install.

 Only minpoint is that it works on textarea's and it does the conversion
after the page is loaded, so you can sometimes see the switch. Also standard
way it works on all the textarea's it finds on the page, but this can be
tweaked by yourself.

 -Original Message-
 From: David G. Friedman [mailto:[EMAIL PROTECTED]
 Sent: donderdag 7 oktober 2004 3:45
 To: Struts Users Mailing List
 Subject: RE: [OT] free javascript htmlEditor


 +1 on FCKEditor.  I'm putting it in a current webapp project.

 -David

 -Original Message-
 From: Niall Pemberton [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 06, 2004 1:54 PM
 To: Struts Users Mailing List; Sergey Livanov
 Subject: Re: [OT] free javascript htmlEditor


 I have tried out the FCKeditor (Tag version) and looks good to me, the
other
 I haven't

 http://www.fckeditor.net/

 http://www.interactivetools.com/products/htmlarea/


 Niall

 - Original Message -
 From: Sergey Livanov [EMAIL PROTECTED]
 To: Struts Mailing List [EMAIL PROTECTED]
 Sent: Wednesday, October 06, 2004 6:29 PM
 Subject: [OT] free javascript htmlEditor


 
  Can you help me to find free javascript htmlEditor.
 
 
  --
  regards,
   Sergey  mailto:[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]



 STRICTLY PERSONAL AND CONFIDENTIAL
 This message may contain confidential and proprietary material for the
sole use of the intended recipient. Any review or distribution by others is
strictly prohibited. If you are not the intended recipient please contact
the sender and delete all copies.

 Ce Message est uniquement destiné aux destinataires indiqués et peut
contenir des informations confidentielles. Si vous n'êtes pas le
destinataire, vous ne devez pas révéler le contenu de ce message ou en
prendre copie. Si vous avez reçu ce message par erreur, veuillez en informer
l'expéditeur, ou La Poste immédiatement, avant de le supprimer.

 Dit bericht is enkel bestemd voor de aangeduide ontvangers en kan
vertrouwelijke informatie bevatten. Als u niet de ontvanger bent, dan mag u
de inhoud van dit bericht niet bekendmaken noch kopiëren. Als u dit bericht
per vergissing heeft ontvangen, gelieve er de afzender of De Post
onmiddellijk van op de hoogte te brengen en het bericht vervolgens te
verwijderen.



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



Re: Session authentication - Struts or ServletFilter

2004-10-07 Thread andy wix
Hi,
That source forge Security Filter stuff looks pretty good, but I only have a 
basic requirement (nothing so posh as realms).
I can't seem to get my (very basic) filter to work with Struts though.

I have the following in my doFilter method:
HttpServletRequest req = (HttpServletRequest) request;
HttpServletResponse res = (HttpServletResponse) response;
HttpSession session = req.getSession();
User user= (User )session.getAttribute(User );
if (null == user) {
 session.invalidate();
 res.sendRedirect(/login.jsp);
}
chain.doFilter(request, response);
It is mapped to all urls (/*) in the web.xml.
I get a 404:
The requested resource (/do/processLogin) is not available
- this after I have entered user/password and submitted form.  If anything, 
I was expecting it to always be re-directed back to the login because I 
guess I need to exclude /do/processLogin from the Filter?

It all works Ok without the filter.
Thanks,
Andy
_
Stay in touch with absent friends - get MSN Messenger 
http://www.msn.co.uk/messenger

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


html:link parameter passing

2004-10-07 Thread M. Onur Tokan
hi,

I have a arraylist of BolgeDTO in request scope. I am iterating this
arraylist in the code below. The problem is I want to add a edit
button on the column. And I want to pass the whole properties to the
next form so The form will contain the data from the selected row. I
look at the html:link doc. It says that:

If you prefer to specify a java.util.Map that contains all of the
request parameters to be added to the hyperlink, use one of the
following techniques:Specify only the name attribute - The named JSP
bean (optionally scoped by the value of the scope attribute) must
identify a java.util.Map containing the parameters.

I tried this method by adding a Map property to the DTO and set it
from its constructor. But it didn't work. Any suggestions please?

logic:iterate id=b name=bolgeler
tr
td
bean:write name=b property=bolge/
/td
td
bean:write name=b property=bolge_kodu_s/
/td
td
bean:write name=b property=bolge_kodu_t/
/td
td
bean:write name=b property=bolge_adi/
/td
td
html:link action=edit
name=b
Düzenle
/html:link
/td
/tr
/logic:iterate
--
Regards,
M. Onur Tokan


-- 
Regards,
M. Onur Tokan

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



Re: cleaning session

2004-10-07 Thread Erik Weber
This is similar to what I usually implement. I have been gradually 
developing a session manager or perhaps a session janitor that 
watches/tracks workflow and cleans up stuff from memory (session) that 
isn't needed anymore. It could be a filter or a custom request processor 
in the world of Struts. Since I most often use my own controller Servlet 
I have my own place to put it, but basically, it gets invoked before any 
request handlers.

Erik
Freddy Villalba A. wrote:
Hi,
I have never implemented anything like this (with Struts), but this is the
first thing I can think of...
Assuming your wizard is one-way (by this, I mean you have a linear graph -
1-2-3... -, no bifurcations and /or intersections and / or parallelism),
you could define your workflow by tagging the pages it is made of...
then, manage the wizard from a filter that is able to detect your getting
into one and your leaving it. Once it detects someone's left a wizard, and
knowing its components, it could have them cleaned off the corresponding
Session.
I believe, however, that this approach wouldn't work if the graph is not
linear.
I'll be glad to here your feedback (everybody).
HTH,
Freddy.
-Mensaje original-
De: Paul McCulloch [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 07 de octubre de 2004 10:27
Para: 'Struts Users Mailing List'
Asunto: RE: cleaning session
That isn't the purpose of the (confusingly named) reset method. Reset is
there to, typically, deal with the html forms submit checkbox fields (they
don't submit anything if they are null).
Paul
 

-Original Message-
From: Leandro Melo [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 06, 2004 5:43 PM
To: Struts Users Mailing List
Subject: Re: cleaning session
If you have your action in HttpSession, why don`t you
just call reset whenever a user clicks on the button
supposed to start this wizard?

--- struts lover [EMAIL PROTECTED] escreveu:
   

Hello everyone,
I am facing this problem of session. I have my
action
form in session(a wizard like thing). Now if the
user
starts filling in values  and clicks on the NEXT
button, to go on to the next screen and then instead
of completing the process of application, clicks on
some other link.
Again he wants to start with the application
process,
the form get pre-populated with the previous values,
as the form in still in session. I want a clean
form.
How to overcome this problem???
Any ideas???
Thanks.

___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com
 

-
   

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

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you
are not the addressee indicated in this message (or responsible for delivery
of the message to such person), you may not copy or deliver this message to
anyone. In such case, you should destroy this message, and notify us
immediately. If you or your employer does not consent to Internet email
messages of this kind, please advise us immediately. Opinions, conclusions
and other information expressed in this message are not given or endorsed by
my Company or employer unless otherwise indicated by an authorised
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being
transmitted via electronic mail attachments we cannot guarantee that
attachments do not contain computer virus code.  You are therefore strongly
advised to undertake anti virus checks prior to accessing the attachment to
this electronic mail.  Axios Systems Ltd grants no warranties regarding
performance use or quality of any attachment and undertakes no liability for
loss or damage howsoever caused.
**
-
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: Internationalizing a Struts project

2004-10-07 Thread Hiran.Chaudhuri
Hi, Jason.

Before I had tried to use request.setCharacterEncoding(UTFß8) in a JSP (independent 
from Struts) and that did not work.
Now I tried using a filter, as you suggest, and it works like a charm. No more need to 
patch RequestUtils, and I can also monitor and write warnings if the response's 
character encoding is not UTF-8. It works both in Tomcat 4.1.30 and Tomcat 5.0.28.

I confess this approach is more elegant than the one I had in mind. Thank you for 
sharing.

Hiran

-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99


 

 -Original Message-
 From: Jason Lea [mailto:[EMAIL PROTECTED] 
 Sent: Donnerstag, 7. Oktober 2004 10:31
 To: Struts Users Mailing List
 Subject: Re: Internationalizing a Struts project
 
 Yes, I use the setCharacterEncoding(...) in a filter on 
 Tomcat 4.1.28 to handle UTF-8 encoded pages (mainly for 
 communicating in Japanese, which should be a good a test as 
 any for UTF-8).  I set the encoding to UTF-8 on each page as 
 Craig suggested so the browser knows the encoding, and use a 
 Filter to force the requests to be UTF-8 encoded before 
 struts reads the parameters.
 
 I don't know about other servlet containers.  Perhaps those 
 other containers are not complying to the specification.
 
 There used to be a good resource *Struts i18n* 
 http://www.anassina.com/struts/i18n/i18n.html by Aaron 
 Rustad. which was at http://www.anassina.com/struts/i18n/i18n.html
 
 But it no longer appears to exist that showed some easy steps 
 to make everything work nicely.
 
 
 [EMAIL PROTECTED] wrote:
 
 Hi, Jason.
 
 Have you tried using setCharacterEncoding(...)? For me on 
 Tomcat 4.1.30 it showed no result at all, and other solutions 
 available on the web state that setCharacterEncoding should 
 work but has problems on many servlet containers. Therefore 
 all I found refers to creating new strings from getParameter()
 
 Hiran
 
 -
 Hiran Chaudhuri
 SAG Systemhaus GmbH
 Elsenheimer Straße 11
 80867 München
 Phone +49-89-54 74 21 34
 Fax   +49-89-54 74 21 99
 
 
  
 
   
 
 -Original Message-
 From: Jason Lea [mailto:[EMAIL PROTECTED] 
 Sent: Mittwoch, 6. Oktober 2004 22:01
 To: Struts Users Mailing List
 Subject: Re: Internationalizing a Struts project
 
 You should only need to do the following:
 
  request.setCharacterEncoding(UTF-8)
 
 before the form is populated.  I think you can do this by 
 overriding the RequestProcessor.  I use a filter to do this instead.
 
 [EMAIL PROTECTED] wrote:
 
 
 
 Hi, Craig.
 
 You hit the bull's eye. No I claim this not only to be a 
   
 
 JSP/Servlet problem.
 
 
 The way you describe will cause the browser to encode all 
   
 
 form data with UTF-8.
 
 
 Unfortunately the servlet container (Tomcat in my case) does 
   
 
 not know about this.
 
 
 To obtain the correct parameter values, someone has to call 
   
 
 (beware of 
 
 
 Nullpointers and UnsupportedEncodingExceptions)
 
 new 
   
 
 String(request.getParameter(...).getBytes(ISO-8859-1), UTF-8)
 
 
 This conversion must be applied to all parameter values. 
   
 
 Either it is done once in Struts, or each and every Action 
 has to convert the values Struts provides, breaking this 
 really nice architecture of FormBeans. In Cocoon I see this 
 type of conversion can be turned on and off by configuration.
 
 
 I recommend changing the RequestUtils' populate method 
   
 
 (which I did for me), or enhancing the RequestProcessor to 
 allow RequestUtils to be replaced by subclasses thereof so 
 people like me can plug in their own RequestUtils. What do 
 you think?
 
 
 Hiran
 
 -
 Hiran Chaudhuri
 SAG Systemhaus GmbH
 Elsenheimer Straße 11
 80867 München
 Phone +49-89-54 74 21 34
 Fax   +49-89-54 74 21 99
 
 
 
 
  
 
   
 
 -Original Message-
 From: Craig McClanahan [mailto:[EMAIL PROTECTED]
 Sent: Dienstag, 5. Oktober 2004 23:47
 To: Struts Users Mailing List
 Subject: Re: Internationalizing a Struts project
 
 On Tue, 5 Oct 2004 16:31:14 +0200,
 [EMAIL PROTECTED] 
 
 
 [EMAIL PROTECTED] wrote:
 
 

 
 
 
 Hi there.
 
 I'm working on i18n of a Struts based project. All
  
 
   
 
 references I find about this topic deal with using messages 
 
 
 depending 
 
 
 on the user's locale. Has anyone ever experienced problems with 
 national special characters (such as currency symbols for 
 
 
 sterling or 
 
 
 euro?

 
 
 
 Hiran
 
  
 
   
 
 This issue is more related to the way JSP works than Struts, but 
 here's a summary.
 
 The most important consideration for national characters is the 
 character encoding that will be used to send the response 
 
 
 back to the 
 
 
 browser.  Unless you ask for something 

RE: cleaning session

2004-10-07 Thread Hiran.Chaudhuri
Hi, Erik and Freddz.

I like the idea of having a wizard whose data gets cleaned as soon as it's scope is 
left.
How about this: Have all resources for one wizard in a URL subdirectory. Have a 
similar naming convention for the resources the wizard leaves in the session. If a 
http request comes for an url, the janitor filter could remove all wizard's session 
resources that do not match the current request's directory.
This way the janitor could be fairly generic.

Hiran

-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99


 

 -Original Message-
 From: Erik Weber [mailto:[EMAIL PROTECTED] 
 Sent: Donnerstag, 7. Oktober 2004 11:55
 To: Struts Users Mailing List
 Subject: Re: cleaning session
 
 This is similar to what I usually implement. I have been 
 gradually developing a session manager or perhaps a 
 session janitor that watches/tracks workflow and cleans up 
 stuff from memory (session) that isn't needed anymore. It 
 could be a filter or a custom request processor in the world 
 of Struts. Since I most often use my own controller Servlet I 
 have my own place to put it, but basically, it gets invoked 
 before any request handlers.
 
 Erik
 
 
 Freddy Villalba A. wrote:
 
 Hi,
 
 I have never implemented anything like this (with Struts), 
 but this is 
 the first thing I can think of...
 
 Assuming your wizard is one-way (by this, I mean you have a linear 
 graph - 1-2-3... -, no bifurcations and /or 
 intersections and / or 
 parallelism), you could define your workflow by 
 tagging the pages it is made of...
 then, manage the wizard from a filter that is able to detect your 
 getting into one and your leaving it. Once it detects 
 someone's left a 
 wizard, and knowing its components, it could have them 
 cleaned off the 
 corresponding Session.
 
 I believe, however, that this approach wouldn't work if the graph is 
 not linear.
 
 I'll be glad to here your feedback (everybody).
 
 HTH,
 Freddy.
 
 -Mensaje original-
 De: Paul McCulloch [mailto:[EMAIL PROTECTED]
 Enviado el: jueves, 07 de octubre de 2004 10:27
 Para: 'Struts Users Mailing List'
 Asunto: RE: cleaning session
 
 
 That isn't the purpose of the (confusingly named) reset 
 method. Reset 
 is there to, typically, deal with the html forms submit 
 checkbox fields 
 (they don't submit anything if they are null).
 
 Paul
 
   
 
 -Original Message-
 From: Leandro Melo [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 06, 2004 5:43 PM
 To: Struts Users Mailing List
 Subject: Re: cleaning session
 
 
 If you have your action in HttpSession, why don`t you just 
 call reset 
 whenever a user clicks on the button supposed to start this wizard?
 
 
 
  --- struts lover [EMAIL PROTECTED] escreveu:
 
 
 Hello everyone,
 I am facing this problem of session. I have my action form in 
 session(a wizard like thing). Now if the user starts filling in 
 values  and clicks on the NEXT button, to go on to the next screen 
 and then instead of completing the process of application, 
 clicks on 
 some other link.
 Again he wants to start with the application process, the form get 
 pre-populated with the previous values, as the form in still in 
 session. I want a clean form.
 How to overcome this problem???
 Any ideas???
 Thanks.
 
 
 
 ___
 Do you Yahoo!?
 Declare Yourself - Register online to vote today!
 http://vote.yahoo.com
 
 
   
 
 
 -
 
 
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
   
 
 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around 
 http://mail.yahoo.com
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 *
 *
 Axios Email Confidentiality Footer
 Privileged/Confidential Information may be contained in this 
 message. 
 If you are not the addressee indicated in this message (or 
 responsible 
 for delivery of the message to such person), you may not copy or 
 deliver this message to anyone. In such case, you should 
 destroy this 
 message, and notify us immediately. If you or your employer does not 
 consent to Internet email messages of this kind, please advise us 
 immediately. Opinions, conclusions and other information 
 expressed in 
 this message are not given or endorsed by my Company or 
 employer unless 
 otherwise indicated by an authorised representative 
 independent of this message.
 WARNING:
 While Axios Systems Ltd takes steps to prevent computer viruses from 
 being transmitted via electronic mail attachments we cannot 
 guarantee 
 that 

Re: Internationalizing a Struts project

2004-10-07 Thread Graeme
On Thu, 7 Oct 2004, Jason Lea wrote:
snip/
There used to be a good resource *Struts i18n* 
http://www.anassina.com/struts/i18n/i18n.html by Aaron Rustad. which was 
at http://www.anassina.com/struts/i18n/i18n.html

But it no longer appears to exist that showed some easy steps to make 
everything work nicely.
Try here 
http://web.archive.org/web/*/http://www.anassina.com/struts/i18n/i18n.html
HTH,
Graeme -
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: cleaning session

2004-10-07 Thread Erik Weber
Yeah, similar naming convention is the key to making it easier on 
yourself.

Also, as I tried to suggest once before (in a riddle -- a single key 
can open many doors -- ha ha ha grasshoppah), you can store references 
to many objects under a single attribute key (using structured/nested 
beans, maps, etc.). Delete the single attribute (perhaps when a user 
returns to a main view) and you delete the entire tree of references, 
freeing up all that memory with one statement and without having to 
write too much conditional code. I'm not sure if this strategy is 
feasible with Struts session-scoped forms though.

Erik
[EMAIL PROTECTED] wrote:
Hi, Erik and Freddz.
I like the idea of having a wizard whose data gets cleaned as soon as it's scope is 
left.
How about this: Have all resources for one wizard in a URL subdirectory. Have a 
similar naming convention for the resources the wizard leaves in the session. If a 
http request comes for an url, the janitor filter could remove all wizard's session 
resources that do not match the current request's directory.
This way the janitor could be fairly generic.
Hiran
-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99

 

-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED] 
Sent: Donnerstag, 7. Oktober 2004 11:55
To: Struts Users Mailing List
Subject: Re: cleaning session

This is similar to what I usually implement. I have been 
gradually developing a session manager or perhaps a 
session janitor that watches/tracks workflow and cleans up 
stuff from memory (session) that isn't needed anymore. It 
could be a filter or a custom request processor in the world 
of Struts. Since I most often use my own controller Servlet I 
have my own place to put it, but basically, it gets invoked 
before any request handlers.

Erik
Freddy Villalba A. wrote:
   

Hi,
I have never implemented anything like this (with Struts), 
 

but this is 
   

the first thing I can think of...
Assuming your wizard is one-way (by this, I mean you have a linear 
graph - 1-2-3... -, no bifurcations and /or 
 

intersections and / or 
   

parallelism), you could define your workflow by 
 

tagging the pages it is made of...
   

then, manage the wizard from a filter that is able to detect your 
getting into one and your leaving it. Once it detects 
 

someone's left a 
   

wizard, and knowing its components, it could have them 
 

cleaned off the 
   

corresponding Session.
I believe, however, that this approach wouldn't work if the graph is 
not linear.

I'll be glad to here your feedback (everybody).
HTH,
Freddy.
-Mensaje original-
De: Paul McCulloch [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 07 de octubre de 2004 10:27
Para: 'Struts Users Mailing List'
Asunto: RE: cleaning session
That isn't the purpose of the (confusingly named) reset 
 

method. Reset 
   

is there to, typically, deal with the html forms submit 
 

checkbox fields 
   

(they don't submit anything if they are null).
Paul

 

-Original Message-
From: Leandro Melo [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 06, 2004 5:43 PM
To: Struts Users Mailing List
Subject: Re: cleaning session
If you have your action in HttpSession, why don`t you just 
   

call reset 
   

whenever a user clicks on the button supposed to start this wizard?

--- struts lover [EMAIL PROTECTED] escreveu:
  

   

Hello everyone,
I am facing this problem of session. I have my action form in 
session(a wizard like thing). Now if the user starts filling in 
values  and clicks on the NEXT button, to go on to the next screen 
and then instead of completing the process of application, 
 

clicks on 
   

some other link.
Again he wants to start with the application process, the form get 
pre-populated with the previous values, as the form in still in 
session. I want a clean form.
How to overcome this problem???
Any ideas???
Thanks.


___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com


 


   

-
   

  

   

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


 

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com


   

-
   

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

   

*
 

*
   

Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this 
 

message. 
   

If you are not the addressee indicated in this message 

OT: jstl equivalent of logic:present

2004-10-07 Thread Zoran Avtarovski
I'm trying to find a way to use the isUserInRole method with the c:if tag.

I tried c:if test=${pageContext.getRequest().isUserInRole(admin)}

But you can't use the isUserInRole method as an expression. I'd rather not
have to cast the role into a page context string to test. Using the
logic:present tag is more preferable. I only ask because I get the feeling
that there's a move away from the struts tags and toward jstl.

How do others do it?

Zoran



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



Re: bouncing address (if this is you at standardbank.co.az, PLEASE correct it)

2004-10-07 Thread Erik Weber

Wendy Smoak wrote:
From: David G. Friedman [EMAIL PROTECTED]
 

Sorry to post Off Topic mid-week but I've posted a few times lately and
   

I'm
 

starting to severly dislike this error message from some unknown subscribe
at standarbank.co.az.  Any list managers out there who could take a look
   

at
 

this?
   

I reported it to [EMAIL PROTECTED] yesterday.
Thank you.
The person has
been notified and will be unsubscribed soon if it doesn't stop happening.
 

In my opinion it has been long enough (I think 48 hours is more than 
fair). I vote that the user be removed immediately.

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


RE: bouncing address (if this is you at standardbank.co.az, PLEASE correct it)

2004-10-07 Thread Hiran.Chaudhuri
 -Original Message-
 I reported it to [EMAIL PROTECTED] yesterday.
 
 Thank you.
 
 The person has
 been notified and will be unsubscribed soon if it doesn't 
 stop happening.
 
   
 
 In my opinion it has been long enough (I think 48 hours is 
 more than fair). I vote that the user be removed immediately.
 
 Erik

+1 (do I have a vote?)

BTW, how did you notify the person? Most probably you've got only the bouncing mail 
address...

Hiran

-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99


 

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



Re: bouncing address (if this is you at standardbank.co.az, PLEASE correct it)

2004-10-07 Thread Darryl Pierce
On Thursday 07 October 2004 07:42 am, [EMAIL PROTECTED] wrote:
 BTW, how did you notify the person? Most probably you've got only the
 bouncing mail address...

Do a whois on the domain and email either the administrative or technical 
contact.

-- 
/**
 * @author Darryl L. Pierce [EMAIL PROTECTED]
 * @seeThe Infobahn Offramp http://mcpierce.mypage.org
 * @quote  Lobby, lobby, lobby, lobby, lobby, lobby... - Adrian Monk
 */

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



Re: Error 500 on Websphere - Missing message for key header.title]

2004-10-07 Thread Martin Gainty
From struts-user mail archives courtesy of Oleg V Alexeev

 Remove resources from classpath and place it to the WEB-INF/classes
 directory. For example

 WEB-INF
   classes
  ApplicationResources.properties
  ApplicationResources_en.properties
   (...place here resources for every language used in your
app...)
In resources search for string
 header.title=Some title  in every file.

MAN1I dream of a world where I would not have to work for free
MAN2Sounds like you're a Misguided capitalist

- Original Message -
From: Simon Charette [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 07, 2004 5:32 AM
Subject: [Fwd: Error 500 on Websphere - Missing message for key
header.title]


 Hi

 I'm trying to install on WAS 5.1 a struts application developped on
 apache tomcat.

 The application does work on tomcat but on websphere I keep getting the
 following error:

 Error 500: Missing message for key header.title

 I made sure my struts-config.xml contained message-resources
 parameter=resources.ApplicationResources/

 I also tried to put in web.xml
 init-param
 param-nameapplication/param-name
 param-valueresources.ApplicationResources/param-value
 /init-param

 I've put my ApplicationResources.properties in /WEB-INF/classes/resources

 I also tried putting it in one of my jar file under /WEB-INF/lib.

 And it does contain the line header.title=Application Title


 Here's the workflow before the error:

 The welcome page makes a logic:redirect forward=home/

 My struts-config.xml has the following config:

 global-forwards
 forward name=home path=/index.do/
 /global-forwards

 action-mappings
 action path=/index forward=/pages/index.jsp/
 /action-mappings

 And the /pages/index.jsp is just:

 html
 bodybean:message key=header.title/
 /body
 /html

 Did I miss something? What did I do wrong?

 Thanks in advance.

 Simon



 --
 Simon Charette
 Professional Services

 Kaidara
 15 rue Soufflot, 75005 Paris, France

 phone : +33 1 53 73 23 30
 fax   : +33 1 53 73 23 01
 email : [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: Inserting a BLOB

2004-10-07 Thread Kailash Vasani
Checkout the Oracle documentation

-Original Message-
From: Arundhati Kalia [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 07, 2004 12:51 PM
To: [EMAIL PROTECTED]
Subject: Inserting a BLOB


Hi All,

Can anyone please guide me to the most efficient way of inserting a BLOB in
Oracle database thro Java ?

TIA
Arundhati

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Quinnox is an Award Winning IT services organisation, accredited to CMM
Level 5. We are successfully delivering Application Development,
Integration, Support and Testing services to clients in the Finance,
Manufacturing, Retail and Telecom sectors. Particular focus areas include
e-Business and ERP (notably SAP) solutions.

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



RE: bouncing address (if this is you at standardbank.co.az, PLEASE correct it)

2004-10-07 Thread Hiran.Chaudhuri
 -Original Message-
 From: Darryl Pierce [mailto:[EMAIL PROTECTED] 
 Sent: Donnerstag, 7. Oktober 2004 12:34
 To: Struts Users Mailing List
 Subject: Re: bouncing address (if this is you at 
 standardbank.co.az, PLEASE correct it)
 
 On Thursday 07 October 2004 07:42 am, 
 [EMAIL PROTECTED] wrote:
  BTW, how did you notify the person? Most probably you've 
 got only the 
  bouncing mail address...
 
 Do a whois on the domain and email either the administrative 
 or technical contact.

Aaaah yesss. Understood. It's not the user, but the best choice.

Hiran

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



RE: cleaning session

2004-10-07 Thread Freddy Villalba A.
Well guys, although on the same direction you are pointing to, I do believe
though that the more framework-independent the solution is, the better. So,
my thought:

Why not have a XML descriptor where you can explicitly define your wizards?
In that way:
(1) No matter where your resources are, they'll get cleansed.
(2) You'll be able to reuse resources at free will on several wizards
(without having to replicate them).
(3) You won't have to set up any structure or hardcode anything in order to
determine what's to be cleansed an what not.

What do you think?

-Mensaje original-
De: Erik Weber [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 07 de octubre de 2004 13:26
Para: Struts Users Mailing List
Asunto: Re: cleaning session


Yeah, similar naming convention is the key to making it easier on
yourself.

Also, as I tried to suggest once before (in a riddle -- a single key
can open many doors -- ha ha ha grasshoppah), you can store references
to many objects under a single attribute key (using structured/nested
beans, maps, etc.). Delete the single attribute (perhaps when a user
returns to a main view) and you delete the entire tree of references,
freeing up all that memory with one statement and without having to
write too much conditional code. I'm not sure if this strategy is
feasible with Struts session-scoped forms though.

Erik


[EMAIL PROTECTED] wrote:

Hi, Erik and Freddz.

I like the idea of having a wizard whose data gets cleaned as soon as it's
scope is left.
How about this: Have all resources for one wizard in a URL subdirectory.
Have a similar naming convention for the resources the wizard leaves in the
session. If a http request comes for an url, the janitor filter could remove
all wizard's session resources that do not match the current request's
directory.
This way the janitor could be fairly generic.

Hiran

-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99






-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 7. Oktober 2004 11:55
To: Struts Users Mailing List
Subject: Re: cleaning session

This is similar to what I usually implement. I have been
gradually developing a session manager or perhaps a
session janitor that watches/tracks workflow and cleans up
stuff from memory (session) that isn't needed anymore. It
could be a filter or a custom request processor in the world
of Struts. Since I most often use my own controller Servlet I
have my own place to put it, but basically, it gets invoked
before any request handlers.

Erik


Freddy Villalba A. wrote:



Hi,

I have never implemented anything like this (with Struts),


but this is


the first thing I can think of...

Assuming your wizard is one-way (by this, I mean you have a linear
graph - 1-2-3... -, no bifurcations and /or


intersections and / or


parallelism), you could define your workflow by


tagging the pages it is made of...


then, manage the wizard from a filter that is able to detect your
getting into one and your leaving it. Once it detects


someone's left a


wizard, and knowing its components, it could have them


cleaned off the


corresponding Session.

I believe, however, that this approach wouldn't work if the graph is
not linear.

I'll be glad to here your feedback (everybody).

HTH,
Freddy.

-Mensaje original-
De: Paul McCulloch [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 07 de octubre de 2004 10:27
Para: 'Struts Users Mailing List'
Asunto: RE: cleaning session


That isn't the purpose of the (confusingly named) reset


method. Reset


is there to, typically, deal with the html forms submit


checkbox fields


(they don't submit anything if they are null).

Paul





-Original Message-
From: Leandro Melo [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 06, 2004 5:43 PM
To: Struts Users Mailing List
Subject: Re: cleaning session


If you have your action in HttpSession, why don`t you just


call reset


whenever a user clicks on the button supposed to start this wizard?



--- struts lover [EMAIL PROTECTED] escreveu:




Hello everyone,
I am facing this problem of session. I have my action form in
session(a wizard like thing). Now if the user starts filling in
values  and clicks on the NEXT button, to go on to the next screen
and then instead of completing the process of application,


clicks on


some other link.
Again he wants to start with the application process, the form get
pre-populated with the previous values, as the form in still in
session. I want a clean form.
How to overcome this problem???
Any ideas???
Thanks.



___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com









-






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







RE: cleaning session

2004-10-07 Thread Hiran.Chaudhuri
Also sounds good. Especially the decoupling of a resource location and usage is what 
Struts tries to do with actions and forwards etc. I see this pattern reused in your 
idea. Plus the possibility of sharing resources. I like this idea.

Hiran

-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99


 

 -Original Message-
 From: Freddy Villalba A. [mailto:[EMAIL PROTECTED] 
 Sent: Donnerstag, 7. Oktober 2004 12:56
 To: Struts Users Mailing List
 Subject: RE: cleaning session
 
 Well guys, although on the same direction you are pointing 
 to, I do believe though that the more framework-independent 
 the solution is, the better. So, my thought:
 
 Why not have a XML descriptor where you can explicitly define 
 your wizards?
 In that way:
 (1) No matter where your resources are, they'll get cleansed.
 (2) You'll be able to reuse resources at free will on several 
 wizards (without having to replicate them).
 (3) You won't have to set up any structure or hardcode 
 anything in order to determine what's to be cleansed an what not.
 
 What do you think?
 
 -Mensaje original-
 De: Erik Weber [mailto:[EMAIL PROTECTED] Enviado el: 
 jueves, 07 de octubre de 2004 13:26
 Para: Struts Users Mailing List
 Asunto: Re: cleaning session
 
 
 Yeah, similar naming convention is the key to making it 
 easier on yourself.
 
 Also, as I tried to suggest once before (in a riddle -- a 
 single key can open many doors -- ha ha ha grasshoppah), you 
 can store references to many objects under a single attribute 
 key (using structured/nested beans, maps, etc.). Delete the 
 single attribute (perhaps when a user returns to a main view) 
 and you delete the entire tree of references, freeing up all 
 that memory with one statement and without having to write 
 too much conditional code. I'm not sure if this strategy is 
 feasible with Struts session-scoped forms though.
 
 Erik
 
 
 [EMAIL PROTECTED] wrote:
 
 Hi, Erik and Freddz.
 
 I like the idea of having a wizard whose data gets cleaned 
 as soon as 
 it's
 scope is left.
 How about this: Have all resources for one wizard in a URL 
 subdirectory.
 Have a similar naming convention for the resources the wizard 
 leaves in the session. If a http request comes for an url, 
 the janitor filter could remove all wizard's session 
 resources that do not match the current request's directory.
 This way the janitor could be fairly generic.
 
 Hiran
 
 -
 Hiran Chaudhuri
 SAG Systemhaus GmbH
 Elsenheimer Straße 11
 80867 München
 Phone +49-89-54 74 21 34
 Fax   +49-89-54 74 21 99
 
 
 
 
 
 
 -Original Message-
 From: Erik Weber [mailto:[EMAIL PROTECTED]
 Sent: Donnerstag, 7. Oktober 2004 11:55
 To: Struts Users Mailing List
 Subject: Re: cleaning session
 
 This is similar to what I usually implement. I have been gradually 
 developing a session manager or perhaps a session janitor that 
 watches/tracks workflow and cleans up stuff from memory 
 (session) that 
 isn't needed anymore. It could be a filter or a custom request 
 processor in the world of Struts. Since I most often use my own 
 controller Servlet I have my own place to put it, but basically, it 
 gets invoked before any request handlers.
 
 Erik
 
 
 Freddy Villalba A. wrote:
 
 
 
 Hi,
 
 I have never implemented anything like this (with Struts),
 
 
 but this is
 
 
 the first thing I can think of...
 
 Assuming your wizard is one-way (by this, I mean you have a linear 
 graph - 1-2-3... -, no bifurcations and /or
 
 
 intersections and / or
 
 
 parallelism), you could define your workflow by
 
 
 tagging the pages it is made of...
 
 
 then, manage the wizard from a filter that is able to detect your 
 getting into one and your leaving it. Once it detects
 
 
 someone's left a
 
 
 wizard, and knowing its components, it could have them
 
 
 cleaned off the
 
 
 corresponding Session.
 
 I believe, however, that this approach wouldn't work if 
 the graph is 
 not linear.
 
 I'll be glad to here your feedback (everybody).
 
 HTH,
 Freddy.
 
 -Mensaje original-
 De: Paul McCulloch [mailto:[EMAIL PROTECTED]
 Enviado el: jueves, 07 de octubre de 2004 10:27
 Para: 'Struts Users Mailing List'
 Asunto: RE: cleaning session
 
 
 That isn't the purpose of the (confusingly named) reset
 
 
 method. Reset
 
 
 is there to, typically, deal with the html forms submit
 
 
 checkbox fields
 
 
 (they don't submit anything if they are null).
 
 Paul
 
 
 
 
 
 -Original Message-
 From: Leandro Melo [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, October 06, 2004 5:43 PM
 To: Struts Users Mailing List
 Subject: Re: cleaning session
 
 
 If you have your action in HttpSession, why don`t you just
 
 
 call reset
 
 
 whenever a user clicks on the button supposed to start 
 this wizard?
 
 
 
 --- struts lover [EMAIL PROTECTED] escreveu:
 
 
 
 
 Hello 

Re: Redirecting and getting the original URL

2004-10-07 Thread Jacob Weber
Craig,
Thanks...I'll give that a try.
Jacob

In article [EMAIL PROTECTED],
 Craig McClanahan [EMAIL PROTECTED] wrote:

 On a Servlet 2.4 container (such as Tomcat 5.x), the server will store
 the original path-related information as a set of request attributes
 with well known names:
 
   javax.servlet.forward.request_uri
   javax.servlet.forward.context_path
   javax.servlet.forward.servlet_path
   javax.servlet.forward.path_info
   javax.servlet.forward.query_string
 
 On a pre-2.4 container, you'll need to save the values yourself prior
 to performing the forward.
 
 Craig
 
 
 
 On Tue, 5 Oct 2004 15:26:55 + (UTC), Jacob Weber
 [EMAIL PROTECTED] wrote:
  Hello. In my Struts application, I have an action which forwards to a 
  second
  action. The redirect parameter is set to false, so the browser's URL 
  doesn't
  change.
  
  I'd like to get the original URL that the user requested (the one that's in 
  his
  browser). But request.getServletPath() and the various other request 
  methods
  return the URL of the second action. One method, getRequestURL(), seems to
  return the original URL, but this only works on Tomcat. On WebLogic, it 
  returns
  the second one.
  
  Is there a reliable way to get this information? Thanks,
  Jacob
  
  -
  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]



checking for an object in a collection

2004-10-07 Thread Muhammad Momin Rashid
Hello All,

I have a scenario in which I need to display (or not display) differnt parts 
of a jsp page depending on rules defined in a collection in scope.

I was wondering what is the best way to accomplish this?  All the rules 
defined in a collection, and the decision is made on the basis of if a rule 
is present in the collection or not.  The following approach seems messy to 
me, so i was wondering if anyone can enlighten me with a better way to 
accomplish this

iterate through collection
if rule x is present
display x table
end if
end iterate

iterate through collection
if rule y is present
display y table
end if
end iterate

A sample code snippit would be highly apprecated,  Thanks for your time.

Regards,
Muhammad Momin Rashid. 




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



Agregating form beans

2004-10-07 Thread Vinicius Carvalho
I was wondering. Is it possible for a form bean to have a field that 
would be another form bean? I have a form, that depending on the user 
selection on the previous screen, it would generate n number of  small 
forms in order for him to fill it up. So I was wondering to have 
something like this:

public class BaseForm extends ValidatorForm{
private String userName;
private Integer userCode;
private Collection projectForm // that's my agregation of project forms
}
public class ProjectForm extends ValidatorForm{
private String projectName;
private TimeStamp dueDate;
}
Is it possible, or creating arrays of those properties would be a better 
solution? Also, does BeanUtils transverse the object graph to copy it to 
a DTO?

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


Re: OT: jstl equivalent of logic:present

2004-10-07 Thread Tim Penhey
Zoran Avtarovski wrote:
I'm trying to find a way to use the isUserInRole method with the c:if tag.
I tried c:if test=${pageContext.getRequest().isUserInRole(admin)}
But you can't use the isUserInRole method as an expression. I'd rather not
have to cast the role into a page context string to test. Using the
logic:present tag is more preferable. I only ask because I get the feeling
that there's a move away from the struts tags and toward jstl.
How do others do it?
Zoran
 

Try the request taglib from jakarta...
%@ taglib uri=http://jakarta.apache.org/taglibs/request-1.0; 
prefix=request%

request:isUserInRole role=admin
Do admin stuff
/request:isUserInRole
Tim
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Validation in Struts for Required fields

2004-10-07 Thread Jacob Weber
One more: you need something like this in your ApplicationResources:

errors.required={0} is required.


In article [EMAIL PROTECTED],
 Caroline Jen [EMAIL PROTECTED] wrote:

 To add to the list:
 
 5. the validator-rules.xml and validation.xml must be
 in the AppName/WEB-INF directory.  
 6. Make sure that there is a proper version of the
 commons-validator.jar file. 
 7. there is font color=?red?html:errors//font in
 the .jsp to turn on the validation and to show warning
 messages in red
 8. validation plug-in in the struts-config.xml; 
 
 -Caroline
 --- Erik Weber [EMAIL PROTECTED] wrote:
 
  Somehow we lost the list on a couple of posts.
  
  OK, so, these are the things I assume you have
  checked so far:
  
  1) you have an html:select tag with property =
  reportType, and the 
  default option's value is 
  2) your ActionForm extends one of the proper types
  (such as 
  ValidatorForm) and has the proper getters and
  setters for the reportType 
  field
  3) in struts-config.xml, you have configured the
  action (the same one 
  that your form will submit to) with validate = true,
  and you have named 
  the proper ActionForm to associate with the action
  (one of your 
  form-bean declarations)
  4) the field name in validation.xml matches the
  field name of your 
  select (reportType), and the form name in
  validation.xml matches the 
  same form name that you are associating with the
  action in 
  struts-config.xml (the name of the form configured
  in the action matches 
  one of your form-bean declarations)
  
  What else am I leaving out?
  
  Erik


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



RE: checking for an object in a collection

2004-10-07 Thread Paul McCulloch
A Map is proabably a better data structure to use than a collection. I'd
consider changing the way the rules are stored, or converting the Collection
to a Map in your action.

Paul

 -Original Message-
 From: Muhammad Momin Rashid [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 07, 2004 1:09 PM
 To: [EMAIL PROTECTED]
 Subject: checking for an object in a collection
 
 
 Hello All,
 
 I have a scenario in which I need to display (or not display) 
 differnt parts 
 of a jsp page depending on rules defined in a collection in scope.
 
 I was wondering what is the best way to accomplish this?  All 
 the rules 
 defined in a collection, and the decision is made on the 
 basis of if a rule 
 is present in the collection or not.  The following approach 
 seems messy to 
 me, so i was wondering if anyone can enlighten me with a 
 better way to 
 accomplish this
 
 iterate through collection
 if rule x is present
 display x table
 end if
 end iterate
 
 iterate through collection
 if rule y is present
 display y table
 end if
 end iterate
 
 A sample code snippit would be highly apprecated,  Thanks for 
 your time.
 
 Regards,
 Muhammad Momin Rashid. 
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


**
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.
**


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



Re: checking for an object in a collection

2004-10-07 Thread DGraham

I may not fully understand what you're
trying to do, but why not use a HashSet instead? Let the table name
be the key to the rule. 
This may or may not be helpful: http://www.javapractices.com/Topic65.cjp.


Dennis







Muhammad Momin Rashid
[EMAIL PROTECTED] 
Sent by: news [EMAIL PROTECTED]
10/07/2004 08:09 AM



Please respond to
Struts Users Mailing List [EMAIL PROTECTED]





To
[EMAIL PROTECTED]


cc



Subject
checking for an object in
a collection








Hello All,

I have a scenario in which I need to display (or not display) differnt
parts 
of a jsp page depending on rules defined in a collection in scope.

I was wondering what is the best way to accomplish this? All the
rules 
defined in a collection, and the decision is made on the basis of if a
rule 
is present in the collection or not. The following approach seems
messy to 
me, so i was wondering if anyone can enlighten me with a better way to

accomplish this

iterate through collection
  if rule x is present
display x table
  end if
end iterate

iterate through collection
  if rule y is present
display y table
  end if
end iterate

A sample code snippit would be highly apprecated, Thanks for your
time.

Regards,
Muhammad Momin Rashid. 




-
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: Session authentication - Struts or ServletFilter

2004-10-07 Thread Jacob Weber
I've been doing the same thing by extending RequestProcessor (or 
TilesRequestProcessor). The advantage of that is, depending on which 
method you extend, you can have access to the Struts Form and 
ActionMapping objects.

Jacob


In article [EMAIL PROTECTED],
 andy wix [EMAIL PROTECTED] wrote:

 Hi,
 
 What is the best approach for the above?  I don't use container security - 
 when a user logs in I store a User object in the session and each page 
 should then check that the User is not null before proceding.
 You seem to get a real mix of opinions reading about the subject - the 
 Servlet 2.3 specification suggests authenication as a suggested use of 
 Filters and yet my Professional SCWCD Certification book says 'Filters 
 should not rely on session state'.
 
 I understand the Struts approach is sub-class Action and have your check in 
 there - this does force you to have an action for every mapping though.
 
 Thanks,
 Andy
 
 _
 Use MSN Messenger to send music and pics to your friends 
 http://www.msn.co.uk/messenger


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



Re: cleaning session

2004-10-07 Thread Vinicius Carvalho
Freddy Villalba A. wrote:
Well guys, although on the same direction you are pointing to, I do believe
though that the more framework-independent the solution is, the better. So,
my thought:
Why not have a XML descriptor where you can explicitly define your wizards?
In that way:
(1) No matter where your resources are, they'll get cleansed.
(2) You'll be able to reuse resources at free will on several wizards
(without having to replicate them).
(3) You won't have to set up any structure or hardcode anything in order to
determine what's to be cleansed an what not.
What do you think?
-Mensaje original-
De: Erik Weber [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 07 de octubre de 2004 13:26
Para: Struts Users Mailing List
Asunto: Re: cleaning session
Yeah, similar naming convention is the key to making it easier on
yourself.
Also, as I tried to suggest once before (in a riddle -- a single key
can open many doors -- ha ha ha grasshoppah), you can store references
to many objects under a single attribute key (using structured/nested
beans, maps, etc.). Delete the single attribute (perhaps when a user
returns to a main view) and you delete the entire tree of references,
freeing up all that memory with one statement and without having to
write too much conditional code. I'm not sure if this strategy is
feasible with Struts session-scoped forms though.
Erik
[EMAIL PROTECTED] wrote:
 

Hi, Erik and Freddz.
I like the idea of having a wizard whose data gets cleaned as soon as it's
   

scope is left.
 

How about this: Have all resources for one wizard in a URL subdirectory.
   

Have a similar naming convention for the resources the wizard leaves in the
session. If a http request comes for an url, the janitor filter could remove
all wizard's session resources that do not match the current request's
directory.
 

This way the janitor could be fairly generic.
Hiran
-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99


   

-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 7. Oktober 2004 11:55
To: Struts Users Mailing List
Subject: Re: cleaning session
This is similar to what I usually implement. I have been
gradually developing a session manager or perhaps a
session janitor that watches/tracks workflow and cleans up
stuff from memory (session) that isn't needed anymore. It
could be a filter or a custom request processor in the world
of Struts. Since I most often use my own controller Servlet I
have my own place to put it, but basically, it gets invoked
before any request handlers.
Erik
Freddy Villalba A. wrote:

 

Hi,
I have never implemented anything like this (with Struts),
   

but this is
 

the first thing I can think of...
Assuming your wizard is one-way (by this, I mean you have a linear
graph - 1-2-3... -, no bifurcations and /or
   

intersections and / or
 

parallelism), you could define your workflow by
   

tagging the pages it is made of...
 

then, manage the wizard from a filter that is able to detect your
getting into one and your leaving it. Once it detects
   

someone's left a
 

wizard, and knowing its components, it could have them
   

cleaned off the
 

corresponding Session.
I believe, however, that this approach wouldn't work if the graph is
not linear.
I'll be glad to here your feedback (everybody).
HTH,
Freddy.
-Mensaje original-
De: Paul McCulloch [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 07 de octubre de 2004 10:27
Para: 'Struts Users Mailing List'
Asunto: RE: cleaning session
That isn't the purpose of the (confusingly named) reset
   

method. Reset
 

is there to, typically, deal with the html forms submit
   

checkbox fields
 

(they don't submit anything if they are null).
Paul


   

-Original Message-
From: Leandro Melo [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 06, 2004 5:43 PM
To: Struts Users Mailing List
Subject: Re: cleaning session
If you have your action in HttpSession, why don`t you just
 

call reset
 

whenever a user clicks on the button supposed to start this wizard?

--- struts lover [EMAIL PROTECTED] escreveu:

 

Hello everyone,
I am facing this problem of session. I have my action form in
session(a wizard like thing). Now if the user starts filling in
values  and clicks on the NEXT button, to go on to the next screen
and then instead of completing the process of application,
   

clicks on
 

some other link.
Again he wants to start with the application process, the form get
pre-populated with the previous values, as the form in still in
session. I want a clean form.
How to overcome this problem???
Any ideas???
Thanks.

___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com


   


Re: checking for an object in a collection

2004-10-07 Thread Miranda John Stager
Hello Muhammad,

I hope that you are using custom tags for this.

I would create a new custom tag  to determine if the
rule is present in the collection...

rule:RulePresent rule=ruleKey
display table x
/rule:RulePresent

This tag would then look in the collection for the
specific rule, not by iterating through the collection
but by trying to retrieve the rule by its key.

I would suggest using a key/value mapping collection,
do the look up on the key
collection.containsKey(ruleKey) if true then display
the tag body, if false then skip the tag body.

Hope this helps.

John

 --- Muhammad Momin Rashid [EMAIL PROTECTED] wrote: 
 Hello All,
 
 I have a scenario in which I need to display (or not
 display) differnt parts 
 of a jsp page depending on rules defined in a
 collection in scope.
 
 I was wondering what is the best way to accomplish
 this?  All the rules 
 defined in a collection, and the decision is made on
 the basis of if a rule 
 is present in the collection or not.  The following
 approach seems messy to 
 me, so i was wondering if anyone can enlighten me
 with a better way to 
 accomplish this
 
 iterate through collection
 if rule x is present
 display x table
 end if
 end iterate
 
 iterate through collection
 if rule y is present
 display y table
 end if
 end iterate
 
 A sample code snippit would be highly apprecated, 
 Thanks for your time.
 
 Regards,
 Muhammad Momin Rashid. 
 
 
 
 

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



validwhen help

2004-10-07 Thread Emmanouil Batsis
Hi, 

Although my validator rule is interpeted just fine, 
an empty string message is produced for this specific error 
using the html:errors tag. Can someone please tell me what 
am i missing? My properties file works for all other rules and 
has a property formname.field...

Thanks,
Manos
field property=time depends=validwhen
  arg0 key=formname.field/
  var
 var-nametest/var-name
 var-value((type != 'time') or (*this* = 1))/var-value
  /var
/field
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: html:link parameter passing

2004-10-07 Thread Jeff Beal
For this to work, 'b' would have to be the name of a java.util.Map 
object; instead, it is a BolgeDTO.  Use the second method discussed in 
the html:link/ documentation:

  Specify both name and property attributes - The specified property 

   getter method will be called on the bean identified by the name (and
   optional scope) attributes, in order to return the java.util.Map
   containing the parameters.
So, if you created a getMap() method on BolgeDTO, the following would work:
 html:link action=edit
 name=b property=map
 Düzenle
 /html:link
-- Jeff
M. Onur Tokan wrote:
hi,
I have a arraylist of BolgeDTO in request scope. I am iterating this
arraylist in the code below. The problem is I want to add a edit
button on the column. And I want to pass the whole properties to the
next form so The form will contain the data from the selected row. I
look at the html:link doc. It says that:
If you prefer to specify a java.util.Map that contains all of the
request parameters to be added to the hyperlink, use one of the
following techniques:Specify only the name attribute - The named JSP
bean (optionally scoped by the value of the scope attribute) must
identify a java.util.Map containing the parameters.
I tried this method by adding a Map property to the DTO and set it
from its constructor. But it didn't work. Any suggestions please?
logic:iterate id=b name=bolgeler
tr
td
bean:write name=b property=bolge/
/td
td
bean:write name=b property=bolge_kodu_s/
/td
td
bean:write name=b property=bolge_kodu_t/
/td
td
bean:write name=b property=bolge_adi/
/td
td
html:link action=edit
name=b
Düzenle
/html:link
/td
/tr
/logic:iterate
--
Regards,
M. Onur Tokan


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

Re: checking for an object in a collection

2004-10-07 Thread DGraham

Obviously, it's still too early for
me. A HashMap is what I meant to say.

Dennis






[EMAIL PROTECTED]

10/07/2004 08:15 AM



Please respond to
Struts Users Mailing List [EMAIL PROTECTED]





To
Struts Users Mailing
List [EMAIL PROTECTED]


cc



Subject
Re: checking for an object
in a collection









I may not fully understand what you're trying to do, but why not use a
HashSet instead? Let the table name be the key to the rule. 

This may or may not be helpful: http://www.javapractices.com/Topic65.cjp.



Dennis 






Muhammad Momin Rashid
[EMAIL PROTECTED] 
Sent by: news [EMAIL PROTECTED] 
10/07/2004 08:09 AM





Please respond to
Struts Users Mailing List [EMAIL PROTECTED]





To
[EMAIL PROTECTED]



cc



Subject
checking for an object in
a collection










Hello All,

I have a scenario in which I need to display (or not display) differnt
parts 
of a jsp page depending on rules defined in a collection in scope.

I was wondering what is the best way to accomplish this? All the
rules 
defined in a collection, and the decision is made on the basis of if a
rule 
is present in the collection or not. The following approach seems
messy to 
me, so i was wondering if anyone can enlighten me with a better way to

accomplish this

iterate through collection
  if rule x is present
display x table
  end if
end iterate

iterate through collection
  if rule y is present
display y table
  end if
end iterate

A sample code snippit would be highly apprecated, Thanks for your
time.

Regards,
Muhammad Momin Rashid. 




-
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: Browser page break with ms/word myme

2004-10-07 Thread Jeff Beal
CSS2 includes page-break-before and page-break-after properties. 
Specifying position:fixed will cause a box to repeat on every page.  I 
am not sure if this is supported in any browser, but that's where I 
would start.

See http://www.w3.org/TR/CSS2/page.html for details on paged media with CSS.
-- Jeff
Paulo Alvim wrote:
Hi!
I've read that the easier way to print using page break and Browser is to
send the ordinary text/html contents with proprietary MS-Word's page break
tags and tell the Browser to open that html using MS-Word. (In this case,
we know the users will have Word installed).
I couldn't make the Browser open my html using word. I've tried to set the
content type response in the Request Processor (my descendent) without
success...
Any one could help with the best approach using Struts? Is there any other
easier and light solution for page break (with specific header in each page,
etc...) using Browser (no .PDF and .DOCs!)?
Thanks in advance
Paulo Alvim
Powerlogic - Brazil

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

RES: [struts] Re: Browser page break with ms/word myme

2004-10-07 Thread Paulo Alvim
Thanks a lot, Jeff!
This is exactly what I was looking for...

-Mensagem original-
De: news [mailto:[EMAIL PROTECTED] nome de Jeff Beal
Enviada em: quinta-feira, 7 de outubro de 2004 09:41
Para: [EMAIL PROTECTED]
Assunto: [struts] Re: Browser page break with ms/word myme


CSS2 includes page-break-before and page-break-after properties.
Specifying position:fixed will cause a box to repeat on every page.  I
am not sure if this is supported in any browser, but that's where I
would start.

See http://www.w3.org/TR/CSS2/page.html for details on paged media with CSS.

-- Jeff

Paulo Alvim wrote:
 Hi!

 I've read that the easier way to print using page break and Browser is to
 send the ordinary text/html contents with proprietary MS-Word's page break
 tags and tell the Browser to open that html using MS-Word. (In this
case,
 we know the users will have Word installed).

 I couldn't make the Browser open my html using word. I've tried to set
the
 content type response in the Request Processor (my descendent) without
 success...

 Any one could help with the best approach using Struts? Is there any other
 easier and light solution for page break (with specific header in each
page,
 etc...) using Browser (no .PDF and .DOCs!)?

 Thanks in advance

 Paulo Alvim
 Powerlogic - Brazil




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



Re: Browser page break with ms/word myme [pt_br]

2004-10-07 Thread Henrique VIECILI
Ae Paulo,

experimenta fazer um servlet para retornar o html e mapeie-o com final .doc no 
web.xml, eu acho q o IE antes de verificar o mime-type verifica a extensão do arquivo. 
Eu fiz isso uma vez para gerar pdf e abrir diretamenta no adobe. Claro que não custa 
setar o mime-type tambem.

Henrique Viecili
  - Original Message - 
  From: Paulo Alvim 
  To: [EMAIL PROTECTED] 
  Sent: Thursday, October 07, 2004 6:19 AM
  Subject: Browser page break with ms/word myme


  Hi!

  I've read that the easier way to print using page break and Browser is to
  send the ordinary text/html contents with proprietary MS-Word's page break
  tags and tell the Browser to open that html using MS-Word. (In this case,
  we know the users will have Word installed).

  I couldn't make the Browser open my html using word. I've tried to set the
  content type response in the Request Processor (my descendent) without
  success...

  Any one could help with the best approach using Struts? Is there any other
  easier and light solution for page break (with specific header in each page,
  etc...) using Browser (no .PDF and .DOCs!)?

  Thanks in advance

  Paulo Alvim
  Powerlogic - Brazil


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


Re: Value of hidden field from ApplicationResources.properties?

2004-10-07 Thread Jeff Beal
I'd just use input type=hidden name=nextStep value=fmt:message 
key='button.validate'/.

Wendy Smoak wrote:
I have what must be the world's simplest form... it has a text field and a
button:
html-el:form action=denRegister 
fmt:message key=label.associationId/: br/
html-el:text property=associationId size=15 /
html-el:submit property=nextStep
  fmt:message key=button.validate/
/html-el:submit
/html-el:form
It works great if the user clicks the button... not so great if he presses
enter, which submits the form without the value of nextStep coming through.
So I thought to put a hidden field in the form and just ignore the button
entirely.  But I can't seem to get the value of the hidden field to come
from ApplicationResources.properties.  I tried to do it like the submit
button, but html-el:hidden *must* be an empty tag.  None of the possible
attributes seem to do it.
Am I missing something?  Otherwise I have to hardcode it...
 html-el:hidden property=nextStep value=Validate /

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

Re: Browser page break with ms/word myme [pt_br]

2004-10-07 Thread Emmanouil Batsis
Henrique VIECILI wrote:
Ae Paulo,
experimenta fazer um servlet para retornar o html e mapeie-o com final .doc no web.xml, eu acho q o IE antes de verificar o mime-type verifica a extensão do arquivo. Eu fiz isso uma vez para gerar pdf e abrir diretamenta no adobe. Claro que não custa setar o mime-type tambem.
 

Unfortunatelly this doesn't seem greek to me (i'm in athens ;-). Please 
lets keep this conversation in english; I'm sure all the fun would go 
away if everyone was using his/her native language

Henrique Viecili
 - Original Message - 
 From: Paulo Alvim 
 To: [EMAIL PROTECTED] 
 Sent: Thursday, October 07, 2004 6:19 AM
 Subject: Browser page break with ms/word myme

 Hi!
 I've read that the easier way to print using page break and Browser is to
 send the ordinary text/html contents with proprietary MS-Word's page break
 tags and tell the Browser to open that html using MS-Word. (In this case,
 we know the users will have Word installed).
 I couldn't make the Browser open my html using word. I've tried to set the
 content type response in the Request Processor (my descendent) without
 success...
 Any one could help with the best approach using Struts? Is there any other
 easier and light solution for page break (with specific header in each page,
 etc...) using Browser (no .PDF and .DOCs!)?
 Thanks in advance
 Paulo Alvim
 Powerlogic - Brazil
 -
 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: html:link parameter passing

2004-10-07 Thread M. Onur Tokan
Sorry for double posting. Jeff It didn't work. It causes Null pointer
exception. I hava a bean named BolgeDTO with a property parameters
(java.util.Map)

And the code is ;


html:link page=/edit.do
name=b
property=parameters
Düzenle
/html:link

while (rs.next())
{
Map p=null;
BolgeDTO bolge = new BolgeDTO();
bolge.setBolge(rs.getString(1));
bolge.setBolge_kodu_s(rs.getString(2));
bolge.setBolge_kodu_t(rs.getString(3));
bolge.setBolge_adi(rs.getString(4));
p.put(bolge,rs.getString(1));
p.put(bolge_adi,rs.getString(4));
bolge.setParameters(p);
list.add(bolge);

}
if (list.size()  0)
request.getSession().setAttribute(bolgeler, list);



On Thu, 07 Oct 2004 08:35:37 -0400, Jeff Beal [EMAIL PROTECTED] wrote:
 For this to work, 'b' would have to be the name of a java.util.Map
 object; instead, it is a BolgeDTO.  Use the second method discussed in
 the html:link/ documentation:
 
Specify both name and property attributes - The specified property
 
 getter method will be called on the bean identified by the name (and
 optional scope) attributes, in order to return the java.util.Map
 containing the parameters.
 
 So, if you created a getMap() method on BolgeDTO, the following would work:
 
   html:link action=edit
   name=b property=map
   Düzenle
   /html:link
 
 -- Jeff
 
 
 
 M. Onur Tokan wrote:
  hi,
 
  I have a arraylist of BolgeDTO in request scope. I am iterating this
  arraylist in the code below. The problem is I want to add a edit
  button on the column. And I want to pass the whole properties to the
  next form so The form will contain the data from the selected row. I
  look at the html:link doc. It says that:
 
  If you prefer to specify a java.util.Map that contains all of the
  request parameters to be added to the hyperlink, use one of the
  following techniques:Specify only the name attribute - The named JSP
  bean (optionally scoped by the value of the scope attribute) must
  identify a java.util.Map containing the parameters.
 
  I tried this method by adding a Map property to the DTO and set it
  from its constructor. But it didn't work. Any suggestions please?
 
  logic:iterate id=b name=bolgeler
  tr
  td
  bean:write name=b property=bolge/
  /td
  td
  bean:write name=b property=bolge_kodu_s/
  /td
  td
  bean:write name=b property=bolge_kodu_t/
  /td
  td
  bean:write name=b property=bolge_adi/
  /td
  td
  html:link action=edit
  name=b
  Düzenle
  /html:link
  /td
  /tr
  /logic:iterate
  --
  Regards,
  M. Onur Tokan
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
Regards,
M. Onur Tokan

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



Re: html:link parameter passing

2004-10-07 Thread Jeff Beal
I don't see where 'p' is initialized to a Map in your Java code. 
Somewhere, you need to have Map p = new java.util.HashMap().

M. Onur Tokan wrote:
Sorry for double posting. Jeff It didn't work. It causes Null pointer
exception. I hava a bean named BolgeDTO with a property parameters
(java.util.Map)
And the code is ;

html:link page=/edit.do
name=b
property=parameters
Düzenle
/html:link

while (rs.next())
{
Map p=null;
BolgeDTO bolge = new BolgeDTO();
bolge.setBolge(rs.getString(1));
bolge.setBolge_kodu_s(rs.getString(2));
bolge.setBolge_kodu_t(rs.getString(3));
bolge.setBolge_adi(rs.getString(4));
p.put(bolge,rs.getString(1));
p.put(bolge_adi,rs.getString(4));
bolge.setParameters(p);
list.add(bolge);
}
if (list.size()  0)
request.getSession().setAttribute(bolgeler, list);

On Thu, 07 Oct 2004 08:35:37 -0400, Jeff Beal [EMAIL PROTECTED] wrote:
For this to work, 'b' would have to be the name of a java.util.Map
object; instead, it is a BolgeDTO.  Use the second method discussed in
the html:link/ documentation:
  Specify both name and property attributes - The specified property
   getter method will be called on the bean identified by the name (and
   optional scope) attributes, in order to return the java.util.Map
   containing the parameters.
So, if you created a getMap() method on BolgeDTO, the following would work:
 html:link action=edit
 name=b property=map
 Düzenle
 /html:link
-- Jeff

M. Onur Tokan wrote:
hi,
I have a arraylist of BolgeDTO in request scope. I am iterating this
arraylist in the code below. The problem is I want to add a edit
button on the column. And I want to pass the whole properties to the
next form so The form will contain the data from the selected row. I
look at the html:link doc. It says that:
If you prefer to specify a java.util.Map that contains all of the
request parameters to be added to the hyperlink, use one of the
following techniques:Specify only the name attribute - The named JSP
bean (optionally scoped by the value of the scope attribute) must
identify a java.util.Map containing the parameters.
I tried this method by adding a Map property to the DTO and set it
from its constructor. But it didn't work. Any suggestions please?
logic:iterate id=b name=bolgeler
   tr
   td
   bean:write name=b property=bolge/
   /td
   td
   bean:write name=b property=bolge_kodu_s/
   /td
   td
   bean:write name=b property=bolge_kodu_t/
   /td
   td
   bean:write name=b property=bolge_adi/
   /td
   td
   html:link action=edit
   name=b
   Düzenle
   /html:link
   /td
   /tr
/logic:iterate
--
Regards,
M. Onur Tokan


-
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: cleaning session

2004-10-07 Thread Erik Weber
I think a good place to start would be to start a list of situations or 
use cases encountered where this type of device was implemented or 
needed (not just with wizards, but with session attributes in general 
I think). Then we could look at the list after a while and see what all 
or many of the entries have in common -- try to recognize a pattern. 
Then maybe we could try to create a class that solves the common problem 
-- one that could be inserted into a filter, a request processor, or 
whatever, making it generically applicable (Struts or not). I would be 
willing to contribute if it caught on, because I certainly have 
encountered a need for this more than once.

For example, I recently I finished a Struts application that had an area 
(a set of pages/commands) for vendors. One of the things a vendor 
could do was search for an item, and then upload files to attach to 
that item (such as photographs). So the ActionForm used for the file 
upload screen not only kept track of the normal properties associated 
with file uploading, but also the item. The item, in turn, housed a 
collection of attributes describing every file currently attached to 
that item. So when you viewed the upload screen, you could see all the 
existing uploads, and the details about the item you were working with. 
Even though it wasn't a proper wizard, I decided to keep the form in 
session scope, because users could make mistakes (such as invalid input) 
and continually end up back at the screen. I didn't want to keep 
reloading the item and all the existing file info every time the page 
was needed. So I ended up writing a cleanup method in a base Action 
class that got rid of the form when it figured that the vendor was 
probably finished using the file upload area (such as when he returned 
home).

Probably you guys have far better examples, but that's just one off the 
top of my head.

And XML is almost always good.
Erik

Freddy Villalba A. wrote:
Well guys, although on the same direction you are pointing to, I do believe
though that the more framework-independent the solution is, the better. So,
my thought:
Why not have a XML descriptor where you can explicitly define your wizards?
In that way:
(1) No matter where your resources are, they'll get cleansed.
(2) You'll be able to reuse resources at free will on several wizards
(without having to replicate them).
(3) You won't have to set up any structure or hardcode anything in order to
determine what's to be cleansed an what not.
What do you think?
-Mensaje original-
De: Erik Weber [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 07 de octubre de 2004 13:26
Para: Struts Users Mailing List
Asunto: Re: cleaning session
Yeah, similar naming convention is the key to making it easier on
yourself.
Also, as I tried to suggest once before (in a riddle -- a single key
can open many doors -- ha ha ha grasshoppah), you can store references
to many objects under a single attribute key (using structured/nested
beans, maps, etc.). Delete the single attribute (perhaps when a user
returns to a main view) and you delete the entire tree of references,
freeing up all that memory with one statement and without having to
write too much conditional code. I'm not sure if this strategy is
feasible with Struts session-scoped forms though.
Erik
[EMAIL PROTECTED] wrote:
 

Hi, Erik and Freddz.
I like the idea of having a wizard whose data gets cleaned as soon as it's
   

scope is left.
 

How about this: Have all resources for one wizard in a URL subdirectory.
   

Have a similar naming convention for the resources the wizard leaves in the
session. If a http request comes for an url, the janitor filter could remove
all wizard's session resources that do not match the current request's
directory.
 

This way the janitor could be fairly generic.
Hiran
-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99


   

-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 7. Oktober 2004 11:55
To: Struts Users Mailing List
Subject: Re: cleaning session
This is similar to what I usually implement. I have been
gradually developing a session manager or perhaps a
session janitor that watches/tracks workflow and cleans up
stuff from memory (session) that isn't needed anymore. It
could be a filter or a custom request processor in the world
of Struts. Since I most often use my own controller Servlet I
have my own place to put it, but basically, it gets invoked
before any request handlers.
Erik
Freddy Villalba A. wrote:

 

Hi,
I have never implemented anything like this (with Struts),
   

but this is
 

the first thing I can think of...
Assuming your wizard is one-way (by this, I mean you have a linear
graph - 1-2-3... -, no bifurcations and /or
   

intersections and / or
 

parallelism), you could define your workflow by
   

tagging the 

Re: [validator] dependent field

2004-10-07 Thread Emmanouil Batsis
One day later, I figured it out. One must split the validators to 
multiple struts.validator tags, each one having it's own msgkey...

Emmanouil Batsis wrote:
Consider two fields, type and time. The first mandatory, the second 
dependent on the value of the first.

What I'm trying to do enforce a not null and not empty value for the 
time field, when the type has a value of 'time'. I've been trying to 
do this for more than an hour; I was hoping someone can spot my error 
as i have become really unproductive here :-)

Below I have both my generated validator.xml fragment and my webdoclet 
tags. Please let me know whats wrong with either!

type field
@struts.validator type=required  msgkey=error.form.eauction.type
time field
@struts.validator type=minlength
 arg1value=${var:minlength}
@struts.validator type=validwhen
@struts.validator-args arg0resource=error.form.eauction.time
@struts.validator-var name=minlength
  value=1
@struts.validator-var name=test
  value=((type != 'time') or (*this* != null))
And my XML fragment:
field property=type
depends=required
 msg
   name=required
   key=error.form.eauction.type/
 arg0 key=auctionDefinitionForm.type/
/field
field property=time
depends=minlength,validwhen
 arg0
   key=error.form.eauction.time
 /
 arg1
 name=minlength
   key=${var:minlength}
 resource=false
 /
 var
   var-nameminlength/var-name
   var-value1/var-value
 /var
 var
   var-nametest/var-name
   var-value((type != 'time') or (*this* != null))/var-value
 /var
/field
-
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: Anyone succeeded using validator in struts1.2.4 ?

2004-10-07 Thread yacout dadoun
When trying html:messages id=error/
   %= error %
  /html:messages
I get an error  saying the end tag lt;html:messages is unbalanced
From: David G. Friedman [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: Anyone succeeded using validator in struts1.2.4 ?
Date: Wed, 6 Oct 2004 19:21:09 -0400
Have you tried using something other than html:errors/ ?
Such as:
html:messages id=error/
   %= error %
  /html:messages
See the Wiki for what I mean, section 1.4:
http://wiki.apache.org/struts/StrutsBeginnerValidatorFramework
Regards,
David
-Original Message-
From: yacout dadoun [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 06, 2004 5:30 PM
To: [EMAIL PROTECTED]
Subject: Anyone succeeded using validator in struts1.2.4 ?

From: yacout dadoun [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Trouble with struts validator
Date: Wed, 06 Oct 2004 15:54:36 +

Hi,

I'm trying to use the struts validator, i have created a simple form with
few inputs, i'd like to oblige the user to enter values into inputs.
I therefore :
1-added the validator pluing to strus-config.xml
2-added the action mapping with the path set to test, the type set to the
path of the action form called TestAction, the name set to testForm,
validate set to true and inut set the the jsp file called siteForm.jsp 
and
forwards success and failure
3-created the TestAction.java taht extends Action and returns success
4-created the TestForm bean that extends ValidatorAction
5-created the testform.jsp  added html:errors/whose fomr id is testForm
6-get teh applictaion.properties file from the struts blank project
7-in the validation.xml added the formset where the name is testForm and
properties are required

However no errors is displayed

Any idea PLS

Thanks

_
Take advantage of powerful junk e-mail filters built on patented 
Microsoft®
SmartScreen Technology.
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=ht
tp://hotmail.com/encaHL=Market_MSNIS_Taglines
  Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.


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


_
Designer Mail isn't just fun to send, it's fun to receive. Use special
stationery, fonts and colors.
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=htt
p://hotmail.com/encaHL=Market_MSNIS_Taglines
  Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.
-
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]
_
Don't just Search. Find! http://search.sympatico.msn.ca/default.aspx The new 
MSN Search! Check it out!

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


Re: Anyone succeeded using validator in struts1.2.4 ?

2004-10-07 Thread Emmanouil Batsis
yacout dadoun wrote:
When trying html:messages id=error/ 
typo:-^
the tag must not close there
I get an error  saying the end tag lt;html:messages is unbalanced
From: David G. Friedman [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: Anyone succeeded using validator in struts1.2.4 ?
Date: Wed, 6 Oct 2004 19:21:09 -0400
Have you tried using something other than html:errors/ ?
Such as:
html:messages id=error/
   %= error %
  /html:messages
See the Wiki for what I mean, section 1.4:
http://wiki.apache.org/struts/StrutsBeginnerValidatorFramework
Regards,
David
-Original Message-
From: yacout dadoun [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 06, 2004 5:30 PM
To: [EMAIL PROTECTED]
Subject: Anyone succeeded using validator in struts1.2.4 ?

From: yacout dadoun [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Trouble with struts validator
Date: Wed, 06 Oct 2004 15:54:36 +

Hi,

I'm trying to use the struts validator, i have created a simple form 
with
few inputs, i'd like to oblige the user to enter values into inputs.
I therefore :
1-added the validator pluing to strus-config.xml
2-added the action mapping with the path set to test, the type set 
to the
path of the action form called TestAction, the name set to testForm,
validate set to true and inut set the the jsp file called 
siteForm.jsp and
forwards success and failure
3-created the TestAction.java taht extends Action and returns success
4-created the TestForm bean that extends ValidatorAction
5-created the testform.jsp  added html:errors/whose fomr id is 
testForm
6-get teh applictaion.properties file from the struts blank project
7-in the validation.xml added the formset where the name is testForm 
and
properties are required

However no errors is displayed

Any idea PLS

Thanks

_
Take advantage of powerful junk e-mail filters built on patented 
Microsoft®
SmartScreen Technology.
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=ht 

tp://hotmail.com/encaHL=Market_MSNIS_Taglines
  Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.


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

_
Designer Mail isn't just fun to send, it's fun to receive. Use special
stationery, fonts and colors.
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=htt 

p://hotmail.com/encaHL=Market_MSNIS_Taglines
  Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.
-
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]
_
Don't just Search. Find! http://search.sympatico.msn.ca/default.aspx 
The new MSN Search! Check it out!

-
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: html:link parameter passing

2004-10-07 Thread M. Onur Tokan
Ohhh my god! It works. thanks a lot. Do you think it's a good practice?


On Thu, 07 Oct 2004 09:26:50 -0400, Jeff Beal [EMAIL PROTECTED] wrote:
 I don't see where 'p' is initialized to a Map in your Java code.
 Somewhere, you need to have Map p = new java.util.HashMap().
 
 
 
 M. Onur Tokan wrote:
  Sorry for double posting. Jeff It didn't work. It causes Null pointer
  exception. I hava a bean named BolgeDTO with a property parameters
  (java.util.Map)
 
  And the code is ;
 
  
html:link page=/edit.do
name=b
property=parameters
Düzenle
/html:link
  
  while (rs.next())
{
Map p=null;
BolgeDTO bolge = new BolgeDTO();
bolge.setBolge(rs.getString(1));
bolge.setBolge_kodu_s(rs.getString(2));
bolge.setBolge_kodu_t(rs.getString(3));
bolge.setBolge_adi(rs.getString(4));
p.put(bolge,rs.getString(1));
p.put(bolge_adi,rs.getString(4));
bolge.setParameters(p);
list.add(bolge);
 
}
if (list.size()  0)
request.getSession().setAttribute(bolgeler, list);
 
 
 
  On Thu, 07 Oct 2004 08:35:37 -0400, Jeff Beal [EMAIL PROTECTED] wrote:
 
 For this to work, 'b' would have to be the name of a java.util.Map
 object; instead, it is a BolgeDTO.  Use the second method discussed in
 the html:link/ documentation:
 
Specify both name and property attributes - The specified property
 
 getter method will be called on the bean identified by the name (and
 optional scope) attributes, in order to return the java.util.Map
 containing the parameters.
 
 So, if you created a getMap() method on BolgeDTO, the following would work:
 
   html:link action=edit
   name=b property=map
   Düzenle
   /html:link
 
 -- Jeff
 
 
 
 M. Onur Tokan wrote:
 
 hi,
 
 I have a arraylist of BolgeDTO in request scope. I am iterating this
 arraylist in the code below. The problem is I want to add a edit
 button on the column. And I want to pass the whole properties to the
 next form so The form will contain the data from the selected row. I
 look at the html:link doc. It says that:
 
 If you prefer to specify a java.util.Map that contains all of the
 request parameters to be added to the hyperlink, use one of the
 following techniques:Specify only the name attribute - The named JSP
 bean (optionally scoped by the value of the scope attribute) must
 identify a java.util.Map containing the parameters.
 
 I tried this method by adding a Map property to the DTO and set it
 from its constructor. But it didn't work. Any suggestions please?
 
 logic:iterate id=b name=bolgeler
 tr
 td
 bean:write name=b property=bolge/
 /td
 td
 bean:write name=b property=bolge_kodu_s/
 /td
 td
 bean:write name=b property=bolge_kodu_t/
 /td
 td
 bean:write name=b property=bolge_adi/
 /td
 td
 html:link action=edit
 name=b
 Düzenle
 /html:link
 /td
 /tr
 /logic:iterate
 --
 Regards,
 M. Onur Tokan
 
 
 
 
 -
 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]
 
 


-- 
Regards,
M. Onur Tokan

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



RES: [struts] Re: Browser page break with ms/word myme [pt_br]

2004-10-07 Thread Paulo Alvim
Obrigado Henrique,

A solução do CSS2 do [EMAIL PROTECTED] funcionou e me atende bem...disponha!

-Mensagem original-
De: Emmanouil Batsis [mailto:[EMAIL PROTECTED]
Enviada em: quinta-feira, 7 de outubro de 2004 09:56
Para: Struts Users Mailing List
Assunto: [struts] Re: Browser page break with ms/word myme [pt_br]


Henrique VIECILI wrote:

Ae Paulo,

experimenta fazer um servlet para retornar o html e mapeie-o com final .doc
no web.xml, eu acho q o IE antes de verificar o mime-type verifica a
extensão do arquivo. Eu fiz isso uma vez para gerar pdf e abrir diretamenta
no adobe. Claro que não custa setar o mime-type tambem.



Unfortunatelly this doesn't seem greek to me (i'm in athens ;-). Please
lets keep this conversation in english; I'm sure all the fun would go
away if everyone was using his/her native language

Henrique Viecili
  - Original Message -
  From: Paulo Alvim
  To: [EMAIL PROTECTED]
  Sent: Thursday, October 07, 2004 6:19 AM
  Subject: Browser page break with ms/word myme


  Hi!

  I've read that the easier way to print using page break and Browser is to
  send the ordinary text/html contents with proprietary MS-Word's page
break
  tags and tell the Browser to open that html using MS-Word. (In this
case,
  we know the users will have Word installed).

  I couldn't make the Browser open my html using word. I've tried to set
the
  content type response in the Request Processor (my descendent) without
  success...

  Any one could help with the best approach using Struts? Is there any
other
  easier and light solution for page break (with specific header in each
page,
  etc...) using Browser (no .PDF and .DOCs!)?

  Thanks in advance

  Paulo Alvim
  Powerlogic - Brazil


  -
  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: cleaning session

2004-10-07 Thread Erik Weber

Vinicius Carvalho wrote:
Freddy Villalba A. wrote:
Well guys, although on the same direction you are pointing to, I do 
believe
though that the more framework-independent the solution is, the 
better. So,
my thought:

Why not have a XML descriptor where you can explicitly define your 
wizards?
In that way:
(1) No matter where your resources are, they'll get cleansed.
(2) You'll be able to reuse resources at free will on several wizards
(without having to replicate them).
(3) You won't have to set up any structure or hardcode anything in 
order to
determine what's to be cleansed an what not.

What do you think?
-Mensaje original-
De: Erik Weber [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 07 de octubre de 2004 13:26
Para: Struts Users Mailing List
Asunto: Re: cleaning session
Yeah, similar naming convention is the key to making it easier on
yourself.
Also, as I tried to suggest once before (in a riddle -- a single key
can open many doors -- ha ha ha grasshoppah), you can store references
to many objects under a single attribute key (using structured/nested
beans, maps, etc.). Delete the single attribute (perhaps when a user
returns to a main view) and you delete the entire tree of references,
freeing up all that memory with one statement and without having to
write too much conditional code. I'm not sure if this strategy is
feasible with Struts session-scoped forms though.
Erik
[EMAIL PROTECTED] wrote:
 

Hi, Erik and Freddz.
I like the idea of having a wizard whose data gets cleaned as soon 
as it's
  
scope is left.
 

How about this: Have all resources for one wizard in a URL 
subdirectory.
  
Have a similar naming convention for the resources the wizard leaves 
in the
session. If a http request comes for an url, the janitor filter could 
remove
all wizard's session resources that do not match the current request's
directory.
 

This way the janitor could be fairly generic.
Hiran
-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99


  

-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 7. Oktober 2004 11:55
To: Struts Users Mailing List
Subject: Re: cleaning session
This is similar to what I usually implement. I have been
gradually developing a session manager or perhaps a
session janitor that watches/tracks workflow and cleans up
stuff from memory (session) that isn't needed anymore. It
could be a filter or a custom request processor in the world
of Struts. Since I most often use my own controller Servlet I
have my own place to put it, but basically, it gets invoked
before any request handlers.
Erik
Freddy Villalba A. wrote:



Hi,
I have never implemented anything like this (with Struts),
  
but this is


the first thing I can think of...
Assuming your wizard is one-way (by this, I mean you have a linear
graph - 1-2-3... -, no bifurcations and /or
  
intersections and / or


parallelism), you could define your workflow by
  
tagging the pages it is made of...


then, manage the wizard from a filter that is able to detect your
getting into one and your leaving it. Once it detects
  
someone's left a


wizard, and knowing its components, it could have them
  
cleaned off the


corresponding Session.
I believe, however, that this approach wouldn't work if the graph is
not linear.
I'll be glad to here your feedback (everybody).
HTH,
Freddy.
-Mensaje original-
De: Paul McCulloch [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 07 de octubre de 2004 10:27
Para: 'Struts Users Mailing List'
Asunto: RE: cleaning session
That isn't the purpose of the (confusingly named) reset
  
method. Reset


is there to, typically, deal with the html forms submit
  
checkbox fields


(they don't submit anything if they are null).
Paul


  

-Original Message-
From: Leandro Melo [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 06, 2004 5:43 PM
To: Struts Users Mailing List
Subject: Re: cleaning session
If you have your action in HttpSession, why don`t you just


call reset


whenever a user clicks on the button supposed to start this wizard?

--- struts lover [EMAIL PROTECTED] escreveu:



Hello everyone,
I am facing this problem of session. I have my action form in
session(a wizard like thing). Now if the user starts filling in
values  and clicks on the NEXT button, to go on to the next screen
and then instead of completing the process of application,
  

clicks on


some other link.
Again he wants to start with the application process, the form get
pre-populated with the previous values, as the form in still in
session. I want a clean form.
How to overcome this problem???
Any ideas???
Thanks.

___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com


  

Colspan html attribute equivalent in jsf

2004-10-07 Thread babloosony
Hi,

In jsf, if i am using h:panelGrid to draw a table with 2 columns,
then in first row i want to club the 2 columns into one (like using
colspan=2 html attribute) and in remaining rows i want to have 2
columns. how can i achieve this using jsf tag h:panelGrid ??

Thanks  Regards,
Kumar.

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



Re: Anyone succeeded using validator in struts1.2.4 ?

2004-10-07 Thread yacout dadoun
Oh yes thanks
Now if we come to our initial problem when i ommit entering a value to an 
input, the messages displayed is null and not  input required.
Should i change the application.properties and  replace errors.required=.. 
by messages.required=... ?

From: Emmanouil Batsis [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: Anyone succeeded using validator in struts1.2.4 ?
Date: Thu, 07 Oct 2004 16:48:55 +0300
yacout dadoun wrote:
When trying html:messages id=error/
typo:-^
the tag must not close there
I get an error  saying the end tag lt;html:messages is unbalanced
From: David G. Friedman [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: Anyone succeeded using validator in struts1.2.4 ?
Date: Wed, 6 Oct 2004 19:21:09 -0400
Have you tried using something other than html:errors/ ?
Such as:
html:messages id=error/
   %= error %
  /html:messages
See the Wiki for what I mean, section 1.4:
http://wiki.apache.org/struts/StrutsBeginnerValidatorFramework
Regards,
David
-Original Message-
From: yacout dadoun [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 06, 2004 5:30 PM
To: [EMAIL PROTECTED]
Subject: Anyone succeeded using validator in struts1.2.4 ?

From: yacout dadoun [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Trouble with struts validator
Date: Wed, 06 Oct 2004 15:54:36 +

Hi,

I'm trying to use the struts validator, i have created a simple form 
with
few inputs, i'd like to oblige the user to enter values into inputs.
I therefore :
1-added the validator pluing to strus-config.xml
2-added the action mapping with the path set to test, the type set to 
the
path of the action form called TestAction, the name set to testForm,
validate set to true and inut set the the jsp file called siteForm.jsp 
and
forwards success and failure
3-created the TestAction.java taht extends Action and returns success
4-created the TestForm bean that extends ValidatorAction
5-created the testform.jsp  added html:errors/whose fomr id is 
testForm
6-get teh applictaion.properties file from the struts blank project
7-in the validation.xml added the formset where the name is testForm 
and
properties are required

However no errors is displayed

Any idea PLS

Thanks

_
Take advantage of powerful junk e-mail filters built on patented 
Microsoft®
SmartScreen Technology.
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=ht

tp://hotmail.com/encaHL=Market_MSNIS_Taglines
  Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.


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

_
Designer Mail isn't just fun to send, it's fun to receive. Use special
stationery, fonts and colors.
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=htt
p://hotmail.com/encaHL=Market_MSNIS_Taglines
  Start enjoying all the benefits of MSN® Premium right now and get the
first two months FREE*.
-
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]
_
Don't just Search. Find! http://search.sympatico.msn.ca/default.aspx The 
new MSN Search! Check it out!

-
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]
_
Take advantage of powerful junk e-mail filters built on patented Microsoft® 
SmartScreen Technology. 
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines 
 Start enjoying all the benefits of MSN® Premium right now and get the 
first two months FREE*.

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


Enhanced client side validation

2004-10-07 Thread mike . dunn
We have a requirement to validate (using Javascript) beans whose properties
can be of type Map, List, [], or any simple type. Furthermore, Maps, Lists,
and []s can be arbitrarily nested.
 
We have found that the validator only supports simple properties (on the
client). We modified it last year to support Lists and []s. Now we want to
modify it to support Maps and nesting.
 

Here's how it currently works:
 
Suppose a user has a List of addresses:
 
 public class User {
  public List getAddresses() {
   ...
  }
 }
 
and an address has a zip:
 
 public class Address {
  public String getZip() {
   ...
  }
 }
 
So in validation.xml we write:
 
 form name=user
 field 
  property=zip
  indexedListProperty=addresses
...
 

What we would rather do is write:
 
 form name=user
 field 
  property=addresses.zip
...
 
or
 
 field 
  property=addresses[].zip
...
 

Then we can expand this to support nesting and Maps:
 
   !-- validates all areaCodes --
 field
  property=addresses[].phoneNumbers[].areaCode
...
 
   !-- addresses is of type Map now; validates areaCodes 
for shipping address --
 field
  property=addresses(shipping).phoneNumbers[].areaCode
...
 field
 
   !-- validates all areaCodes --
  property=addresses().phoneNumbers[].areaCode
...
 field
 
   !-- validates areaCodes for shipping address and phone 
numbers that start with home (i.e. home, home1, 
 home2, etc.) --
 field 
  property=addresses(shipping).phoneNumbers(home*).areaCode
...
 
Note the wildcard in the last example.
 
Please let us know if this has been done before; if there's a better
approach; or if you would like the code for yourself.
 
Thanks,
Mike Dunn
mike dot dunn at siemens dot com


Problem sharing Tiles between applications

2004-10-07 Thread Brown, Robert
Greetings:

   Perhaps you can help me with a real problem I am having using Tiles.

   I have an understanding of how to use Tiles; I have several pages that
use several parts of JSPs, as illustrated by the example below:

%@ taglib uri=/WEB-INF/struts-tiles.tld prefix=tiles %

tiles:insert page=/layouts/mainlayout.jsp flush=true
tiles:put name=title value=Typical Title of Page /
tiles:put name=banner value=/parts/toppart.jspf /
tiles:put name=menu value=/parts/menu.jspf /
tiles:put name=content value=/content/mainpg.jspf /
tiles:put name=footer value=/parts/footer.jspf /
/tiles:insert

The names of the JSPs (and the parameters) should speak for themselves.

   I have several pages within my application which reuse the banner,
menu, and footer pages. My problem arises when I attempt to use these
same pages in another application.

   What I tried to do is create another application and have it point to the
same banner, menu, and footer pages. The exact pages. What I want to
do is have a common directory that has toppart.jspf, menu.jspf, and
footer.jspf, and have more than one application go to that directory for
those files. 

   Unfortunately, it appears that the different applications always look for
a subdirectory under their context root for the files in question --
especially if those applications are packaged in EAR files. When I try to
make one application go to another for the JSPs in question, an exception is
thrown because the tiles:insert tag cannot fnd the files.

   Has anyone else run into this problem that you know of? Is there a
possible solution? I would rather be able to reuse parts of JSPs between
applications; after all, the banner, menu, and footer are common across the
applications they will be used for. I do not want to have to have multiple
copies of these files; after all, isn't that what Tiles is supposed to help
avoid???

   Can you give some insight into this matter? Thank You.

-Robert Brown III

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



RE: cleaning session

2004-10-07 Thread Freddy Villalba A.
There is another typical example:

You have a search screen. after performing a search, you select one of the
items in order to... say... edit it. You go to the edition screen (form)
and, once you've concluded working with that item (typically: saved, deleted
or canceled), you return to the search screen, where you'd see the
(refreshed version of the) last search results' table (to keep it simple,
don't even assume there is pagination).



-Mensaje original-
De: Erik Weber [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 07 de octubre de 2004 15:31
Para: Struts Users Mailing List
Asunto: Re: cleaning session


I think a good place to start would be to start a list of situations or
use cases encountered where this type of device was implemented or
needed (not just with wizards, but with session attributes in general
I think). Then we could look at the list after a while and see what all
or many of the entries have in common -- try to recognize a pattern.
Then maybe we could try to create a class that solves the common problem
-- one that could be inserted into a filter, a request processor, or
whatever, making it generically applicable (Struts or not). I would be
willing to contribute if it caught on, because I certainly have
encountered a need for this more than once.

For example, I recently I finished a Struts application that had an area
(a set of pages/commands) for vendors. One of the things a vendor
could do was search for an item, and then upload files to attach to
that item (such as photographs). So the ActionForm used for the file
upload screen not only kept track of the normal properties associated
with file uploading, but also the item. The item, in turn, housed a
collection of attributes describing every file currently attached to
that item. So when you viewed the upload screen, you could see all the
existing uploads, and the details about the item you were working with.
Even though it wasn't a proper wizard, I decided to keep the form in
session scope, because users could make mistakes (such as invalid input)
and continually end up back at the screen. I didn't want to keep
reloading the item and all the existing file info every time the page
was needed. So I ended up writing a cleanup method in a base Action
class that got rid of the form when it figured that the vendor was
probably finished using the file upload area (such as when he returned
home).

Probably you guys have far better examples, but that's just one off the
top of my head.

And XML is almost always good.

Erik



Freddy Villalba A. wrote:

Well guys, although on the same direction you are pointing to, I do believe
though that the more framework-independent the solution is, the better. So,
my thought:

Why not have a XML descriptor where you can explicitly define your wizards?
In that way:
(1) No matter where your resources are, they'll get cleansed.
(2) You'll be able to reuse resources at free will on several wizards
(without having to replicate them).
(3) You won't have to set up any structure or hardcode anything in order to
determine what's to be cleansed an what not.

What do you think?

-Mensaje original-
De: Erik Weber [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 07 de octubre de 2004 13:26
Para: Struts Users Mailing List
Asunto: Re: cleaning session


Yeah, similar naming convention is the key to making it easier on
yourself.

Also, as I tried to suggest once before (in a riddle -- a single key
can open many doors -- ha ha ha grasshoppah), you can store references
to many objects under a single attribute key (using structured/nested
beans, maps, etc.). Delete the single attribute (perhaps when a user
returns to a main view) and you delete the entire tree of references,
freeing up all that memory with one statement and without having to
write too much conditional code. I'm not sure if this strategy is
feasible with Struts session-scoped forms though.

Erik


[EMAIL PROTECTED] wrote:



Hi, Erik and Freddz.

I like the idea of having a wizard whose data gets cleaned as soon as it's


scope is left.


How about this: Have all resources for one wizard in a URL subdirectory.


Have a similar naming convention for the resources the wizard leaves in the
session. If a http request comes for an url, the janitor filter could
remove
all wizard's session resources that do not match the current request's
directory.


This way the janitor could be fairly generic.

Hiran

-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99








-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 7. Oktober 2004 11:55
To: Struts Users Mailing List
Subject: Re: cleaning session

This is similar to what I usually implement. I have been
gradually developing a session manager or perhaps a
session janitor that watches/tracks workflow and cleans up
stuff from memory (session) that isn't needed 

Re: cleaning session

2004-10-07 Thread Vinicius Carvalho
Erik Weber wrote:

Vinicius Carvalho wrote:
Freddy Villalba A. wrote:
Well guys, although on the same direction you are pointing to, I do 
believe
though that the more framework-independent the solution is, the 
better. So,
my thought:

Why not have a XML descriptor where you can explicitly define your 
wizards?
In that way:
(1) No matter where your resources are, they'll get cleansed.
(2) You'll be able to reuse resources at free will on several wizards
(without having to replicate them).
(3) You won't have to set up any structure or hardcode anything in 
order to
determine what's to be cleansed an what not.

What do you think?
-Mensaje original-
De: Erik Weber [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 07 de octubre de 2004 13:26
Para: Struts Users Mailing List
Asunto: Re: cleaning session
Yeah, similar naming convention is the key to making it easier on
yourself.
Also, as I tried to suggest once before (in a riddle -- a single key
can open many doors -- ha ha ha grasshoppah), you can store references
to many objects under a single attribute key (using structured/nested
beans, maps, etc.). Delete the single attribute (perhaps when a user
returns to a main view) and you delete the entire tree of references,
freeing up all that memory with one statement and without having to
write too much conditional code. I'm not sure if this strategy is
feasible with Struts session-scoped forms though.
Erik
[EMAIL PROTECTED] wrote:
 

Hi, Erik and Freddz.
I like the idea of having a wizard whose data gets cleaned as soon 
as it's
  

scope is left.
 

How about this: Have all resources for one wizard in a URL 
subdirectory.
  

Have a similar naming convention for the resources the wizard leaves 
in the
session. If a http request comes for an url, the janitor filter 
could remove
all wizard's session resources that do not match the current request's
directory.
 

This way the janitor could be fairly generic.
Hiran
-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99


 

-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 7. Oktober 2004 11:55
To: Struts Users Mailing List
Subject: Re: cleaning session
This is similar to what I usually implement. I have been
gradually developing a session manager or perhaps a
session janitor that watches/tracks workflow and cleans up
stuff from memory (session) that isn't needed anymore. It
could be a filter or a custom request processor in the world
of Struts. Since I most often use my own controller Servlet I
have my own place to put it, but basically, it gets invoked
before any request handlers.
Erik
Freddy Villalba A. wrote:

   

Hi,
I have never implemented anything like this (with Struts),
  

but this is
   

the first thing I can think of...
Assuming your wizard is one-way (by this, I mean you have a linear
graph - 1-2-3... -, no bifurcations and /or
  

intersections and / or
   

parallelism), you could define your workflow by
  

tagging the pages it is made of...
   

then, manage the wizard from a filter that is able to detect your
getting into one and your leaving it. Once it detects
  

someone's left a
   

wizard, and knowing its components, it could have them
  

cleaned off the
   

corresponding Session.
I believe, however, that this approach wouldn't work if the graph is
not linear.
I'll be glad to here your feedback (everybody).
HTH,
Freddy.
-Mensaje original-
De: Paul McCulloch [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 07 de octubre de 2004 10:27
Para: 'Struts Users Mailing List'
Asunto: RE: cleaning session
That isn't the purpose of the (confusingly named) reset
  

method. Reset
   

is there to, typically, deal with the html forms submit
  

checkbox fields
   

(they don't submit anything if they are null).
Paul


 

-Original Message-
From: Leandro Melo [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 06, 2004 5:43 PM
To: Struts Users Mailing List
Subject: Re: cleaning session
If you have your action in HttpSession, why don`t you just


call reset
   

whenever a user clicks on the button supposed to start this wizard?

--- struts lover [EMAIL PROTECTED] escreveu:

   

Hello everyone,
I am facing this problem of session. I have my action form in
session(a wizard like thing). Now if the user starts filling in
values  and clicks on the NEXT button, to go on to the next screen
and then instead of completing the process of application,
  

clicks on
   

some other link.
Again he wants to start with the application process, the form get
pre-populated with the previous values, as the form in still in
session. I want a clean form.
How to overcome this problem???
Any ideas???
Thanks.

___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com


  


Re: cleaning session

2004-10-07 Thread Erik Weber

Vinicius Carvalho wrote:
Erik Weber wrote:

Vinicius Carvalho wrote:
Freddy Villalba A. wrote:
Well guys, although on the same direction you are pointing to, I do 
believe
though that the more framework-independent the solution is, the 
better. So,
my thought:

Why not have a XML descriptor where you can explicitly define your 
wizards?
In that way:
(1) No matter where your resources are, they'll get cleansed.
(2) You'll be able to reuse resources at free will on several wizards
(without having to replicate them).
(3) You won't have to set up any structure or hardcode anything in 
order to
determine what's to be cleansed an what not.

What do you think?
-Mensaje original-
De: Erik Weber [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 07 de octubre de 2004 13:26
Para: Struts Users Mailing List
Asunto: Re: cleaning session
Yeah, similar naming convention is the key to making it easier on
yourself.
Also, as I tried to suggest once before (in a riddle -- a single key
can open many doors -- ha ha ha grasshoppah), you can store 
references
to many objects under a single attribute key (using structured/nested
beans, maps, etc.). Delete the single attribute (perhaps when a user
returns to a main view) and you delete the entire tree of references,
freeing up all that memory with one statement and without having to
write too much conditional code. I'm not sure if this strategy is
feasible with Struts session-scoped forms though.

Erik
[EMAIL PROTECTED] wrote:
 

Hi, Erik and Freddz.
I like the idea of having a wizard whose data gets cleaned as soon 
as it's
  

scope is left.
 

How about this: Have all resources for one wizard in a URL 
subdirectory.
  

Have a similar naming convention for the resources the wizard 
leaves in the
session. If a http request comes for an url, the janitor filter 
could remove
all wizard's session resources that do not match the current request's
directory.
 

This way the janitor could be fairly generic.
Hiran
-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99


 

-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 7. Oktober 2004 11:55
To: Struts Users Mailing List
Subject: Re: cleaning session
This is similar to what I usually implement. I have been
gradually developing a session manager or perhaps a
session janitor that watches/tracks workflow and cleans up
stuff from memory (session) that isn't needed anymore. It
could be a filter or a custom request processor in the world
of Struts. Since I most often use my own controller Servlet I
have my own place to put it, but basically, it gets invoked
before any request handlers.
Erik
Freddy Villalba A. wrote:

  

Hi,
I have never implemented anything like this (with Struts),
  

but this is
  

the first thing I can think of...
Assuming your wizard is one-way (by this, I mean you have a linear
graph - 1-2-3... -, no bifurcations and /or
  

intersections and / or
  

parallelism), you could define your workflow by
  

tagging the pages it is made of...
  

then, manage the wizard from a filter that is able to detect your
getting into one and your leaving it. Once it detects
  

someone's left a
  

wizard, and knowing its components, it could have them
  

cleaned off the
  

corresponding Session.
I believe, however, that this approach wouldn't work if the 
graph is
not linear.

I'll be glad to here your feedback (everybody).
HTH,
Freddy.
-Mensaje original-
De: Paul McCulloch [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 07 de octubre de 2004 10:27
Para: 'Struts Users Mailing List'
Asunto: RE: cleaning session
That isn't the purpose of the (confusingly named) reset
  

method. Reset
  

is there to, typically, deal with the html forms submit
  

checkbox fields
  

(they don't submit anything if they are null).
Paul




-Original Message-
From: Leandro Melo [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 06, 2004 5:43 PM
To: Struts Users Mailing List
Subject: Re: cleaning session
If you have your action in HttpSession, why don`t you just



call reset
  

whenever a user clicks on the button supposed to start this 
wizard?


--- struts lover [EMAIL PROTECTED] escreveu:

  

Hello everyone,
I am facing this problem of session. I have my action form in
session(a wizard like thing). Now if the user starts filling in
values  and clicks on the NEXT button, to go on to the next 
screen
and then instead of completing the process of application,

  


clicks on
  

some other link.
Again he wants to start with the application process, the form 
get
pre-populated with the previous values, as the form in still in
session. I want a clean form.
How to overcome this problem???
Any ideas???
Thanks.


___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com


   

Re: cleaning session

2004-10-07 Thread Erik Weber
Yes, that is a good example.
My only requirement here is that no one from STANDARDS BANK may ever 
make use of it.

:)
Erik

Freddy Villalba A. wrote:
There is another typical example:
You have a search screen. after performing a search, you select one of the
items in order to... say... edit it. You go to the edition screen (form)
and, once you've concluded working with that item (typically: saved, deleted
or canceled), you return to the search screen, where you'd see the
(refreshed version of the) last search results' table (to keep it simple,
don't even assume there is pagination).

-Mensaje original-
De: Erik Weber [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 07 de octubre de 2004 15:31
Para: Struts Users Mailing List
Asunto: Re: cleaning session
I think a good place to start would be to start a list of situations or
use cases encountered where this type of device was implemented or
needed (not just with wizards, but with session attributes in general
I think). Then we could look at the list after a while and see what all
or many of the entries have in common -- try to recognize a pattern.
Then maybe we could try to create a class that solves the common problem
-- one that could be inserted into a filter, a request processor, or
whatever, making it generically applicable (Struts or not). I would be
willing to contribute if it caught on, because I certainly have
encountered a need for this more than once.
For example, I recently I finished a Struts application that had an area
(a set of pages/commands) for vendors. One of the things a vendor
could do was search for an item, and then upload files to attach to
that item (such as photographs). So the ActionForm used for the file
upload screen not only kept track of the normal properties associated
with file uploading, but also the item. The item, in turn, housed a
collection of attributes describing every file currently attached to
that item. So when you viewed the upload screen, you could see all the
existing uploads, and the details about the item you were working with.
Even though it wasn't a proper wizard, I decided to keep the form in
session scope, because users could make mistakes (such as invalid input)
and continually end up back at the screen. I didn't want to keep
reloading the item and all the existing file info every time the page
was needed. So I ended up writing a cleanup method in a base Action
class that got rid of the form when it figured that the vendor was
probably finished using the file upload area (such as when he returned
home).
Probably you guys have far better examples, but that's just one off the
top of my head.
And XML is almost always good.
Erik

Freddy Villalba A. wrote:
 

Well guys, although on the same direction you are pointing to, I do believe
though that the more framework-independent the solution is, the better. So,
my thought:
Why not have a XML descriptor where you can explicitly define your wizards?
In that way:
(1) No matter where your resources are, they'll get cleansed.
(2) You'll be able to reuse resources at free will on several wizards
(without having to replicate them).
(3) You won't have to set up any structure or hardcode anything in order to
determine what's to be cleansed an what not.
What do you think?
-Mensaje original-
De: Erik Weber [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 07 de octubre de 2004 13:26
Para: Struts Users Mailing List
Asunto: Re: cleaning session
Yeah, similar naming convention is the key to making it easier on
yourself.
Also, as I tried to suggest once before (in a riddle -- a single key
can open many doors -- ha ha ha grasshoppah), you can store references
to many objects under a single attribute key (using structured/nested
beans, maps, etc.). Delete the single attribute (perhaps when a user
returns to a main view) and you delete the entire tree of references,
freeing up all that memory with one statement and without having to
write too much conditional code. I'm not sure if this strategy is
feasible with Struts session-scoped forms though.
Erik
[EMAIL PROTECTED] wrote:

   

Hi, Erik and Freddz.
I like the idea of having a wizard whose data gets cleaned as soon as it's
 

scope is left.
   

How about this: Have all resources for one wizard in a URL subdirectory.
 

Have a similar naming convention for the resources the wizard leaves in the
session. If a http request comes for an url, the janitor filter could
   

remove
 

all wizard's session resources that do not match the current request's
directory.
   

This way the janitor could be fairly generic.
Hiran
-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99



 

-Original Message-
From: Erik Weber [mailto:[EMAIL PROTECTED]
Sent: Donnerstag, 7. Oktober 2004 11:55
To: Struts Users Mailing List
Subject: Re: cleaning session
This is similar to what I usually implement. I have been

RE: cleaning session

2004-10-07 Thread Hiran.Chaudhuri
Don't put this example under Apache License then. ;-)
Or have it patented (with the new patent laws in Europe no problem).

Hiran (getting offtopic)

-
Hiran Chaudhuri
SAG Systemhaus GmbH
Elsenheimer Straße 11
80867 München
Phone +49-89-54 74 21 34
Fax   +49-89-54 74 21 99


 

 -Original Message-
 From: Erik Weber [mailto:[EMAIL PROTECTED] 
 Sent: Donnerstag, 7. Oktober 2004 15:33
 To: Struts Users Mailing List
 Subject: Re: cleaning session
 
 Yes, that is a good example.
 
 My only requirement here is that no one from STANDARDS BANK 
 may ever make use of it.
 
 :)
 
 Erik
 
 
 
 Freddy Villalba A. wrote:
 
 There is another typical example:
 
 You have a search screen. after performing a search, you 
 select one of 
 the items in order to... say... edit it. You go to the 
 edition screen 
 (form) and, once you've concluded working with that item (typically: 
 saved, deleted or canceled), you return to the search screen, where 
 you'd see the (refreshed version of the) last search 
 results' table (to 
 keep it simple, don't even assume there is pagination).
 
 
 
 -Mensaje original-
 De: Erik Weber [mailto:[EMAIL PROTECTED] Enviado el: 
 jueves, 07 
 de octubre de 2004 15:31
 Para: Struts Users Mailing List
 Asunto: Re: cleaning session
 
 
 I think a good place to start would be to start a list of 
 situations or 
 use cases encountered where this type of device was implemented or 
 needed (not just with wizards, but with session attributes 
 in general 
 I think). Then we could look at the list after a while and 
 see what all 
 or many of the entries have in common -- try to recognize a pattern.
 Then maybe we could try to create a class that solves the common 
 problem
 -- one that could be inserted into a filter, a request processor, or 
 whatever, making it generically applicable (Struts or not). 
 I would be 
 willing to contribute if it caught on, because I certainly have 
 encountered a need for this more than once.
 
 For example, I recently I finished a Struts application that had an 
 area (a set of pages/commands) for vendors. One of the things a 
 vendor could do was search for an item, and then upload files to 
 attach to that item (such as photographs). So the 
 ActionForm used for 
 the file upload screen not only kept track of the normal properties 
 associated with file uploading, but also the item. The item, 
 in turn, 
 housed a collection of attributes describing every file currently 
 attached to that item. So when you viewed the upload screen, 
 you could 
 see all the existing uploads, and the details about the item 
 you were working with.
 Even though it wasn't a proper wizard, I decided to keep 
 the form in 
 session scope, because users could make mistakes (such as invalid 
 input) and continually end up back at the screen. I didn't 
 want to keep 
 reloading the item and all the existing file info every time 
 the page 
 was needed. So I ended up writing a cleanup method in a 
 base Action 
 class that got rid of the form when it figured that the vendor was 
 probably finished using the file upload area (such as when 
 he returned 
 home).
 
 Probably you guys have far better examples, but that's just 
 one off the 
 top of my head.
 
 And XML is almost always good.
 
 Erik
 
 
 
 Freddy Villalba A. wrote:
 
   
 
 Well guys, although on the same direction you are pointing to, I do 
 believe though that the more framework-independent the solution is, 
 the better. So, my thought:
 
 Why not have a XML descriptor where you can explicitly 
 define your wizards?
 In that way:
 (1) No matter where your resources are, they'll get cleansed.
 (2) You'll be able to reuse resources at free will on 
 several wizards 
 (without having to replicate them).
 (3) You won't have to set up any structure or hardcode anything in 
 order to determine what's to be cleansed an what not.
 
 What do you think?
 
 -Mensaje original-
 De: Erik Weber [mailto:[EMAIL PROTECTED] Enviado 
 el: jueves, 
 07 de octubre de 2004 13:26
 Para: Struts Users Mailing List
 Asunto: Re: cleaning session
 
 
 Yeah, similar naming convention is the key to making it easier on 
 yourself.
 
 Also, as I tried to suggest once before (in a riddle -- a 
 single key 
 can open many doors -- ha ha ha grasshoppah), you can store 
 references to many objects under a single attribute key (using 
 structured/nested beans, maps, etc.). Delete the single attribute 
 (perhaps when a user returns to a main view) and you delete 
 the entire 
 tree of references, freeing up all that memory with one 
 statement and 
 without having to write too much conditional code. I'm not sure if 
 this strategy is feasible with Struts session-scoped forms though.
 
 Erik
 
 
 [EMAIL PROTECTED] wrote:
 
 
 
 
 
 Hi, Erik and Freddz.
 
 I like the idea of having a wizard whose data gets cleaned 
 as soon as 
 it's
 
 
   
 
 scope is left.
 
 
 
 
 How about this: Have all 

grab form bean was Re: form reset

2004-10-07 Thread roy-strutsuser
Hey guys,

Thanks for the response on my first question.  Turns out I'm an idiot and was 
pre-filling a form element via the value parameter of a html-el... tag.

However this now leads to a second question.  How do I grab the form bean and the 
fields?  I'd like to print the value of a form field either on an error or success.  

Searching the list, it looks like I can do something like this:
jsp:useBean id=myform class=package.class scope=session/
c:out value=${myform.myField}/

Trying this in my app doesn't seem to work... any clues?

I have my action...  setup with scope session and my forward success with a 
redirect of false.

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



Re: grab form bean was Re: form reset

2004-10-07 Thread wiwit_tjahjana
If you have a request- or session-scoped regular formBean called myform, 
a simple call like this will output the value of property myfield
c:out value=${myform.myfield} /
But with dynaBean, you have to qualify the property name with map:
c:out value=${myform.map.myfield} /
Hope that helps!
wiwit






[EMAIL PROTECTED] 
10/07/2004 11:05 AM
Please respond to
Struts Users Mailing List [EMAIL PROTECTED]


To
[EMAIL PROTECTED]
cc

Subject
grab form bean was Re: form reset






Hey guys,

Thanks for the response on my first question.  Turns out I'm an idiot and 
was pre-filling a form element via the value parameter of a html-el... 
tag.

However this now leads to a second question.  How do I grab the form bean 
and the fields?  I'd like to print the value of a form field either on an 
error or success. 

Searching the list, it looks like I can do something like this:
jsp:useBean id=myform class=package.class scope=session/
c:out value=${myform.myField}/

Trying this in my app doesn't seem to work... any clues?

I have my action...  setup with scope session and my forward success 
with a redirect of false.

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





[OT] Site map generator

2004-10-07 Thread Durham David R Jr Contr 805 CSPTS/SCE
I'm looking for something that dynamically generates a site map.  Simply
spidering pages is not going to work.  Basically, I'm looking for
something that uses a configuration to generate HTML/CSS or and
Image/Map combination.

Obviously free would be preferred, but something that costs money is
also an option.


Thanks,

--
Dave

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



[validator] How to submit only when ther are no eror

2004-10-07 Thread yacout dadoun
Hi,
I'm using struts1.2.4, using validator, how can i submit teh oage, which 
neans call my bean setter only when therer are norerror genrated by my 
validator? i guess it'll be done in teh Action java file but how? it always 
set the entered values even whne teh input is empty and wich imy validator 
does not allow
Thanks

_
MSN® Calendar keeps you organized and takes the effort out of scheduling 
get-togethers. 
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines 
 Start enjoying all the benefits of MSN® Premium right now and get the 
first two months FREE*.

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


tool to produce a sitemap from struts-config

2004-10-07 Thread Emmanouil Batsis
I remember someone posted about a tool that reads struts-config and 
produces some kind of sitemap but i cant find it by searching... can 
someone please refresh my memory?

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


RE: [validator] How to submit only when ther are no eror

2004-10-07 Thread Barnett, Brian W.
One way to accomplish this is with client side validation. This is dependent
on scripting being enabled on the browser however.

html:form action=/foo onsubmit=return validateFooForm(this);
...
/html:form
html:javascript formName = fooForm/

-Original Message-
From: yacout dadoun [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 07, 2004 9:49 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [validator] How to submit only when ther are no eror

Hi,
I'm using struts1.2.4, using validator, how can i submit teh oage, which 
neans call my bean setter only when therer are norerror genrated by my 
validator? i guess it'll be done in teh Action java file but how? it always 
set the entered values even whne teh input is empty and wich imy validator 
does not allow
Thanks

_
MSN(r) Calendar keeps you organized and takes the effort out of scheduling 
get-togethers. 
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=htt
p://hotmail.com/encaHL=Market_MSNIS_Taglines 
  Start enjoying all the benefits of MSN(r) Premium right now and get the 
first two months FREE*.


-
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: [validator] How to submit only when ther are no eror

2004-10-07 Thread yacout dadoun
Thanks, but is there a way to do that using jsp jstl  no struts tags  ?

From: Barnett, Brian W. [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: [validator] How to submit only when ther are no eror
Date: Thu, 7 Oct 2004 10:48:06 -0500
One way to accomplish this is with client side validation. This is 
dependent
on scripting being enabled on the browser however.

html:form action=/foo onsubmit=return validateFooForm(this);
...
/html:form
html:javascript formName = fooForm/
-Original Message-
From: yacout dadoun [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 07, 2004 9:49 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [validator] How to submit only when ther are no eror
Hi,
I'm using struts1.2.4, using validator, how can i submit teh oage, which
neans call my bean setter only when therer are norerror genrated by my
validator? i guess it'll be done in teh Action java file but how? it always
set the entered values even whne teh input is empty and wich imy validator
does not allow
Thanks
_
MSN(r) Calendar keeps you organized and takes the effort out of scheduling
get-togethers.
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=htt
p://hotmail.com/encaHL=Market_MSNIS_Taglines
  Start enjoying all the benefits of MSN(r) Premium right now and get the
first two months FREE*.
-
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]
_
MSN® Calendar keeps you organized and takes the effort out of scheduling 
get-togethers. 
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=http://hotmail.com/encaHL=Market_MSNIS_Taglines 
 Start enjoying all the benefits of MSN® Premium right now and get the 
first two months FREE*.

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


Re: tool to produce a sitemap from struts-config

2004-10-07 Thread Niall Pemberton
http://struts.sourceforge.net/strutsdoc/

- Original Message - 
From: Emmanouil Batsis [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, October 07, 2004 4:53 PM
Subject: tool to produce a sitemap from struts-config


 I remember someone posted about a tool that reads struts-config and 
 produces some kind of sitemap but i cant find it by searching... can 
 someone please refresh my memory?
 
 Thanks,
 
 Manos
 
 -
 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: tool to produce a sitemap from struts-config

2004-10-07 Thread Xavier Noria
On Oct 7, 2004, at 17:53, Emmanouil Batsis wrote:
I remember someone posted about a tool that reads struts-config and 
produces some kind of sitemap but i cant find it by searching... can 
someone please refresh my memory?
Maybe you mean VisualStruts?
http://visualstruts.sourceforge.net/
-- fxn
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: [validator] How to submit only when ther are no eror

2004-10-07 Thread Barnett, Brian W.
Yes, you can manually do everything that the Struts tag and the
validation.xml file is doing for you.

form name=fooForm method=post action=/do/foo onsubmit=return
validateFooForm(this);

...

/form

Then you would have to write a validateFooForm javascript function that
validates the fields of your form. Your validateFooForm function should
return true if validation succeeds and false if validation fails.

   } -Original Message-
From: yacout dadoun [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 07, 2004 10:04 AM
To: [EMAIL PROTECTED]
Subject: RE: [validator] How to submit only when ther are no eror

Thanks, but is there a way to do that using jsp jstl  no struts tags  ?


From: Barnett, Brian W. [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Subject: RE: [validator] How to submit only when ther are no eror
Date: Thu, 7 Oct 2004 10:48:06 -0500

One way to accomplish this is with client side validation. This is 
dependent
on scripting being enabled on the browser however.

html:form action=/foo onsubmit=return validateFooForm(this);
...
/html:form
html:javascript formName = fooForm/

-Original Message-
From: yacout dadoun [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 07, 2004 9:49 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [validator] How to submit only when ther are no eror

Hi,
I'm using struts1.2.4, using validator, how can i submit teh oage, which
neans call my bean setter only when therer are norerror genrated by my
validator? i guess it'll be done in teh Action java file but how? it always
set the entered values even whne teh input is empty and wich imy validator
does not allow
Thanks

_
MSN(r) Calendar keeps you organized and takes the effort out of scheduling
get-togethers.
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=ht
t
p://hotmail.com/encaHL=Market_MSNIS_Taglines
   Start enjoying all the benefits of MSN(r) Premium right now and get the
first two months FREE*.


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


_
MSN(r) Calendar keeps you organized and takes the effort out of scheduling 
get-togethers. 
http://join.msn.com/?pgmarket=en-capage=byoa/premxAPID=1994DI=1034SU=htt
p://hotmail.com/encaHL=Market_MSNIS_Taglines 
  Start enjoying all the benefits of MSN(r) Premium right now and get the 
first two months FREE*.


-
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: Session authentication - Struts or ServletFilter

2004-10-07 Thread Sandro Duarte
Try this:

if (null == user) {
 session.invalidate();
 res.sendRedirect(/login.jsp);
} else {
 chain.doFilter(request, response);
}

I was having some trouble with my auth filter until I realized this
problem: you should continue de filter chain only if everything is ok.

Sandro


On Thu, 07 Oct 2004 09:57:26 +, andy wix [EMAIL PROTECTED] wrote:
 Hi,
 
 That source forge Security Filter stuff looks pretty good, but I only have a
 basic requirement (nothing so posh as realms).
 I can't seem to get my (very basic) filter to work with Struts though.
 
 I have the following in my doFilter method:
 
 HttpServletRequest req = (HttpServletRequest) request;
 HttpServletResponse res = (HttpServletResponse) response;
 HttpSession session = req.getSession();
 
 User user= (User )session.getAttribute(User );
 
 if (null == user) {
   session.invalidate();
   res.sendRedirect(/login.jsp);
 }
 chain.doFilter(request, response);
 
 It is mapped to all urls (/*) in the web.xml.
 
 I get a 404:
 The requested resource (/do/processLogin) is not available
 
 - this after I have entered user/password and submitted form.  If anything,
 I was expecting it to always be re-directed back to the login because I
 guess I need to exclude /do/processLogin from the Filter?
 
 It all works Ok without the filter.
 
 Thanks,
 Andy
 
 _
 Stay in touch with absent friends - get MSN Messenger 
 
 
 http://www.msn.co.uk/messenger
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-- 
Sandro Duarte
Analista de Sistemas
TRE-RS/SI

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



Re: Session authentication - Struts or ServletFilter

2004-10-07 Thread Sean Schofield
You cannot map 100% of your web application (as it seems your are doing) 
to the filter, because the login page you are redirecting to would 
itself require login.

Also, your 404 mentions /do/processLogin but your filter is redirecting 
to /login.jsp.  I'm a bit confused by that.   Maybe if you could explain 
exactly what's going on we could help more.

Finally, what is the login.jsp page doing?  Typically the container 
handles authentication, etc.  Are you doing that yourself in the login 
page?  If so, where is the user information being submitted to?  
Wherever that's being posted to should not be protected by the filter 
either.

Hope that helps,
sean
Sandro Duarte wrote:
Try this:
if (null == user) {
session.invalidate();
res.sendRedirect(/login.jsp);
} else {
chain.doFilter(request, response);
}
I was having some trouble with my auth filter until I realized this
problem: you should continue de filter chain only if everything is ok.
Sandro
On Thu, 07 Oct 2004 09:57:26 +, andy wix [EMAIL PROTECTED] wrote:
 

Hi,
That source forge Security Filter stuff looks pretty good, but I only have a
basic requirement (nothing so posh as realms).
I can't seem to get my (very basic) filter to work with Struts though.
I have the following in my doFilter method:
HttpServletRequest req = (HttpServletRequest) request;
HttpServletResponse res = (HttpServletResponse) response;
HttpSession session = req.getSession();
User user= (User )session.getAttribute(User );
if (null == user) {
 session.invalidate();
 res.sendRedirect(/login.jsp);
}
chain.doFilter(request, response);
It is mapped to all urls (/*) in the web.xml.
I get a 404:
The requested resource (/do/processLogin) is not available
- this after I have entered user/password and submitted form.  If anything,
I was expecting it to always be re-directed back to the login because I
guess I need to exclude /do/processLogin from the Filter?
It all works Ok without the filter.
Thanks,
Andy
_
Stay in touch with absent friends - get MSN Messenger 

http://www.msn.co.uk/messenger
-
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: Periods in form attribute names prevents retrieval

2004-10-07 Thread Jeff Beal
Have you tried
html:text name=profile.account property=name/?
-- Jeff
Laurent Duperval wrote:
Hello,
In my jsp, I have code like this:
...
...
...
html:text name=profile property=account.name value=Foo /
...
...
...
This generates:
tdinput type=text name=profile.name value=Foo/td


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

RE: Displaytags or ValueListHandler

2004-10-07 Thread Chris Bredesen
We use displaytag and it is dynamite.  It is fast and has lots of
features.  I haven't written one single TABLE since discovering it.  It
even allows you to specify a message to display when the list is empty;
saves you from having to put that logic in the page.

ValueList looked a bit more complex to use and there was so much vocal
support in the community for displaytag that we went that route.

-Chris

 -Original Message-
 From: Shabada, Gnaneshwer [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 07, 2004 3:31 PM
 To: 'Struts Users Mailing List'
 Subject: Displaytags or ValueListHandler
 
 
 
 Hello all,
 
 I have a requirement in my project to query and retrieve 
 search results from the database. I was doing some research 
 and found DisplayTags
 (http://displaytag.sourceforge.net/) and ValueListHandler
 (http://valuelist.sourceforge.net/) tags. They both look same 
 to me, infact DisplayTags look more attractive. But am not 
 sure what's the difference between their architecture? Are 
 they both same performance wise? Which one would you guys 
 recommend to work with Struts?
 
 Thanks for your input
 
 Gnan
 
 ==
 == 
 This email message is for the sole use of the intended 
 recipient (s) and may contain confidential and privileged 
 information. Any unauthorized review, use, disclosure or 
 distribution is prohibited. If you are not the intended 
 recipient, please contact the sender by reply email and 
 destroy all copies of the original message. To reply to our 
 email administrator directly, send an email to 
 [EMAIL PROTECTED] 
 Toys R Us, Inc.
 
 -
 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]



parameter passing to /html:link

2004-10-07 Thread Phani
I need to display all the elements in the map, the key
 value pairs. Till here it's fine.

Evrything works fine except the html:link tag.

When I click on view, the key of the map has to be
passed as parameter.

I am not able to get the syntax right for passing the
parameter.

Thanks.

Here is my code snippet.

logic:iterate name=varAssumptionsForm
property=varAssumptionsSettingsMap id=map
  tr

td
bean:write name=map property=key/
/TD

td
bean:write name=map property=value/
/TD

TD
html:link onclick=Javascript:doView(); name=map
paramId=filename paramName=key View /html:link
/TD

  /TR
/logic:iterate

function doView()
{
  document.forms[0].target = ;
  document.forms[0].method = POST;
  document.forms[0].action =
varAssumptions.do?action=view;
  document.forms[0].submit();
}

This is sort of urgent, Any help would be appreciated.



__
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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



RE: Displaytags or ValueListHandler

2004-10-07 Thread Chris Bredesen
This is OT, I will reply directly.

-Chris

 -Original Message-
 From: Shabada, Gnaneshwer [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 07, 2004 3:51 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Displaytags or ValueListHandler
 
 
 
 But looks like ValueList tag actually uses ValueList Handler 
 pattern indicating from its name. Does displaytag use the 
 same pattern? I just wanted to go with the better one so that 
 I don't want o switch to something else later. I read the 
 configuration part of displaytag and was thiking if changing 
 the default properties like color, format, position is easy? 
 Also can we have check boxes, dropdowns, editable fields as columns? 
 
 Thanks again
 Gnan
 
 -Original Message-
 From: Chris Bredesen [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 07, 2004 3:35 PM
 To: 'Struts Users Mailing List'
 Subject: RE: Displaytags or ValueListHandler
 
 
 We use displaytag and it is dynamite.  It is fast and has 
 lots of features.  I haven't written one single TABLE since 
 discovering it.  It even allows you to specify a message to 
 display when the list is empty; saves you from having to put 
 that logic in the page.
 
 ValueList looked a bit more complex to use and there was so 
 much vocal support in the community for displaytag that we 
 went that route.
 
 -Chris
 
  -Original Message-
  From: Shabada, Gnaneshwer [mailto:[EMAIL PROTECTED]
  Sent: Thursday, October 07, 2004 3:31 PM
  To: 'Struts Users Mailing List'
  Subject: Displaytags or ValueListHandler
  
  
  
  Hello all,
  
  I have a requirement in my project to query and retrieve
  search results from the database. I was doing some research 
  and found DisplayTags
  (http://displaytag.sourceforge.net/) and ValueListHandler
  (http://valuelist.sourceforge.net/) tags. They both look same 
  to me, infact DisplayTags look more attractive. But am not 
  sure what's the difference between their architecture? Are 
  they both same performance wise? Which one would you guys 
  recommend to work with Struts?
  
  Thanks for your input
  
  Gnan
  
  ==
  ==
  This email message is for the sole use of the intended 
  recipient (s) and may contain confidential and privileged 
  information. Any unauthorized review, use, disclosure or 
  distribution is prohibited. If you are not the intended 
  recipient, please contact the sender by reply email and 
  destroy all copies of the original message. To reply to our 
  email administrator directly, send an email to 
  [EMAIL PROTECTED] 
  Toys R Us, Inc.
  
  
 -
  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]
 
 ==
 == 
 This email message is for the sole use of the intended 
 recipient (s) and may contain confidential and privileged 
 information. Any unauthorized review, use, disclosure or 
 distribution is prohibited. If you are not the intended 
 recipient, please contact the sender by reply email and 
 destroy all copies of the original message. To reply to our 
 email administrator directly, send an email to 
 [EMAIL PROTECTED] 
 Toys R Us, Inc.
 
 -
 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: Displaytags or ValueListHandler

2004-10-07 Thread Shabada, Gnaneshwer


Forgot to metion if DisplayTag or valueList support adding a row to the
table on the same page. I mean I have a table of results displayed using
(lets's say) displayTag and also have another set of text boxes out of the
table where I can enter data and it is added to the database and also to the
table. Does either of them support this functionality?

Thanks again.

-Original Message-
From: Shabada, Gnaneshwer [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 07, 2004 3:51 PM
To: 'Struts Users Mailing List'
Subject: RE: Displaytags or ValueListHandler



But looks like ValueList tag actually uses ValueList Handler pattern
indicating from its name. Does displaytag use the same pattern? I just
wanted to go with the better one so that I don't want o switch to something
else later. I read the configuration part of displaytag and was thiking if
changing the default properties like color, format, position is easy? Also
can we have check boxes, dropdowns, editable fields as columns? 

Thanks again
Gnan

-Original Message-
From: Chris Bredesen [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 07, 2004 3:35 PM
To: 'Struts Users Mailing List'
Subject: RE: Displaytags or ValueListHandler


We use displaytag and it is dynamite.  It is fast and has lots of
features.  I haven't written one single TABLE since discovering it.  It
even allows you to specify a message to display when the list is empty;
saves you from having to put that logic in the page.

ValueList looked a bit more complex to use and there was so much vocal
support in the community for displaytag that we went that route.

-Chris

 -Original Message-
 From: Shabada, Gnaneshwer [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, October 07, 2004 3:31 PM
 To: 'Struts Users Mailing List'
 Subject: Displaytags or ValueListHandler
 
 
 
 Hello all,
 
 I have a requirement in my project to query and retrieve 
 search results from the database. I was doing some research 
 and found DisplayTags
 (http://displaytag.sourceforge.net/) and ValueListHandler
 (http://valuelist.sourceforge.net/) tags. They both look same 
 to me, infact DisplayTags look more attractive. But am not 
 sure what's the difference between their architecture? Are 
 they both same performance wise? Which one would you guys 
 recommend to work with Struts?
 
 Thanks for your input
 
 Gnan
 
 ==
 == 
 This email message is for the sole use of the intended 
 recipient (s) and may contain confidential and privileged 
 information. Any unauthorized review, use, disclosure or 
 distribution is prohibited. If you are not the intended 
 recipient, please contact the sender by reply email and 
 destroy all copies of the original message. To reply to our 
 email administrator directly, send an email to 
 [EMAIL PROTECTED] 
 Toys R Us, Inc.
 
 -
 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]

 
This email message is for the sole use of the intended recipient (s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. To reply to our email administrator directly, send
an email to [EMAIL PROTECTED] 
Toys R Us, Inc.

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

 
This email message is for the sole use of the intended recipient (s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. To reply to our email administrator directly, send
an email to [EMAIL PROTECTED] 
Toys R Us, Inc.

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



Re: parameter passing to /html:link

2004-10-07 Thread Wendy Smoak
From: Phani [EMAIL PROTECTED]
 I need to display all the elements in the map, the key
  value pairs. Till here it's fine.
 Evrything works fine except the html:link tag.
 html:link onclick=Javascript:doView(); name=map
 paramId=filename paramName=key View /html:link

http://struts.apache.org/userGuide/struts-html.html#link

I think you're missing a 'paramProperty' attribute.

-- 
Wendy Smoak

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



Re: OT: jstl equivalent of logic:present

2004-10-07 Thread Jason Lea
I couldn't find a way in JSTL/EL using the standard tags.  So it looks 
like we need a tag with that ability.
In that case it probably doesn't matter if you use the logic tag or the 
other suggestion of the request tag.

I see that the logic tag allows you to check for more than 1 role eg
logic:present role=role1,role2,role3
whereas the request tag does not, so there may be a benefit with still 
using the logic tag.

Zoran Avtarovski wrote:
I'm trying to find a way to use the isUserInRole method with the c:if tag.
I tried c:if test=${pageContext.getRequest().isUserInRole(admin)}
But you can't use the isUserInRole method as an expression. I'd rather not
have to cast the role into a page context string to test. Using the
logic:present tag is more preferable. I only ask because I get the feeling
that there's a move away from the struts tags and toward jstl.
How do others do it?
Zoran

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


--
Jason Lea

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


Re: parameter passing to /html:link

2004-10-07 Thread Varun Garg
Use the a href and build the link manually or create
an extension of the html:link tag.

Thanks,

Varun
--- Phani [EMAIL PROTECTED] wrote:

 I need to display all the elements in the map, the
 key
  value pairs. Till here it's fine.
 
 Evrything works fine except the html:link tag.
 
 When I click on view, the key of the map has to
 be
 passed as parameter.
 
 I am not able to get the syntax right for passing
 the
 parameter.
 
 Thanks.
 
 Here is my code snippet.
 
 logic:iterate name=varAssumptionsForm
 property=varAssumptionsSettingsMap id=map
   tr
 
 td
   bean:write name=map property=key/
 /TD
   
 td
   bean:write name=map property=value/
 /TD
   
 TD
   html:link onclick=Javascript:doView();
 name=map
 paramId=filename paramName=key View
 /html:link
 /TD
 
   /TR
 /logic:iterate
 
 function doView()
 {
   document.forms[0].target = ;
   document.forms[0].method = POST;
   document.forms[0].action =
 varAssumptions.do?action=view;
   document.forms[0].submit();
 }
 
 This is sort of urgent, Any help would be
 appreciated.
 
 
   
 __
 Do you Yahoo!?
 Yahoo! Mail Address AutoComplete - You start. We
 finish.
 http://promotions.yahoo.com/new_mail 
 

-
 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: getDataSource() in JSP

2004-10-07 Thread Jonathan Wright
Your DataSources are stored in the application context. Use your implicit
pageContext reference to get a reference to the servlet / application
context, then get your data source using
(DataSource)ctx.getAttribute(dataSource);

Jonathan Wright
- Original Message -
From: Shailender Jain [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 07, 2004 6:20 PM
Subject: getDataSource() in JSP


 Hello,

 I want to use the method getDataSource() from my JSP page.
 I want to use this since  i am using some tag library to do some generic
 things.

 Can somebody let me know how i can use this function to get  connection
 so that i can use them in tag library.
 In this tag i will pass some sql query and it will generate some combo
 box, table.


 Thanks,
 Shailender Jain



 -
 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: How work to DynaValidatorForm and java.sql.Date

2004-10-07 Thread Pedro Salgado
On 7/10/04 1:00 am, Gabriel França Campolina [EMAIL PROTECTED] wrote:

 Hi Folks,
 I have the problem when i submit a field text that was mapping to
 java.sql.date in format dd/MM/, I received null value, what´s my
 problem?? only this value I don't received the other fields(String) i
 receved correct.

  You should always use java.lang.String (or String[]) on your form-bean
properties.
  The validation part should be implemented on the form validate() method or
on the validator or on the struts action itself (-).


Pedro


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



Re: parameter passing to /html:link

2004-10-07 Thread Jeff Beal
I think you're also missing one of href, action, page, or forward.  See 
http://struts.apache.org/userGuide/struts-html.html#link for details.

While I'm at it, I'm not sure about the use of a JavaScript onclick 
handler with the html:link tag.  I don't think that will do what you 
want it to do.  Neither am I sure about your use of the POST method when 
submitting the form or why you are using JavaScript at all.  If I 
understand what you are trying to do, the HTML that you want is simply:

a href=varAttributes.do?action=viewfilename=somethingView/a
To get this, you probably want to do:
html:link page=varAttributes.do?action=view paramName=map 
paramProperty=keyView/html:link

If you need the JavaScript, I'd leave off the html:link tag altogether 
and piece together the HTML that you need.

-- Jeff
Phani wrote:	
TD
html:link onclick=Javascript:doView(); name=map
paramId=filename paramName=key View /html:link
/TD

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


Re: parameter passing to /html:link

2004-10-07 Thread Jeff Beal
Oops!  Forgot the paramId attribute on html:link; include 
paramId=filename.

html:link page=varAttributes.do?action=view
  paramId=filename
  paramName=map
  paramProperty=keyView/html:link
Jeff Beal wrote:
html:link page=varAttributes.do?action=view paramName=map 
paramProperty=keyView/html:link

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


Re: parameter passing to /html:link

2004-10-07 Thread Phani

That works,

Thanks Jeff.

--- Jeff Beal [EMAIL PROTECTED] wrote:

 Oops!  Forgot the paramId attribute on html:link;
 include 
 paramId=filename.
 
 html:link page=varAttributes.do?action=view
paramId=filename
paramName=map
paramProperty=keyView/html:link
 
 
 Jeff Beal wrote:
 
  html:link page=varAttributes.do?action=view
 paramName=map 
  paramProperty=keyView/html:link
 
 

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




___
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com

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



Re: tool to produce a sitemap from struts-config

2004-10-07 Thread Martin Gainty
Would this be Transform XML to HTML?
Martin-
- Original Message - 
From: Emmanouil Batsis [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, October 07, 2004 11:53 AM
Subject: tool to produce a sitemap from struts-config


 I remember someone posted about a tool that reads struts-config and 
 produces some kind of sitemap but i cant find it by searching... can 
 someone please refresh my memory?
 
 Thanks,
 
 Manos
 
 -
 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]