You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by bhukar <ja...@yahoo.com> on 2007/08/23 13:59:14 UTC

Struts2 plugin for eclipse

Hi,

Is there any plugin available for eclipse to use struts2 framework?  We
would also like to work on Hibernate? 

Your help on this would be greatly appreciated.

Regards,
NKarthikeyan.
-- 
View this message in context: http://www.nabble.com/Struts2-plugin-for-eclipse-tf4317126.html#a12292272
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Struts2 with AJAX

Posted by Nuwan Chandrasoma <my...@gmail.com>.
Hi,

In your action class you have to return null after you write the 
response for eg:-

  public String ajax() throws Exception {
     
      respone.getWriter().println("hello");
      respone.getWriter().close();
     
      return null;
  }

and also i dont think you need to specify the full URL when you are 
doing the ajax call.,

Thanks,

Nuwan


animesh saxena wrote:
> Hi,
>    I am using a very basic AJAX code snippet with struts. No it's not
> dojo. 
>
> req = new XMLHttpRequest();
> var url='http://localhost:8084/StrutsAjax/example/SearchAJAX.action';
> req.open("POST",url,true);
> req.onreadystatechange=searchResults;
> req.send(null);       
>
> in searchResults() function I just wnt to see req.responseText;
>
> If I want to return some response from server side if I use something
> crude like this
>
> response.getOutputStream().print("<html>Animesh</html>");
>
> It messes up struts and I get lots of exceptions in responseText.
>
> I want to return some string from the server side which is accessible by
> javascript code. It can be JSON or anything.
>
> What should be the code on server side / my action class (execute
> method) to return something to client side? Any suggestions??
>
>
>
> Thanks,
>
> Animesh
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>   


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


Struts2 with AJAX

Posted by animesh saxena <an...@gmail.com>.
Hi,
   I am using a very basic AJAX code snippet with struts. No it's not
dojo. 

req = new XMLHttpRequest();
var url='http://localhost:8084/StrutsAjax/example/SearchAJAX.action';
req.open("POST",url,true);
req.onreadystatechange=searchResults;
req.send(null);       

in searchResults() function I just wnt to see req.responseText;

If I want to return some response from server side if I use something
crude like this

response.getOutputStream().print("<html>Animesh</html>");

It messes up struts and I get lots of exceptions in responseText.

I want to return some string from the server side which is accessible by
javascript code. It can be JSON or anything.

What should be the code on server side / my action class (execute
method) to return something to client side? Any suggestions??



Thanks,

Animesh


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