Re: Spring-webflow exception

2007-06-19 Thread Manfred Wolff

Wrong mailinglist? This is struts even not spring.

Rikard schrieb:
 Hi im trying out the spring-weblow example. But i get this exception:


 09:43:42,494 ERROR [[/spaceport].listenerStart] Exception sending context
 initialized event to listener instance of
 class org.springframework.web.context.ContextLoaderListener
 org.springframework.beans.factory.parsing.BeanDefinitionParsingException:
 Configuration problem: Unable to locate NamespaceHandler for namespace
 [http://www.springframework.org/schema/webflow-config]


 but in the applicationContext.xml i got:

 beans xmlns=http://www.springframework.org/schema/beans;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:aop=http://www.springframework.org/schema/aop;
xmlns:flow=http://www.springframework.org/schema/webflow-config;
xsi:schemaLocation=
 http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
 http://www.springframework.org/schema/aop
 http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
 http://www.springframework.org/schema/webflow-config
 http://www.springframework.org/schema/webflow-config/spring-webflow-config-1.0.xsd;
default-autowire=byName
 

 Does any one have any clue?

 Thanks ! 

 ps.. does anyone have the source code for the web-flow example ? 

   


-- 
===
Dipl.-Inf. Manfred Wolff
Software Engineer
Fon  : +49 421 534522
Fax  : +49 421 4314578
Mobil: +49 173 2494181
---
http://www.manfred-wolff.de
http://www.struts-it.org
---


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



Re: [ANN] Starting with Struts2 Book

2007-05-27 Thread Manfred Wolff

Unfortunately  I get only a message, that the file is damage and cannot
be downloaded. Can anybody help me?

Manfred

Josh Long schrieb:
 Wonderful contribution! Congratulations!



-- 
===
Dipl.-Inf. Manfred Wolff
Software Engineer
Fon  : +49 421 534522
Fax  : +49 421 4314578
Mobil: +49 173 2494181
---
http://www.manfred-wolff.de
http://www.struts-it.org
---


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



Re: [ANN] Starting with Struts2 Book

2007-05-27 Thread Manfred Wolff

I've fixed it myself. With the internet explorer it was possible to
download the book.

 Manfred

Manfred Wolff schrieb:
 Unfortunately  I get only a message, that the file is damage and cannot
 be downloaded. Can anybody help me?

 Manfred

 Josh Long schrieb:
   
 Wonderful contribution! Congratulations!

 


   


-- 
===
Dipl.-Inf. Manfred Wolff
Software Engineer
Fon  : +49 421 534522
Fax  : +49 421 4314578
Mobil: +49 173 2494181
---
http://www.manfred-wolff.de
http://www.struts-it.org
---



Struts 1.3 and maven

2007-03-28 Thread Manfred Wolff

Hi

Can somebody tell me, why there is no jar file at ibiblio.org/maven - and - 
where I can get the jars (via url), if I want to make a maven 1 project with 
struts 1.3.8?

Thanks
Manne


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



Re: Struts 1.3 and maven

2007-03-28 Thread Manfred Wolff


Sorry, but there  - as in ibiblio - is no 1.3 Struts in the repository.

Manne

James Mitchell wrote:

http://www.apache.org/dev/repository-faq.html


--
James Mitchell
The Ruby Roundup
http://www.rubyroundup.com/


On Mar 28, 2007, at 10:55 AM, Manfred Wolff wrote:


Hi

Can somebody tell me, why there is no jar file at ibiblio.org/maven - 
and - where I can get the jars (via url), if I want to make a maven 1 
project with struts 1.3.8?


Thanks
Manne


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




--
===
Dipl.-Inf. Manfred Wolff
Software Engineer
Fon  : +49 421 534522
Fax  : +49 421 4314578
Mobil: +49 173 2494181
---
http://www.manfred-wolff.de
http://www.struts-it.org
---


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



Re: Struts 1.3 and maven

2007-03-28 Thread Manfred Wolff


James.

For a project with one worker this is a suitable resolution. But in a 
big project, with developers round the world (in this case Germany, 
India and Tunesia) it is a good thing to have all needed common open 
source jars held in the project.xml accessable via a public maven repo 
as ibiblio. So no one must be careful using the right versions - and no 
one has problem to get all jars that are needed. I wonder if there is a 
server who serves this jars for public access as the struts 1.2 jars 
(last is 1.2.9).


Manne


James Mitchell wrote:

Oh, you're right.  Sorry.

Would you be able to install them locally and just go with that?  Or 
do you have to have a portable solution?


If you can install them locally (on your machine), then drop them in 
the right place, and call it done.


If you must have a portable solution, just drop them on a server that 
you (and whoever else needs them) can see when building the app.


The maven repos are nothing more than a file system fronted with a web 
server.



--
James Mitchell
The Ruby Roundup
http://www.rubyroundup.com/


On Mar 28, 2007, at 11:22 AM, Manfred Wolff wrote:



Sorry, but there  - as in ibiblio - is no 1.3 Struts in the repository.

Manne

James Mitchell wrote:

http://www.apache.org/dev/repository-faq.html


--James Mitchell
The Ruby Roundup
http://www.rubyroundup.com/


On Mar 28, 2007, at 10:55 AM, Manfred Wolff wrote:


Hi

Can somebody tell me, why there is no jar file at ibiblio.org/maven 
- and - where I can get the jars (via url), if I want to make a 
maven 1 project with struts 1.3.8?


Thanks
Manne


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




--===
Dipl.-Inf. Manfred Wolff
Software Engineer
Fon  : +49 421 534522
Fax  : +49 421 4314578
Mobil: +49 173 2494181
---
http://www.manfred-wolff.de
http://www.struts-it.org
---


-
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: Struts 1.3 and maven

2007-03-28 Thread Manfred Wolff


James.

I know it. But at least one question: Does anybody know why every little 
peace of open source is hosted at ibiblio, but not the famous struts. I 
really don't understand this.


Manne

James Mitchell wrote:
Ya, I don't know off the top of my head, but keep in mind that you can 
tell Maven to use different repositories, so you can easily host your 
own maven repo on your intranet which I presume that all of the devs 
could see and may or may not be open to the public.


HTH

--
James Mitchell


On Mar 28, 2007, at 11:34 AM, Manfred Wolff wrote:



James.

For a project with one worker this is a suitable resolution. But in a 
big project, with developers round the world (in this case Germany, 
India and Tunesia) it is a good thing to have all needed common open 
source jars held in the project.xml accessable via a public maven 
repo as ibiblio. So no one must be careful using the right versions - 
and no one has problem to get all jars that are needed. I wonder if 
there is a server who serves this jars for public access as the 
struts 1.2 jars (last is 1.2.9).


Manne


James Mitchell wrote:

Oh, you're right.  Sorry.

Would you be able to install them locally and just go with that?  Or 
do you have to have a portable solution?


If you can install them locally (on your machine), then drop them in 
the right place, and call it done.


If you must have a portable solution, just drop them on a server 
that you (and whoever else needs them) can see when building the app.


The maven repos are nothing more than a file system fronted with a 
web server.



--James Mitchell
The Ruby Roundup
http://www.rubyroundup.com/


On Mar 28, 2007, at 11:22 AM, Manfred Wolff wrote:



Sorry, but there  - as in ibiblio - is no 1.3 Struts in the 
repository.


Manne

James Mitchell wrote:

http://www.apache.org/dev/repository-faq.html


--James Mitchell
The Ruby Roundup
http://www.rubyroundup.com/


On Mar 28, 2007, at 10:55 AM, Manfred Wolff wrote:


Hi

Can somebody tell me, why there is no jar file at 
ibiblio.org/maven - and - where I can get the jars (via url), if 
I want to make a maven 1 project with struts 1.3.8?


Thanks
Manne


- 


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]




--===
Dipl.-Inf. Manfred Wolff
Software Engineer
Fon  : +49 421 534522
Fax  : +49 421 4314578
Mobil: +49 173 2494181
---
http://www.manfred-wolff.de
http://www.struts-it.org
---


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




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



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




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





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



Re: Application setup using Ant

2006-10-13 Thread Manfred Wolff

You can specify e.g. a lib directory with a classpath id.

