Re: (FRIDAY) Struts in Action Live

2009-04-03 Thread Chris Pratt
OK, that's the coolest thing I've seen in a long time.  Thanks for the
pointer.
  (*Chris*)

On Fri, Apr 3, 2009 at 5:57 PM, Ted Husted  wrote:

> Hey, I posted a blog the other day about Gliffy, which I use all the
> time now. Turns out, it's based on Struts! A great example of "what
> goes around comes around" ... but in a good way.
>
> * http://tedhusted.blogspot.com/2009_03_01_archive.html
>
> Keep the faith, Ted.
> http://twitter.com/tedhusted
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


(FRIDAY) Struts in Action Live

2009-04-03 Thread Ted Husted
Hey, I posted a blog the other day about Gliffy, which I use all the
time now. Turns out, it's based on Struts! A great example of "what
goes around comes around" ... but in a good way.

* http://tedhusted.blogspot.com/2009_03_01_archive.html

Keep the faith, Ted.
http://twitter.com/tedhusted

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Creating a grid component in Struts 2

2009-04-03 Thread stanlick
Take a look at the DisplayTag control.
It kicks bootie.

Peace,
Scott

On Fri, Apr 3, 2009 at 2:58 AM, Manoj Dhore wrote:

> Hi,
>
>
>
>  Is there anyway to create a grid control in Struts 2 or any default
> implementation of grid layout.
>
>
>
> Thanks in advance.
>
>
>
> Regards
>
> Manoj Dhore
>
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom
> they are addressed.
> If you have received this email in error please notify the
> originator of the message. This footer also confirms that this
> email message has been scanned for the presence of computer viruses.
>
> Any views expressed in this message are those of the individual
> sender, except where the sender specifies and with authority,
> states them to be the views of Sword Intech.
>
> Scanning of this message and addition of this footer is performed
> by Websense Email Security software in conjunction with
> virus detection software.
>
>


Making two URLs map to the same action

2009-04-03 Thread laredotornado

Hi,

I'm using Struts 1.3 with WebLogic 9.2.2.  I would like my URL

http://mydomain.com/context-path/refresh

to do the same thing, or at least point to the same place that

http://mydomain.com/context-path/refresh.do goes.  How can I set this up?

Thanks, - Dave

-- 
View this message in context: 
http://www.nabble.com/Making-two-URLs-map-to-the-same-action-tp22874227p22874227.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Mixing convention plugin and legacy action mappings

2009-04-03 Thread Ryan Chichirico
I think as I was typing a response I may have discovered the issue.  We 
had a wildcard catch all for the root namespace which was throwing 
things off.

   
   /ftl/{1}.ftl
   

Once I created a stand alone package com.xm.web.struts2.test.HelloAction 
I was able to use both /test/hello and /test/hello.action


Thanks for your quick response.

-Ryan

Musachy Barroso wrote:

Convention configuration just gets mixed with xml configuration, they
should not conflict. What kind of problem are you having?

musachy

On Fri, Apr 3, 2009 at 12:52 PM, Ryan Chichirico  wrote:
  

We've recently migrated to Struts 2.1.6 and started looking into the
convention plugin.  Since our application is far along the 2.0.x way of
doing things it's difficult to make whole sale changes immediately.  We'd
like to start introducing new features with the convention plugin and slowly
adapt the other actions as we find time.
Out of the box this didn't seem to work.  Has anyone tried doing this?

Our struts.properties file has the following:

struts.action.extension=action
struts.ui.templateSuffix=ftl

I've noticed that when I comment out the struts.action.extension then the
convention plugin works fine with the new actions but all of our legacy
*.action classes don't work.  Any tips would be greatly appreciated

-Ryan


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org







  


--
Ryan Chichirico
Buzzwire, Inc.
1123 Auraria Parkway, Suite 400
Denver, CO 80202
Cell: 720.841.5931 
www.buzzwire.com



-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Mixing convention plugin and legacy action mappings

2009-04-03 Thread Musachy Barroso
Convention configuration just gets mixed with xml configuration, they
should not conflict. What kind of problem are you having?

musachy

On Fri, Apr 3, 2009 at 12:52 PM, Ryan Chichirico  wrote:
> We've recently migrated to Struts 2.1.6 and started looking into the
> convention plugin.  Since our application is far along the 2.0.x way of
> doing things it's difficult to make whole sale changes immediately.  We'd
> like to start introducing new features with the convention plugin and slowly
> adapt the other actions as we find time.
> Out of the box this didn't seem to work.  Has anyone tried doing this?
>
> Our struts.properties file has the following:
>
> struts.action.extension=action
> struts.ui.templateSuffix=ftl
>
> I've noticed that when I comment out the struts.action.extension then the
> convention plugin works fine with the new actions but all of our legacy
> *.action classes don't work.  Any tips would be greatly appreciated
>
> -Ryan
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>



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

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Mixing convention plugin and legacy action mappings

