How to forward request in struts 2.1.6?

2009-04-29 Thread xnpeng
from: ServletActionContext.getServletContext().getRequestDispatcher("/post/message/"+id).forward(ServletActionContext.getRequest(),ServletActionContext.getResponse()); I want to forward request to http://localhost:8080/post/message/3166, but it always throws out exception says requested resource

Re:Re: How to forward request in struts 2.1.6?

2009-04-30 Thread xnpeng
rward request to action conditionally,ie,depend on "category" in action class. 在2009-04-29,"Nils-Helge Garli Hegvik" 写道: >Why do you need to do it manually with the request dispatcher? Can't >you use any of the available result types? > >http://struts.ap

Re:Re: Re: How to forward request in struts 2.1.6?

2009-04-30 Thread xnpeng
aultHttpHeaders; import org.apache.struts2.rest.HttpHeaders; import javax.servlet.ServletException; import java.io.IOException; /** * User: xnpeng * Date: 2009-4-21 * Time: 20:02:50 */ public class PublishController extends PublishAction implements Preparable { private static String messa

Re:Re: How to forward request in struts 2.1.6?

2009-04-30 Thread xnpeng
my-action rather than MyAction) the normal mappings don't work in the REST-plugin environment. 在2009-05-01,"Dave Newton" 写道: >xnpeng wrote: >> public class PublishController extends PublishAction implements Preparable { >> private static String message_url =

Struts2+ReST-plugin prolems need help!!!

2009-05-19 Thread xnpeng
I'm doing my project with struts2+rest-plugin for about 3 months.there is a lot of problems unresolved. With rest-plugin and convention-plugin,all action-mapping are done automatically,manual action-mapping in struts.xml cannot work.so, 1, I cannot define global-error-result; 2, I cannot do for

Re:Re: Struts2+ReST-plugin prolems need help!!!

2009-05-20 Thread xnpeng
SimpleInterceptor doing login check, /error.jsp thank you very much. 在2009-05-20,"Dave Newton" 写道: >xnpeng wrote: >> I'm doing my pro

Re:RE: Struts2+ReST-plugin prolems need help!!!

2009-05-20 Thread xnpeng
gt; > > > > > > > > > > > > /error.jsp > > > > > > > > > > /action${ClassName.type}.action > /index.jsp > > > > action1_success.jsp > action1_error.jsp > > > > > > action2_success.jsp > action2_error.jsp > > > > >> third, a SimpleInterceptor doing login check, >> >> >&

How to setup Interceptor when using struts2.1.6 rest plugin with convention