path id=xdoclet.class.path
  fileset dir=./lib
include name=**/*.jar/
  /fileset
/path

In other sections you can reference this id.

taskdef name=ejbdoclet classpathref=xdoclet.class.path 
classname=xdoclet.modules.ejb.EjbDocletTask/

Manfred

Struts goes mobile: http://www.strutsme.org. Now 1.0Beta3 available.

Medicherla Lakshmi wrote:
 Hi All,

   Can anyone tell me how to include classpath in build.xml file.
   Actually i want to run database script file using build.xml file for which 
 i need to set the classpath with .jar file of the particular database java 
 connector.

target name=classpath
  path
  pathelement location=${dbconnectorname}/
   fileset dir=${dbconnectorname}
include name=*.jar/
   /fileset 
  /path 
  /target

   where dbconnectorname is the path of the directory where this .jar file is 
 located.

   Please tel me how to run database scripts using build.xml file.

   Thanks in Advance.

   Thanks and Regards,
   Lakshmi MSV.

   
 -
  Find out what India is talking about on  - Yahoo! Answers India 
  Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get 
 it NOW
   



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



Re: Struts Project + Logging

2006-09-14 Thread Manfred Wolff

Just an example:

log4j.rootCategory= DEBUG, ConsoleApp, FileMyApp, FileOtherApp

log4j.appender.ConsoleApp.threshold=DEBUG
log4j.appender.FileApp.threshold=DEBUG

#+
# Appender for my application
#+
log4j.appender.FileMyApp=org.apache.log4j.RollingFileAppender
log4j.appender.FileMyApp.File=/myApp
log4j.appender.FileMyApp.MaxFileSize=5000KB
log4j.appender.FileMyApp.MaxBackupIndex=5
log4j.appender.FileMyApp.layout=org.apache.log4j.PatternLayout
log4j.appender.FileMyApp.layout.ConversionPattern=%d{ISO8601} %-5p
(%t)[%c{1}] %m%n

#+
# Appender for other stuff
#+
log4j.appender.FileOtherApp=org.apache.log4j.RollingFileAppender
log4j.appender.FileOtherApp.File=/otherApp
log4j.appender.FileOtherApp.MaxFileSize=5000KB
log4j.appender.FileOtherApp.MaxBackupIndex=5
log4j.appender.FileOtherApp.layout=org.apache.log4j.PatternLayout
log4j.appender.FileOtherApp.layout.ConversionPattern=%d{ISO8601} %-5p
(%t)[%c{1}] %m%n

#+
# Appender for console
#+
log4j.appender.ConsoleApp=org.apache.log4j.ConsoleAppender
log4j.appender.ConsoleApp.layout=org.apache.log4j.PatternLayout
log4j.appender.ConsoleApp.layout.ConversionPattern=%d{ISO8601} %-5p
[%c{1}] %m%n


#my.package to myApp
log4j.logger.my.package= debug, myApp
#org.apache for otherApp
log4j.logger.org.apache=info, otherApp

yours Manfred

Struts goes mobile: http://strutsme.org


Raghuveer wrote:
 Since for struts framework commons-logging.jar is used
 How can I use Commons logging so that logs related to my application are
 sent to separate log file.
 How to configure my logger   by log.properties  realted to application
 alone.





   


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



Re: Struts for locale

2006-09-14 Thread Manfred Wolff

See http://struts.apache.org/1.2.9/userGuide/building_view.html#i18n

Struts goes mobile: http://strutsme.org

Raghuveer wrote:
  What precautions i need to take for my struts project to be accessed in
 Canada(French language) and Other  Countries(English)






 -
 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 to dynamically internationalize login page

2006-09-13 Thread Manfred Wolff

leo.

Please don't do so. In Struts you can do the language switching with the
locale Action. For this you have to provide several resources in the
java resourcebundle manner:

- provide a file for your message-ressource e.g. resources.properties
- provide a file for each language and name it
  resources_en.properties for english
  resources_de.properties for german
  resources_fr.properties for france etc.
- struts itsself fetches the right file. You have to do nothing else.

Download http://struts-ge-packt.de/download/code.zip for examples. Here
you can see how to deal with the most of the actions that are provided
with struts.

Manfred

Struts goes mobile: http://strutsme.org


leo mj wrote:
 hi all,

  I think some fellow member has asked the same question.But I didn't find any 
 reply for the old thread.

 So i have a scenario

 I have a login page with 

   1.Username
   2.Password
   3.Language

 Based on the language selected I have to reload the page.

 I have used internationalization techniques like ApplicationResources_de for 
 german.But this is a scenario where the language to be displayed is 
 preconfigured using message-resources in struts-config.xml.

 But dynamic selection of language,i feel can be done only if 
 message-resource parameter=ApplicationResources is modified using Action 
 class.

 I have done the modification using SAX parser and FileWriter.But I need a 
 more neat way to do so.Is it possible???

 Regards,
 Leo




   
 -
 Stay in the know. Pulse on the new Yahoo.com.  Check it out. 
   


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



Re: Forward to the same page

2006-09-08 Thread Manfred Wolff

hi antonio,


Try http://www.manfred-wolff.de/struts/articles/HowTo-Back.html. In this
solution you can go back and stay where you are for language switching.

Manfred

Struts goes mobile. See http://www.strutsme.org



leo mj wrote:
 hi antonio,


  It can be done by using ActionForwards.Also go tru internatinalization in 
 struts
 for displaying langauage :
 http://www.allapplabs.com/struts/struts_internationalization.htm


 in the action class use
   ActionForward forward=new ActionForward();

 if(chk whther the language  combo box has been selected ){

   forward=mapping.getInputForward();

 }

 add internationalization code using 
 bean:messageKey
 get language to be selected using request.getAttribute(fieldName);

 in ur jsp...

 Regards,
 Leo







   

 Artem Zhmurov [EMAIL PROTECTED] wrote: What about using JavaScript? Try 
 this:




  
 Changing location 



  
 function changeLanguage(lang){
  var location = window.location.href;
  if(location.indexOf(?) == -1){
   location += ?lang=;
   location += lang;
   window.location = location;
  } else {
   var pos = location.indexOf(lang=);
   if(pos != -1){
var new_location = location.substring(0, pos + 5);
new_location += lang;
window.location = new_location;
   } else {
location += lang=;
location += lang;
window.location = location;
   }
  }
 }



  [input]  
  [input]  



 It will work if you don't need the addition page (such as when dealing with
 login).

 Also you have to be sure, that your lang=.. parameter is in the end of
 parameters line (that is true until you're not trying to add lang=..
 somewhere outside). And there will be problem if your application dealing
 with parameters named, for example, 'XXXlang'. All imperfections mentioned
 can be removed by some little changes in script.

   
 -Original Message-
 From: Antonio Petrelli [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 25, 2006 12:09 PM
 To: Struts Users Mailing List
 Subject: Re: Forward to the same page

 Thomas Hamacher ha scritto:
 
 How do I forward to the same page I was coming from? The typical example
   
 for
 
 this is the change-language-problem. Someone is on one page and simply
 wants to change the language and expects to see the same page in a
   
 different
 
 language.

   
 Just an idea,  tag has the action attribute that is no more
 required. If it is not specified the last servlet path (i.e. post
 back) will be taken.
 http://struts.apache.org/1.x/struts-taglib/tlddoc/html/form.html
 You could grab the code that controls the value of the action
 attribute to determine the path you're coming from. Then you change the
 language and then redirect (I think it's better than forwarding) to the
 previous servlet path.

 HTH
 Antonio


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



   
 -
 How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone call rates.
   


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



Re: Several action in a jsp

2006-09-07 Thread Manfred Wolff
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
 

Marcello!

Of course you can. But only the values of the special form will be
submitted and transport via the request. Otherwise you have to collect
the values via javascript.

Manfred

Struts goes mobile. See http://www.strutsme.org


Marcello Savino wrote:
 In a struts jsp files can I have more form with different action defined
 ?
 I mean something like that

 ?xml version=1.0 encoding=UTF-8 ?
 %@ page language=java contentType=text/html; charset=UTF-8
 pageEncoding=UTF-8%
 %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
 %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
 %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
 html:html locale=true
 head
 body
 html:form action=/action1
 /html:form
 html:form action=/action2
 /html:form
 /body
 /html:html
 Thanks in advancee for reply
 Marcello

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


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (MingW32)
Comment: GnuPT 2.7.2
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
iQEVAwUBRP/HldokyUkhmcy6AQLN+wf/VXqfHM+cgR81StKIGjI2dxilofqUS5Jp
OWlZf9EtvdxmIDZjYfWeu71TNcwZVDkw+68Kb6pht8Rwo4agPYdfwkUVIScg2ukC
I0zk1MIE8qSb0V/gvb9i5/I7RZ7j6hTWqAqmGJ7uTBpFUCXq/dgXQLQSHab9HV3o
AJaO2yB0L/LCrh4quJWk3JvecxFXaKMmWpzkS9ClfcxfYistYppjPXjj8+1EVHuX
JNfmu1LTZ6moEEP9YSCqhOkPBXr1qN78A0bobfIoUrzHgi36SRvUouFx444tkJUN
fqdvgx975200zE5FneW5x5w6X61O5P+7zS3LERRsqZPGBg1PldwQsQ==
=4IeK
-END PGP SIGNATURE-


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



Re: R: Several action in a jsp

2006-09-07 Thread Manfred Wolff

Thats a html feature. Only the values of the submitted form will be
transported in the request. And only those values, that are transported
in the request, can be populated from the struts framework.

Manfred

Struts goes mobile. See http://www.strutsme.org


Marcello Savino wrote:
 You mean I cannot, for instance, populate fields in the form2 after
acquiring data from form1 ?

 -Messaggio originale-
 Da: Manfred Wolff [mailto:[EMAIL PROTECTED]
 Inviato: giovedì 7 settembre 2006 9.18
 A: Struts Users Mailing List
 Oggetto: Re: Several action in a jsp


 Marcello!

 Of course you can. But only the values of the special form will be
 submitted and transport via the request. Otherwise you have to collect
 the values via javascript.

 Manfred

 Struts goes mobile. See http://www.strutsme.org


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



Re: about struts.

2006-09-07 Thread Manfred Wolff

Hi.

That's a little bit OT. The connection pool should be part of the tomcat
configuration (or an other servlet engine). The server.xml may be a good
part, better you place a xml into the
$CATALINA_HOME/conf/Catalina/localhost folder such as:

Context path=/example
 docBase=/workspaces/struts-it/examples/src/webapp
 reloadable=true
 crossContext=true

   Logger className=org.apache.catalina.logger.FileLogger
   prefix=examples_log. suffix=.txt
   timestamp=true/

   Resource name=jdbc/default
 auth=Container
 type=javax.sql.DataSource
 maxActive=100
 maxIdle=30
 maxWait=1
 username=application
 password=
 driverClassName=com.mysql.jdbc.Driver
 url=jdbc:mysql://localhost:3306/test?autoReconnect=true/

/Context

Then you are able to configure a connectionpool via jndi ressource. For
more details contact the tomcat documentation.

Manfred

Struts goes mobile. See http://www.strutsme.org




amit fulambarkar wrote:
 How can i implement connection pooling in struts. What will be the
 server.xml? and what the things i would have to do.Give the code.


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



Re: Go Back

2006-05-29 Thread Manfred Wolff

Exactly No. 2 does
http://www.manfred-wolff.de/struts/articles/HowTo-Back.html

Manfred

Emilia Ipate wrote:
 There are 2 ways for doing it:
 1. on client side:
   - use javascript: history.back() or history.go(-1)
   This solution is very fast because the browser loads the page
 quite fast as from the client's PC (does not go to the server)
 2. on the server side
   - in the your RequestProcessor store each request on the session
 and so when the user asks for the previous page, you give him the url of
 the page previously stored in the session.


 Kind regards,
 Emilia

 -Original Message-
 From: Shervin Asgari [mailto:[EMAIL PROTECTED] 
 Sent: maandag 29 mei 2006 9:59
 To: Struts Users Mailing List
 Subject: Go Back


 Hello. I was wondering. Is there a way in struts to go back to the 
 previous page. Like hitting back button?

 I have a confirmation page, and I want when the user hits the cancel 
 button for it to be redirected to the previous page. Currently I have an

 ActionForward which returns

 mapping.findForward(SomePage.page);

 Shervin


 -
 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: Struts with Eclipse 3.1

2006-05-25 Thread Manfred Wolff

Take maven and you have no problem with any IDE or development environment.

Manfred

Dave Newton wrote:
 [EMAIL PROTECTED] wrote:
   
 My point is that Eclipse does not, in the base IDE, have the knowledge to 
 build and deploy a web-app.  You can get that capability with ANT, which 
 gives you all the flexibility in the world about how you arrange your 
 project, or with a plugin, which requires you to arrange your project in a 
 particular way.
   
 

 Just an FYI, things are still somewhat flexible within a project under
 MyEclipse, if your deployment doesn't reach in to non-WEB-INF dirs.
 (Some of the functionality comes from stock Eclipse.)

 For example, on several projects we've had multiple source directories
 (like, say, a unit test source dir, a generated java source dir, etc.)

 You can set output directories for each source directory, so the
 regular source dir and the generated source dir get dropped into
 WEB-INF classes for automagic deployment, whereas the unit-test stuff
 hangs out elsewhere, accessible to the ant file but not deployed by
 MyEclipse.

 We still tended to use ant stuff for creating the war files etc. because
 we all hate IDE lock-in.

 Dave



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

   


-- 
===
Dipl.-Inf. Manfred Wolff
Software Engineer
Fon  : +49 421 534522
Fax  : +49 421 4314578
Mobil: +49 173 2494181
---
http://www.manfred-wolff.de
http://www.struts-it.org
---


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



Re: struts token

2006-05-19 Thread Manfred Wolff
Yes, you can. The token will be stored in the request.



temp temp wrote:
 Can I use  struts token mechanism for an action without a form bean ?
 Thanks  Regards
   
   
   
 -
 Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.
   

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



Re: struts token

2006-05-19 Thread Manfred Wolff
Hi mr. temp.temp

1. The Action calls saveToken(request);
2. A unique token will be generated and saved in the session and in the
jsp as a hidden field.
3. The next action calls |*isTokenValid
http://struts.apache.org/struts-doc-1.2.x/api/org/apache/struts/action/Action.html#isTokenValid%28javax.servlet.http.HttpServletRequest,%20boolean%29(request,
true);
4. If the token in the request match the token in the session everything
is alright. Otherwise the user has gone back and the token in the
request is not valid.
5. True means, the token will be reseted. Otherwise you have to reset it
on your own with the method resetToken(request).

Manfred*|


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



Re: Browser Back Button

2006-05-15 Thread Manfred Wolff

Lixin.

I think mostly it is no problem to go back in a struts implemented
application. If it ist a problem (e.g. after a logout or if you saved
data) you can take the struts token mechanism to prevend such backs.

Manfred

Lixin Chu wrote:
 A cleaner back button solution is almost a must-have for logout:
 after logout, the back button should not bring back the previous page.

 looking at that Gmail does. any idea how it is implemented ?



-- 
===
Dipl.-Inf. Manfred Wolff
Software Engineer
Fon  : +49 421 534522
Fax  : +49 421 4314578
Mobil: +49 173 2494181
---
http://www.manfred-wolff.de
http://www.struts-it.org
---


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



Re: Browser Back Button

2006-05-15 Thread Manfred Wolff

Found at http://husted.com/struts/catalog.html


Use the Action Token methods to prevent duplicate submits

There are methods built into the Struts action to generate one-use
tokens. A token is placed in the session when a form is populated and
also into the HTML form as a hidden property. When the form is returned,
the token is validated. If validation fails, then the form has already
been submitted, and the user can be apprised.

* saveToken(request)
* /on the return trip,/
  o isTokenValid(request)
  o resetToken(request)

Perhaps someone (me?) must write a documentation? If I have a little
time, and no has do so, I will do.

Manfred


temp temp wrote:
 Can U suggets me an article which clearly explains using struts  tokens  
 mechanisim?

 Manfred Wolff [EMAIL PROTECTED] wrote:  
 Lixin.

 I think mostly it is no problem to go back in a struts implemented
 application. If it ist a problem (e.g. after a logout or if you saved
 data) you can take the struts token mechanism to prevend such backs.

 Manfred

 Lixin Chu wrote:
   
 A cleaner back button solution is almost a must-have for logout:
 after logout, the back button should not bring back the previous page.

 looking at that Gmail does. any idea how it is implemented ?

 


   


-- 
===
Dipl.-Inf. Manfred Wolff
Software Engineer
Fon  : +49 421 534522
Fax  : +49 421 4314578
Mobil: +49 173 2494181
---
http://www.manfred-wolff.de
http://www.struts-it.org
---


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



Convenient Struts Back Mechanism

2006-02-28 Thread Manfred Wolff

Hi everybody.

In 2003 I wrote an article about a possibility to go struts conform back
(http://www.manfred-wolff.de/struts/articles-old/HowTo-Back.html).
Struts conform means, the request must pass the request-processor. I got
so many feedback, that I refactored the solution. It is now downloadable
at sourceforge.net.

The Problem: Struts has no way to know where someone comes from. So
there are many scenarios that are difficult with struts:

- You want to repeat the last step regardless what the last step was
(e.g. you added a new customor and you will add an other).
- You want to switch your language but you will stay at the site, you
switched the language in a generic manner.
- You want to go back and forward in a use case like an installation
wizzard.

The struts back mechanism has a generic and convenient manner to solve
such problems. It offers an own request processor, that logs all
requests, that passes the request processor (all *.do, but no *.jsp). So
you can configure global action-mapping to go back, forward and so on in
all program contexts. There also exists a demo application that
demonstrates going forward and back, and demonstrates howto switch the
language in a manner, that you stay on the site you are.

Pick the resources at http://sourceforge.net/projects/strutsback/
Show the homepage at  http://strutsback.sourceforge.net/.

Coming soon:
- Support for struts 1.3
- More possibility to configure the solution
- Pattern back (go back to the last Pre*Action.do)

Yours
Manfred


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



Re: Convenient Struts Back Mechanism

2006-02-28 Thread Manfred Wolff

Fine, but where is the source code? I didn't found it!

-Manfred

Michael Jouravlev schrieb:

On 2/28/06, Manfred Wolff [EMAIL PROTECTED] wrote:
  

- You want to go back and forward in a use case like an installation
wizzard.



http://www.superinterface.com/wizard/signupWizard.do

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

  



-- 
===
Dipl.-Inf. Manfred Wolff
Software Engineer
Fon  : +49 421 534522
Fax  : +49 421 4314578
Mobil: +49 173 2494181
---
http://www.manfred-wolff.de
http://www.struts-it.org
---


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



Re: Convenient Struts Back Mechanism

2006-02-28 Thread Manfred Wolff

Perhaps I'm a little bit blind. Thanks a lot. Yes, I'm really interested
'cause I have to solve those and other problems with struts every day.
Some people say: Struts is dead, look forward to JSF or to spring MVC.
But there are so many projects, which started now (here in germany)
using the good old struts.

-Manfred

Michael Jouravlev schrieb:

On 2/28/06, Dave Newton [EMAIL PROTECTED] wrote:
  

Manfred Wolff wrote:


Fine, but where is the source code? I didn't found it!

  

http://www.superinterface.com/easywizard.htm

Sometimes it pays to just look at the home page for a demo and see
what's there.



Thanks, Dave!

Manfred, I am about to release a new version of my Struts Dialogs
library, it contains the example of how to use wizard engine. The
engine itself has barely changed but its usage is tremendously
simplified.

If you are really interested, you can either take a look at the source
code that is available now, or you can wait till I make a formal
release with proper docs and stuff.

You can take a look here as well:

  http://struts.sourceforge.net/strutsdialogs/wizardaction.html

Don't get scared of complex ActionForm and a lot of forwards :) the
next version will be *much* simpler.

Michael.

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



Struts and Velocity - example

2006-02-06 Thread Manfred Wolff
Hi.

Has anyone a not trivial example of a struts-velocity page with
iteration of lists. parameter in links etc.  The most things I have
collected in the internet, but it were fine, if I get an example that is
a little bit difficult.

Manfred

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



Struts 1.3: Arbitary key/value pair

2006-01-06 Thread Manfred Wolff
Hi everybody.

Since Struts 1.3 it is possible to set an arbitary key/value pair to
retrieve at runtime such as:

action path=/EditSubscription
extends=Editor
set-property key=foo value=bar /
/action

In a document from the struts university (author Ted Husted) is an example to 
retrieve such pair:


public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {

string foo = getProperty(foo); 

// ...

In the nightly builds and in the newest subversion branch (366511) there is no 
getProperty() method 
in the Action class. So does anybody know, how to retrieve such a pair von 
set-properties.

Thanks a log
Manfred

-- 
===
Dipl.-Inf. Manfred Wolff
Software Engineer
Fon  : +49 421 534522
Fax  : +49 421 4314578
Mobil: +49 173 2494181
---
http://www.manfred-wolff.de
http://www.struts-it.org
---


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



Re: Struts 1.3: Arbitary key/value pair

2006-01-06 Thread Manfred Wolff

Thanks - works fine.

Niall Pemberton schrieb:

The properties get set in the ActionMapping - not the Action, so you can do
mapping.getProperty(foo) to get the values.

This feature works the same throughout - its available in the
configuration objects, not the object itself - so ActionMapping which is
the config for Action or FormBeanConfig rather than the ActionForm.

Niall


- Original Message - 
From: Manfred Wolff [EMAIL PROTECTED]
Sent: Friday, January 06, 2006 4:43 PM


  

Hi everybody.

Since Struts 1.3 it is possible to set an arbitary key/value pair to
retrieve at runtime such as:

action path=/EditSubscription
extends=Editor
set-property key=foo value=bar /
/action

In a document from the struts university (author Ted Husted) is an example


to retrieve such pair:
  

public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {

string foo = getProperty(foo);

// ...

In the nightly builds and in the newest subversion branch (366511) there


is no getProperty() method
  

in the Action class. So does anybody know, how to retrieve such a pair von


set-properties.
  

Thanks a log
Manfred





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



-- 
===
Dipl.-Inf. Manfred Wolff
Software Engineer
Fon  : +49 421 534522
Fax  : +49 421 4314578
Mobil: +49 173 2494181
---
http://www.manfred-wolff.de
http://www.struts-it.org
---


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



Re: [OT] Re: log4j:WARN No appenders could be found for logger.

2005-10-11 Thread Manfred Wolff
] digester.Digester
(Digester.java:1241) -   Pushing body text ''
2005-10-10 16:40:50,749 DEBUG [main] digester.Digester
(Digester.java:1260) -   New match='web-app/servlet'
2005-10-10 16:40:50,749 DEBUG [main] digester.Digester
(Digester.java:1284) -   No rules found matching 'web-app/servlet'.
2005-10-10 16:40:50,749 DEBUG [main] digester.Digester
(Digester.java:1123) - ignorableWhitespace(
)
2005-10-10 16:40:50,749 DEBUG [main] digester.Digester
(Digester.java:1234) - startElement(,servlet-name,servlet-name)
2005-10-10 16:40:50,749 DEBUG [main] digester.Digester
(Digester.java:1241) -   Pushing body text ''
2005-10-10 16:40:50,749 DEBUG [main] digester.Digester
(Digester.java:1260) -   New match='web-app/servlet/servlet-name'
2005-10-10 16:40:50,749 DEBUG [main] digester.Digester
(Digester.java:1284) -   No rules found matching
'web-app/servlet/servlet-name'.
2005-10-10 16:40:50,759 DEBUG [main] digester.Digester
(Digester.java:936) - characters(log4j-init)
2005-10-10 16:40:50,759 DEBUG [main] digester.Digester
(Digester.java:1004) - endElement(,servlet-name,servlet-name)
2005-10-10 16:40:50,759 DEBUG [main] digester.Digester
(Digester.java:1007) -   match='web-app/servlet/servlet-name'
2005-10-10 16:40:50,759 DEBUG [main] digester.Digester
(Digester.java:1008) -   bodyText='log4j-init'
2005-10-10 16:40:50,759 DEBUG [main] digester.Digester
(Digester.java:1039) -   No rules found matching
'web-app/servlet/servlet-name'.
2005-10-10 16:40:50,759 DEBUG [main] digester.Digester
(Digester.java:1046) -   Popping body text ''
2005-10-10 16:40:50,759 DEBUG [main] digester.Digester
(Digester.java:1123) - ignorableWhitespace(
)
2005-10-10 16:40:50,759 DEBUG [main] digester.Digester
(Digester.java:1234) - startElement(,servlet-class,servlet-class)
2005-10-10 16:40:50,759 DEBUG [main] digester.Digester
(Digester.java:1241) -   Pushing body text ''
2005-10-10 16:40:50,759 DEBUG [main] digester.Digester
(Digester.java:1260) -   New match='web-app/servlet/servlet-class'
2005-10-10 16:40:50,759 DEBUG [main] digester.Digester
(Digester.java:1284) -   No rules found matching
'web-app/servlet/servlet-class'.
2005-10-10 16:40:50,759 DEBUG [main] digester.Digester
(Digester.java:936) -
characters(com.dgworld.customer.InitializationServlet)
2005-10-10 16:40:50,769 DEBUG [main] digester.Digester
(Digester.java:1004) - endElement(,servlet-class,servlet-class)
2005-10-10 16:40:50,769 DEBUG [main] digester.Digester
(Digester.java:1007) -   match='web-app/servlet/servlet-class'
2005-10-10 16:40:50,769 DEBUG [main] digester.Digester
(Digester.java:1008) -  
bodyText='com.dgworld.customer.InitializationServlet'
2005-10-10 16:40:50,769 DEBUG [main] digester.Digester
(Digester.java:1039) -   No rules found matching
'web-app/servlet/servlet-class'.
2005-10-10 16:40:50,769 DEBUG [main] digester.Digester
(Digester.java:1046) -   Popping body text ''
2005-10-10 16:40:50,769 DEBUG [main] digester.Digester
(Digester.java:1123) - ignorableWhitespace(
)
2005-10-10 16:40:50,769 DEBUG [main] digester.Digester
(Digester.java:1234) - startElement(,init-param,init-param)


On 10/10/05, Dave Newton [EMAIL PROTECTED] wrote:
  

Marked [OT] because... it's OT.

Deep Chand wrote:



I'm trying to use Log4J for logging. I get the following error during start 
up:
log4j:WARN No appenders could be found for logger
(org.apache.commons.digester.Digester)
log4j:WARN Please initialize the log4j system properly.


  

That's not an error; that's a WARNing.



After that it goes in some sort of loop. No idea what it is missing.


  

What goes in to a loop, and how do you know it's in a loop?

Anyway, all that means is that the digester is looking for an appender
it doesn't have yet.

Dave



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

  



-- 
===
Dipl.-Inf. Manfred Wolff
Software Engineer
---
http://www.manfred-wolff.de
http://www.struts-it.org
http://www.unartigen.de
---


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



Re: No suitable driver error

2005-10-04 Thread Manfred Wolff

Hi.

Thats nothing to do with struts. You haven't placed your mysql driver in
the tomcat directory e.g. $CATALINA_BASE/shared/lib. So Struts cannot
initializing the datasource object.

Manfred

Deep Chand schrieb:

Hi,
I'm kind of new to struts and/or web technologies. I'm trying to
configure mysql database for my struts appln using Tomcat. I'm getting
the following exception:

Initializing application data source org.apache.struts.action.DATA_SOURCE
org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver
of class '' for connect URL
'jdbc:mysql://localhost:3306/javatest?autoReconnect=true', cause:
java.sql.SQLException: No suitable driver
   at java.sql.DriverManager.getDriver(DriverManager.java:243)
   at 
 org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:743)
   at 
 org.apache.commons.dbcp.BasicDataSource.setLogWriter(BasicDataSource.java:576)
   at 
 org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:1087)
   at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472)
   at javax.servlet.GenericServlet.init(GenericServlet.java:256)
   at 
 org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935)
   at 
 org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
   at 
 org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3427)
   at 
 org.apache.catalina.core.StandardContext.start(StandardContext.java:3628)
   at 
 org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:821)
   at 
 org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
   at 
 org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:307)
   at org.apache.catalina.core.StandardHost.install(StandardHost.java:788)
   at 
 org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:559)
   at 
 org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:401)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:718)
   at 
 org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:358)
   at 
 org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:166)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:754)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
   at 
 org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363)
   at 
 org.apache.catalina.core.StandardService.start(StandardService.java:497)
   at 
 org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
   at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
   at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:324)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

I've put the following in struts-config.xml. Do I need to add
something to server.xml and web.xml too?

data-source type=org.apache.commons.dbcp.BasicDataSource
set-property property=password value=javadude /
set-property property=user value=javauser /
set-property property=driverClass value=com.mysql.jdbc.Driver /
set-property property=description value= Database /
set-property property=url
value=jdbc:mysql://localhost:3306/javatest?autoReconnect=true /
set-property property=readOnly value=false /
set-property property=autoCommit value=false /
set-property property=validationQuery value=SELECT COUNT(*) FROM author /
/data-source

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

  



-- 
===
Dipl.-Inf. Manfred Wolff
Software Engineer
---
http://www.manfred-wolff.de
http://www.struts-it.org
http://www.unartigen.de
---


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



Re: Navigating back to a previous page

2005-08-27 Thread Manfred Wolff
http://www.manfred-wolff.de/struts/articles/HowTo-Back.html

jonathan gilmore schrieb:


 I have a common screen that is navigated to by many other screens. 
 Does Struts have support for remembering the previous screen so that
 my common screen needs only one 'back' button to return the user to
 their original location?

 I have looked through the docs and havn't found anything.

 Any comments much appreciated



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



-- 
===
Dipl.-Inf. Manfred Wolff
Software Engineer
---
http://www.manfred-wolff.de
http://www.struts-it.org
http://www.unartigen.de
---


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



Strange problem with validator

2005-06-30 Thread Manfred Wolff

Hi all.

I have a very, very strage problem. I use commons-validator to validate 
my struts pages. I use also velocity to render the pages. If I have a 
required field and it is empty it writes an error message and deletes 
the field. But it also deletes other fields in the form. Not all, but 
some. I have four fields:


name
vorname
email
homepage

If I fill in the form only vorname, email and homepage the 
following things happens:


There ist an error message name is a mandantory field and vorname 
AND homepage will be deleted in the form. email not!!! Knows anyone 
the problem, that some field will be deleted an other fields not, if a 
validation fails??


Manfred

*Validator:*

   form name=personForm

 field property=name depends=required, mask
 arg key=person.name  position=0/
   var
 var-namemask/var-name
 var-value^[a-zA-Z]*$/var-value
   /var
 /field

 field property=vorname depends=required, mask
 arg key=person.vorname  position=0/
   var
 var-namemask/var-name
 var-value^[a-zA-Z]*$/var-value
   /var
 /field

 field property=email depends=email
 arg key=person.email/
 /field

 field property=homepage depends=url
 arg key=person.homepage/
 /field
   /form

*Velocity Template*

form method=POST action=$link.setAction('/addperson')

   table height=20% border=0 cellspacing=5
   tr
   td
   #parse (/velocity-functions/errors.vm)   
   /td

   /tr
   /table

table border=0 cellspacing=5
   tr
   /tr
   tr
   td colspan=4bheader/b/td
   /tr

   tr
   td$text.get('person.name') */td
td colspan=3input type=text name=name 
value=$!form.bean.name size=30 maxlength=50/ /td

   /tr
   tr
   td$text.get('person.vorname') */td
td colspan=3input type=text name=holla' 
value=$!form.bean.vorname size=30 maxlength=50//td

   /tr
  
   tr

   td$text.get('person.email')/td
td colspan=3input type=text name=email 
value=$!form.bean.email  size=30 maxlength=50//td

   /tr
   tr
   td$text.get('person.homepage') /td
td colspan=3input type=text name=homepage' 
value=$!form.bean.homepage  size=30 maxlength=50//td

   /tr

   tr class=normalRow
   td colspan=4 align=center
   input type=submit value=Datensatz speichern name=submit
   /td
   /tr
   /table
/form

*app.properties*

person.name=Name
person.vorname=Vorname
person.email=E-Mail Adresse
person.homepage=Homepage

--
===
Dipl.-Inf. Manfred Wolff
Software Engineer
---
http://www.manfred-wolff.de
http://www.struts-it.org
---

Die fatale Neigung der Menschen,
vom Nachdenken über eine Sache nachzulassen,
wenn sie nicht länger zweifelhaft ist,
ist die Ursache der Hälfte ihrer Irrtümer.
- John Stuart Mil -
___


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



Re: Can struts-1.1 support multiple configurations and multiple resources

2005-06-13 Thread Manfred Wolff


Yes it can with multiple module support.

http://struts.apache.org/userGuide/configuration.html#dd_config_modules

Manfred

Venkat Reddy Valluri wrote:


Hi

  Can struts-1.1 support multiple configurations and multiple resources. Can 
some body please throw some light on this. I need it very urgent

Thanks in advance

--Venkat

 




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




--
===
Dipl.-Inf. Manfred Wolff
---
phone neusta  : +49 421 20696-0
fax neusta: +49 421 20696-99
phone private : +49 421 534522
eFax  : +49 1212 6 62663 96533
---

Diese E-Mail enthlt mglicherweise vertrauliche und/oder rechtlich geschtzte 
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtmlich erhalten 
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte 
Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. Any unauthorised 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden.


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



Re: Can struts-1.1 support multiple configurations and multiple resources

2005-06-13 Thread Manfred Wolff


--Venkat

Thats the trick. If you set null to false, than *if* a error message is not 
found, the struts framework prints the language and the key, that is not found. 
So it says: You have an error here. So you have an other mistake. It is good 
practice to set null to false in all ressurce bundles, so you can see if 
anything is wrong.


-Manfred

Venkat Reddy Valluri wrote:


Hi Manfred,
  I have given null=false  for my main module struts config file and still 
the error message is not displayed

instead it is just dipaying like below
  en.us.error.user.user_name.required. (It is just displaying property 
but not value)

Thank you very much

--Venkat

 




-Original Message-
From:   Manfred Wolff [mailto:[EMAIL PROTECTED]
Sent:   Mon 6/13/2005 1:47 PM
To: Struts Users Mailing List
Cc: 
Subject:Re: Can struts-1.1 support multiple configurations and multiple 
resources
Venkat

I think you don't have to deal with suffixes (like sub) because struts 
itsselfs concatinate the module in the key, stored into the session. I 
have a little example written for my struts book (only in german) that 
deals with multiple struts config files. You may download it under


http://struts-ge-packt.de/download/code.zip

Because it is no maven project it comes with a lot of libraries.

1st Struts config: (struts-config.xml)
message-resources parameter=MessageResources null=false /

2nd Struts config with Module (struts-modul-confix.xml)
message-resources parameter=MessageModulResources /

It is a struts 1.2 application but the module support is fine in 1.1

-Manfred

Venkat Reddy Valluri wrote:

 


Hi  Manfred,
   Thank you very much for responding immediately. I ended up multiple  struts config files successfully. But the thing is when I tried to use separate resources for each struts config file using bundle parametre,  It seems not to be working.  


Here is my struts configurations

In my main module struts config file
I included below one
struts-main.xml---
   message-resources
  parameter=com.main.examp.ApplicationResources/


In my sub module struts config file

I included below one
struts-sub.xml---
 message-resources
  parameter=com.sub.examp.SubResources key=sub
/message-resources

SubResources.properties
error.user.user_name.required=UserName is required

Here in my sub module
 
SubEditActionForm.java---


In validate method I have given like this

public ActionErrors validate(ActionMapping mapping,
   HttpServletRequest request) {
 ActionErrors errors = new ActionErrors();

  if (user_name == null || user_name.length() == 0) {
  errors.add(user_name, new  
ActionError(error.user.user_name.required));
  }
 return errors;
}
   
But here the error messgae UserName is required  is not able to be displyed on screen  when I submit the page with out entering user_name


  So I thought of passing buddle  attribute sub  which is used struts-sub.xml 
 to ActionError class
(
message-resources
  parameter=com.sub.examp.SubResources key=sub
/message-resources)

 But there is no option to pass that attribute in ActionError or ActionMessage 
class

  SO here where I struck 


Can you please  throw some light on this

Thanks in advace

--Venkat



 






 
-Original Message-

From:   Manfred Wolff [mailto:[EMAIL PROTECTED]
Sent:   Mon 6/13/2005 10:00 AM
To: Struts Users Mailing List
Cc: 
Subject:Re: Can struts-1.1 support multiple configurations and multiple 
resources

Yes it can with multiple module support.

http://struts.apache.org/userGuide/configuration.html#dd_config_modules

Manfred

Venkat Reddy Valluri wrote:



   


Hi

Can struts-1.1 support multiple configurations and multiple resources. Can some 
body please throw some light on this. I need it very urgent

Thanks in advance

--Venkat





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




--
===
Dipl.-Inf. Manfred Wolff
---
phone neusta  : +49 421 20696-0
fax neusta: +49 421 20696-99
phone private : +49 421 534522
eFax  : +49 1212 6 62663 96533
---

Diese E-Mail enthlt mglicherweise vertrauliche und/oder rechtlich geschtzte 
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtmlich erhalten 
haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail

Re: Multiple struts-config.xml

2005-04-11 Thread Manfred Wolff
Hi
A better way is to use struts modules. Every Module has its own 
struts-configuration. If you use more than one struts configuration such 
as described below, you  may have problems with duplicate identifiers, 
becaus struts builds one configuration out of all files. This problems 
you don't have using modules. Modules acts as a namespace in this case.

-Manfred
--
===
Dipl.-Inf. Manfred Wolff
Software Engineer
---
http://www.manfred-wolff.de
http://www.struts-it.org
---
Folashade Adeyosoye wrote:
Yes, in your web.xml
Change this...
 servlet
   servlet-nameAppName/servlet-name
   servlet-classcom.path.to.the.ActionServlet/servlet-class
   init-param
 param-nameconfig/param-name
 param-value/WEB-INF/struts-config.xml/param-value
   /init-param
   load-on-startup1/load-on-startup
 /servlet
To 

 servlet
   servlet-name AppName /servlet-name
   servlet-classcom.path.to.the.ActionServlet/servlet-class
   init-param
 param-nameconfig/param-name
param-value/WEB-INF/struts-config.xml,/WEB-INF/the-employee-config.xml,/WE
B-INF/the-admin-config.xml,/WEB-INF/the-client-config.xml,/WEB-INF/the-billi
ng-config.xml,/WEB-INF/the-report-config.xml,/WEB-INF/the-patient-config.xml
/param-value
   /init-param
   load-on-startup1/load-on-startup
 /servlet
-Original Message-
From: Néstor Boscán [mailto:[EMAIL PROTECTED] 
Sent: Sunday, April 10, 2005 11:04 PM
To: 'Struts Users Mailing List'
Subject: Multiple struts-config.xml

Hi
I have an application and I need to create many web flows. If I use struts
to model the web flows, is it possible to use many struts-config.xml instead
of one?
Regards,
Néstor Boscán
-
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: RequestProcessor and ActionServlet

2005-03-15 Thread Manfred Wolff
Rajaneesh.
There are three things which are part of the controller:
- The ActionServlet that acts as a front controller.
- The RequestProcessor that has the responsibility to fulfill the 
request in a specific module.
- The Action which is the part of the controller that deals with the 
other layer (e.g. business layer).

Manfred
Rajaneesh wrote:
Hi,
 In struts what is actually the controller portion? (Is it RequestProcessor
or ActionServlet?)
Regards
Rajaneesh
 

===
Dipl.-Inf. Manfred Wolff
Software Engineer
---
http://www.manfred-wolff.de
http://www.struts-it.org
---


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


Re: Struts Business Logic :: Best Practices

2005-03-11 Thread Manfred Wolff
Ted.
+1 to this approach. I prefer leightweight container such as hivemind to 
manage the entrypoints to the business logic. Hivemind is easy to learn 
and you have the benefit, that the lifecycle of the business components 
may be steered too (such as pooled components, singletons etc.). Other 
containers like spring or picocontainer are also well.

-Manfred
Ted Husted wrote:
As to business objects, the usual advice is to use Plain Old Java
Objects (POJOs).
The current MailReader example application is an excellent example of
creating a set of interfaces to represent business logic, then
instantiating a set of classes to implement the business logic.
The MailReader uses a Struts PlugIn to create the business logic beans
in application scope. Another good approach is to use Spring to create
your business objects. Here, you might use a PlugIn to create the
Spring instance in application scope, and then call the Spring
instance to create everything else.
Of course, my favorite way to manage business objects now is as a
Chain of Responsbility. But, to get started, you probably want to use
plain old business beans, as the MailReader does.
All this is to say, option 2. The Actions call the business beans, and
the beans do all the heavy lifiting. (Actions shouldn't know *how* to
do things, just who to ask to get things done.)
The iBATIS DAO layer is cool, but if you don't need a switchable DAO,
you can do the same thing using your own interfaces.
Of course, my favorite way to do business logic now is using the Chain
of Responsiblity. But, that's a bit bleeding edge right now :)
-Ted.
On Fri, 11 Mar 2005 14:57:51 +0530, karthikeyan balasubramanian
[EMAIL PROTECTED] wrote:
 

Hi all,
 Struts DB Access Best Practices thread gave me great insight on how
I should proceed with db operations.
 I have one more question.  Where do you keep your business logic
code.  Right now I am thinking to use
1. Struts(JSP, Actions)
2. Simple class(Managers) to keep all our business logic code
3. IBATIS for database abstraction.
Actions can call Managers to get the job done and Manager can use
iBATIS to access DB.
Is this a good approach or is there a better approach than this?
Looking forward for your response.
Have a great day.
Karthikeyan B
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   


 


--
===
Dipl.-Inf. Manfred Wolff
Software Engineer
---
http://www.manfred-wolff.de
http://www.struts-it.org
---

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


Re: message-resource help!

2005-03-11 Thread Manfred Wolff

How did you name your ressource-file and on which directory did you 
place it?

Manfred
wo_shi_ni_ba_ba wrote:
hi folks,
I am trying to use error message specified in the
application resources
I specified the following name=pair:
newunit.failure = Failed to create a new {0}: br {1}
and then in my Action class I added an error like
this:
errors.add(ActionErrors.GLOBAL_ERROR, new
ActionError(newunit.failure, project,
e.getMessage()));
The error is returned on my html page like this:
???en_US.newunit.failure??? 
which probably means struts can't find and  associate
the application resources,
I did specify the message-resource in struts-config
message-resources
parameter=com.xxx.ApplicationResources
null=false/
do I need to programtically use MessageResource class
to obtain the my error message? os is there an easier
way I missed?
thanks in advance


		
__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

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


[perhaps OT] Testing Struts App with JNDI Datasouce

2005-03-09 Thread Manfred Wolff
Hi.
My favorite Configuration is Struts, HiveMind and Hibernate together in 
a servlet Container (Tomcat 5.0). I have configures a datasource in the 
Tomcat container and have access to the datasource via hibernate (JNDI 
Lookup). Is there a solution to do this in a testcase without running 
tomcat?

Thanks
Manfred
--
===
Dipl.-Inf. Manfred Wolff
Software Engineer
---
http://www.manfred-wolff.de
http://www.struts-it.org
---

Diese E-Mail enthält möglicherweise vertrauliche und/oder rechtlich geschützte 
Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail 
irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und 
vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte 
Weitergabe dieser Mail ist nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and destroy this e-mail. Any unauthorised 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Switching between HTTP and HTTPS

2004-09-15 Thread Manfred Wolff
Antory.
I thing sslext is a very good way, if you use mixed HTTP and HTTPS. 
Unfortunally it is not well documented ;-), but there are less things to 
do. If you will use it, I can give you an overview, what to do, but not 
imediately. The roadmap says, that sslext will be integrated in further 
struts versions.

   * Other potential enhancements for the 1.x.x series
 o Consider Cocoon Plugin http://struts.sf.net/struts-cocoon/
 o Consider Spring Plugin
   http://struts.sourceforge.net/struts-spring/index.html
 o Consider adopting several popular extensions, including:
   + SSL Ext http://sslext.sourceforge.net/
   + TestCase http://strutstestcase.sourceforge.net/
   + Stxx http://stxx.sourceforge.net (XLST)
   + Workflow http://www.livinglogic.de/Struts/
   Manfred

Manfred
Antony Paul wrote:
Hi,
   Does solution for switching between HTTP and HTTPS has been incorporated
into Struts ?. If yes which version of Struts it have ?.
   I have read the archives and found sslext is the best alternative. Do I
have to use it ?.
rgds
Antony Paul
-
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: Design patterns used in Struts

2004-08-30 Thread Manfred Wolff
Antony.
1. Implementation of the MVC2 Paradigma.
2. Front Controller
3. View Dispatcher
4. Service To Worker.
5. Not complete: Inversion of Control
I think thats all ;-))
Manfred
Antony Paul wrote:
Hi all,
   Can anyone tell me what are the design patterns used in Struts