2009-04-03 Thread Ryan Chichirico
We've recently migrated to Struts 2.1.6 and started looking into the 
convention plugin.  Since our application is far along the 2.0.x way of 
doing things it's difficult to make whole sale changes immediately.  
We'd like to start introducing new features with the convention plugin 
and slowly adapt the other actions as we find time. 


Out of the box this didn't seem to work.  Has anyone tried doing this?

Our struts.properties file has the following:

struts.action.extension=action
struts.ui.templateSuffix=ftl

I've noticed that when I comment out the struts.action.extension then 
the convention plugin works fine with the new actions but all of our 
legacy *.action classes don't work.  Any tips would be greatly appreciated


-Ryan


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Stumped on form field

2009-04-03 Thread Security Management
I cannot figure this out, days is never set, and the debug logging does not
show up for setting days, but it does for name.  Anyone have any idea?

JSP page:
<%@ taglib prefix="s" uri="/struts-tags" %>




 
















The struts.xml snippet:

/pages/scrounger/jsps/add-exceptions.jsp


The Java class:
package com.secmgmt.struts2.actions.scrounger;

import com.secmgmt.struts2.base.SMCBaseAction;
import com.secmgmt.interfaces.auth.IAuthProvider;
import com.secmgmt.interfaces.people.providers.IPersonProvider;
import com.secmgmt.interfaces.people.providers.IScroungerProvider;
import com.secmgmt.interfaces.people.IScroungerRule;
import com.secmgmt.interfaces.people.IPersonType;

import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
import org.apache.log4j.Logger;

/**
 * IndexAction
 *
 * @author Mike Baranski (m...@secmgmt.com)
 */
public class SaveRuleNameDaysTypes extends SMCBaseAction
{
private static Logger l = Logger.getLogger(SaveRuleNameDaysTypes.class);
private IAuthProvider authProvider;
private IScroungerProvider sp;
private IPersonProvider ppp;

private Long ruleId;
private Integer days;
private String ruleName;

private IScroungerRule r;

public IScroungerRule getRule()
{
return r;
}

public void setRule(IScroungerRule r)
{
this.r = r;
}

// Set from the form
private List ruleTypes;

// Converted from the form
private List ruleIPersonTypes;

public void setRuleDays(String i)
{
l.debug("Setting days: " + i);
try
{
this.days = new Integer(i);
}
catch(NumberFormatException e)
{
l.error("Error parsing: " + e.toString());
this.days = null;
}
}

public void setRuleName(String n)
{
l.debug("Setting rule name: " + n);
this.ruleName = n;
}

public String getRuleName()
{
return this.ruleName;
}

public Integer getRuleDays()
{
return this.days;
}

public IScroungerProvider getScroungerProvider()
{
return this.sp;
}

public void setScroungerProvider(IScroungerProvider s)
{
this.sp = s;
}

public void setRuleTypes(List l) throws Exception
{
this.ruleIPersonTypes = new ArrayList(l.size());
Iterator typeIter = l.iterator();
while(typeIter.hasNext())
{
 
this.ruleIPersonTypes.add(this.getPersonProvider().getPersonType(typeIter.ne
xt()));
}
}   public List getRuleIPersonTypes()
{
return this.ruleIPersonTypes;
}

public void setPersonProvider(IPersonProvider p)
{
this.ppp = p;
}

public IPersonProvider getPersonProvider()
{
return ppp;
}

public void setAuthProvider(IAuthProvider p)
{
this.authProvider = p;
}

public IAuthProvider getAuthProvider()
{
return this.authProvider;
}

public void setRuleId(Long id)
{
this.ruleId = id;
}

public Long getRuleId()
{
return this.ruleId;
}

/**
 *
 * @return {...@link #SUCCESS}
 */
public String execute() throws Exception
{
IScroungerRule rule = this.getScroungerProvider().getInstance();
rule.setRuleName(this.getRuleName());
rule.setId(this.getRuleId());
rule.setDays(this.getRuleDays());
rule.setRulePersonTypes(this.getRuleIPersonTypes());

this.getScroungerProvider().makePersistent(rule);
this.setRule(rule);

return SUCCESS;
}

public void validate()
{
if(this.getRuleIPersonTypes() == null ||
this.getRuleIPersonTypes().size() == 0)
{
addActionError(getText("sc_no_type_selected"));
}
if(this.getRuleName() == null || this.getRuleName().length() ==
0)
{
addActionError(getText("sc_no_rule_name_entered"));
}

if(this.getRuleDays() == null)
{
addActionError(getText("sc_no_rule_days_entered"));
}
}

}




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Struts 2.1.6, Convention plugin, and Scope interceptor

