Re: struts.xml - change default location

2007-03-20 Thread Bartek

Hi James

Well, the person who created the project structure is not me. I just have to
fit my development into it.
So the discussion if this makes sense or not is not the point of this topic
:). 
But nerevtheless, thank you for confirming what I have also supposed (and
what you called a battle).
Thanks again.!!

Regards
Bartek


James Mitchell-3 wrote:
 
 I don't understand why it has to be loaded from outside the  
 classpath.  There are facilities in place to let you do what you  
 want, but  you would be fighting an uphill battle.
 
 I don't see the justification for changing code to simplify this.   
 Please help me understand why you have to have your struts  
 configuration in WEB-INF and not in WEB-INF/classes (or jar).
 
 
 --
 James Mitchell
 The Ruby Roundup
 http://www.rubyroundup.com/
 
 
 On Mar 19, 2007, at 8:14 AM, Bartek wrote:
 

 Hi James

 Well, the default location of struts.xml is classpath location e.g.
 WEB-INF/classes. And I want to load it from outside the classpath,  
 e.g.
 directly from WEB-INF directory. How can I do this? I thought , I  
 coudl do
 this as in case of struts1 - using param-nameconfig/param-name of
 actionservlet. Of course in case of struts2 I would use this init  
 param in
 context of FilterDispatcher. But it did not work. So again, the  
 question is:
 How to load the struts.xml from WEB-INF directory, without adding  
 it to
 classpath?

 bartek


 James Mitchell-3 wrote:

 Can you restate your question?


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


 On Mar 19, 2007, at 5:21 AM, Bartek wrote:


 Hi

 I have to face up the following issue. My location of struts.xml
 shoudl be
 WEB-INF directory, not WEB-INF/classes.
 What is the easiest way to achieve this?? I tried several different
 config
 locations (e.g. WEB-INF/struts.xml) for
 StrutsXmlConfigurationProvider, none
 of them worked. Creating custom configuration provider might help,
 but it is
 pojo by default , protocol independant and therefore without any
 ServletContext access - what is a pain in this case.

 Cheers
 bartek

 -- 
 View this message in context: http://www.nabble.com/struts.xml---
 change-default-location-tf3425865.html#a9548614
 Sent from the Struts - User mailing list archive at Nabble.com.


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



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




 -- 
 View this message in context: http://www.nabble.com/struts.xml--- 
 change-default-location-tf3425865.html#a9550834
 Sent from the Struts - User mailing list archive at Nabble.com.


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

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

-- 
View this message in context: 
http://www.nabble.com/struts.xml---change-default-location-tf3425865.html#a9567920
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: [s2] Possibility to hide input fields if not empty?

2007-03-20 Thread joey

Just use condition tag to hide your fields,like this:
   s:if test=user.email==null
   s:textfield key=user.email name=user.email /
   /s:if


On 3/20/07, Piero Sartini [EMAIL PROTECTED] wrote:


Just wondering how you guys would make something like this:
When a Field in a form is null or empty it should be displayed, if it is
already filled it should disappear.

Is there an easy way to do this with s2? Use-Case is to ask the user
missing
information after login.

Piero.

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




A suggestion for struts.xml!

2007-03-20 Thread joey

 I think if struts.xml 's element 'include' support wildcard,it will be
better.
For example  I have ten file to be included in struts.xml,now I have to
write
include file=/config/struts-xxx.xml / ten times.But if it has supported
wildcard,
I would only need write once like this include file=/config/*.xml /.
 is it possible to support wildcard next version?I think I can deploy my
struts application
easier if so.


A suggestion for struts.xml!

2007-03-20 Thread joey

 I think if struts.xml 's element 'include' support wildcard,it will be
better.
For example  I have ten file to be included in struts.xml,now I have to
write
include file=/config/struts-xxx.xml  / ten times.But if it has supported
wildcard,
I would only need write once like this include file=/config/*.xml /.
 is it possible to support wildcard next version?I think I can deploy my
struts application
easier if so.


Re: Why following is not working

2007-03-20 Thread Dave Newton
--- tom tom [EMAIL PROTECTED] wrote:
 Can some body let me know why following is not
 working
 
 s:a href=s:url
 action=myInfor.studentProfile/
  span id=blue
Personal Details
/span
 /s:a
 
 can't we have s:a href like this. but this works
 with
 a href=s:url action=myInfor.studentProfile/
  span id=blue
Personal Details
/span
  /a

s:url action=myInfor.studentProfile id=foo/
s:a href=#foo
  span id=blue
Personal Details
  /span
/s:a

It doesn't work because you can't just randomly nest
tags like that.

d.



 

It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.
http://tools.search.yahoo.com/toolbar/features/mail/

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



ldap access

2007-03-20 Thread Philippe Le Gal
Hi,

I'm looking for an example of an ldap search with struts.

Any pointer ?

Thank

Philippe

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



Re: Forward a action from one action programmatically in STruts 2.0

2007-03-20 Thread Rene Gielen
Maybe this is the option you are searching for:

struts.xml:
---
action name=action1 class=acme.Action1
  result${targetUrl}/result
/action

in your acme.Action1 class:
---
String targetUrl;

public String getTargetUrl() {
return this.targetUrl;
}

public String execute() {
if (...) {
this,targetUrl = 1.jsp;
} else ...
}
}

Regards,
- Rene

arunkumar S schrieb:
 Hi,
 
 
 
 Thanks for the inputs. my req. will not satisfy your suggestion.
 
 
 
 My req. is I have to load different Jsps depending on the user
 profile. eg http://profile.eg/. for user with profile = abc,
 
 i will have JSps like 1_abc.jsp,2_abc.jsp,3_abc.jsp
 
 for user with profile = def , i will have jsps like 1_def.jsp,2_def.jsp
 etc..
 
 
 
 
 
 
 
 one way of solving this is to mention all the Jsp for users with
 different profile in the results and then forward
 
 it in the action itself.
 
 
 
 like
 
 
 
 
 
 action name=action1 class = action1
 
  result1_abc.jsp/result
 
  result1_def.jsp/result
 
 /action
 
 
 
 
 
 action name=action2 class = action2
 
  result2_abc.jsp/result
 
  result2_def.jsp/result
 
 /action
 
 
 
 return corresponding result in each action based on the users profile.
 
 
 
 but the pblm here for each action the application developer has to
 define results for each user.
 
 I am thinking of moving this to framework.
 
 
 
 Below is the new approach.
 
 
 
 
 
 
 
 action name=action1 class = action1
 
  result1.jsp/result
 
 /action
 
 
 
 
 
 action name=action2 class = action2
 
  result2.jsp/result
 
 /action
 
 
 
 action name= *
 
 result/{1}.jsp/result
 
 /action
 
 
 
 
 
 Now , in an action1.class  action2.class depending on the user
 profile i construt 1_abc.action or
 
 1_def.action and 2_abc.action or 2_def.action respectively . and if
 i can forward with 1_abc.action the below
 
 definition present in the STruts.xml will take care of forwarding it
 to 1_abc.jsp /1_def.jsp  depending on the user automatically.
 
 
 
 action name= *
 
 result/{1}.jsp/result
 
 /action
 
 
 
 FOr this i need to programmatically forward to an action so that i can
 leverage the above mentioned facility.
 
 
 
 I hope i have made things clear.Let me know if have any suggestions.
 
 
 
 
 
 
 
 
 
 Regards,
 
 Arun.
 
 
 
 
 
 The way I solve this is by returning the value you want and setting up the
 action chain on struts.xml file:
 
 Example:
 
   class MyAction 1 .. {
 
   public String execute(){
 if(foo)
 return foo;
 else
 return bar;
  }
 
 Then on the Strutus XML file:
 
  action name= MyAction  class. = 
  result name=foo type=chain FooAction/result
  result name=bar type=chain BarAction/result
 ...
 /action
 
 PS. Make sure you use type=chain!
 Hope this helps.
 
 Harring
 On 3/15/07, arunkumar S [EMAIL PROTECTED] wrote:
 
 Hi,
 
 I have a requirement where in the action has to be forwarded based on
 certain runtime conditions.The destination will be decided only on the
 runtime.
 ---
 if(Input = Case1 )
 forward action1
 else
 forward action2.
 ---
 
 Basically i want to acheive a simple forward( requestdispatcher.forward()
 ) in
 ActionClass in Struts 2.0.
 
 How can we acheive this in Struts 2.0. I dont have any API to acheive
 this.
 
 Any inputs pls?
 
 
 Regards,
 Arun
 


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



Re: ldap access

2007-03-20 Thread Dave Newton
--- Philippe Le Gal [EMAIL PROTECTED] wrote:
 I'm looking for an example of an ldap search with
 struts.

I'm not sure how the two are related; can you be more
specific?

d.



 

Food fight? Enjoy some healthy debate 
in the Yahoo! Answers Food  Drink QA.
http://answers.yahoo.com/dir/?link=listsid=396545367

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



Re: ldap access

2007-03-20 Thread Philippe Le Gal

I'm looking for an example for implementing a LDAP user authentification 
inside a struts application.

I think I've to test java.naming.ldap classes. Am i right ?

Thx 

Philippe

Le Tuesday 20 March 2007 13:18:31 Dave Newton, vous avez écrit :
 --- Philippe Le Gal [EMAIL PROTECTED] wrote:
  I'm looking for an example of an ldap search with
  struts.

 I'm not sure how the two are related; can you be more
 specific?

 d.




 ___
_ Food fight? Enjoy some healthy debate
 in the Yahoo! Answers Food  Drink QA.
 http://answers.yahoo.com/dir/?link=listsid=396545367

 -
 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: Please help: Struts tags don't evaluate any expressions

2007-03-20 Thread irene

Hi Laurie,
It works! i'm not using servlet 2.4 specification.
Now it works (but i have to change the taglib declaration to %@ taglib
uri=http://java.sun.com/jstl/core_rt; prefix=c %)

Thanks a lot, I wanted to avoid the use of scriptlets.



Laurie Harper wrote:
 
 You probably *don't* want the -el taglibs on Tomcat 5. You will need to 
 make sure your web.xml uses the Servlet 2.4 style namespace declaration, 
 though, to get EL working.
 
 For scriptlets, your problem is invalid syntax. An attribute value can 
 be either plain text, or an RT expression. You can't mix the two forms. 
 Try this instead:
 
html:text property=%='num_linea['+i+']% /
 
 But I'd strongly suggest getting EL working and avoiding RT expressions 
 and scriptlets altogether.
 
 L.
 
 Ed Griebel wrote:
 I've done EL expressions like you want to do. Try using the -el
 version of the html tag:
 
 html-el:text property=num_linea[${i}]/
 
 On 3/16/07, irene [EMAIL PROTECTED] wrote:

 Hi,
 I have a problem with Struts tags.
 I can't use any expression (EL, runtime) in the tag attributes :

 html:text property=num_linea[${i}] /

 html:text property=num_linea[%=i%] /

 The result is an error: Invalid argument looking up property:
 num_linea[%=i%]

 I suppose i have something wrong in my webapp configuration...

 I use tomcat 5, struts 1.2.9

 Please help!!!
 -- 
 View this message in context: 
 http://www.nabble.com/Please-help%3A-Struts-tags-don%27t-evaluate-any-expressions-tf3413607.html#a9511739
  

 Sent from the Struts - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/Please-help%3A-Struts-tags-don%27t-evaluate-any-expressions-tf3413607.html#a9571429
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: ldap access

2007-03-20 Thread Dave Newton
--- Philippe Le Gal [EMAIL PROTECTED] wrote:
 I'm looking for an example for implementing a LDAP
 user authentification inside a struts application.
 
 I think I've to test java.naming.ldap classes. Am i
 right ?

Oh, gotcha. IIRC it's javax.naming.ldap but anything I
know about it is about a year old.

http://java.sun.com/products/jndi/tutorial/ldap/index.html
was one of the references I used. Unfortunately I do
not have my sample code available to me at the moment
:/

Dave



 

Now that's room service!  Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097

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



RE: ldap access

2007-03-20 Thread Wesley Wannemacher
 
 --- Philippe Le Gal [EMAIL PROTECTED] wrote:
  I'm looking for an example for implementing a LDAP
  user authentification inside a struts application.
  
  I think I've to test java.naming.ldap classes. Am i
  right ?
 
 Oh, gotcha. IIRC it's javax.naming.ldap but anything I
 know about it is about a year old.
 
 http://java.sun.com/products/jndi/tutorial/ldap/index.html
 was one of the references I used. Unfortunately I do
 not have my sample code available to me at the moment
 :/
 
 Dave
 

I wonder if the OP has considered the container managed security? For
Tomcat, using LDAP for authentication/authorization is quite easy - 

http://tomcat.apache.org/tomcat-5.5-doc/realm-howto.html#JNDIRealm

It might save some coding time if you can fit your problem into this
solution.

-Wes


smime.p7s
Description: S/MIME cryptographic signature


Re: A suggestion for struts.xml!

2007-03-20 Thread Harring Figueiredo

Even though I would like to have something like this for CLASSPATH in say,
ant scripts,  I would not want something like this in configuration file for
2 reasons:

- Sercuty issues

- When it comes to error messages, struts does not really provide good
messages (I take that this is because the XML parser errors is not filtered
and interpreted ). I would hate to have a member of the development team
drop a .xml file in the config dir and break the deployment for no aparent
reason.

Harring

On 3/20/07, joey [EMAIL PROTECTED] wrote:


  I think if struts.xml 's element 'include' support wildcard,it will be
better.
For example  I have ten file to be included in struts.xml,now I have to
write
include file=/config/struts-xxx.xml  / ten times.But if it has
supported
wildcard,
I would only need write once like this include file=/config/*.xml /.
  is it possible to support wildcard next version?I think I can deploy my
struts application
easier if so.





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided.


Re: [BEER] Ruby Roundup (was Is there a mailing list for S2 only?)

2007-03-20 Thread Greg Reddin

On 3/19/07, James Mitchell [EMAIL PROTECTED] wrote:


If I continue to think in Java, my ruby code will look (structurally)
like Java.  That's actually a natural progression that people will
make as they learn to think in Ruby.



Maybe that's why I haven't fallen in love with Ruby yet.  I haven't spent
enough time with it to start thinking in Ruby.

Sorry, I'm not trying to push Ruby on you guys, I just want to be

honest about my experience.



Anybody who thinks they'll be using the current technology for the rest of
their career is (one way or another) pretty close to the end of their career
:-)

Greg


CompositeActionMapper

2007-03-20 Thread Deryl Seale
I am having some trouble getting the CompositeActionMapper to work  
properly.  I have the following specified in my struts.properties:


struts.mapper.class=org.apache.struts2.dispatcher.mapper.CompositeAction 
Mapper
struts.mapper.composite=org.apache.struts2.dispatcher.mapper.DefaultActi 
onMapper,org.apache.struts2.dispatcher.mapper.RestfulActionMapperorg.apa 
che.struts2.dispatcher.mapper.Restful2ActionMapper


I have verified that my application is using the  
CompositeActionMapper, but I always get a 404 error when trying any  
URL for my application.  After some digging, I have traced the issue  
to the setActionMappings method in CompositeActionMapper:


@Inject(StrutsConstants.STRUTS_MAPPER_COMPOSITE)
public void setActionMappers(String list) {
if (list != null) {
String[] arr = list.split(,);
for (String name : arr) {
Object obj = container.getInstance 
(ActionMapper.class, name);

if (obj != null) {
actionMappers.add((ActionMapper) obj);
}
}
}
}

I verified that the list of mappers I want to use is being passed in  
to this method correctly.  When it invokes the container.getIntance()  
method, however, the result is always null.  Thus, the actionMappers  
list in CompositeActionMapper is always empty, and every request gets  
a null value, and hence a 404 error.


My question is: am I missing some step in the configuration?  Is  
there a reason why CompositeActionMapper can't get references to the  
ActionMappers I specify?


thanks!
--Deryl





Re: [BEER] Ruby Roundup (was Is there a mailing list for S2 only?)

2007-03-20 Thread stanlick

Very well stated Greg!  What if our physician continued to practice medicine
using the techniques of the past.  I would imagine everyone here would be in
search of a new Dr.  I don't like to jettison acquired knowledge any more
than the next person.  However, to remain viable in this industry, I have no
choice in the matter.  Sure, there will always be those who claim they can
ride the old stuff to retirement -- hence the end of their career.

P.S. I received my Pocket PC last night via FedEx.  I'm clearly glad the IT
developers who wrote this kick butt code are striving to remain current.
Now if I can just figure out how to place a call with it!

Scott

On 3/20/07, Greg Reddin [EMAIL PROTECTED] wrote:


On 3/19/07, James Mitchell [EMAIL PROTECTED] wrote:

 If I continue to think in Java, my ruby code will look (structurally)
 like Java.  That's actually a natural progression that people will
 make as they learn to think in Ruby.


Maybe that's why I haven't fallen in love with Ruby yet.  I haven't spent
enough time with it to start thinking in Ruby.

Sorry, I'm not trying to push Ruby on you guys, I just want to be
 honest about my experience.


Anybody who thinks they'll be using the current technology for the rest of
their career is (one way or another) pretty close to the end of their
career
:-)

Greg





--
Scott
[EMAIL PROTECTED]


s:checkboxlist

2007-03-20 Thread Hartrich, James CTR USTRANSCOM J6
Is there a way to pre-check boxes that meet criteria?  I have 2 lists,
listA is for all the checkboxes and listB is for checkboxes that will be
pre-checked.

s:checkboxlist label=Registration list=#allreglist.regList 
listKey=regId listValue=regNm 
name=reg.registrationList
/s:checkboxlist

This displays a checkbox list fine for insert. How do I get the
pre-selected boxes for an update?

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



Re: [BEER] Ruby Roundup (was Is there a mailing list for S2 only?)

2007-03-20 Thread Dave Newton
--- [EMAIL PROTECTED] wrote:
 What if our physician continued to practice medicine
 using the techniques of the past.

You mean like using leeches and maggots to speed the
healing process?

Oh, wait, they're doing that again. Dammit.

d.



 

TV dinner still cooling? 
Check out Tonight's Picks on Yahoo! TV.
http://tv.yahoo.com/

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



Re: [BEER] Ruby Roundup (was Is there a mailing list for S2 only?)

2007-03-20 Thread stanlick

Actually, I was thinking more in terms of nuclear medicine.


P.S. - My sledge hammer still works fine for splitting wood too.

On 3/20/07, Dave Newton [EMAIL PROTECTED] wrote:


--- [EMAIL PROTECTED] wrote:
 What if our physician continued to practice medicine
 using the techniques of the past.

You mean like using leeches and maggots to speed the
healing process?

Oh, wait, they're doing that again. Dammit.

d.






TV dinner still cooling?
Check out Tonight's Picks on Yahoo! TV.
http://tv.yahoo.com/

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





--
Scott
[EMAIL PROTECTED]


Re: CompositeActionMapper

2007-03-20 Thread Deryl Seale
Yes, I tried that, and all I got was an exception when I started up  
the application saying that an ActionMapper with the name struts  
had already been loaded, presumedly from struts-default.xml.  If  
there is a way to make Struts use CompositeActionMapper with some  
configuration entry in struts.xml, it is not obvious to me how to do  
it (in spite of the documentation).


--Deryl

On Mar 20, 2007, at 10:26 AM, Dave Newton wrote:


--- Deryl Seale [EMAIL PROTECTED] wrote:

I am having some trouble getting the
CompositeActionMapper to work
properly.  I have the following specified in my
struts.properties:
[...]


Have you tried it like this in struts.xml?

bean
type=org.apache.struts2.dispatcher.mapper.ActionMapper

  name=struts

class=org.apache.struts2.dispatcher.mapper.CompositeActionMapper
/
constant name=struts.mapper.composite

value=org.apache.struts2.dispatcher.mapper.DefaultActionMapper,foo.ba 
r.MyActionMapper,foo.bar.MyAnotherActionMapper

/

(I haven't; this is what's in the API docs, though,
and I tend to avoid the properties file.)

d.




__ 
__

No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail

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



--
Deryl Seale -- Director of Engineering
c: 734.883.9636
[EMAIL PROTECTED]
www.intel-assess.com





Re: CompositeActionMapper

2007-03-20 Thread Dave Newton
--- Deryl Seale [EMAIL PROTECTED] wrote:
 I am having some trouble getting the
 CompositeActionMapper to work  
 properly.  I have the following specified in my
 struts.properties:
 [...]

Have you tried it like this in struts.xml?

bean
type=org.apache.struts2.dispatcher.mapper.ActionMapper

  name=struts 
 
class=org.apache.struts2.dispatcher.mapper.CompositeActionMapper
/
constant name=struts.mapper.composite
 
value=org.apache.struts2.dispatcher.mapper.DefaultActionMapper,foo.bar.MyActionMapper,foo.bar.MyAnotherActionMapper
/

(I haven't; this is what's in the API docs, though,
and I tend to avoid the properties file.)

d.



 

No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail 

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



Re: s:checkboxlist

2007-03-20 Thread Dave Newton
--- Hartrich, James CTR USTRANSCOM J6 wrote:
 Is there a way to pre-check boxes that meet
 criteria?  I have 2 lists, listA is for all the 
 checkboxes and listB is for checkboxes that will be
 pre-checked.

In my app I currently have:

s:checkboxlist list=tags 
name=tagids 
listKey=id
listValue=name/

In the action, the tags property is the list of all
possible tags. tagids holds the selected tags. In my
preparation I add every selected option from tags
into tagids; s:checkboxlist.../ does the rest.

HTH,
d.



 

Finding fabulous fares is fun.  
Let Yahoo! FareChase search your favorite travel sites to find flight and hotel 
bargains.
http://farechase.yahoo.com/promo-generic-14795097

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



Re: [BEER] Ruby Roundup (was Is there a mailing list for S2 only?)

2007-03-20 Thread Leon Rosenberg

I hope you understand that your argument beats your own
argumentation... I mean RoR... hmm integrated full stack scripting
language which lacks everything a good language needs... sounds
familiar... VBA? PHP?

I thought we were moving from scripting and hacking into software
engineering... apparently not all of us.

Leon

On 3/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

Actually, I was thinking more in terms of nuclear medicine.


P.S. - My sledge hammer still works fine for splitting wood too.

On 3/20/07, Dave Newton [EMAIL PROTECTED] wrote:

 --- [EMAIL PROTECTED] wrote:
  What if our physician continued to practice medicine
  using the techniques of the past.

 You mean like using leeches and maggots to speed the
 healing process?

 Oh, wait, they're doing that again. Dammit.

 d.





 

 TV dinner still cooling?
 Check out Tonight's Picks on Yahoo! TV.
 http://tv.yahoo.com/

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




--
Scott
[EMAIL PROTECTED]



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



Migrating to Struts2 from existing Struts1 Tiles1 application

2007-03-20 Thread Avinash Wable
Hi,

 

I would like to hear some advices about migrating to Struts 2.

 

1.  We have developed a website using Struts 1 with Tiles 1.

Now as Struts 2 and Tiles 2 is available how much is it feasible to migrate
to Struts 2 Tiles 2?

Before that I want to know whether I can use Struts 2 with Tiles 1, if yes
how?

 

2.  Also I have configured Struts2 in my application with Struts1
plug-in so that current application works fine with .do extension. And I can
easily use .action to distinguish Struts 2 actions.

 

3.  But now I want to know how it works with tiles. 

a.  I am using Tiles1
b.  Now how can I use these tiles in my new JSPs those are using Struts2
tags and actions?
c.  I mean how it (Struts2) will find tiles-config (initialized by
Struts1 as request was initialized from some Struts1 page) at runtime?

 

Any help in this regard will be a great help

 

Thanks and Regards

Avinash Wable


DISCLAIMER
==
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Pvt. Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Pvt. Ltd. does not accept any liability for virus infected mails.


Re: TAbbedPanel and CSS

2007-03-20 Thread Felipe Rodrigues

Hi,

I'm still having problems to take the templates images out of .jar.

I'm trying to take the images that compose the Tab in a TabbedPanel, and
thus, use my own images with my own colors. I got this replacing the images
inside the .jar, but it is not a good approach.

I got use my own css using templateCssPath, but I changed the url for get
images from /MyCTX/images/core/tab
Does anyone have any example about how take the images out of .jar?

The weird thing is that it was supposed to be a simple thing, isn't it?

regards...

Felipe Rodrigues


Musachy Barroso wrote:
 
 Look at TabContainer.html here:
 
 http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/
 
 which is the template used by Dojo to build the widget.
 
 regards
 musachy
 
 On 3/16/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:


 But what exactly are the css's that I have to override?

 I mean, what properties does TabbedPanel allow to set from css?
 Is there any place to find it out?
 I'm asking this because I didn't found any place at
 TabConteiner.csssetting
 up the font of a Tab.

 Another question would be, where does dojo set the css classes for this
 file? Is that important to know or I just have to create a new css file
 with
 the same properties and my own values?


 Felipe



 Nate Drake wrote:
 
  Awesome!  I didn't realize that.  Thanks.
 
  Musachy Barroso musachy at gmail.com writes:
 
 
  You can use the templateCssPath property to point to your css.
 
  musachy
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/TAbbedPanel-and-CSS-tf3416215.html#a9522435
 Sent from the Struts - User mailing list archive at Nabble.com.


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


 
 
 -- 
 Hey you! Would you help me to carry the stone? Pink Floyd
 
 

-- 
View this message in context: 
http://www.nabble.com/TAbbedPanel-and-CSS-tf3416215.html#a9574285
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: TAbbedPanel and CSS

2007-03-20 Thread Musachy Barroso

Do you mean to extract the images or reference the images inside the jar?
Once you are using your css, you can use your own images like you usually do
(from a  subdir of your webroot for example)

musachy

On 3/20/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:



Hi,

I'm still having problems to take the templates images out of .jar.

I'm trying to take the images that compose the Tab in a TabbedPanel, and
thus, use my own images with my own colors. I got this replacing the
images
inside the .jar, but it is not a good approach.

I got use my own css using templateCssPath, but I changed the url for get
images from /MyCTX/images/core/tab
Does anyone have any example about how take the images out of .jar?

The weird thing is that it was supposed to be a simple thing, isn't it?

regards...

Felipe Rodrigues


Musachy Barroso wrote:

 Look at TabContainer.html here:


http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/

 which is the template used by Dojo to build the widget.

 regards
 musachy

 On 3/16/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:


 But what exactly are the css's that I have to override?

 I mean, what properties does TabbedPanel allow to set from css?
 Is there any place to find it out?
 I'm asking this because I didn't found any place at
 TabConteiner.csssetting
 up the font of a Tab.

 Another question would be, where does dojo set the css classes for this
 file? Is that important to know or I just have to create a new css file
 with
 the same properties and my own values?


 Felipe



 Nate Drake wrote:
 
  Awesome!  I didn't realize that.  Thanks.
 
  Musachy Barroso musachy at gmail.com writes:
 
 
  You can use the templateCssPath property to point to your css.
 
  musachy
 
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/TAbbedPanel-and-CSS-tf3416215.html#a9522435
 Sent from the Struts - User mailing list archive at Nabble.com.


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




 --
 Hey you! Would you help me to carry the stone? Pink Floyd



--
View this message in context:
http://www.nabble.com/TAbbedPanel-and-CSS-tf3416215.html#a9574285
Sent from the Struts - User mailing list archive at Nabble.com.


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





--
Hey you! Would you help me to carry the stone? Pink Floyd


Re: [BEER] Ruby Roundup (was Is there a mailing list for S2 only?)

2007-03-20 Thread Dave Newton
--- Leon Rosenberg wrote:
 [...] integrated full stack scripting language which

 lacks everything a good language needs... 

Hey, maybe we should have yet another what is a
scripting language or, better yet, static vs.
dynamic vs. strong vs. weak typing argument.

Nah; I've got LtU for that. All I know is that I can
write correct, functional applications in whatever
paradigm I want to, and my favorite (and most
productive) environments are Smalltalk, Ruby, and
Lisp.

d.



 

Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html

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



Re: Migrating to Struts2 from existing Struts1 Tiles1 application

2007-03-20 Thread Dave Newton
--- Avinash Wable wrote:
 I would like to hear some advices about migrating to
 Struts 2.

Step 1: Determine if you have an actual need to
migrate to Struts 2.

 Before that I want to know whether I can use Struts
 2 with Tiles 1, if yes how?

I don't know if you even can, but I'm not sure why
you'd want to if you could; AFAIK the plugin is for
Tiles2.

 2. Also I have configured Struts2 in my application
 with Struts1 plug-in so that current application 
 works fine with .do extension. And I can easily use 
 .action to distinguish Struts 2 actions.

If you want to run them in *parallel* that's a
different story.

 b.Now how can I use these tiles in my new JSPs
 those are using Struts2 tags and actions?

The Tiles 1/2 DTDs are different; this will probably
be an issue.

d.



 

We won't tell. Get more on shows you hate to love 
(and love to hate): Yahoo! TV's Guilty Pleasures list.
http://tv.yahoo.com/collections/265 

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



[JAVA] suing synchronized block

2007-03-20 Thread temp temp
I  using synchronized block  and need help in using it ?
   
  I have a SingleTon class which has a global valriable Map.
  I will  updating this Map  at runtime.
   
  Example
  synchronized (fActionHandlers) {
  fActionHandlers.put(
  vAction.getClassName(),  
  vConfigAction);
  }
  I want this  update to be synchronized . The above code is this right  ?
  My  assumption about this is JVM will allow only one thread at a time 
to execute  the code in the synchronized block  is  this right ?
  Thanks  Regards
 

 
-
It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.

Re: [BEER] Ruby Roundup (was Is there a mailing list for S2 only?)

2007-03-20 Thread Larry Meadors

Forget Ruby, use SQL On Rails.

http://www2.sqlonrails.org/

Larry

On 3/20/07, Dave Newton [EMAIL PROTECTED] wrote:

--- Leon Rosenberg wrote:
 [...] integrated full stack scripting language which

 lacks everything a good language needs...

Hey, maybe we should have yet another what is a
scripting language or, better yet, static vs.
dynamic vs. strong vs. weak typing argument.

Nah; I've got LtU for that. All I know is that I can
write correct, functional applications in whatever
paradigm I want to, and my favorite (and most
productive) environments are Smalltalk, Ruby, and
Lisp.

d.





Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html

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



[OT] Re: [JAVA] suing synchronized block

2007-03-20 Thread Dave Newton
--- temp temp [EMAIL PROTECTED] wrote:
 I using synchronized block  and need help in using
it

http://www.google.com/search?q=java+%2Bsynchronized+%2Bblock

d.



 

Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121

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



Re: [OT][JAVA] suing synchronized block

2007-03-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To whom it may concern,

Please note that this is a mailing list for users of the Struts web
application framework. Your question is more appropriate elsewhere.

That being said, we tend to know a lot about Java...

temp temp wrote:
 I am using a synchronized block and need help using it.
 
 I have a singleton class which has a global variable Map. I will
 updating this Map at runtime.

I assume that you mean that you have a singleton which contains a map.
The map itself is not global... the fact that the class is a singleton
allows you to treat it as if it is a global variable.

   Example
   synchronized (fActionHandlers) {
   fActionHandlers.put(
   vAction.getClassName(),  
   vConfigAction);
   }

 I want this update to be synchronized. The above code is this right?

That depends. Is fActionHandlers the map you want to protect? If so,
then your code is correct. Another option is to use a Map that is
already synchronized (such as a Hashtable) or add synchronization to
your Map using java.util.Collections.synchronizedMap.

 My assumption about this is JVM will allow only one thread at a time
 to execute the code in the synchronized block is this right ?

The JVM will only allow one thread to execute that code /for the object
used as the monitor/ -- that is, as long as fActionHandlers is always
a reference to the the same object.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGAAi69CaO5/Lv0PARAhoiAKCKqA1tI9lAjaDHnIlNy6M5wSbakgCgwFRB
46yOi9fT3L0/jaN1Sn79UM0=
=huj5
-END PGP SIGNATURE-

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



Re: [BEER] Ruby Roundup (was Is there a mailing list for S2 only?)

2007-03-20 Thread Leon Rosenberg

ROFL!
That was great!
And the sad thing of all this RoR hype, I actually believed it wasn't
a joke. First 10 seconds :)

Great link Larry!
Thanx
Leon

On 3/20/07, Larry Meadors [EMAIL PROTECTED] wrote:

Forget Ruby, use SQL On Rails.

http://www2.sqlonrails.org/

Larry

On 3/20/07, Dave Newton [EMAIL PROTECTED] wrote:
 --- Leon Rosenberg wrote:
  [...] integrated full stack scripting language which

  lacks everything a good language needs...

 Hey, maybe we should have yet another what is a
 scripting language or, better yet, static vs.
 dynamic vs. strong vs. weak typing argument.

 Nah; I've got LtU for that. All I know is that I can
 write correct, functional applications in whatever
 paradigm I want to, and my favorite (and most
 productive) environments are Smalltalk, Ruby, and
 Lisp.

 d.




 

 Sucker-punch spam with award-winning protection.
 Try the free Yahoo! Mail Beta.
 http://advision.webevents.yahoo.com/mailbeta/features_spam.html

 -
 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: TAbbedPanel and CSS

2007-03-20 Thread Felipe Rodrigues

The problem is, even using the css pointing to my own images, dojo still keep
getting the images from inside the jar.

Here is a piece of my .css . The url is correct and the tab should be green.
(I changed the images to green)
But when I test the app, the Tab is still blue. I also deleted the images
from inside the jar, and now, I don't see any images.

.dojoTab div {
display : block;
padding : 4px 15px 4px 6px;
background : url(/core/images/tab_top_right.gif) no-repeat right top;
color : #333;
font-size : 85%;
font-family: tahoma, verdana, sans-serif;
}

I agree, should work just like you said, but it is not.
Any idea?


Musachy Barroso wrote:
 
 Do you mean to extract the images or reference the images inside the jar?
 Once you are using your css, you can use your own images like you usually
 do
 (from a  subdir of your webroot for example)
 
 musachy
 
 On 3/20/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:


 Hi,

 I'm still having problems to take the templates images out of .jar.

 I'm trying to take the images that compose the Tab in a TabbedPanel, and
 thus, use my own images with my own colors. I got this replacing the
 images
 inside the .jar, but it is not a good approach.

 I got use my own css using templateCssPath, but I changed the url for get
 images from /MyCTX/images/core/tab
 Does anyone have any example about how take the images out of .jar?

 The weird thing is that it was supposed to be a simple thing, isn't it?

 regards...

 Felipe Rodrigues


 Musachy Barroso wrote:
 
  Look at TabContainer.html here:
 
 
 http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/
 
  which is the template used by Dojo to build the widget.
 
  regards
  musachy
 
  On 3/16/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:
 
 
  But what exactly are the css's that I have to override?
 
  I mean, what properties does TabbedPanel allow to set from css?
  Is there any place to find it out?
  I'm asking this because I didn't found any place at
  TabConteiner.csssetting
  up the font of a Tab.
 
  Another question would be, where does dojo set the css classes for
 this
  file? Is that important to know or I just have to create a new css
 file
  with
  the same properties and my own values?
 
 
  Felipe
 
 
 
  Nate Drake wrote:
  
   Awesome!  I didn't realize that.  Thanks.
  
   Musachy Barroso musachy at gmail.com writes:
  
  
   You can use the templateCssPath property to point to your css.
  
   musachy
  
  
  
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
  --
  View this message in context:
  http://www.nabble.com/TAbbedPanel-and-CSS-tf3416215.html#a9522435
  Sent from the Struts - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  --
  Hey you! Would you help me to carry the stone? Pink Floyd
 
 

 --
 View this message in context:
 http://www.nabble.com/TAbbedPanel-and-CSS-tf3416215.html#a9574285
 Sent from the Struts - User mailing list archive at Nabble.com.


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


 
 
 -- 
 Hey you! Would you help me to carry the stone? Pink Floyd
 
 

-- 
View this message in context: 
http://www.nabble.com/TAbbedPanel-and-CSS-tf3416215.html#a9575709
Sent from the Struts - User mailing list archive at Nabble.com.


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



Re: [BEER] Ruby Roundup (was Is there a mailing list for S2 only?)

2007-03-20 Thread Ted Husted

Should have saved that one for April 1 :)

On 3/20/07, Larry Meadors [EMAIL PROTECTED] wrote:

Forget Ruby, use SQL On Rails.

http://www2.sqlonrails.org/

Larry


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



adding parameters at runtime to actionforward which uses tiles

2007-03-20 Thread temp temp
I am using  tiles definitions in my actionforward  
   
   action path=/action/manage/entity/viewEntity
  type=com.reisys.fema.ognt.web.action.manage.entity.ViewEntityAction
  forward name=success  path=forward.view.entity/
  /action
   
   
  definition name=forward.view.entity  extends=ogntlayout
  put name=body  value=/jsp/manage/entity/adminViewEntity.jsp  /
  /definition
  Is there a  way I can add parameters to an actionforward which uses tiles 
definition ?
  If its not  tiles I can append to actionForward.getActionPath()  what in 
case of tiles , how can I append parameters   at runtime ?
  Thanks  Regards
  
  

 
-
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.

Re: [OT][JAVA] suing synchronized block

2007-03-20 Thread Romu

http://www-128.ibm.com/developerworks/library/j-dcl.html


if u use jdk1.5 , it's the second time i read that volatile is a good
solution .





2007/3/20, Christopher Schultz [EMAIL PROTECTED]:


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

To whom it may concern,

Please note that this is a mailing list for users of the Struts web
application framework. Your question is more appropriate elsewhere.

That being said, we tend to know a lot about Java...

temp temp wrote:
 I am using a synchronized block and need help using it.

 I have a singleton class which has a global variable Map. I will
 updating this Map at runtime.

I assume that you mean that you have a singleton which contains a map.
The map itself is not global... the fact that the class is a singleton
allows you to treat it as if it is a global variable.

   Example
   synchronized (fActionHandlers) {
   fActionHandlers.put(
   vAction.getClassName(),
   vConfigAction);
   }

 I want this update to be synchronized. The above code is this right?

That depends. Is fActionHandlers the map you want to protect? If so,
then your code is correct. Another option is to use a Map that is
already synchronized (such as a Hashtable) or add synchronization to
your Map using java.util.Collections.synchronizedMap.

 My assumption about this is JVM will allow only one thread at a time
 to execute the code in the synchronized block is this right ?

The JVM will only allow one thread to execute that code /for the object
used as the monitor/ -- that is, as long as fActionHandlers is always
a reference to the the same object.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGAAi69CaO5/Lv0PARAhoiAKCKqA1tI9lAjaDHnIlNy6M5wSbakgCgwFRB
46yOi9fT3L0/jaN1Sn79UM0=
=huj5
-END PGP SIGNATURE-

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




Re: [OT][JAVA] suing synchronized block

2007-03-20 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Romu,

Romu wrote:
 http://www-128.ibm.com/developerworks/library/j-dcl.html
 
 if u use jdk1.5 , it's the second time i read that volatile is a good
 solution .

A few notes:

1. volatile has been available since the beginning. JDK 1.5 is not
   required.
2. volatile only refers to a particular variable, not an object.
   In this case, the object /reference/ will be 'volatile', and
   therefore will not be stored in the thread's local cache.
3. Since we're talking about a singleton, the reference's value should
   never change across the life of the application (assuming that the
   singleton has been correctly implemented)

Using volatile in this case will not add anything at all.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGABo39CaO5/Lv0PARAprgAJ446cu5g+9seW4y+gYJRVw6is4OhQCbBaRB
r/Ws4nPdmjNcYmLvk4Vq4f8=
=vaIY
-END PGP SIGNATURE-

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



Re: [s2] Confused about s:tree

2007-03-20 Thread Brian Thompson

Hey Dave,

That helps a lot, thanks!

Do you know if the childCollectionProperty has to be a Set, or can it be
anything that implements the Collection interface?  Also, is there any way
to force childCollectionProperty to look in the action class containing the
rootNode object, or does the set of children *have* to be a property of the
rootNode object?

-Brian



On 3/19/07, Dave Newton [EMAIL PROTECTED] wrote:


--- Brian Thompson [EMAIL PROTECTED] wrote:
 [... s:tree.../ issues]

s:tree theme=ajax
  rootNode=%{rootNode}
  childCollectionProperty=children
  nodeIdProperty=id
  nodeTitleProperty=name
  treeSelectedTopic=treeSelected
  toggle=explode
  toggleDuration=0
  cssClass=bptree
  id=bptree
/s:tree

In my case, rootNode is a Hibernate POJO that has a
set name=children.../ mapping element with each
element being the same type as the rootNode.

So the pseudo-class for rootNode is:

public class MyPojo {
// s:tree.../ nodeIdProperty attribute
@property Long id;

// s:tree.../ nodeTitleProperty attribute
@property String name;

// s:tree.../ childCollectionProperty attribute
@property SetMyPojo children;
}

Does that help?

d.



Re: [s2] Confused about s:tree

2007-03-20 Thread Brian Thompson

Hey Martin,

I was looking at the Action class you quoted as I was writing the original
email in this thread.  I saw that the example wanted a Category object for
the tree, but I wasn't sure what that Category class was supposed to look
like.

Thanks, though.

-Brian


On 3/19/07, Martin Gainty [EMAIL PROTECTED] wrote:


Brian

Looking at
public class DynamicTreeSelectAction extends ActionSupport
which acquires the 
org.apache.struts.action2.showcase.ajax.tree.Categorycategory by nodeID as in
private Category currentCategory;
when the Action class acquires the Category by nodeID
e.g.
public String execute() throws Exception {
currentCategory = Category.getById(nodeId);
return SUCCESS;
}
Does this answer your question?

M--



Re: [s2] Confused about s:tree

2007-03-20 Thread Dave Newton
--- Brian Thompson wrote:
 Do you know if the childCollectionProperty has to be
 a Set, or can it be anything that implements the 
 Collection interface? 

That I don't know (and I don't have the source in
front of me) but I would hope any Collection would
work...

Famous last words ;)

 Also, is there any way to force
childCollectionProperty 
 to look in the action class containing the rootNode
object, 
 or does the set of children *have* to be a property
of the
 rootNode object?

That I also don't know, so I wonder why I'm replying
to this at all! I would have assumed that children
needed to belong to the root node, since that's kind
of the definition of a tree.

d.



 

Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html 

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



RE: DownloadAction IE problem on Open

2007-03-20 Thread Scott Smith
I finally was able to google the problem on a PHP board.  Apparently,
it's a cache issue with IE6.  You can work around it by adding the
following lines to your download code.

res.setHeader(Cache-Control, private);
res.setHeader(Expires, 0);
res.setHeader(Pragma, cache);

res is the HttpServletResponse object

-Original Message-
From: Scott Smith [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 19, 2007 3:40 PM
To: Struts Users Mailing List
Subject: RE: DownloadAction IE problem on Open

This happens the first time I attempt to download the file.  I also have
tried it on IE7 and Firefox and it works fine on both those browsers.
Only IE6 has a problem (don't have a IE5 or IE5.5 to try).  I also
looked in the cache (since the full path is in notepad) and there is
nothing there under file[1].txt or file.txt.

-Original Message-
From: Bindul Bhowmik [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 19, 2007 3:23 PM
To: Struts Users Mailing List
Subject: Re: DownloadAction IE problem on Open

Hello Scott,

On 3/19/07, Scott Smith [EMAIL PROTECTED] wrote:
 I've implemented a file download using the Struts 1.2.9 version of
 org.apache.struts.actions.DownloadAction.  When the user hits the
 download button, he or she gets the save/open/cancel dialog with the
 correct filename.  In Firefox, hitting save or open does exactly
 what I expect (i.e., I can save the file or open it in notepad).  On
IE,
 save works as expected.



 However, in IE6, if I hit Open, it opens notepad with a filename
that
 looks like file[1].txt (note the [1] which doesn't exist in the
 original filename and then it asks if I want to create a new file
since
 it appears the file didn't get downloaded.  Has anyone else seen this
 and found a solution?


This is not a IE bug, you can recreate the same easily using Firefox.
When you select 'open' in browsers, the file is actually downloaded to
your Temporary folder and opened. If a file with the same name exists
in the temporary folder, the browsers modify the file name to
differentiate it from the previous one. Usually if the file is named
'file.txt' subsequent download actions on Firefox would create
'file-1.txt', 'file-2.txt', and so on. On IE the series goes like
'file[1].txt', 'file[2].txt'.



 Scott







HTH
Bindul

-- 
Bindul Bhowmik
MindTree Consulting Ltd.

-
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: [BEER] Ruby Roundup (was Is there a mailing list for S2 only?)

2007-03-20 Thread Harring Figueiredo

If you need the following on your project:

1) SOP (Service Oriented Programming)
2) SaaS (Software as a Service)
3) IoC pattern
4) and XML coding with logic

I would not recommend http://www2.sqlonrails.org/ yet,  UNLESS you are
willing to wait for the next version as they claim all of these and more
will be available.

hf

On 3/20/07, Ted Husted [EMAIL PROTECTED] wrote:


Should have saved that one for April 1 :)

On 3/20/07, Larry Meadors [EMAIL PROTECTED] wrote:
 Forget Ruby, use SQL On Rails.

 http://www2.sqlonrails.org/

 Larry

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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided.


Re: [BEER] Ruby Roundup (was Is there a mailing list for S2 only?)

2007-03-20 Thread Dave Newton
--- Harring Figueiredo [EMAIL PROTECTED] wrote:
 3) IoC pattern

Wait, I thought SQL injection was commonplace.

d.



 

The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php

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



Re: Forward a action from one action programmatically in STruts 2.0

2007-03-20 Thread Rene Gielen
Maybe this is the option you are searching for:

struts.xml:
---
action name=action1 class=acme.Action1
  result${targetUrl}/result
/action

in your acme.Action1 class:
---
String targetUrl;

public String getTargetUrl() {
return this.targetUrl;
}

public String execute() {
if (...) {
this,targetUrl = 1.jsp;
} else ...
}
}

Regards,
- Rene

arunkumar S schrieb:
 Hi,
 
 
 
 Thanks for the inputs. my req. will not satisfy your suggestion.
 
 
 
 My req. is I have to load different Jsps depending on the user
 profile. eg http://profile.eg/. for user with profile = abc,
 
 i will have JSps like 1_abc.jsp,2_abc.jsp,3_abc.jsp
 
 for user with profile = def , i will have jsps like 1_def.jsp,2_def.jsp
 etc..
 
 
 
 
 
 
 
 one way of solving this is to mention all the Jsp for users with
 different profile in the results and then forward
 
 it in the action itself.
 
 
 
 like
 
 
 
 
 
 action name=action1 class = action1
 
  result1_abc.jsp/result
 
  result1_def.jsp/result
 
 /action
 
 
 
 
 
 action name=action2 class = action2
 
  result2_abc.jsp/result
 
  result2_def.jsp/result
 
 /action
 
 
 
 return corresponding result in each action based on the users profile.
 
 
 
 but the pblm here for each action the application developer has to
 define results for each user.
 
 I am thinking of moving this to framework.
 
 
 
 Below is the new approach.
 
 
 
 
 
 
 
 action name=action1 class = action1
 
  result1.jsp/result
 
 /action
 
 
 
 
 
 action name=action2 class = action2
 
  result2.jsp/result
 
 /action
 
 
 
 action name= *
 
 result/{1}.jsp/result
 
 /action
 
 
 
 
 
 Now , in an action1.class  action2.class depending on the user
 profile i construt 1_abc.action or
 
 1_def.action and 2_abc.action or 2_def.action respectively . and if
 i can forward with 1_abc.action the below
 
 definition present in the STruts.xml will take care of forwarding it
 to 1_abc.jsp /1_def.jsp  depending on the user automatically.
 
 
 
 action name= *
 
 result/{1}.jsp/result
 
 /action
 
 
 
 FOr this i need to programmatically forward to an action so that i can
 leverage the above mentioned facility.
 
 
 
 I hope i have made things clear.Let me know if have any suggestions.
 
 
 
 
 
 
 
 
 
 Regards,
 
 Arun.
 
 
 
 
 
 The way I solve this is by returning the value you want and setting up the
 action chain on struts.xml file:
 
 Example:
 
   class MyAction 1 .. {
 
   public String execute(){
 if(foo)
 return foo;
 else
 return bar;
  }
 
 Then on the Strutus XML file:
 
  action name= MyAction  class. = 
  result name=foo type=chain FooAction/result
  result name=bar type=chain BarAction/result
 ...
 /action
 
 PS. Make sure you use type=chain!
 Hope this helps.
 
 Harring
 On 3/15/07, arunkumar S [EMAIL PROTECTED] wrote:
 
 Hi,
 
 I have a requirement where in the action has to be forwarded based on
 certain runtime conditions.The destination will be decided only on the
 runtime.
 ---
 if(Input = Case1 )
 forward action1
 else
 forward action2.
 ---
 
 Basically i want to acheive a simple forward( requestdispatcher.forward()
 ) in
 ActionClass in Struts 2.0.
 
 How can we acheive this in Struts 2.0. I dont have any API to acheive
 this.
 
 Any inputs pls?
 
 
 Regards,
 Arun
 

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



Re: Forward a action from one action programmatically in STruts 2.0

2007-03-20 Thread arunkumar S

Hi Rene,

It works.Thanks

Regards,
Arun.

Maybe this is the option you are searching for:

struts.xml:
---
action name=action1 class=acme.Action1
 result${targetUrl}/result
/action

in your acme.Action1 class:
---
String targetUrl;

public String getTargetUrl() {
return this.targetUrl;
}

public String execute() {
if (...) {
this,targetUrl = 1.jsp;
} else ...
}
}

Regards,
- Rene

arunkumar S schrieb:

Hi,



Thanks for the inputs. my req. will not satisfy your suggestion.



My req. is I have to load different Jsps depending on the user
profile. eg http://profile.eg/. for user with profile = abc,

i will have JSps like 1_abc.jsp,2_abc.jsp,3_abc.jsp

for user with profile = def , i will have jsps like 1_def.jsp,2_def.jsp
etc..







one way of solving this is to mention all the Jsp for users with
different profile in the results and then forward

it in the action itself.



like





action name=action1 class = action1

 result1_abc.jsp/result

 result1_def.jsp/result

/action





action name=action2 class = action2

 result2_abc.jsp/result

 result2_def.jsp/result

/action



return corresponding result in each action based on the users profile.



but the pblm here for each action the application developer has to
define results for each user.

I am thinking of moving this to framework.



Below is the new approach.







action name=action1 class = action1

 result1.jsp/result

/action





action name=action2 class = action2

 result2.jsp/result

/action



action name= *

result/{1}.jsp/result

/action





Now , in an action1.class  action2.class depending on the user
profile i construt 1_abc.action or

1_def.action and 2_abc.action or 2_def.action respectively . and if
i can forward with 1_abc.action the below

definition present in the STruts.xml will take care of forwarding it
to 1_abc.jsp /1_def.jsp  depending on the user automatically.



action name= *

result/{1}.jsp/result

/action



FOr this i need to programmatically forward to an action so that i can
leverage the above mentioned facility.



I hope i have made things clear.Let me know if have any suggestions.









Regards,

Arun.





The way I solve this is by returning the value you want and setting up the
action chain on struts.xml file:

Example:

  class MyAction 1 .. {

  public String execute(){
if(foo)
return foo;
else
return bar;
 }

Then on the Strutus XML file:

 action name= MyAction  class. = 
 result name=foo type=chain FooAction/result
 result name=bar type=chain BarAction/result
...
/action

PS. Make sure you use type=chain!
Hope this helps.

Harring
On 3/15/07, arunkumar S [EMAIL PROTECTED] wrote:

Hi,

I have a requirement where in the action has to be forwarded based on
certain runtime conditions.The destination will be decided only on the
runtime.
---
if(Input = Case1 )
forward action1
else
forward action2.
---

Basically i want to acheive a simple forward( requestdispatcher.forward()
) in
ActionClass in Struts 2.0.

How can we acheive this in Struts 2.0. I dont have any API to acheive
this.

Any inputs pls?


Regards,
Arun


Re: TAbbedPanel and CSS

2007-03-20 Thread Musachy Barroso

That should be it, I would try with Dojo first (download Dojo distribution),
specify the custom css in one of their examples and make sure that
everything works as expected and then try with S2.

musachy

On 3/20/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:



The problem is, even using the css pointing to my own images, dojo still
keep
getting the images from inside the jar.

Here is a piece of my .css . The url is correct and the tab should be
green.
(I changed the images to green)
But when I test the app, the Tab is still blue. I also deleted the images
from inside the jar, and now, I don't see any images.

.dojoTab div {
display : block;
padding : 4px 15px 4px 6px;
background : url(/core/images/tab_top_right.gif) no-repeat right
top;
color : #333;
font-size : 85%;
font-family: tahoma, verdana, sans-serif;
}

I agree, should work just like you said, but it is not.
Any idea?


Musachy Barroso wrote:

 Do you mean to extract the images or reference the images inside the
jar?
 Once you are using your css, you can use your own images like you
usually
 do
 (from a  subdir of your webroot for example)

 musachy

 On 3/20/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:


 Hi,

 I'm still having problems to take the templates images out of .jar.

 I'm trying to take the images that compose the Tab in a TabbedPanel,
and
 thus, use my own images with my own colors. I got this replacing the
 images
 inside the .jar, but it is not a good approach.

 I got use my own css using templateCssPath, but I changed the url for
get
 images from /MyCTX/images/core/tab
 Does anyone have any example about how take the images out of .jar?

 The weird thing is that it was supposed to be a simple thing, isn't it?

 regards...

 Felipe Rodrigues


 Musachy Barroso wrote:
 
  Look at TabContainer.html here:
 
 

http://svn.apache.org/viewvc/struts/struts2/branches/STRUTS_2_0_X/core/src/main/resources/org/apache/struts2/static/dojo/src/widget/templates/
 
  which is the template used by Dojo to build the widget.
 
  regards
  musachy
 
  On 3/16/07, Felipe Rodrigues [EMAIL PROTECTED] wrote:
 
 
  But what exactly are the css's that I have to override?
 
  I mean, what properties does TabbedPanel allow to set from css?
  Is there any place to find it out?
  I'm asking this because I didn't found any place at
  TabConteiner.csssetting
  up the font of a Tab.
 
  Another question would be, where does dojo set the css classes for
 this
  file? Is that important to know or I just have to create a new css
 file
  with
  the same properties and my own values?
 
 
  Felipe
 
 
 
  Nate Drake wrote:
  
   Awesome!  I didn't realize that.  Thanks.
  
   Musachy Barroso musachy at gmail.com writes:
  
  
   You can use the templateCssPath property to point to your css.
  
   musachy
  
  
  
  
  
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
  --
  View this message in context:
  http://www.nabble.com/TAbbedPanel-and-CSS-tf3416215.html#a9522435
  Sent from the Struts - User mailing list archive at Nabble.com.
 
 
 
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
  --
  Hey you! Would you help me to carry the stone? Pink Floyd
 
 

 --
 View this message in context:
 http://www.nabble.com/TAbbedPanel-and-CSS-tf3416215.html#a9574285
 Sent from the Struts - User mailing list archive at Nabble.com.


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




 --
 Hey you! Would you help me to carry the stone? Pink Floyd



--
View this message in context:
http://www.nabble.com/TAbbedPanel-and-CSS-tf3416215.html#a9575709
Sent from the Struts - User mailing list archive at Nabble.com.


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





--
Hey you! Would you help me to carry the stone? Pink Floyd


Re: [s2] Confused about s:tree

2007-03-20 Thread Musachy Barroso

The tree tag needs more documentation. I have it on my todo list for
2.1(read: Dave could you help on this one on the wiki? :) )

musachy

On 3/20/07, Dave Newton [EMAIL PROTECTED] wrote:


--- Brian Thompson wrote:
 Do you know if the childCollectionProperty has to be
 a Set, or can it be anything that implements the
 Collection interface?

That I don't know (and I don't have the source in
front of me) but I would hope any Collection would
work...

Famous last words ;)

 Also, is there any way to force
childCollectionProperty
 to look in the action class containing the rootNode
object,
 or does the set of children *have* to be a property
of the
 rootNode object?

That I also don't know, so I wonder why I'm replying
to this at all! I would have assumed that children
needed to belong to the root node, since that's kind
of the definition of a tree.

d.






Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html

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





--
Hey you! Would you help me to carry the stone? Pink Floyd


Re: [s2] Confused about s:tree

2007-03-20 Thread Dave Newton
--- Musachy Barroso [EMAIL PROTECTED] wrote:
 The tree tag needs more documentation. I have it on
 my todo list for 2.1(read: Dave could you help on 
 this one on the wiki? :) )

:p

Yep, but it might not happen until the weekend. Busy
little bee this week!

Dave



 

Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

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



Re: s.autocompleter with JSON Plugin

2007-03-20 Thread Piero Sartini
I tried to apply the patch that is in JIRA - but it does not work. I guess it 
is not only the change in the JavaScript but somewhere in the Java classes as 
well.

Is there a prepackaged 2.0.7 somewhere? Or do I have to build it by myself?

Need to present s2 soon and it would be great if I get this to work till then.

Regards,
Piero

Am Samstag, 17. März 2007 schrieb Musachy Barroso:
 This was an issue in 2.0.6 and it is fixed on 2.0.7:

 https://issues.apache.org/struts/browse/WW-1659

 As Dave mentioned in 2.0.6 the autocompleter was expecting an array of
 arrays. Now the autocompleter will use the following logic to determine how
 to load the data:

 1. If the response is an array, use it
 2. If the response is an object, and has a field  that matches the
 dataFieldName attribute in the autocompleter, use it.
 3. If the response is an object, and has a field that starts with the
 name of the autcompleter use it
 4. If a field of type array is found, use it

 so the following cases will work:

 public class MyAction {
private String[][] states;  //data here
 }

 s:autocompleter dataFieldName=states .. // #2
 s:autocompleter name=state ..  //#3
 s:autocompleter ... //#4

 regards
 musachy

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



Re: s.autocompleter with JSON Plugin

2007-03-20 Thread Musachy Barroso

I think the daily builds are for 2.1 only. If you want to build it:

http://struts.apache.org/2.x/docs/building-with-maven.html

The autocompleter tag can be used without the json plugin, check showcase
for examples.

musachy

On 3/20/07, Piero Sartini [EMAIL PROTECTED] wrote:


I tried to apply the patch that is in JIRA - but it does not work. I guess
it
is not only the change in the JavaScript but somewhere in the Java classes
as
well.

Is there a prepackaged 2.0.7 somewhere? Or do I have to build it by
myself?

Need to present s2 soon and it would be great if I get this to work till
then.

Regards,
Piero

Am Samstag, 17. März 2007 schrieb Musachy Barroso:
 This was an issue in 2.0.6 and it is fixed on 2.0.7:

 https://issues.apache.org/struts/browse/WW-1659

 As Dave mentioned in 2.0.6 the autocompleter was expecting an array of
 arrays. Now the autocompleter will use the following logic to determine
how
 to load the data:

 1. If the response is an array, use it
 2. If the response is an object, and has a field  that matches the
 dataFieldName attribute in the autocompleter, use it.
 3. If the response is an object, and has a field that starts with the
 name of the autcompleter use it
 4. If a field of type array is found, use it

 so the following cases will work:

 public class MyAction {
private String[][] states;  //data here
 }

 s:autocompleter dataFieldName=states .. // #2
 s:autocompleter name=state ..  //#3
 s:autocompleter ... //#4

 regards
 musachy

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





--
Hey you! Would you help me to carry the stone? Pink Floyd


Time of displaying data on the page

2007-03-20 Thread puchacz

Hi

Hi If anybody could tell me, how can I measure the time of displaying some
data on the screen? 

code


%@ include file=/WEB-INF/jsp/include.jsp%
[EMAIL PROTECTED] import=bus.TimeHold%
[EMAIL PROTECTED] import=java.util.Date%

html
link type=text/css href=./css/main.css rel=stylesheet media=screen

head

script language=JavaScript type=text/javascript
function displayName(){
var myVar = document.getElementById(startTime).value;
var myVary = document.getElementById(endTime).value;
alert(Value is:  + myVar  + + myVary +  + (myVary-myVar));

}
/script

% 
java.util.Date begin = new Date();

long pomocnicza; 
pomocnicza = begin.getTime(); 

%


/head
body onload=displayName();

c:out value=${startTime} /

input type=text value=%=pomocnicza % id=startTime



table width=100%
tr
td

center

display:table name=users export=false id=currentRowObject
requestURI=listOfUsers.do decorator=view.Wrapper
display:column property=name title=Name  /
display:column property=lastName title=Last name /
display:column property=school title=School 
headerClass=table_head / 
/display:table
/center

/td
/tr
/table

% 
java.util.Date end = new Date();


pomocnicza2 = end.getTime(); 


%

input type=text value=%=pomocnicza2 % id=endTime/

/body

/html

/code


The thing is that the time which in the pomocnicza2 is much more smaller
then the time of displaying the page. How to check time after display the
page? 
If anybody has any idea, please tell me!!! I sit on this problem for a such
a long time, and nothing :(.

Thnx 
-- 
View this message in context: 
http://www.nabble.com/Time-of-displaying-data-on-the-page-tf3436810.html#a9582552
Sent from the Struts - User mailing list archive at Nabble.com.


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



Class path basic question and FileInputStream

2007-03-20 Thread Zhang, Larry \(L.\)
I have a program.xml file phycially located in a directory in my web
project class path in WSAD,then in my jsp I am trying to read this file,
I got an error saying the file is not found. Why? When creating File
file = new File(program.xml); on earth, which directory does JVM tries
to find out the file? Thanks.

P.S. JSP:

[EMAIL PROTECTED] language=java contentType=text/html; charset=ISO-8859-1
pageEncoding=ISO-8859-1%
[EMAIL PROTECTED] import=java.io.File,java.io.FileInputStream%
Hello world.br /
%
File file = new File(program.xml);
// JVM will fine out the file in the build directory instead of
from the class path
FileInputStream fis=new FileInputStream(file);
byte b[]=new byte[fis.available()];
fis.read(b);
String s = new String(b);
StringBuffer data = new StringBuffer(s);
System.out.println(Data:\n  + data.toString() + \n);
%  

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



Re: s.autocompleter with JSON Plugin

2007-03-20 Thread Piero Sartini
Am Dienstag, 20. März 2007 schrieb Musachy Barroso:
 I think the daily builds are for 2.1 only. If you want to build it:

 http://struts.apache.org/2.x/docs/building-with-maven.html

I tried to build tags/STRUTS_2_0_7 as well as trunk. both seem to be broken:
[surefire] Running org.apache.struts2.views.xslt.XSLTResultTest
2007-03-20 23:41:57,404 ERROR [XSLTResult.java:365] : Unable to render XSLT 
Template, 'nofile.xsl'
javax.xml.transform.TransformerException: Stylesheet nofile.xsl not found in 
resources.

 The autocompleter tag can be used without the json plugin, check showcase
 for examples.

Seems to be my only chance, thanks :)

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



Re: Class path basic question and FileInputStream

2007-03-20 Thread Harring Figueiredo

Larry:

When you ran the webapp, the container has a _different_ view of the file
system. The root of the file system for the web application will the root
of your web app.

The class path you are describing plays no role in finding the
program.xmlfile when you try to open a file the way you are doing.

If you want the classpath to play a role on how to find your file, take a
look at:
http://java.sun.com/j2se/1.5.0/docs/api/
java.util
Class ResourceBundle
Hopes this helps.
hff

On 3/20/07, Zhang, Larry (L.) [EMAIL PROTECTED] wrote:


I have a program.xml file phycially located in a directory in my web
project class path in WSAD,then in my jsp I am trying to read this file,
I got an error saying the file is not found. Why? When creating File
file = new File(program.xml); on earth, which directory does JVM tries
to find out the file? Thanks.

P.S. JSP:

[EMAIL PROTECTED] language=java contentType=text/html; charset=ISO-8859-1
pageEncoding=ISO-8859-1%
[EMAIL PROTECTED] import=java.io.File,java.io.FileInputStream%
Hello world.br /
%
File file = new File(program.xml);
// JVM will fine out the file in the build directory instead of
from the class path
FileInputStream fis=new FileInputStream(file);
byte b[]=new byte[fis.available()];
fis.read(b);
String s = new String(b);
StringBuffer data = new StringBuffer(s);
System.out.println(Data:\n  + data.toString() + \n);
%

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





--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided.


Re: Is Struts version 1.2.4 compatible with J2EE 1.4 and Java 5?

2007-03-20 Thread Paul Benedict
Yes. Sun never deprecates the Servlet API. Anything that works in 1.4 
will work in 5.


Sunitha Garapati wrote:

Is Struts  version 1.2.4  compatible with J2EE 1.4 and Java 5?
Thanks for your help!




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



Re: adding parameters at runtime to actionforward which uses tiles

2007-03-20 Thread Paul Benedict

temp temp wrote:

  Is there a  way I can add parameters to an actionforward which uses tiles 
definition ?
  If its not  tiles I can append to actionForward.getActionPath()  what in 
case of tiles , how can I append parameters   at runtime ?


Temp,

Tile views shouldn't need parameters. If you need to pass data, consider 
putting that information in request attributes.


Paul


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



Re: [s1] Struts 1.3.8: property actionId causes load() Exception

2007-03-20 Thread Paul Benedict

Pierre,

Ever solve this problem?

Paul

Pierre Thibaudeau wrote:
2007/3/18, Paul Benedict [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED]:


What version of the DTD are you using?


The heading of my struts-config.xml file reads as follows:

?xml version=1.0 encoding=UTF-8?
!DOCTYPE struts-config
PUBLIC -//Apache Software Foundation//DTD Struts Configuration 
1.3//EN

http://struts.apache.org/dtds/struts-config_1_3.dtd 




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



Re: adding parameters at runtime to actionforward which uses tiles

2007-03-20 Thread temp temp
What in case of redirect and I donot want to use session?
  Thanks  Regards
  

Paul Benedict [EMAIL PROTECTED] wrote:  temp temp wrote:
   Is there a  way I can add parameters to an actionforward which uses 
 tiles definition ?
  If its not tiles I can append to actionForward.getActionPath() what in  case 
 of tiles , how can I append parameters at runtime ?

Temp,

Tile views shouldn't need parameters. If you need to pass data, consider 
putting that information in request attributes.

Paul


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



 
-
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.

Re: Time of displaying data on the page

2007-03-20 Thread Ed Griebel

Hi-

Do you mean to say that the time difference is much less than the time
from when you click the mouse, to when page is rendered in browser?

In your code below, since you are using %=scriptlets% you are only
going to measure the time that the Java servlet itself takes. This
will not take into account the time for:
- an action servlet to execute and forward to this JSP
- any database access to generate the 'users' collection
- translating the JSP to Java code (first time JSP is called)
- the Java to be compiled to a servlet .class file (first time JSP is called)
- streaming the generated HTML across your network to your browser
- browser to load main.css
- browser to render the page

The best way to trace these is lots of debugging statements at
strategic places in your code.

However, the simple way is to use endTime to store the time that the
JSP is executed. If you are using an Action class, store a Date into
the session or request scope, and then in your JSP page, have
Javascript code that stores a datestamp as well. By comparing these
figures you can get an idea of how long some of these steps take. If
you had a lot of data being displayed you could also get a fourth
javascript function to run in body onload= so you could get a
timestamp of how long it takes for the browser to render your page.

Good luck,
-ed

On 3/20/07, puchacz [EMAIL PROTECTED] wrote:


Hi

Hi If anybody could tell me, how can I measure the time of displaying some
data on the screen?

code


%@ include file=/WEB-INF/jsp/include.jsp%
[EMAIL PROTECTED] import=bus.TimeHold%
[EMAIL PROTECTED] import=java.util.Date%

html
link type=text/css href=./css/main.css rel=stylesheet media=screen

head

script language=JavaScript type=text/javascript
function displayName(){
var myVar = document.getElementById(startTime).value;
var myVary = document.getElementById(endTime).value;
alert(Value is:  + myVar  + + myVary +  + (myVary-myVar));

}
/script

%
java.util.Date begin = new Date();

long pomocnicza;
pomocnicza = begin.getTime();

%


/head
body onload=displayName();

c:out value=${startTime} /

input type=text value=%=pomocnicza % id=startTime



table width=100%
tr
td

center

display:table name=users export=false id=currentRowObject
requestURI=listOfUsers.do decorator=view.Wrapper
display:column property=name title=Name  /
display:column property=lastName title=Last name /
display:column property=school title=School
headerClass=table_head /
/display:table
/center

/td
/tr
/table

%
java.util.Date end = new Date();


pomocnicza2 = end.getTime();


%

input type=text value=%=pomocnicza2 % id=endTime/

/body

/html

/code


The thing is that the time which in the pomocnicza2 is much more smaller
then the time of displaying the page. How to check time after display the
page?
If anybody has any idea, please tell me!!! I sit on this problem for a such
a long time, and nothing :(.

Thnx


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



Re: A suggestion for struts.xml!

2007-03-20 Thread joey

 Thank your reply!
 I only want more choices.I think wildcard style would be more easier in
developing stage,
and the current style would be more suitable in deploying stage.

On 3/20/07, Harring Figueiredo [EMAIL PROTECTED] wrote:


Even though I would like to have something like this for CLASSPATH in say,
ant scripts,  I would not want something like this in configuration file
for
2 reasons:

- Sercuty issues

- When it comes to error messages, struts does not really provide good
messages (I take that this is because the XML parser errors is not
filtered
and interpreted ). I would hate to have a member of the development team
drop a .xml file in the config dir and break the deployment for no
aparent
reason.

Harring

On 3/20/07, joey [EMAIL PROTECTED] wrote:

   I think if struts.xml 's element 'include' support wildcard,it will be
 better.
 For example  I have ten file to be included in struts.xml,now I have to
 write
 include file=/config/struts-xxx.xml  / ten times.But if it has
 supported
 wildcard,
 I would only need write once like this include file=/config/*.xml /.
   is it possible to support wildcard next version?I think I can deploy
my
 struts application
 easier if so.




--
Sincerely,

Harring Figueiredo
Sr. Software Engineer
Email: [EMAIL PROTECTED]
Telephone: 941-256-0600

We never become truly spiritual by sitting down and wishing to become so.
You must undertake something so great that you cannot accomplish it
unaided.



Re: JSTL Empty equivalent for struts 2.0.6

2007-03-20 Thread tom tom
I believe the simple answer in struts 2.0.6 is

s:if test=#session.myBean.myProperty == null

The property is null

/s:if

which is same in struts 1.x as
logic:empty name=myBean property=myProperty

The property is null

/logic:empty  


Pls let me know if any other alternative or a better
approach

Thanks





--- tom tom [EMAIL PROTECTED] wrote:

 Hi,
 
 What is the struts 2.0.6 equivalent for the empty
 check
 for the following
 
 c:if test=${empty
 sessionScope.myBean.myProperty}
 do something /c:if
 
 Thanks
 
 
  


 TV dinner still cooling? 
 Check out Tonight's Picks on Yahoo! TV.
 http://tv.yahoo.com/
 

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



 

No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail 

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