framework.
rgds
Antony Paul
-
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: I suspect this is a bad idea...so what's a better one?

2004-08-09 Thread Manfred Wolff
Robert
Comands are really a good Solution for acting on business logic. See the 
common-chain framework also. It offers command and chains to access the 
business logic in different manner.

Manfred
Robert Taylor wrote:
Joe, you could move your business logic to a service layer which
also leverages the Command pattern. You could have a base command
which did something similar as Craig has outlined.
public abstract class BaseCommand {
public void execute() throws Exception {
   try {
 // set up transaction
doExecute();
   } catch (Exception e) {
// abort transaction
   } finally {
   // clean up transaction

   } 

   

 }
 // implement actual work here.
 public abstract void doExecute() throws Exception;
}
then
public class  MyCommand extends BaseCommand {
public void doExecute() throws exception {
// put business logic here
}
}
in your action's execute method (be it DispatchAction, MappingDispatchAction, 
etc...)
public ActionForward execute(...) throws Exception {
 ActionForward forward = // get appropriate forward
 Command command = // get the appropriate command and initialize it 
 

  command.execute();

return forward;
}

You might also check out the Spring framework. It allows you to declaratively demarcate
transaction boundries (similar to EJB). 

robert


 

-Original Message-
From: Joe Hertz [mailto:[EMAIL PROTECTED]
Sent: Monday, August 09, 2004 4:11 AM
To: 'Struts Users Mailing List'
Subject: RE: I suspect this is a bad idea...so what's a better one?
Craig,
Thanks for the idea.
Only problem I see with this that I usually make my real actions some
flavor of a DispatchAction, usually a MappingDispatchAction.
So to keep that type of functionality, it appears that I'd have to
replicate a lot of the Struts dispatch/reflection logic inside of my
abstract Action subclass. Calling super.execute() gets me that, but that
is precisely what this concept seems to try to avoid. :-/

   

-Original Message-
 

:snip:
   

A useful design pattern for something like this is to create 
a common subclass for your actions that does the 
setup/teardown work in the
execute() method, and then delegates to the action-specific 
work in some other method.  For your scenario, it might look 
like this:

   public abstract class BaseAction extends Action {
   public ActionForward execute(...) throws Exception {
   Persistence persistence = 
ActionHelper.getPersistenceObject(request);
   try {
   ActionForward forward = delegate(mapping, 
form, request, response, persistence);
   } finally {
   persistence.release)(;
   }
   }

   protected abstract ActionForward 
delegate(ActionMapping mapping, ActionForm form,
 HttpServletRequest request, HttpServletResponse 
response, Persistence persistence)
 throws Exception;

   }
Then, your real business logic is implemented in a delegate() 
method that is passed in for you, and you never have to 
remember to allocate and release the persistence object.

   public class RealAction extends BaseAction {
   protected ActionForward delegate(...) {
   ... use the persistence object as needed ...
   }
   }
This is pretty close to what you've got now ... the key 
difference is that it uses a local variable instead of an 
instance variable to avoid sharing problems.  Also, because 
of the finally clause, it also ensures that the persistence 
object is cleaned up, even if the
delegate() method throws an exception.

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

 

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

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


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


Re: Jakarta Struts Initial Installed

2004-05-12 Thread Manfred Wolff (neusta)
Andre.

javax.servlet.ServletException: Missing message for key welcome.title

Thats the reason. You have to put your message keys into a directory that is containing to the classpath. Look your entry in the struts-config.xml (Message-Resources).

Manfred



Bussie, Andre D wrote:

I recently installed the latest struts package. I installed struts to
Tomcat 5.0.19 and I'm having problems deploying the struts-blank.war.
I get the following message when I visit the struts-blank index page



type Exception report

message 

description The server encountered an internal error () that prevented
it from fulfilling this request.
exception 

javax.servlet.ServletException: Missing message for key welcome.title

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageCont
extImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
tImpl.java:800)
org.apache.jsp.pages.Welcome_jsp._jspService(Welcome_jsp.java:81)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.struts.actions.ForwardAction.execute(ForwardAction.java:158)