2009-05-27 Thread xnpeng
Hi, when i use rest-plugin with convention plugin in struts2.1.6, i cannot setup my interceptor. the following is my interceptor and config file. i cannot see the println result on console. can anyone help? thank you! public class SimpleInterceptor extends AbstractInterceptor { public Str

Re:Struts2+ReST-plugin prolems need help!!!

2009-05-27 Thread xnpeng
can any one help? i use struts2.1.6. 在2009-05-20,xnpeng 写道: >I'm doing my project with struts2+rest-plugin for about 3 months.there is a >lot of problems unresolved. > >With rest-plugin and convention-plugin,all action-mapping are done >automatically,manual action-m

Re:Re: How to setup Interceptor when using struts2.1.6 rest plugin with convention

2009-05-27 Thread xnpeng
se to work. 在2009-05-28,"Dave Newton" 写道: >You're setting the default parent package to rest-default, which doesn't >include your interceptor--have you tried setting it to the package with >your interceptor in it? > >Dave &

Re:Re: How to setup Interceptor when using struts2.1.6 rest plugin with convention

2009-05-27 Thread xnpeng
rceptor won't be used, unless you use the @InterceptorRef >annotation. > >musachy > >On Wed, May 27, 2009 at 9:31 PM, Dave Newton wrote: >> You're setting the default parent package to rest-default, which doesn't >> include your interceptor--have you tried sett

Re:Re: Re: How to setup Interceptor when using struts2.1.6 rest plugin with convention

2009-05-27 Thread xnpeng
hose actions. You need to make it point to your own package, which >defines a default interceptor stack with your interceptor. Either >that, or use @InterceptorRef in your actions. > >musachy > >2009/5/27 xnpeng : >> hi,Musachy : >> I have a line defined in config

Re: How to setup Interceptor when using struts2.1.6 rest plugin with convention

2009-05-27 Thread xnpeng
ger.getConfiguration(ConfigurationManager.java:55) 在2009-05-28,xnpeng 写道: >Hi,musachy! > things are going on. when i add a line to my Controller(Action): > >@InterceptorRefs({...@interceptorref("user"), @InterceptorRef("defaultStack")}) >public class MainControll

Re:Re: Redirect after login

2009-08-18 Thread xnpeng
user-uc.1250646216.gailghbjfpefofegeakd-xnpeng=163@struts.apache.orguser-uc.1250646216.gailghbjfpefofegeakd-xnpeng=163.com@struts.apache.orguser-uc.1250646216.gailghbjfpefofegeakd-xnpeng=163@struts.apache.orguser-uc.1250646216.gailghbjfpefofegeakd-xnpeng=163.com@struts.apache.orguser-uc

Re:Re:Re: Redirect after login

2009-08-18 Thread xnpeng
user-uc.1250646216.gailghbjfpefofegeakd-xnpeng=163@struts.apache.orguser-uc.1250646216.gailghbjfpefofegeakd-xnpeng=163.com@struts.apache.orguser-uc.1250646216.gailghbjfpefofegeakd-xnpeng=163@struts.apache.orguser-uc.1250646216.gailghbjfpefofegeakd-xnpeng=163.com@struts.apache.orguser-uc

Re:RE: Hibernate3+Spring2.5+Struts2

2009-08-20 Thread xnpeng
how to remove my email from this fucking list? how to remove my email from this fucking list? how to remove my email from this fucking list? how to remove my email from this fucking list? how to remove my email from this fucking list? how to remove my email from this fucking list? how to remove my

Re:Re: Why submit didn't support param

2009-08-20 Thread xnpeng
how to remove my email from this fucking list? how to remove my email from this fucking list? how to remove my email from this fucking list? how to remove my email from this fucking list? how to remove my email from this fucking list? how to remove my email from this fucking list? how to remove my

Re:Re: Why submit didn't support param

2009-08-20 Thread xnpeng
how to remove my email from this fucking list? how to remove my email from this fucking list? how to remove my email from this fucking list? how to remove my email from this fucking list? how to remove my email from this fucking list? how to remove my email from this fucking list? how to remove my

how to update/persist associate entity?

2009-03-17 Thread xnpeng
class Site{ String id; String name; Set properties; ...setter/getter } class SiteProperty{ String typeId; String typeName; Site site; ... setter/getter } SiteController.java class SiteController extends ActionSupport{ Site site; setter/getter... public String update(){ S

Re:how to update/persist associate entity?

2009-03-17 Thread xnpeng
class Site{ String id; String name; Set properties; ...setter/getter } class SiteProperty{ String propId; String propName; Site site; .. setter/getter } SiteController.java class SiteController extends ActionSupport{ Site site; setter/getter... public String update(){ Session s

struts2 iterator list mapping --ReST

2009-03-19 Thread xnpeng
in struts2-REST environment,i cannot run struts2/showcase/person example. in struts2/showcase/person,there is a : ID First Name Last Name

Re:Re: REST Plugin only for some actions

2009-03-27 Thread xnpeng
same situation with me,i want to set parameter for FileUpload action in REST: image/JPEG,image/PNG how can I do this? 在2009-03-24,"Radoslav Krivak" 写道: > > >GF-7 wrote: >> >> Is this a TODO or is it already available? >> > >In 2.1.6 it certainly isn't available. I was looking for somet

Re:Re: Error - 2.1.6 - index()

2009-03-30 Thread xnpeng
delete struts2-rest-plugin-2.1.6.jar from your lib. 在2009-03-30,strangerinu 写道: > >Would you please tell me how did you fix this error. Even i too get this >error, it never considers my method parameter in struts. it tries to call >the index()? >Kindly help > > > >jbogo wrote: >> >> I don't

Re:Re: REST Plugin only for some actions

2009-03-30 Thread xnpeng
agree! I like rest, the great url patern. but,too many problems now. I can browse http://localhost:8080/test/data.xml,but when call it in a jsp file dhtmlxtree.loadFrom("http://localhost:8080/test/data.xml";), it says there is no action or result named 'test'! seems the server treat all .xml ur

Re:RE: Localization in Struts 2.0

2009-03-30 Thread xnpeng
I think the properties files are sequenced like: 1,ActionName.properties; 2,PackageName.properties; 3,Default.paroperties(you can tell struts2 in config file); 在2009-03-30,"Manoj Dhore" 写道: >Hi Poul, > > Thanks for your help. It worked fine. The problem was with the properties > file name. Th

REST! ReST!

2009-03-30 Thread xnpeng
struts2 + rest plugin is a good idea. anybody have materials or experience on this? thank you