2009-04-03 Thread Patrick Aikens
I'm trying to go with an all-annotation based configuration for a
project I'm working on, and now have the desire to use a scope
interceptor in my app.  The following is an example of my current
ideas, but I'm not sure it's working correctly (I have a sneaking
suspicion that I'm modifying the stack to add a second scope
interceptor for the start and end actions rather than overriding the
params for the existing one).  Does this work, or do I need to use XML
to define the start and end actions like in the older Zero
Config/Codebehind days?  I'm planning on using a single class to
implement all the actions for this workflow (the number of screens in
the workflow is dynamic, which is one of the reasons I want a scope
interceptor)

Also, I want to do this in "pure" struts 2 without a third party plugin

@InterceptorRefs({
   �...@interceptorref(value="scope", params={"session", "model", "key",
"customModel"}),
   �...@interceptorref("defaultStack")
})
public class ManageCategoryAction extends ActionSupport
        implements ModelDriven> {

   �...@action(value="startCustomizationWorkflow",
        interceptorre...@interceptorref(value="scope", params={"type", "start"})
    )
    public String startCustomizationWorkflow() {
{...}
    }

@Action(value="endCustomizationWorkflow",
interceptorre...@interceptorref(value="scope", params={"type", "end"})
)
public String startCustomizationWorkflow() {
{...}
}

@Action(value="nextCustomizationWorkflowScreen")
public String startCustomizationWorkflow() {
{...}
}

@Action(value="prevCustomizationWorkflowScreen")
public String startCustomizationWorkflow() {
{...}
}
}


--
SELECT * FROM users WHERE clue > 0

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Result Params not getting set in redirect

2009-04-03 Thread srinivasch

Hi,

   I am using a simple action which reads the xml, xml has data as to where
my resultant action would be. So I am able to read the xml file and set the
parameters in the @Result like below

@Result(name="redirect",location="${url}", type="redirect",
params={"REQUEST_TYPE","${requestType}","username","${username}","password","${password}"})


Problem is its going to the location of the url file, but it is not setting
any of the parameters. Appreciate any kind of help in resolving this. I saw
a patch for ServletRedirectResult which I applied but still it doesnt work
https://issues.apache.org/struts/browse/WW-3046

Thanks
-- 
View this message in context: 
http://www.nabble.com/Result-Params-not-getting-set-in-redirect-tp22871066p22871066.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: No getter method available for property

2009-04-03 Thread elyes sallem
the message is clear, it didn't find a getter for the TVShowSelect  property

just one remark, u should choose a name of property begining with lowercase
(for example tvShowSelect). and if u have a getter named getTvShowSelect()
in your  form,
u won't have this error

Regards
Elyes


2009/4/3 NR031 

>
> Hi,
>
>
> I am new to struts and I need help for solving my problem. I have
> created a weapplication project using NetBeans with struts framework.
>
>I am following the tutorial given
> http://www.javabeat.net/articles/21-ajax-support-in-struts-20-2.html HERE
> .
>
>
>When I run my code I am getting StandardWrapperValve[jsp]: PWC1406:
> Servlet.service() for servlet jsp threw exception
> javax.servlet.jsp.JspException: No getter method available for property
> TVShowSelect for bean under name org.apache.struts.taglib.html.BEAN
>at
>
> org.apache.struts.taglib.html.SelectTag.calculateMatchValues(SelectTag.java:266)
>at
> org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:200)
>at
> org.apache.jsp.tvshow_jsp._jspx_meth_html_select_0(tvshow_jsp.java from
> :176)
>at org.apache.jsp.tvshow_jsp._jspx_meth_html_form_0(tvshow_jsp.java
> from :147)
>at org.apache.jsp.tvshow_jsp._jspService(tvshow_jsp.java from :115)
>at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
>at
>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
>at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
>at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
>at
>
> org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
>at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
>at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
>at
>
> org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
>at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
>at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
>at
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
>at
>
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
>at
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
>at
>
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
>at
>
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
>at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
>at
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
>at
>
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
>at
>
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
>at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
>at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
>at
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
>at
>
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
>at
>
> org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
>at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
>at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
>at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
>at
>
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
>at
>
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
>at
>
> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
>at
>
> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
>at
>
> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
>at
>
> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
>at
>
> com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
>at
> com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
>at
>
> com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWork

No getter method available for property

2009-04-03 Thread NR031

Hi,


 I am new to struts and I need help for solving my problem. I have
created a weapplication project using NetBeans with struts framework.

I am following the tutorial given 
http://www.javabeat.net/articles/21-ajax-support-in-struts-20-2.html HERE . 


When I run my code I am getting StandardWrapperValve[jsp]: PWC1406:
Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: No getter method available for property
TVShowSelect for bean under name org.apache.struts.taglib.html.BEAN
at
org.apache.struts.taglib.html.SelectTag.calculateMatchValues(SelectTag.java:266)
at
org.apache.struts.taglib.html.SelectTag.doStartTag(SelectTag.java:200)
at
org.apache.jsp.tvshow_jsp._jspx_meth_html_select_0(tvshow_jsp.java from
:176)
at org.apache.jsp.tvshow_jsp._jspx_meth_html_form_0(tvshow_jsp.java
from :147)
at org.apache.jsp.tvshow_jsp._jspService(tvshow_jsp.java from :115)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at
com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at
com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)


Struts-config.xml











ShowCharacters.jsp




JSP Page




<%ArrayList ch = (ArrayList)
request.getSession().getAttribute("characters");
String[] s = new String[ch.size()];
ch.toArray(s);
for (int i = 0; i < s.length; i++) {%>

<%}%>








I am attachin

Re: S2: latest Struts 2.1.x and latest CXF dont play nice together

2009-04-03 Thread Marc Logemann
Ahh here we go. Just read the struts 2.0 -> 2.1 migration guide and  
saw this:


"The default action extension list (struts.action.extension) has  
changed from just 'action' to 'action' plus "" (no extension). If your  
application has servlets or other requests that have no extension then  
they will be mistaken as actions and you will get a "There is no  
Action mapped for ..." exception like below."


This explains the difference with regard to handling the mentioned  
URIs. So i can just do that:




to get the old "2.0.x" bevaior. Unfortunately i created a custom  
ActionMapper the wont handle /services/* URIs. Hmmm. Lets see what i  
do now :)


---
regards
Marc Logemann
http://www.logemann.org
http://www.logentis.de




Am 03.04.2009 um 11:54 schrieb Marc Logemann:


Hi,

i have the following web.xml:

   
   struts2
   class 
> 
org 
.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterfilter-class>

   

   
   struts2
   /*
   

   
   CXFServlet
   
   org.apache.cxf.transport.servlet.CXFServlet
   
   1
   

   
   CXFServlet
   /services/*
   


No as you can see, i want all URLs resolved by Struts2 but / 
services/ should be handled by CXF. This worked with Struts 2.0.x  
and CXF but with latest Struts2, the Filter seems to be changed.  
Apart from the fact that i know use StrutsPrepareAndExecuteFilter  
instead of FilterDispatchter (using FilterDispatcher makes no  
difference regarding my problem), it seems that Struts2 now treats  
every URL as it should be processed by the framework, even without  
mapping and namespaces for it.


The ciritical point is the following code in the Struts filter:

ActionMapping mapping = prepare.findActionMapping(request, response);
   if (mapping == null) {
   boolean handled =  
execute.executeStaticResourceRequest(request, response);

   if (!handled) {
   chain.doFilter(request, response);
   }
   }


If it wouldnt find a mapping (in fact there is no mapping but the  
object is nevertheless != null) i think it would work because  
executeStaticResourceRequest() would return false and the normal  
processing chain of the Request would occur.



I cant change the struts2 url filter mapping beause that would break  
so much code of my existing app that i would rather modify the  
Filter not to handle "/service" urls. Again all this is because of a  
very poor web.xml (servlet) spec with regard to simple url-pattern  
without the chance to exclude something


Any hints ??


---
regards
Marc Logemann
http://www.logemann.org
http://www.logentis.de





-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: how to re-init / update parameter of an interceptor during runtime?

2009-04-03 Thread musomesa

 


 An interceptor has access to application via ActionContext so it is easy to 
rig up. From anywhere in your application you can manipulate an entry in 
application and have the interceptor check if it matches the value it currently 
has. I still think it is an unorthodox approach though. It also costs you time 
as your intercept() method now has that extra check.
Chris M


 

-Original Message-
From: Joe Lam 
To: user@struts.apache.org
Sent: Fri, 3 Apr 2009 2:48 am
Subject: Re: how to re-init / update parameter of an interceptor during runtime?











thx for your reply.

actually I am not going to change the param regularly.
this is more like "just in case I want to change the setting in the future".

thx

Joe


Nils-Helge Garli wrote:
> 
> Why do you need to do that?
> 
> Nils-H
> 
> On Fri, Apr 3, 2009 at 5:05 AM, Joe Lam  wrote:
>>
>> I got this in action mapping
>> 
>> ? ? ? ?value01
>> 
>>
>> that parameter actually is an instance property of that interceptor
>> instance.
>>
>> private String param01;
>> public void setParam01(String value){
>> ? ? ? ?param01= value;
>> }
>>
>> I wonder if it is possible to call again the setter method via API during
>> runtime to change the interceptor behavior.
>>
>> thanks.
>>
>> Joe
>> --
>> View this message in context:
>> http://www.nabble.com/how-to-re-init---update-parameter-of-an-interceptor-during-runtime--tp22861150p22861150.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
> 
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-re-init---update-parameter-of-an-interceptor-during-runtime--tp22861150p22862897.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



 



Re: how to re-init / update parameter of an interceptor during runtime?

2009-04-03 Thread musomesa

 Since interceptors are not thread safe I would look at manipulating fields 
from a given thread with a jaundiced eye.
Chris M.


 


 

-Original Message-
From: Nils-Helge Garli Hegvik 
To: Struts Users Mailing List 
Sent: Fri, 3 Apr 2009 1:46 am
Subject: Re: how to re-init / update parameter of an interceptor during  
runtime?










Why do you need to do that?

Nils-H

On Fri, Apr 3, 2009 at 5:05 AM, Joe Lam  wrote:
>
> I got this in action mapping
> 
> ? ? ? ?value01
> 
>
> that parameter actually is an instance property of that interceptor
> instance.
>
> private String param01;
> public void setParam01(String value){
> ? ? ? ?param01= value;
> }
>
> I wonder if it is possible to call again the setter method via API during
> runtime to change the interceptor behavior.
>
> thanks.
>
> Joe
> --
> View this message in context: 
> http://www.nabble.com/how-to-re-init---update-parameter-of-an-interceptor-during-runtime--tp22861150p22861150.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



 



S2: latest Struts 2.1.x and latest CXF dont play nice together

2009-04-03 Thread Marc Logemann

Hi,

i have the following web.xml:


struts2
class 
> 
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterfilter-class>




struts2
/*



CXFServlet

org.apache.cxf.transport.servlet.CXFServlet

1



CXFServlet
/services/*



No as you can see, i want all URLs resolved by Struts2 but /services/  
should be handled by CXF. This worked with Struts 2.0.x and CXF but  
with latest Struts2, the Filter seems to be changed. Apart from the  
fact that i know use StrutsPrepareAndExecuteFilter instead of  
FilterDispatchter (using FilterDispatcher makes no difference  
regarding my problem), it seems that Struts2 now treats every URL as  
it should be processed by the framework, even without mapping and  
namespaces for it.


The ciritical point is the following code in the Struts filter:

ActionMapping mapping = prepare.findActionMapping(request, response);
if (mapping == null) {
boolean handled =  
execute.executeStaticResourceRequest(request, response);

if (!handled) {
chain.doFilter(request, response);
}
}


If it wouldnt find a mapping (in fact there is no mapping but the  
object is nevertheless != null) i think it would work because  
executeStaticResourceRequest() would return false and the normal  
processing chain of the Request would occur.



I cant change the struts2 url filter mapping beause that would break  
so much code of my existing app that i would rather modify the Filter  
not to handle "/service" urls. Again all this is because of a very  
poor web.xml (servlet) spec with regard to simple url-pattern without  
the chance to exclude something


Any hints ??


---
regards
Marc Logemann
http://www.logemann.org
http://www.logentis.de





-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Creating a grid component in Struts 2

2009-04-03 Thread Manoj Dhore
Hi,

 

 Is there anyway to create a grid control in Struts 2 or any default
implementation of grid layout.

 

Thanks in advance.

 

Regards

Manoj Dhore

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom
they are addressed.
If you have received this email in error please notify the
originator of the message. This footer also confirms that this
email message has been scanned for the presence of computer viruses.

Any views expressed in this message are those of the individual
sender, except where the sender specifies and with authority,
states them to be the views of Sword Intech.

Scanning of this message and addition of this footer is performed
by Websense Email Security software in conjunction with 
virus detection software.