org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:446)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
266)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)

org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause 

javax.servlet.jsp.JspException: Missing message for key welcome.title

org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:298)

org.apache.jsp.pages.Welcome_jsp._jspx_meth_bean_message_0(Welcome_jsp.j
ava:144)
org.apache.jsp.pages.Welcome_jsp._jspx_meth_html_html_0(Welcome_jsp.java
:102)
org.apache.jsp.pages.Welcome_jsp._jspService(Welcome_jsp.java:72)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.struts.actions.ForwardAction.execute(ForwardAction.java:158)

org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:446)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
266)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)

org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:492)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
note The full stack trace of the root cause is available in the Tomcat
logs.
Any suggestions on how this can resolved?



 



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


Re: concurrency in struts

2004-05-10 Thread Manfred Wolff (neusta)
There are two concepts you have to understand: thread-safe and reentrant.

A method is reentrant, if many threads can enter the method as the same 
time without conflicting. For that you only have to act on parameters 
and local variables. Threads only share the data- and the code-segment 
of an application. Every thread gets his own stack-segment, where all 
local variables and the parameters will be push onto. If you act in the 
execute-method only on the parameters and on local variables you are 
thread safe. If you will join shared ressources as database connections 
... you have to take care, that such ressources are either pooled or the 
access is sychronized.

