Rest plugin and 2.1.6 - controllers not mapped

2009-03-12 Thread Niels Boldt
Hi

I have a web application that uses Struts2 2.1.2 and the rest plugin. I'm
developing using a combo of eclipse, maven and tomcat.

However, I have tried to upgrade to 2.1.6 and then the application stops to
work. The problem is that my action classes does not get mapped anymore
after I upgraded.

For instance running 2.1.2 I got the following line outputted during
startup: class:class dk.bc.serverinterface.http.rest.RestController
parent:null current:dk.bc.serverinterface.http.rest

Eg it maps restcontroller to an action. After the update no controllers are
mapped, and all request to the application fails. Is there a fix to this
problem or should I alter my configuration after updating.

Best Regards
Niels
-- 
BinaryConstructors ApS
Vestergade 10a, 4th
1456 Kbh K
Denmark
phone: +4528138757
web: http://www.binaryconstructors.dk
mail: n...@binaryconstructors.dk
skype: nielsboldt


s2 : assigning a variable to jsp

2008-03-21 Thread niels

Hello,

I want to assign a property to a value in jsp.

in struts 1.3 i could do it like:

bean:define id=assign name=somename property=userName
type=java.lang.String /

Now I can access the variable via:  %=assign%

How can i accomplish this in struts2 for a property:
s:property value=userName/


thanks
in advance.

Niels

Re: s2 : assigning a variable to jsp

2008-03-21 Thread niels

Hm,
want the otherway around.

something like:
s:set name=technologyName value=%{'Java'}/
%= technologyName %


On Mar 21, 2008, at 12:11 PM, Deepak Kumar wrote:


Hi,

In Struts 2 you can use s:set tag.

Check the example at
http://www.roseindia.net/struts/struts2/struts2controltags/set-tag.shtml

Thanks


