Re: Digester getting recursive tag types.

2003-01-19 Thread Simon Kelly

> If you're looking at 1.1, the Digester instance is created in the
> initConfigDigester() method of ActionServlet, which delegates to the
> ConfigRuleSet class (in org.apache.struts.config) to add all of the
> detailed rules.

Sweet.  Thanks.

> Could you imagine the programming required to scan through a DOM and pull
> out all the configuration elements?  Necessity was definitely the mother
> of invention here :-).

It gives me restless nights thinking of how to pass the minor bit of
information I have.  That would have driven me insane!!


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [OT]: I don't see how this works?

2003-01-19 Thread Simon Kelly
Thanks Dave.

- Original Message -
From: "Durham David Cntr 805CSS/SCBE" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 17, 2003 4:12 PM
Subject: RE: [OT]: I don't see how this works?


That will sort whatever is inside of lActions base on the anonymous
comparator object.  Check here for details on the Comparator interface,
http://java.sun.com/j2se/1.4/docs/api/java/util/Comparator.html





> -Original Message-
> From: Simon Kelly [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 17, 2003 4:22 AM
> To: Struts Users Mailing List
> Subject: [OT]: I don't see how this works?
>
>
> I'm just scanning thru the struts source, looking for
> ModuleConfig stuff and
> ran over this bit of code.
>
> I've never seen anything written like it and wondered what
> it's doing and
> how the hell does it work?
>
> Cheers
>
> Simon
>
> 
> Collections.sort(lActions, new Comparator() {
> public int compare(Object o1, Object o2) {
> ValidatorAction va1 = (ValidatorAction) o1;
> ValidatorAction va2 = (ValidatorAction) o2;
> if ((va1.getDepends() == null || va1.getDepends().length() == 0)
> && (va2.getDepends() == null || va2.getDepends().length() == 0)) {
> return 0;
> } else if (
> (va1.getDepends() != null && va1.getDepends().length() > 0)
> && (va2.getDepends() == null || va2.getDepends().length() == 0)) {
> return 1;
> } else if (
> (va1.getDepends() == null || va1.getDepends().length() == 0)
> && (va2.getDepends() != null && va2.getDepends().length() > 0)) {
> return -1;
> } else {
> return va1.getDependencies().size() - va2.getDependencies().size();
> }
> }
> });
> Institut fuer
> Prozessdatenverarbeitung
> und Elektronik,
> Forschungszentrum Karlsruhe GmbH,
> Postfach 3640,
> D-76021 Karlsruhe,
> Germany.
>
> Tel: (+49)/7247 82-4042
> E-mail : [EMAIL PROTECTED]
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>

--
To unsubscribe, e-mail:

For additional commands, e-mail:




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: The best way for learning struts (stupid question)

2003-01-19 Thread joni santoso
i am looking forward to it.

On Fri, 17 Jan 2003 00:01:48 -0500
 "V. Cekvenich" <[EMAIL PROTECTED]> wrote:

I will post here when I am ready soon. Glad there is 
interest, I got some private e-mail.

As I plan to donate materials to Jakarta I would like 
to see if some of the Advanced Pros would want to 
participate, so that one of them could teach next online 
seminar, or maybe even document some of the presentation.
.V

Joyce Gu wrote:
Hello,
Do you have the web address and we can refer to when you 
start your 
training session? I have worked on Strut for seven months 
now. I learned 
by myself. However, I would like to have a formal 
training and I really 
like that the idea that you will give home work too.
Thanks

At 08:31 AM 1/16/2003 -0500, you wrote:

http://www.sdtimes.com/news/063/story2.htm
Tomcat has most market share (above) and  best 
support.
(Check out PostgreSQL and Eclipse).

Re: training:
I plan to do public training "Intermediate Struts" via 
the Internet, 
in about a month.
4 Sessions Saturdays at 10:15 for about an hour, giving 
labs for  
home work due for next week labs. The cost will be only 
to cover the 
cost of webex, and so that it is not FREE.
It will cover is Struts review, Tiles, Master/Detail, 
Multi Row 
Update, Option Selections, Development Process, CRUD 
testing, and how 
to develop very very fast,  etc.

I have done lots of public (and private training) Struts 
training (and 
won best training by JDJ) and am looking to showcase my 
training 
approach, so someone else can do this kind of an online 
training 
seminar next time so I can see other training 
aproaches(but I would 
like them to take the class first, or even contribute to 
it, and then 
maybe donate all back to Struts). If I sign up at least 
20 people I 
will do it.

.V

(This is not intro to Struts, some pre-reqs for the class 
are at least 
some MVC, and some books such as "SQL for Smarties", 
"Java Web 
Compoent Developer Certification" or at least "JSP 
Weekend Crash Course")

joni santoso wrote:



* The Servlet API -- foundation to every Java-based web 
application


It's probably worth throwing in "installing and 
configuring a servlet
container like Tomcat" at about this point.  Many of us 
have the 
luxury of
sysadmins who takt that task on, but it's a very useful 
skill to 
know how
to set Tomcat up on your development PC.

I wonder if Tomcat is used in real and critical 
application by major 
companies? What other servlet containers out there? I 
once played 
with orion.
=== 

Meriahkan Hari Valentine Anda dan Ikuti Lomba Desain 
Kartu Eletronik 
dengan Tema Valentine
Ikuti Polling Pemilihan Pemenang Lomba Desain Kartu 
Elektronik Natal 
dan Tahun Baru 2003 di http://kartu.plasa.com/lomba
KSI PlasaCom - Reuni Alumni STTTelkom 
http://www.plasa.com/belajar/reuni.html 
=== 





--
To unsubscribe, e-mail:   

For additional commands, e-mail: 



Joyce GuM.S
Scientific Programmer
Biomedical Computing Facility
Baylor College of Medicine
Phone: (713)502-7024(C)
Fax: (713)798-6822
email: [EMAIL PROTECTED]




--
To unsubscribe, e-mail: 
 
For additional commands, e-mail: 



Regards,

Joni
===
Meriahkan Tahun Baru Imlek dengan mengirimkan Kartu Elektronik PlasaCom kepada kerabat dan teman Anda
KSI PlasaCom - Reuni Alumni STTTelkom http://www.plasa.com/belajar/reuni.html 
===

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: property file content not display correctly

2003-01-19 Thread Sakis Chatzinikolaou
Hi, 
I had the same problem with Greek.

I read somewhere to use native2ascii.exe (which resides in JDK bin directory)
native2ascii -encoding ISO-8859-7 ApplicationResources.properties 
ApplicationResourcesChanged.properties.

In the encoding use the one for French.

It worked for me.

Hope this works.

Sakis :)
  - Original Message - 
  From: dmz 
  To: [EMAIL PROTECTED] 
  Sent: Friday, January 17, 2003 6:21 PM
  Subject: i18n: property file content not display correctly


  Hi all:

   I am trying to display my page in French. I have set encoding to utf-8 for JSP 
and HTML and also edited the property file so that it is encoded in utf-8. But some 
characters are not displayed correctly even the encoding under view in IE6 shows utf-8 
when auto-select is on. I am attaching part of the property file so you could check 
its encoding. Has anyone run into this problem before? What should I do?

  Thanks.





--
  Do you Yahoo!?
  Yahoo! Mail Plus - Powerful. Affordable. Sign up now


--


  --
  To unsubscribe, e-mail:   
  For additional commands, e-mail: 


Re: DynaActionForm question

2003-01-19 Thread Craig R. McClanahan


On Sun, 19 Jan 2003, Mark Minnie wrote:

> Date: Sun, 19 Jan 2003 21:04:55 -0800
> From: Mark Minnie <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: DynaActionForm question
>
> "Struts in Action" on page 162 reads:
>
> "You can use a DynaActionForm anywhere an ActionForm can be used.  You can also 
>substitute a DynaActionForm for a conventional ActionForm without changing any of the 
>existing Java or JSP code."
>
> I changed a ActionForm to a DynaActionForm by using the struts-config.xml:
>
> dynamic="true">
>
>
> 
>
> I thought I would not have to change my existing code in the Action java code, but 
>my existing code did not work.  I originally had:
>
> String username = ((LoginForm)form).getUsername();
> String password = ((LoginForm)form).getPassword();
>
> The LoginForm was the form bean that I had created manually in java.  I deleted the 
>LoginForm and replaced the form bean with a DynaActionForm as listed above.  Of 
>course, once I no longer have a LoginForm.java file because it is a DynaActionForm, 
>this Action java code does not compile.
>
> Therefore I see that I have to change my code in going from a manually coded form 
>bean to a DynaActionForm.
>
> Am I missing something?
>

I think there was an implicit assumption in the sentence you quoted, that
you were using BeanUtils or PropertyUtils to manipulate the properties.
If your code had actually been:

  String username = PropertyUtils.getProperty(form, "username");
  String password = PropertyUtils.getProperty(form, "password");

then you would indeed have had to make no changes when you swtiched from a
standard ActionForm bean to a DynaActionForm.  If you're planning on
experimenting with such switching, you might want to think about coding
defensively like this.

> TIA
>
> Mark

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: struts servlet-mapping

2003-01-19 Thread geoff
Excellent, good to hear.


Regards,

Geoff Bennett


Multitask Consulting Pty Ltd
Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
Tel +61 2 9252 1462Fax +61 2 9252 4636
www.multitask.com.auemail: [EMAIL PROTECTED]





Cagan Senturk <[EMAIL PROTECTED]>
20/01/2003 03:36 PM
Please respond to "Struts Users Mailing List"
 
To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
cc: 
Subject:Re: struts servlet-mapping



Geoff,
thank you very much, that works!
I always return to the same layout jsp, so your solution fixes the 
whole problem.
-Cagan
On Sunday, January 19, 2003, at 06:26  PM, [EMAIL PROTECTED] wrote:

> Cagan,
>
> using the  tag will solve your action calling problems:
> Some link text here
>
> this will produce the following link:
> Some link text here
> use the paramId, paramName, paramProperty attributes if the 'urn' 
> value is
> dynamic.
>
>
> But, I get the feeling that you want the action to forward to one of 
> many
> tiles layout jsp's.
> One might be in 'p3/layout' and another in 'p4/layout'?
>
> If this is the case, then the only way I can guarantee that you will
> achieve this is to pass the value
> 'p3/layout' as a parameter and then pre-append it to your action's
> forward.
>
> I'm not saying that this is the only way, but it is the only one that I
> don't have to test to know that it will work :)
>
> Regards,
>
> Geoff Bennett
>
>
> Multitask Consulting Pty Ltd
> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
> Tel +61 2 9252 1462Fax +61 2 9252 4636
> www.multitask.com.auemail: [EMAIL PROTECTED]
>
>
>
>
>
> Cagan Senturk <[EMAIL PROTECTED]>
> 20/01/2003 09:43 AM
> Please respond to "Struts Users Mailing List"
>
> To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> cc:
> Subject:Re: struts servlet-mapping
>
>
>
> Geoff,
> Thanks for your answer.
> The problem is '/layout' or another directory gets appended there by
> Tomcat at runtime..Here's the whole story:
> The content is generated by a content editor, and for internal links we
> specified that the client uses the following format:
> Some link text here
>
> When this content is loaded, and it's loaded by a Tiles layout jsp,
> Tomcat automatically reads it as :
> http://hostname:port/ppp/p3/layout/link.do?urn=1334333
> where 'ppp' is the name of the context and 'p3/layout' the path to the
> directory where the Tiles layout jsp resides.
>
> And I'm trying to get my web app to forward all 'link.do' requests to
> the same handler.
>
> I don't want to hardcode the directory structure into the struts-config
> when defining the  element...
>
> -Cagan
>
> On Sunday, January 19, 2003, at 05:02  PM, [EMAIL PROTECTED] 
> wrote:
>
>> Is it important that '/layout' be part of the action path? why not 
>> just
>> have '/test'?
>>
>> It sounds as if this is an action used in multiple context's, and if
>> you
>> don't want to make
>> multiple mapping's, then why not just have the one mapping that is 
>> used
>> everywhere.
>>
>> The path in a mapping is just the name of the action on the server. It
>> doesn't relate back to a
>> directory structure, although, a path can be made to look that way.
>>
>>
>> Regards,
>>
>> Geoff Bennett
>>
>>
>> Multitask Consulting Pty Ltd
>> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
>> Tel +61 2 9252 1462Fax +61 2 9252 4636
>> www.multitask.com.auemail: [EMAIL PROTECTED]
>>
>>
>>
>>
>>
>> Cagan Senturk <[EMAIL PROTECTED]>
>> 17/01/2003 10:53 AM
>> Please respond to "Struts Users Mailing List"
>>
>> To: "Struts Users Mailing List"
>> <[EMAIL PROTECTED]>
>> cc:
>> Subject:Re: struts servlet-mapping
>>
>>
>>
>> The thing is the /layout directory is determined at run-time; I don't
>> know what it will be a deployment time.
>> Thanks,
>> Cagan
>> On Thursday, January 16, 2003, at 06:18  PM, [EMAIL PROTECTED]
>> wrote:
>>
>>> If you want your action to be available from
>>> http://localhost:8080/ppp/layout/test.do
>>> then you need to make a mapping like this:
>>>
>>> >> type="com.emirca.pp.controller.actionhandler.Welcomer"
>>> unknown="true"
>>> validate="false">
>>> 
>>>
>>>
>>> Regards,
>>>
>>> Geoff Bennett
>>>
>>>
>>> Multitask Consulting Pty Ltd
>>> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
>>> Tel +61 2 9252 1462Fax +61 2 9252 4636
>>> www.multitask.com.auemail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>>
>>>
>>> Cagan Senturk <[EMAIL PROTECTED]>
>>> 17/01/2003 10:00 AM
>>> Please respond to "Struts Users Mailing List"
>>>
>>> To: [EMAIL PROTECTED]
>>> cc:
>>> Subject:struts servlet-mapping
>>>
>>>
>>>

 Hello,
 I am using Struts 1.1-b2 and Tomcat4.1.18.
 My web app is deployed under a context named 'ppp'.
 In web.xml, url-pattern for struts action servlet is set to '*.do':
  
 action
 *.do
   

 And in struts-config.xml, I have the followi

RE: DynaActionForm question

2003-01-19 Thread James Turner
> From: Mark Minnie [mailto:[EMAIL PROTECTED]] 
>
> String username = ((LoginForm)form).getUsername();
> String password = ((LoginForm)form).getPassword();
> 
> The LoginForm was the form bean that I had created manually 
> in java.  I deleted the LoginForm and replaced the form bean 
> with a DynaActionForm as listed above.  Of course, once I no 
> longer have a LoginForm.java file because it is a 
> DynaActionForm, this Action java code does not compile. 
> 
> Therefore I see that I have to change my code in going from a 
> manually coded form bean to a DynaActionForm.  


Nope, one of the differences between DynaForms and conventional forms is
that Dynaforms are map-based, which means you need to rewrite those
lines as:

String username =  (String)((LoginForm)form).get("username");
String password = (String) ((LoginForm)form).get("password");

I got so sick of recasting to String that I wrote my own class which
extends DynaActionForm class and has getString helper methods in it.

James Turner
Owner & Manager, Black Bear Software, LLC
[EMAIL PROTECTED]

Author: 
MySQL & JSP Web Applications: 
Data Driven Programming Using Tomcat and MySQL
ISBN 0672323095; SAMS, 2002

Co-Author: 
Struts Kick Start
ISBN 0672324725; SAMS, 2002

Forthcoming:
Java Server Faces Kick Start 
SAMS, Fall 2003


> -Original Message-



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: How to use struts to handle session id in the following DHTMLmen u?

2003-01-19 Thread Paul Linden
If I were you, I would read the struts taglib documentation (especially 
http://jakarta.apache.org/struts/struts-html.html#link) to understand 
exactly what html:link does. Then read 
http://jakarta.apache.org/struts/struts-html.html#rewrite.

In fact, I would recommend before you try to use any of the tags, you 
read the relevant taglib docs.

Paul

Jason Yam wrote:

Hi everyone,

   anyone know how to change the following DHTML statement using in one
struts project so that struts will use the same jsessionid for all the DHTML
menu links?  For example, it will append jsessionid when the cookie function
is disabled and it will use jsessionid invisibly when the cookie function is
enabled.

Original
==

Inquiry


Edit


   I try to change the above statement using  so
that struts will take action on it and it works.  However, it looks a little
bit ugly.  Here is the way I modify:



page="/topic.action1.do">Inquiry


and it will generate the following DHTML statement:



Inquiry


   Anybody knows how to modify?  Is it feasible in the struts 1.0 release?
Is it feasible in the struts 1.1 release?

Thank you

Jason
   


 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Calling DLL

2003-01-19 Thread Prakash N
Hi

I want to call a dll from a jsp page using JNI i am using both Apache and Tomcat as 
servers.It is showing an error Class already loaded in another Class loader.I am 
placing the dll in the tomcat bin directory.

Regards
Thomas



DynaActionForm question

2003-01-19 Thread Mark Minnie
"Struts in Action" on page 162 reads:

"You can use a DynaActionForm anywhere an ActionForm can be used.  You can also 
substitute a DynaActionForm for a conventional ActionForm without changing any of the 
existing Java or JSP code."

I changed a ActionForm to a DynaActionForm by using the struts-config.xml:


   
   


I thought I would not have to change my existing code in the Action java code, but my 
existing code did not work.  I originally had:

String username = ((LoginForm)form).getUsername();
String password = ((LoginForm)form).getPassword();

The LoginForm was the form bean that I had created manually in java.  I deleted the 
LoginForm and replaced the form bean with a DynaActionForm as listed above.  Of 
course, once I no longer have a LoginForm.java file because it is a DynaActionForm, 
this Action java code does not compile. 

Therefore I see that I have to change my code in going from a manually coded form bean 
to a DynaActionForm.  

Am I missing something?

TIA

Mark


Re: struts servlet-mapping

2003-01-19 Thread Cagan Senturk
Geoff,
thank you very much, that works!
I always return to the same layout jsp, so your solution fixes the 
whole problem.
-Cagan
On Sunday, January 19, 2003, at 06:26  PM, [EMAIL PROTECTED] wrote:

Cagan,

using the  tag will solve your action calling problems:
Some link text here

this will produce the following link:
Some link text here
use the paramId, paramName, paramProperty attributes if the 'urn' 
value is
dynamic.


But, I get the feeling that you want the action to forward to one of 
many
tiles layout jsp's.
One might be in 'p3/layout' and another in 'p4/layout'?

If this is the case, then the only way I can guarantee that you will
achieve this is to pass the value
'p3/layout' as a parameter and then pre-append it to your action's
forward.

I'm not saying that this is the only way, but it is the only one that I
don't have to test to know that it will work :)

Regards,

Geoff Bennett


Multitask Consulting Pty Ltd
Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
Tel +61 2 9252 1462Fax +61 2 9252 4636
www.multitask.com.auemail: [EMAIL PROTECTED]





Cagan Senturk <[EMAIL PROTECTED]>
20/01/2003 09:43 AM
Please respond to "Struts Users Mailing List"

To: "Struts Users Mailing List"
<[EMAIL PROTECTED]>
cc:
Subject:Re: struts servlet-mapping



Geoff,
Thanks for your answer.
The problem is '/layout' or another directory gets appended there by
Tomcat at runtime..Here's the whole story:
The content is generated by a content editor, and for internal links we
specified that the client uses the following format:
Some link text here

When this content is loaded, and it's loaded by a Tiles layout jsp,
Tomcat automatically reads it as :
http://hostname:port/ppp/p3/layout/link.do?urn=1334333
where 'ppp' is the name of the context and 'p3/layout' the path to the
directory where the Tiles layout jsp resides.

And I'm trying to get my web app to forward all 'link.do' requests to
the same handler.

I don't want to hardcode the directory structure into the struts-config
when defining the  element...

-Cagan

On Sunday, January 19, 2003, at 05:02  PM, [EMAIL PROTECTED] 
wrote:

Is it important that '/layout' be part of the action path? why not 
just
have '/test'?

It sounds as if this is an action used in multiple context's, and if
you
don't want to make
multiple mapping's, then why not just have the one mapping that is 
used
everywhere.

The path in a mapping is just the name of the action on the server. It
doesn't relate back to a
directory structure, although, a path can be made to look that way.


Regards,

Geoff Bennett


Multitask Consulting Pty Ltd
Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
Tel +61 2 9252 1462Fax +61 2 9252 4636
www.multitask.com.auemail: [EMAIL PROTECTED]





Cagan Senturk <[EMAIL PROTECTED]>
17/01/2003 10:53 AM
Please respond to "Struts Users Mailing List"

To: "Struts Users Mailing List"
<[EMAIL PROTECTED]>
cc:
Subject:Re: struts servlet-mapping



The thing is the /layout directory is determined at run-time; I don't
know what it will be a deployment time.
Thanks,
Cagan
On Thursday, January 16, 2003, at 06:18  PM, [EMAIL PROTECTED]
wrote:

If you want your action to be available from
http://localhost:8080/ppp/layout/test.do
then you need to make a mapping like this:





Regards,

Geoff Bennett


Multitask Consulting Pty Ltd
Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
Tel +61 2 9252 1462Fax +61 2 9252 4636
www.multitask.com.auemail: [EMAIL PROTECTED]





Cagan Senturk <[EMAIL PROTECTED]>
17/01/2003 10:00 AM
Please respond to "Struts Users Mailing List"

To: [EMAIL PROTECTED]
cc:
Subject:struts servlet-mapping





Hello,
I am using Struts 1.1-b2 and Tomcat4.1.18.
My web app is deployed under a context named 'ppp'.
In web.xml, url-pattern for struts action servlet is set to '*.do':
 
action
*.do
  

And in struts-config.xml, I have the following  element
setup:



On my server, the following works:
http://localhost:8080/ppp/test.do

but the following doesn't:
http://localhost:8080/ppp/layout/test.do

Which means subdirectories within the context are not recognized by
struts in this setup...
How can I fix this?
Thanks in advance.
Cagan



Cagan Senturk

Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012

mailto:[EMAIL PROTECTED]
http://www.emirca.com


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




Cagan Senturk

Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012

mailto:[EMAIL PROTECTED]
http://www.emirca.com


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




Cagan Senturk

Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012

mailto:[EMAIL PROTECTED]
http://www.emirca.com


--
To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
For

Struts and Websphere

2003-01-19 Thread Steve Vanspall
Hi there,

I just wanted to see if there's anyone here who has succesfully deployed a
struts-based web application onWebsphere application server.

I am using Tomcat for development, but need to be able to deploy on
websphere?

As yet I have had no luck.

I am using

Struts 1.1Beta-1
Eclipse
am making the war file using Eclipse, the war file works with tomcat, but
not websphere.

Websphere pickup my welcome page, it then calls findefault.do, but that
causes a 500 error.

I think there must be some added setting one of my xml files needs.

Can anyone help me out

Regards

Steve Vanspall





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




prepoulating map-backed forms

2003-01-19 Thread rajiv ahuja
Hi

I am a newbie and got a requirement which probably could be solved using 
map-backed ActionForms. Actually I don't know the form properties in advace 
(getting it from database) so decided to use map-backed ActionForm. I also 
need to show the existing state (in database) in the web form and then allow 
user to change it. I am not sure how to prepopulate the map and write the 
jsp so that



shows what's their in database and allows the user to change it.

Sample code wil be highly appreciated.

Thanks
Rajiv





_
Help STOP SPAM: Try the new MSN 8 and get 2 months FREE* 
http://join.msn.com/?page=features/junkmail


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



How to use struts to handle session id in the following DHTML menu?

2003-01-19 Thread Jason Yam
Hi everyone,
 
anyone know how to change the following DHTML statement using in one
struts project so that struts will use the same jsessionid for all the DHTML
menu links?  For example, it will append jsessionid when the cookie function
is disabled and it will use jsessionid invisibly when the cookie function is
enabled.
 
Original
==

Inquiry


Edit

 
I try to change the above statement using  so
that struts will take action on it and it works.  However, it looks a little
bit ugly.  Here is the way I modify:
 

Inquiry

 
and it will generate the following DHTML statement:
 
 

Inquiry

 
Anybody knows how to modify?  Is it feasible in the struts 1.0 release?
Is it feasible in the struts 1.1 release?
 
Thank you
 
Jason

 



RE: Using internationalised messages as custom tag parameters

2003-01-19 Thread Marco Tedone
Have you tried with the following?

MessageResources resources =
(MessageResources)request.getAttribute(xxx.MESSAGES_KEY);

Then the resources.getMessage("xxx") shall return you the value.

Hope it will works :-)

-Original Message-
From: Alan P Sexton [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, January 19, 2003 11:34 PM
To: [EMAIL PROTECTED]
Subject: Using internationalised messages as custom tag parameters



When using custom tags, sometimes I want to pass an internationalised string
as an attribute value: e.g. using the display:column tag inside
display:table, I want to specify the column title using the message resource
key and not a constant string.

Currently I have it working using the very ugly code (cut down and
simplified):

...
<% org.apache.struts.util.PropertyMessageResources msgs = 
 
((org.apache.struts.util.PropertyMessageResources)request.getAttribute(org.a
pache.struts.Globals.MESSAGES_KEY) ; %>

...

   
 

Ideally I would like to be able to set this attribute using the bean:message
tag, but I don't see any way to do so.

I would also like to be able to easily apply text filtering for html
sensitive characters as per bean:write

Is there a cleaner, neater way to do all this?

Alan Sexton

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Using internationalised messages as custom tag parameters

2003-01-19 Thread Alan P Sexton

When using custom tags, sometimes I want to pass an internationalised
string as an attribute value: e.g. using the display:column tag inside display:table,
I want to specify the column title using the message resource key and
not a constant string.

Currently I have it working using the very ugly code (cut down and simplified):

...
<% org.apache.struts.util.PropertyMessageResources msgs = 

((org.apache.struts.util.PropertyMessageResources)request.getAttribute(org.apache.struts.Globals.MESSAGES_KEY)
 ; %>

...

 
 
 


Ideally I would like to be able to set this attribute using the
bean:message tag, but I don't see any way to do so.

I would also like to be able to easily apply text filtering for html
sensitive characters as per bean:write

Is there a cleaner, neater way to do all this?

Alan Sexton

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: struts servlet-mapping

2003-01-19 Thread geoff
Cagan,

using the  tag will solve your action calling problems:
Some link text here

this will produce the following link:
Some link text here
use the paramId, paramName, paramProperty attributes if the 'urn' value is 
dynamic.


But, I get the feeling that you want the action to forward to one of many 
tiles layout jsp's.
One might be in 'p3/layout' and another in 'p4/layout'?

If this is the case, then the only way I can guarantee that you will 
achieve this is to pass the value
'p3/layout' as a parameter and then pre-append it to your action's 
forward.

I'm not saying that this is the only way, but it is the only one that I 
don't have to test to know that it will work :) 

Regards,

Geoff Bennett


Multitask Consulting Pty Ltd
Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
Tel +61 2 9252 1462Fax +61 2 9252 4636
www.multitask.com.auemail: [EMAIL PROTECTED]





Cagan Senturk <[EMAIL PROTECTED]>
20/01/2003 09:43 AM
Please respond to "Struts Users Mailing List"
 
To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
cc: 
Subject:Re: struts servlet-mapping



Geoff,
Thanks for your answer.
The problem is '/layout' or another directory gets appended there by 
Tomcat at runtime..Here's the whole story:
The content is generated by a content editor, and for internal links we 
specified that the client uses the following format:
Some link text here

When this content is loaded, and it's loaded by a Tiles layout jsp, 
Tomcat automatically reads it as :
http://hostname:port/ppp/p3/layout/link.do?urn=1334333
where 'ppp' is the name of the context and 'p3/layout' the path to the 
directory where the Tiles layout jsp resides.

And I'm trying to get my web app to forward all 'link.do' requests to 
the same handler.

I don't want to hardcode the directory structure into the struts-config 
when defining the  element...

-Cagan

On Sunday, January 19, 2003, at 05:02  PM, [EMAIL PROTECTED] wrote:

> Is it important that '/layout' be part of the action path? why not just
> have '/test'?
>
> It sounds as if this is an action used in multiple context's, and if 
> you
> don't want to make
> multiple mapping's, then why not just have the one mapping that is used
> everywhere.
>
> The path in a mapping is just the name of the action on the server. It
> doesn't relate back to a
> directory structure, although, a path can be made to look that way.
>
>
> Regards,
>
> Geoff Bennett
>
>
> Multitask Consulting Pty Ltd
> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
> Tel +61 2 9252 1462Fax +61 2 9252 4636
> www.multitask.com.auemail: [EMAIL PROTECTED]
>
>
>
>
>
> Cagan Senturk <[EMAIL PROTECTED]>
> 17/01/2003 10:53 AM
> Please respond to "Struts Users Mailing List"
>
> To: "Struts Users Mailing List"
> <[EMAIL PROTECTED]>
> cc:
> Subject:Re: struts servlet-mapping
>
>
>
> The thing is the /layout directory is determined at run-time; I don't
> know what it will be a deployment time.
> Thanks,
> Cagan
> On Thursday, January 16, 2003, at 06:18  PM, [EMAIL PROTECTED]
> wrote:
>
>> If you want your action to be available from
>> http://localhost:8080/ppp/layout/test.do
>> then you need to make a mapping like this:
>>
>> > type="com.emirca.pp.controller.actionhandler.Welcomer"
>> unknown="true"
>> validate="false">
>> 
>>
>>
>> Regards,
>>
>> Geoff Bennett
>>
>>
>> Multitask Consulting Pty Ltd
>> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
>> Tel +61 2 9252 1462Fax +61 2 9252 4636
>> www.multitask.com.auemail: [EMAIL PROTECTED]
>>
>>
>>
>>
>>
>> Cagan Senturk <[EMAIL PROTECTED]>
>> 17/01/2003 10:00 AM
>> Please respond to "Struts Users Mailing List"
>>
>> To: [EMAIL PROTECTED]
>> cc:
>> Subject:struts servlet-mapping
>>
>>
>>
>>>
>>> Hello,
>>> I am using Struts 1.1-b2 and Tomcat4.1.18.
>>> My web app is deployed under a context named 'ppp'.
>>> In web.xml, url-pattern for struts action servlet is set to '*.do':
>>>  
>>> action
>>> *.do
>>>   
>>>
>>> And in struts-config.xml, I have the following  element 
>>> setup:
>>> >> 
>>> type="com.emirca.pp.controller.actionhandler.Welcomer"
>>> unknown="true"
>>> validate="false">
>>> 
>>>
>>> On my server, the following works:
>>> http://localhost:8080/ppp/test.do
>>>
>>> but the following doesn't:
>>> http://localhost:8080/ppp/layout/test.do
>>>
>>> Which means subdirectories within the context are not recognized by
>>> struts in this setup...
>>> How can I fix this?
>>> Thanks in advance.
>>> Cagan
>>>
>>>
>> Cagan Senturk
>>
>> Emirca Technologies, Inc.
>> 75 Spring St. Floor #8
>> NYC, NY 10012
>>
>> mailto:[EMAIL PROTECTED]
>> http://www.emirca.com
>>
>>
>> --
>> To unsubscribe, e-mail:   <
>> mailto:[EMAIL PROTECTED]>
>> For additional commands, e-mail: <
>> mailto:[EMAIL PROTECTED]>
>>
>>
>>
> Cagan Senturk
>
> Emirca Technologies, Inc.
> 75 Spring St. Floo

Re: struts servlet-mapping

2003-01-19 Thread Cagan Senturk
I agree. But I think support of wildcards in the path would be very 
useful.

On Sunday, January 19, 2003, at 06:10  PM, Marco Tedone wrote:

I think it's important as the controllers maps the exactly match 
between the
action-path specified by the client with the action specified in the
configuration file.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 19, 2003 10:02 PM
To: Struts Users Mailing List
Subject: Re: struts servlet-mapping


Is it important that '/layout' be part of the action path? why not just
have '/test'?

It sounds as if this is an action used in multiple context's, and if 
you
don't want to make
multiple mapping's, then why not just have the one mapping that is used
everywhere.

The path in a mapping is just the name of the action on the server. It
doesn't relate back to a
directory structure, although, a path can be made to look that way.


Regards,

Geoff Bennett


Multitask Consulting Pty Ltd
Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
Tel +61 2 9252 1462Fax +61 2 9252 4636
www.multitask.com.auemail: [EMAIL PROTECTED]





Cagan Senturk <[EMAIL PROTECTED]>
17/01/2003 10:53 AM
Please respond to "Struts Users Mailing List"

To: "Struts Users Mailing List"
<[EMAIL PROTECTED]>
cc:
Subject:Re: struts servlet-mapping



The thing is the /layout directory is determined at run-time; I don't
know what it will be a deployment time.
Thanks,
Cagan
On Thursday, January 16, 2003, at 06:18  PM, [EMAIL PROTECTED]
wrote:

If you want your action to be available from
http://localhost:8080/ppp/layout/test.do
then you need to make a mapping like this:





Regards,

Geoff Bennett


Multitask Consulting Pty Ltd
Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
Tel +61 2 9252 1462Fax +61 2 9252 4636
www.multitask.com.auemail: [EMAIL PROTECTED]





Cagan Senturk <[EMAIL PROTECTED]>
17/01/2003 10:00 AM
Please respond to "Struts Users Mailing List"

To: [EMAIL PROTECTED]
cc:
Subject:struts servlet-mapping





Hello,
I am using Struts 1.1-b2 and Tomcat4.1.18.
My web app is deployed under a context named 'ppp'.
In web.xml, url-pattern for struts action servlet is set to '*.do':

action
*.do
  

And in struts-config.xml, I have the following  element 
setup:


type="com.emirca.pp.controller.actionhandler.Welcomer"
unknown="true"
validate="false">


On my server, the following works: http://localhost:8080/ppp/test.do

but the following doesn't: http://localhost:8080/ppp/layout/test.do

Which means subdirectories within the context are not recognized by
struts in this setup... How can I fix this?
Thanks in advance.
Cagan


Cagan Senturk

Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012

mailto:[EMAIL PROTECTED]
http://www.emirca.com


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




Cagan Senturk

Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012

mailto:[EMAIL PROTECTED]
http://www.emirca.com


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



--
To unsubscribe, e-mail:   

For additional commands, e-mail: 





Cagan Senturk

Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012

mailto:[EMAIL PROTECTED]
http://www.emirca.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: struts servlet-mapping

2003-01-19 Thread Marco Tedone
I think it's important as the controllers maps the exactly match between the
action-path specified by the client with the action specified in the
configuration file. 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, January 19, 2003 10:02 PM
To: Struts Users Mailing List
Subject: Re: struts servlet-mapping


Is it important that '/layout' be part of the action path? why not just 
have '/test'?

It sounds as if this is an action used in multiple context's, and if you 
don't want to make
multiple mapping's, then why not just have the one mapping that is used 
everywhere.

The path in a mapping is just the name of the action on the server. It 
doesn't relate back to a
directory structure, although, a path can be made to look that way.


Regards,

Geoff Bennett


Multitask Consulting Pty Ltd
Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
Tel +61 2 9252 1462Fax +61 2 9252 4636
www.multitask.com.auemail: [EMAIL PROTECTED]





Cagan Senturk <[EMAIL PROTECTED]>
17/01/2003 10:53 AM
Please respond to "Struts Users Mailing List"
 
To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
cc: 
Subject:Re: struts servlet-mapping



The thing is the /layout directory is determined at run-time; I don't 
know what it will be a deployment time.
Thanks,
Cagan
On Thursday, January 16, 2003, at 06:18  PM, [EMAIL PROTECTED] 
wrote:

> If you want your action to be available from 
> http://localhost:8080/ppp/layout/test.do
> then you need to make a mapping like this:
>
>  type="com.emirca.pp.controller.actionhandler.Welcomer"
> unknown="true"
> validate="false">
> 
>
>
> Regards,
>
> Geoff Bennett
>
>
> Multitask Consulting Pty Ltd
> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
> Tel +61 2 9252 1462Fax +61 2 9252 4636
> www.multitask.com.auemail: [EMAIL PROTECTED]
>
>
>
>
>
> Cagan Senturk <[EMAIL PROTECTED]>
> 17/01/2003 10:00 AM
> Please respond to "Struts Users Mailing List"
>
> To: [EMAIL PROTECTED]
> cc:
> Subject:struts servlet-mapping
>
>
>
>>
>> Hello,
>> I am using Struts 1.1-b2 and Tomcat4.1.18.
>> My web app is deployed under a context named 'ppp'.
>> In web.xml, url-pattern for struts action servlet is set to '*.do':  
>> 
>> action
>> *.do
>>   
>>
>> And in struts-config.xml, I have the following  element setup:
>> > type="com.emirca.pp.controller.actionhandler.Welcomer"
>> unknown="true"
>> validate="false">
>> 
>>
>> On my server, the following works: http://localhost:8080/ppp/test.do
>>
>> but the following doesn't: http://localhost:8080/ppp/layout/test.do
>>
>> Which means subdirectories within the context are not recognized by 
>> struts in this setup... How can I fix this?
>> Thanks in advance.
>> Cagan
>>
>>
> Cagan Senturk
>
> Emirca Technologies, Inc.
> 75 Spring St. Floor #8
> NYC, NY 10012
>
> mailto:[EMAIL PROTECTED]
> http://www.emirca.com
>
>
> --
> To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: < 
> mailto:[EMAIL PROTECTED]>
>
>
>
Cagan Senturk

Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012

mailto:[EMAIL PROTECTED]
http://www.emirca.com


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



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: RequestProcessor

2003-01-19 Thread Craig R. McClanahan


On Sun, 19 Jan 2003, Angel Aledo wrote:

> Date: Sun, 19 Jan 2003 18:24:48 +0100
> From: Angel Aledo <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: RequestProcessor
>
> Hello,
>
> I found out a little (but important) difference in the use of the
> RequestProcessor between the Sun WAF (Petstore application) and Struts. In
> the Sun framework the method is not synchronized:
>
> MainServlet.java (Sun WAF):
>
> private RequestProcessor getRequestProcessor() {
> ...
> }
>
> but in the Struts Framework the method is synchronized:
>
> ActionServlet.java (Struts):
>
> protected synchronized RequestProcessor
> getRequestProcessor(ApplicationConfig config) throws
> ServletException {
> ...
> }
>
> Why this design difference?.

A primary reason is that there can be more than one RequestProcessor in a
struts based application -- indeed, there will be one per module.

The second reason is that getRequestProcessor() in Struts is actually a
factory method -- it will create the instance if it's not there alrady,
and save it (as a servlet context attribute).  In order to avoid race
conditions where two threads both discover that the RequestProcessor
doesn't exist and both create a new one.

There's a similar situation inside the standard RequestProcessor itself,
where the processActionCreate() method creates new Action instances if
they don't exist already.  The only difference is that synchronized block
is inside the method (because not everythng there needed to be
synchronized).

> Could the synchronized method be a bottleneck
> in the Struts framework?.

Most likely not.  Especially on a 1.4 platform, synchs are pretty fast,
and there's probably hundreds of them executed every request anyway
between what your app does, what your JDBC driver does, what Struts does,
and what your servlet container does.

> Is it really necessary to the correct execution of
> the struts actions?.

Yes, it is -- it's required to live up to the contract that the request
processor for a particular module is guaranteed to be a singleton.

> Thanks,
>
> Angel
>

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: struts servlet-mapping

2003-01-19 Thread Cagan Senturk
Geoff,
Thanks for your answer.
The problem is '/layout' or another directory gets appended there by 
Tomcat at runtime..Here's the whole story:
The content is generated by a content editor, and for internal links we 
specified that the client uses the following format:
Some link text here

When this content is loaded, and it's loaded by a Tiles layout jsp, 
Tomcat automatically reads it as :
http://hostname:port/ppp/p3/layout/link.do?urn=1334333
where 'ppp' is the name of the context and 'p3/layout' the path to the 
directory where the Tiles layout jsp resides.

And I'm trying to get my web app to forward all 'link.do' requests to 
the same handler.

I don't want to hardcode the directory structure into the struts-config 
when defining the  element...

-Cagan

On Sunday, January 19, 2003, at 05:02  PM, [EMAIL PROTECTED] wrote:

Is it important that '/layout' be part of the action path? why not just
have '/test'?

It sounds as if this is an action used in multiple context's, and if 
you
don't want to make
multiple mapping's, then why not just have the one mapping that is used
everywhere.

The path in a mapping is just the name of the action on the server. It
doesn't relate back to a
directory structure, although, a path can be made to look that way.


Regards,

Geoff Bennett


Multitask Consulting Pty Ltd
Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
Tel +61 2 9252 1462Fax +61 2 9252 4636
www.multitask.com.auemail: [EMAIL PROTECTED]





Cagan Senturk <[EMAIL PROTECTED]>
17/01/2003 10:53 AM
Please respond to "Struts Users Mailing List"

To: "Struts Users Mailing List"
<[EMAIL PROTECTED]>
cc:
Subject:Re: struts servlet-mapping



The thing is the /layout directory is determined at run-time; I don't
know what it will be a deployment time.
Thanks,
Cagan
On Thursday, January 16, 2003, at 06:18  PM, [EMAIL PROTECTED]
wrote:

If you want your action to be available from
http://localhost:8080/ppp/layout/test.do
then you need to make a mapping like this:





Regards,

Geoff Bennett


Multitask Consulting Pty Ltd
Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
Tel +61 2 9252 1462Fax +61 2 9252 4636
www.multitask.com.auemail: [EMAIL PROTECTED]





Cagan Senturk <[EMAIL PROTECTED]>
17/01/2003 10:00 AM
Please respond to "Struts Users Mailing List"

To: [EMAIL PROTECTED]
cc:
Subject:struts servlet-mapping





Hello,
I am using Struts 1.1-b2 and Tomcat4.1.18.
My web app is deployed under a context named 'ppp'.
In web.xml, url-pattern for struts action servlet is set to '*.do':
 
action
*.do
  

And in struts-config.xml, I have the following  element 
setup:


type="com.emirca.pp.controller.actionhandler.Welcomer"
unknown="true"
validate="false">


On my server, the following works:
http://localhost:8080/ppp/test.do

but the following doesn't:
http://localhost:8080/ppp/layout/test.do

Which means subdirectories within the context are not recognized by
struts in this setup...
How can I fix this?
Thanks in advance.
Cagan


Cagan Senturk

Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012

mailto:[EMAIL PROTECTED]
http://www.emirca.com


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




Cagan Senturk

Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012

mailto:[EMAIL PROTECTED]
http://www.emirca.com


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




Cagan Senturk

Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012

mailto:[EMAIL PROTECTED]
http://www.emirca.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: [Ignore this mail]

2003-01-19 Thread Todd Pierce
OK

-Original Message-
From: Simon Kelly [mailto:[EMAIL PROTECTED]]
Sent: Saturday, 18 January 2003 1:38 AM
To: Struts Users Mailing List
Subject: [Ignore this mail]



Institut fuer
Prozessdatenverarbeitung
und Elektronik,
Forschungszentrum Karlsruhe GmbH,
Postfach 3640,
D-76021 Karlsruhe,
Germany.

Tel: (+49)/7247 82-4042
E-mail : [EMAIL PROTECTED]

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: struts servlet-mapping

2003-01-19 Thread geoff
Is it important that '/layout' be part of the action path? why not just 
have '/test'?

It sounds as if this is an action used in multiple context's, and if you 
don't want to make
multiple mapping's, then why not just have the one mapping that is used 
everywhere.

The path in a mapping is just the name of the action on the server. It 
doesn't relate back to a
directory structure, although, a path can be made to look that way.


Regards,

Geoff Bennett


Multitask Consulting Pty Ltd
Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
Tel +61 2 9252 1462Fax +61 2 9252 4636
www.multitask.com.auemail: [EMAIL PROTECTED]





Cagan Senturk <[EMAIL PROTECTED]>
17/01/2003 10:53 AM
Please respond to "Struts Users Mailing List"
 
To: "Struts Users Mailing List" 
<[EMAIL PROTECTED]>
cc: 
Subject:Re: struts servlet-mapping



The thing is the /layout directory is determined at run-time; I don't 
know what it will be a deployment time.
Thanks,
Cagan
On Thursday, January 16, 2003, at 06:18  PM, [EMAIL PROTECTED] 
wrote:

> If you want your action to be available from
> http://localhost:8080/ppp/layout/test.do
> then you need to make a mapping like this:
>
>  type="com.emirca.pp.controller.actionhandler.Welcomer"
> unknown="true"
> validate="false">
> 
>
>
> Regards,
>
> Geoff Bennett
>
>
> Multitask Consulting Pty Ltd
> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
> Tel +61 2 9252 1462Fax +61 2 9252 4636
> www.multitask.com.auemail: [EMAIL PROTECTED]
>
>
>
>
>
> Cagan Senturk <[EMAIL PROTECTED]>
> 17/01/2003 10:00 AM
> Please respond to "Struts Users Mailing List"
>
> To: [EMAIL PROTECTED]
> cc:
> Subject:struts servlet-mapping
>
>
>
>>
>> Hello,
>> I am using Struts 1.1-b2 and Tomcat4.1.18.
>> My web app is deployed under a context named 'ppp'.
>> In web.xml, url-pattern for struts action servlet is set to '*.do':
>>  
>> action
>> *.do
>>   
>>
>> And in struts-config.xml, I have the following  element setup:
>> > type="com.emirca.pp.controller.actionhandler.Welcomer"
>> unknown="true"
>> validate="false">
>> 
>>
>> On my server, the following works:
>> http://localhost:8080/ppp/test.do
>>
>> but the following doesn't:
>> http://localhost:8080/ppp/layout/test.do
>>
>> Which means subdirectories within the context are not recognized by
>> struts in this setup...
>> How can I fix this?
>> Thanks in advance.
>> Cagan
>>
>>
> Cagan Senturk
>
> Emirca Technologies, Inc.
> 75 Spring St. Floor #8
> NYC, NY 10012
>
> mailto:[EMAIL PROTECTED]
> http://www.emirca.com
>
>
> --
> To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
>
>
>
Cagan Senturk

Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012

mailto:[EMAIL PROTECTED]
http://www.emirca.com


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





Re: Struts / Tiles Design question

2003-01-19 Thread Paul Hodgetts
Carl Hope wrote:

> - Is there a way to process just the menu HTML and avoid re-generating the
> body, header and footer?.
> - If all tiles must be regenerated, how should I define the Action for the
> menu change.  This should really just call a menu handler page but if the
> entire page must be regenerated, then I need to specify the action for the
> current Tiles definition and retain state.
>
> I've considered trappping and caching the generated HTML from each response
> and replacing only the changed menu but that doesn't seem "clean".  Anyone
> have any guidance?

Could you use something like OS Cache tags to cache the individual
tiles that don't change.  I've been using it and it is working
well for me.  Very simple.

See http://www.opensymphony.com:8668/space/OSCache

Regards,
Paul
-
Paul Hodgetts -- President, Principal Consultant
Agile Logic  -- www.agilelogic.com
Consulting, Coaching, Training -- On-Site & Out-Sourced Development
Java, J2EE, C++, OOA/D -- Agile Methods/XP/Scrum, Use Cases, UI/IA


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: [PATCH] LookupDispatchAction

2003-01-19 Thread A Stephen
[PATCH]
Index: LocalStrings.properties
===
RCS file:
/home/cvspublic/jakarta-struts/src/share/org/apache/struts/actions/LocalStri
ngs.properties,v
retrieving revision 1.5
diff -r1.5 LocalStrings.properties
5a6
> dispatch.parameter.error=Request[{0}] does not contain method mapping  for
{1}

Index: LookupDispatchAction.java
===
RCS file:
/home/cvspublic/jakarta-struts/src/share/org/apache/struts/actions/LookupDis
patchAction.java,v
retrieving revision 1.10
diff -r1.10 LookupDispatchAction.java
231d230
<
233c232,235
<
---
> if (methodName==null){
> String message =
messages.getMessage("dispatch.parameter.error", mapping.getPath(), name);
> throw new ServletException(message);
> }


Please don't get me wrong I'm a big fan/advocate of struts and wasn't trying
to say it was Strut's fault.
I was merely trying to submit a patch; and avoid hours of frustration for
the people that use resin/ struts

If it works on platform and not the other , we all might as well be
developing Microsoft applications.


- Original Message -
From: "Wendy Smoak" <[EMAIL PROTECTED]>
To: "'Struts Developers List'" <[EMAIL PROTECTED]>
Sent: Friday, January 17, 2003 6:56 AM
Subject: RE: [PATCH] Re: Nasty Error when use LookupDispatchAction


> > Everything works beautifully until you try and mess the query string
> > for e.g  /edit.do?submit=initchanged&key=10
> > there is no mapping for initx, hence there is no method name and null is
> > passed into the
> > return dispatchMethod(mapping, form, request, response, methodName)
> > which finally calls getMethod(String name, Class[] parameterTypes)
> > The end result is that application shuts down with VM error
>
> This has been discussed before and I believe the general consensus is that
> there's a bug in Resin.  If you try the same thing in Tomcat, you will
only
> get an exception.
>
> Still, I don't like the behavior of LookupDispatchAction so I override the
> execute() method in which I examine the request parameters.  If the
"action"
> is present, I just call super.execute().  Otherwise I try to figure out
what
> would be appropriate (add?  edit?) before giving up and throwing an
> exception.
>
> I would like to add a "default" attribue to the tag in struts-config so
you
> can specify which method to call if the parameter isn't present in the
> request.
>
> In short, I don't think that VM Error is the fault of Struts.
>
> --
> Wendy Smoak
> Applications Systems Analyst, Sr.
> Arizona State University PA Information Resources Management
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: RequestProcessor

2003-01-19 Thread Marco Tedone
I think because probally, as in the Struts framework only a single instance
of an Action is created for each application, and the RequestProcessor is
called by the ActionServlet istance, the synchronization ensure the
integrity between ActionServlet and RequestProcessor instances.

-Original Message-
From: Angel Aledo [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, January 19, 2003 5:25 PM
To: [EMAIL PROTECTED]
Subject: RequestProcessor


Hello,

I found out a little (but important) difference in the use of the
RequestProcessor between the Sun WAF (Petstore application) and Struts. In
the Sun framework the method is not synchronized:

MainServlet.java (Sun WAF):

private RequestProcessor getRequestProcessor() {
...
}

but in the Struts Framework the method is synchronized:

ActionServlet.java (Struts):

protected synchronized RequestProcessor
getRequestProcessor(ApplicationConfig config) throws
ServletException { ... }

Why this design difference?. Could the synchronized method be a bottleneck
in the Struts framework?. Is it really necessary to the correct execution of
the struts actions?. Thanks,

Angel


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RequestProcessor

2003-01-19 Thread Angel Aledo
Hello,

I found out a little (but important) difference in the use of the
RequestProcessor between the Sun WAF (Petstore application) and Struts. In
the Sun framework the method is not synchronized:

MainServlet.java (Sun WAF):

private RequestProcessor getRequestProcessor() {
...
}

but in the Struts Framework the method is synchronized:

ActionServlet.java (Struts):

protected synchronized RequestProcessor
getRequestProcessor(ApplicationConfig config) throws
ServletException {
...
}

Why this design difference?. Could the synchronized method be a bottleneck
in the Struts framework?. Is it really necessary to the correct execution of
the struts actions?.
Thanks,

Angel


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts / Tiles Design question

2003-01-19 Thread Cagan Senturk
I believe there is no way you can refresh part of a layout; the whole 
layout jsp will have to reload.
For your second question, you can write the menu part of your layout 
(say 'menu.jsp') in a way capable of recognizing the current section 
selection of the user and self-expand accordingly...

On Sunday, January 19, 2003, at 09:07  AM, Carl Hope wrote:


I'm recoding an existing app using Struts and Tiles.   The app 
originally used frames with the usual
components of header, menu, body and footer.  I've replaced the 
frameset with
a layout template and it works fine.  The difficulty I'm having is 
when I only
want to refresh the menu tile and not repeat all the work to create 
the body.
e.g. the user clicks on an image in the menu that opens up a tree node 
to show
sub-menus - only the menu model and view are changed.  With frames 
this was
easy, but with Tiles it's not so easy, at least not for me.  There are 
two
problems:

- Is there a way to process just the menu HTML and avoid re-generating 
the
body, header and footer?.
- If all tiles must be regenerated, how should I define the Action for 
the
menu change.  This should really just call a menu handler page but if 
the
entire page must be regenerated, then I need to specify the action for 
the
current Tiles definition and retain state.

I've considered trappping and caching the generated HTML from each 
response
and replacing only the changed menu but that doesn't seem "clean".  
Anyone
have any guidance?

Cagan Senturk

Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012

mailto:[EMAIL PROTECTED]
http://www.emirca.com


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Struts / Tiles Design question

2003-01-19 Thread Christopher Willingham
For your second question I believe the answer is to create a new tiles
definition where you override the menu tile.  In your action reference the
new definition.

But your first question I don't know.  I am now building my first large
corporate struts app and am using tiles which I like very much but am very
worried about speed and wonder whether I should use frames to speed things
up( for your re-gen reasons as well as the caching of images, javascript ref
tables, etc on a fixed frame such as navbar).  So I am curious how tiles
would run on top of frames and whether I should consider it.


- Original Message -
From: "Carl Hope" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Sunday, January 19, 2003 9:07 AM
Subject: Struts / Tiles Design question



I'm recoding an existing app using Struts and Tiles.   The app originally
used frames with the usual
components of header, menu, body and footer.  I've replaced the frameset
with
a layout template and it works fine.  The difficulty I'm having is when I
only
want to refresh the menu tile and not repeat all the work to create the
body.
e.g. the user clicks on an image in the menu that opens up a tree node to
show
sub-menus - only the menu model and view are changed.  With frames this was
easy, but with Tiles it's not so easy, at least not for me.  There are two
problems:

- Is there a way to process just the menu HTML and avoid re-generating the
body, header and footer?.
- If all tiles must be regenerated, how should I define the Action for the
menu change.  This should really just call a menu handler page but if the
entire page must be regenerated, then I need to specify the action for the
current Tiles definition and retain state.

I've considered trappping and caching the generated HTML from each response
and replacing only the changed menu but that doesn't seem "clean".  Anyone
have any guidance?




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts / Tiles Design question

2003-01-19 Thread Carl Hope

I'm recoding an existing app using Struts and Tiles.   The app originally used frames 
with the usual
components of header, menu, body and footer.  I've replaced the frameset with
a layout template and it works fine.  The difficulty I'm having is when I only
want to refresh the menu tile and not repeat all the work to create the body.
e.g. the user clicks on an image in the menu that opens up a tree node to show
sub-menus - only the menu model and view are changed.  With frames this was
easy, but with Tiles it's not so easy, at least not for me.  There are two
problems: 

- Is there a way to process just the menu HTML and avoid re-generating the
body, header and footer?. 
- If all tiles must be regenerated, how should I define the Action for the
menu change.  This should really just call a menu handler page but if the
entire page must be regenerated, then I need to specify the action for the
current Tiles definition and retain state. 

I've considered trappping and caching the generated HTML from each response
and replacing only the changed menu but that doesn't seem "clean".  Anyone
have any guidance? 



Validator can use different resource bundle?

2003-01-19 Thread Franco Caponi
I need to use a different resource bundle in the validator.
In the struts_example i have see a bundle attribute in the field attribute
but i have not find it in the DTD and seem not work... Wath are the correct
guidelines to use resource from a specified bundle using the validator
framework?


--
To unsubscribe, e-mail:   
For additional commands, e-mail: