You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Denis Peyrusaubes <De...@valtech.fr> on 2004/07/15 11:29:41 UTC

Easy Struts Eclipse V3

Hi,

I am wondering  if somebody tries the easystruts plugin for eclipse V3.
http://easystruts.sourceforge.net only talk about eclipse V2....

Do u know other plugin for developing struts based application using Eclipse V3

Thank u

Denis 




-----Message d'origine-----
De : Robert Shields [mailto:rshields@star.net.uk] 
Envoyé : jeudi 15 juillet 2004 11:23
À : user@struts.apache.org
Objet : calling request.getInputStream() within Action

Hi Struts Users

I'm trying to get the InputStream to read the binary contents of the
request within an Action's execute method. E.g.



public ActionForward execute(
		ActionMapping mapping,
		ActionForm form,
		HttpServletRequest request,
		HttpServletResponse response)
		throws IOException, ServletException {

	InputStream inputStream = request.getInputStream();

	// bytesAvailable is always 0
	int bytesAvailable = inputStream.available();

	int bytesRead;
	byte[] buf = new byte[1024];
	while((bytesRead = inputStream.read(buf)) != -1)
	{
		// do stuff
	}
}

So bytesAvailable is always 0, and inputStream.read(buf) immediately
returns -1.

I have heard that calling request.getParamter() before trying to access
the input stream can affect accessing the input stream. I believe struts
calls request.getParamter (it must do to populate the form bean).

My question is, how can I get access to the entire binary contents of
the HTTP body?

I'm using Tomcat 5.0.25 BTW

TIA
Rob


This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
_____________________________________________________________________

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


RE: Easy Struts Eclipse V3

Posted by James Holmes <ja...@jamesholmes.com>.
Struts Console is very similar to Easy Struts and works in ALL versions of
Eclipse (but best in 3.0).  In fact, Easy Struts is based on Struts Console,
so they are very similar.

http://www.jamesholmes.com/struts/

-James  

-----Original Message-----
From: Denis Peyrusaubes [mailto:Denis.Peyrusaubes@valtech.fr] 
Sent: Thursday, July 15, 2004 4:30 AM
To: Struts Users Mailing List
Subject: Easy Struts Eclipse V3

Hi,

I am wondering  if somebody tries the easystruts plugin for eclipse V3.
http://easystruts.sourceforge.net only talk about eclipse V2....

Do u know other plugin for developing struts based application using Eclipse
V3

Thank u

Denis 




-----Message d'origine-----
De : Robert Shields [mailto:rshields@star.net.uk] 
Envoyé : jeudi 15 juillet 2004 11:23
À : user@struts.apache.org
Objet : calling request.getInputStream() within Action

Hi Struts Users

I'm trying to get the InputStream to read the binary contents of the
request within an Action's execute method. E.g.



public ActionForward execute(
		ActionMapping mapping,
		ActionForm form,
		HttpServletRequest request,
		HttpServletResponse response)
		throws IOException, ServletException {

	InputStream inputStream = request.getInputStream();

	// bytesAvailable is always 0
	int bytesAvailable = inputStream.available();

	int bytesRead;
	byte[] buf = new byte[1024];
	while((bytesRead = inputStream.read(buf)) != -1)
	{
		// do stuff
	}
}

So bytesAvailable is always 0, and inputStream.read(buf) immediately
returns -1.

I have heard that calling request.getParamter() before trying to access
the input stream can affect accessing the input stream. I believe struts
calls request.getParamter (it must do to populate the form bean).

My question is, how can I get access to the entire binary contents of
the HTTP body?

I'm using Tomcat 5.0.25 BTW

TIA
Rob


This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
_____________________________________________________________________

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


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