-Original Message-
From: niels [mailto:[EMAIL PROTECTED]
Sent: Friday, March 21, 2008 4:35 PM
To: user@struts.apache.org
Subject: s2 : assigning a variable to jsp


Hello,

I want to assign a property to a value in jsp.

in struts 1.3 i could do it like:

bean:define id=assign name=somename property=userName
type=java.lang.String /

Now I can access the variable via:  %=assign%

How can i accomplish this in struts2 for a property:
s:property value=userName/


thanks
in advance.

Niels


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





Re: s2 : assigning a variable to jsp

2008-03-21 Thread niels

Hi Nils,

If looks at the docs, but can't find an example where I can set a jsp  
variable. I have this situation, I use oscache like:


cache:cache key=%=cacheKey% time=120

Where I want to set the jsp string 'cacheKey' with a property from the  
value stack..


like (what of course doesn't work):

String cacheKey = pre_+s:property value=pageAlias /;


Thanks
Niels

On Mar 21, 2008, at 12:59 PM, Nils-Helge Garli Hegvik wrote:


Check out the set [1] and property [2] tags. It might also be useful
to read about the tag syntax [3]

[1] - http://struts.apache.org/2.x/docs/set.html
[2] - http://struts.apache.org/2.x/docs/property.html
[3] - http://struts.apache.org/2.x/docs/tag-syntax.html

Nils-H

On Fri, Mar 21, 2008 at 12:05 PM, niels [EMAIL PROTECTED] wrote:

Hello,

I want to assign a property to a value in jsp.

in struts 1.3 i could do it like:

bean:define id=assign name=somename property=userName
type=java.lang.String /

Now I can access the variable via:  %=assign%

How can i accomplish this in struts2 for a property:
s:property value=userName/


thanks
in advance.

Niels


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





Where did the target attribute go in the a-tag?

2008-01-29 Thread niels

There is no target attribute in de a-tag:
http://struts.apache.org/2.x/docs/a.html

I am a newbie, and want to open de link in another (specified) browser  
window..


How to overcome this?

Niels

Re: Where did the target attribute go in the a-tag?

2008-01-29 Thread niels

Thanks David,

but according to the TLD target is not a valid attribute for tag url

Niels


On Jan 29, 2008, at 12:44 PM, David Tercero wrote:



Hi niels,

  you can generate a html anchor, using the s:url tag to generate  
the href

url,

s:url ...  target=...some text

hope this helps.




niels-15 wrote:


There is no target attribute in de a-tag:
http://struts.apache.org/2.x/docs/a.html

I am a newbie, and want to open de link in another (specified)  
browser

window..

How to overcome this?

Niels



--
View this message in context: 
http://www.nabble.com/Where-did-the-target-attribute-go-in-the-a-tag--tp15156349p15157668.html
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]



Re: Where did the target attribute go in the a-tag?

2008-01-29 Thread niels

David,

I don't understand what you mean by anchor
imagine the next situation.

s:url id=url action=getCRUD
s:param name=id value=%{user.id} /
/s:url
s:a href=%{url}edit/s:a


Niels

On Jan 29, 2008, at 1:33 PM, David Tercero wrote:



target belongs to the anchor, not to the s:url tag.




niels-15 wrote:


Thanks David,

but according to the TLD target is not a valid attribute for tag url

Niels


On Jan 29, 2008, at 12:44 PM, David Tercero wrote:



Hi niels,

 you can generate a html anchor, using the s:url tag to generate
the href
url,

s:url ...  target=...some text

hope this helps.




niels-15 wrote:


There is no target attribute in de a-tag:
http://struts.apache.org/2.x/docs/a.html

I am a newbie, and want to open de link in another (specified)
browser
window..

How to overcome this?

Niels



--
View this message in context:
http://www.nabble.com/Where-did-the-target-attribute-go-in-the-a-tag--tp15156349p15157668.html
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/Where-did-the-target-attribute-go-in-the-a-tag--tp15156349p15158312.html
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: Where did the target attribute go in the a-tag?

2008-01-29 Thread niels

Thanks,

This works form me:
s:url id=url  action=getCRUD /
a href=s:property value='#url'/ target=_blank.../a

niels



On Jan 29, 2008, at 5:36 PM, Laurie Harper wrote:


niels wrote:

There is no target attribute in de a-tag:
http://struts.apache.org/2.x/docs/a.html


Correct, there isn't such an attribute. The Struts 2.0.9  
documentation for that tag lists a 'targets' attribute, but that's  
related to the Ajax theme and doesn't do what you're looking for.


I am a newbie, and want to open de link in another (specified)  
browser window..

How to overcome this?


Dave's solution (using a vanilla a tag) is the correct way to do  
this.


L.


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





struts2: sent value to freemarker template

2008-01-09 Thread niels

I want to pass a value to my fielderror.ftl

lik this:

s:fielderror
s:param name=foo value=bar/
/s:fielderror



Does someone knows how to retrief the value in de template?

${parameters.foo}

gives me the error:
freemarker.core.InvalidReferenceException: Expression Expression  
parameters.foo is undefined



Thanks in advance,
NIELS





Re: problem with modules : Cannot retrieve mapping

2006-07-07 Thread niels

Actually  I don't want to switch modules, I want to 'access' an action form
another module

On 7/6/06, Laurie Harper [EMAIL PROTECTED] wrote:


niels wrote:
 have 2 modules: moduleA and moduleB
 in struts-config.xml from moduleA:

 action path=/moduleATest forward=/testA.jsp /

 where testA is located on the filesystem in : /moduleA/testA.jsp

 in struts-config.xml from moduleB:
 action path=/moduleBTest forward=/testB.jsp /

 action
path=/searchUserSubmit
type=com.lego.user.action.SearchUserAction
name=searchUserForm
validate=true
input=/searchUser.do
forward name=success  path=/searchUser.do /
/action

 in testB.jsp  testA.jsp if have:

 html:form action=searchUserSubmit.do method=post
 html:text property=userName /
 html:submit property=submitsearch/html:submit
 /html:form


 whe I call /moduleB/moduleBtest.do -- form is displayed

 when I call /moduleA/moduleAtest.do-- error cannot retrieve mapping for
 action /searchUserSubmit

 So  how to make module A aware of another module and its action
 mappings?

 For the html:link tag there is the attribute : module like:
 html:link module=/moduleA action=/moduleATest.doto
test/html:link
 Is there someting simular for html:form

Hmm, the html:form tag doesn't have a 'module' attribute. I don't use
modules so I'm not sure how to handle this, but you may need to submit
via the SwitchModule action.

L.


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




problem with modules : Cannot retrieve mapping

2006-07-06 Thread niels

have 2 modules: moduleA and moduleB
in struts-config.xml from moduleA:

action path=/moduleATest forward=/testA.jsp /

where testA is located on the filesystem in : /moduleA/testA.jsp

in struts-config.xml from moduleB:
action path=/moduleBTest forward=/testB.jsp /

action
   path=/searchUserSubmit
   type=com.lego.user.action.SearchUserAction
   name=searchUserForm
   validate=true
   input=/searchUser.do
   forward name=success  path=/searchUser.do /
   /action

in testB.jsp  testA.jsp if have:

html:form action=searchUserSubmit.do method=post
html:text property=userName /
html:submit property=submitsearch/html:submit
/html:form


whe I call /moduleB/moduleBtest.do -- form is displayed

when I call /moduleA/moduleAtest.do-- error cannot retrieve mapping for
action /searchUserSubmit

So  how to make module A aware of another module and its action
mappings?

For the html:link tag there is the attribute : module like:
html:link module=/moduleA action=/moduleATest.doto test/html:link
Is there someting simular for html:form

Thanks,
Niels


RE: Advice with Struts and Generate documents in PDF, XLS...

2006-02-02 Thread Voorhoeve, Niels {PBG}
For excel exports use this:
http://jakarta.apache.org/poi/hssf/index.html 

-Original Message-
From: Angel Navarro [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 02, 2006 11:43 AM
To: Struts Users Mailing List
Subject: Advice with Struts and Generate documents in PDF, XLS...

Hi,

I need advice to develop documents in PDF or XLS format in a struts web
application.

Have Struts libraries that do this?

Is better JasperReport?
Is easy integrate JasperReport (or other library) with Struts?

Thanks and sorry by mi English

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



validwhen problem in combination with RadioButton

2005-12-27 Thread niels
Hi,

I want to validate a form:
company field may only be filled if the selected (by radiobutton)
addresstype is equal to CN

I try to do this via:
form-validation
formset
 form name=addressForm
field property=company depends=validwhen
arg0 key=error.company/
var
var-nametest/var-name
var-value((*this* != null) and
(addressType==CN))/var-value
/var
/field
 /form
/formset
/form-validation

without anyl uck..and cannot find any error messages in de log file.
Who can help me?


How to keep a request Attribute available (from first action) after second action is called

2005-12-18 Thread niels
An action (ActionOne with scope=request) is called which
puts a result list on an attribute like:
request.setAttribute(listResult, list);
This result is displayed in a jsp.

After that a second action (ActionTwo) is called
which forward to another jsp. How can I make the listResult available in
ActionTwo?


Thanks in advance,
Niels