So the message is: In the execute Method don't use global variables but 
only local variables. This and the parameters are pushed on your stack, 
that is only in your thread visible.

Hope it helps
Manfred Wolff
Jignesh Patel wrote:

Riyad,
But does this methods are synchronized? Otherwise if two threads execute at 
the same time they can access the method at the same time. And result will be 
big mess.

-Jignesh
On Monday 10 May 2004 18:29, Riyad Kalla wrote:
 

This question is actually what made me sign up to this mailing list...
the answer is that there is no implicit concurrency. All your
work/variables in Actions should be method-scoped and not use ANY class
variables because of this. My specific questions was that I wanted to
use a class variable ActionErrors so any of my methods
(DispatchAction) could add errors without initializing a new ActionError
instance, and return it. But this is incorrect and can/will introduce
problems.
So there is no concurrency in Struts.

Jignesh Patel wrote:
   

On Monday 10 May 2004 17:21, Jignesh Patel wrote:
I am just wondering, how concurrent request will be handled by single
Action class. Because for many form objects(as there are thousands of
browser running with jsp forms) and there is only one action class.
 

-
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: Fwd: RE: Problem with LookupDispatchAction and parameter operation

2004-04-13 Thread Manfred Wolff (neusta)
Don't forget the message resource bundle, where the keys button.consult 
and button.search are defined!

Manfred

Struts Framework wrote:

I hava already this solution, but without sucess.

- Segue mensagem encaminhada -

De: Sanoj, Antony (IE10) [EMAIL PROTECTED]
Data: Mon, 12 Apr 2004 08:26:07 -0700
Para: Struts Users Mailing List [EMAIL PROTECTED]
Assunto: RE: Problem with LookupDispatchAction and parameter operation
hi,

 

html:form action=mapCoordinate.html
table width=750 height=50 border=0 cellpadding=0 cellspacing=0
   

bgcolor=#C0C0C0
 

tr
   

what is action=mapCoordinate.html ?

Change it to mapCoordinate.

Regards, 
Sanoj Antony 

-Original Message-
From: Struts Framework [mailto:[EMAIL PROTECTED]
Sent: Monday, April 12, 2004 8:41 PM
To: [EMAIL PROTECTED]
Subject: Problem with LookupDispatchAction and parameter operation
Hi,

I'm using the following environment with LookupDispatchAction.

struts-config.xml

form-bean name=mapCoordinateForm
type=com.contract.mapcoordinate.web.MapCoordinateForm/

action path=/mapCoordinate parameter=operation
type=com.contract.mapcoordinate.web.MapCoordinateAction
name=mapCoordinateForm scope=session
forward name=consult
path=/WEB-INF/jsp/mapCoordinate/mapCoordinateConsult.jsp
redirect=false/
/action
MapCoodinateAction.java
public class MapCoordinateAction extends LookupDispatchAction {
protected Map getKeyMethodMap() {
Map map = new HashMap();
map.put(button.consult, consult);
map.put(button.search, search);
return map;
}
public ActionForward consult(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
MapCoordinateForm mcf = (MapCoordinateForm) form;
try {
MapCoordinateDelegate delegate = new
MapCoordinateDelegate();

request.setAttribute(stateOptionItemList,
(java.util.Collection)delegate.getStates());
request.setAttribute(addressTypeOptionItemList,
delegate.getAddressTypes());
return mapping.findForward(consult);
} catch (MapCoordinateDelegateException mcde) {
ActionErrors erros = new ActionErrors();
erros.add(
error_on_server,
new ActionError(errors.on.server,
mcde.getMessage()));
saveErrors(request, erros);
return mapping.findForward(exceptions);
}
}
public ActionForward search(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {

StringBuffer buffer = new
StringBuffer(http://geo/geo/geoSearch.do?searchInitialName=False;);
MapCoordinateForm mcf = (MapCoordinateForm) form;
try {
MapCoordinateDelegate delegate = new
MapCoordinateDelegate();

request.setAttribute(stateOptionItemList,
(java.util.Collection)delegate.getStates());
request.setAttribute(addressTypeOptionItemList,
delegate.getAddressTypes());
mcf.setMapCoordinateVOList(
delegate.process(buffer.toString()) );
			return mapping.findForward(consult);

} catch (MapCoordinateDelegateException mcde) {
ActionErrors erros = new ActionErrors();
erros.add(
error_on_server,
new ActionError(errors.on.server,
mcde.getMessage()));
saveErrors(request, erros);
return mapping.findForward(exceptions);
}
}
mapCoordinateConsult.jsp
html:form action=mapCoordinate.html
table width=750 height=50 border=0 cellpadding=0 cellspacing=0
bgcolor=#C0C0C0
tr
td width=100% colspan=2 background=#E0E0E0
table border=0 width=100% cellpadding=0 cellspacing=0
 tr background=#CC
td align=center class=td
width=100%bbean:message key=mapCoordinateConsult.title//b/td
 /tr
/table
/td
br
br
/tr
/table
table width=750 border=0 cellpadding=0 cellspacing=0
/table
table width=750 border=0 cellpadding=0 cellspacing=0
tr
td align=right
html:submit property=operation  styleClass=flatButton
bean:message key=button.search/
   /html:submit
/td
/tr
/table
br
/html:form


My problem is when I call the 

Re: can not retrieve action mapping?

2004-04-13 Thread Manfred Wolff (neusta)
Mu.

don't define that.do but only /that and evrything will work fine. Be
care, that you have described a servlet extension mapping in your web.xml.

Manfred

Mu Mike wrote:

 I have this.jsp under the dir /this, it has a form defined like the below

 form action=/that/that.do
 ...
 /form

 while in struts-that-config.xml, I have that.do defined
 yet it tells can not retrieve the action mapping, why?

 _
  MSN Messenger: http://messenger.msn.com/cn

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