You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Saurabh Bhatla <sa...@resolution.com> on 2004/08/17 17:14:30 UTC

java application to struts

Hi all,
   I have my web application based on struts framework. This application
takes some information from the user. I can submit information using jsp
but now i want to have a java application that would connect to my
webapplication using http connection and submit the information. I know
I can do that if I have a servlet. Now my question is how do that with
struts. What will be action mapping and all that information. 

Any suggestions
regards
saurabh


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


Re: java application to struts

Posted by Erik Weber <er...@mindspring.com>.
In a case like this my action mapping would look something like this:

<action path="/actor/downloadFile" type="MyActionClass" 
parameter="serveBinaryFile"/>

In other words, no forwards, no form beans.

Your execute method in your action class can manipulate the response 
OutputStream, flush and close it manually and then return null to the 
controller.

Erik



Erik Weber wrote:

> Ah. Your Action's execute method, which returns an ActionForward 
> instance, can return null, and (as far as I know) the controller won't 
> send a response. I use this when serving binary files.
>
> Erik
>
> Saurabh Bhatla wrote:
>
>> Erik,
>> then my question is what do i need to change in .xml file if i dont
>> want anything to be returned back to the application from struts?.
>> reading and writing to the stream is handled manually in servlets. Will
>> it be like if i dont apecify <forward> in .xml file then nothing will be
>> returned to the application.
>> regards
>> saurabh
>>
>> On Tue, 2004-08-17 at 10:26, Erik Weber wrote:
>>
>>
>>> To your HTTP client, there should be no difference between a Struts 
>>> app and any other Servlet-based app (or HTTP server app for that 
>>> matter).
>>>
>>> Right?
>>>
>>> Erik
>>>
>>> Saurabh Bhatla wrote:
>>>
>>>
>>>> Hi all,
>>>> I have my web application based on struts framework. This application
>>>> takes some information from the user. I can submit information 
>>>> using jsp
>>>> but now i want to have a java application that would connect to my
>>>> webapplication using http connection and submit the information. I 
>>>> know
>>>> I can do that if I have a servlet. Now my question is how do that with
>>>> struts. What will be action mapping and all that information.
>>>> Any suggestions
>>>> regards
>>>> saurabh
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> 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: java application to struts

Posted by Erik Weber <er...@mindspring.com>.
Ah. Your Action's execute method, which returns an ActionForward 
instance, can return null, and (as far as I know) the controller won't 
send a response. I use this when serving binary files.

Erik

Saurabh Bhatla wrote:

>Erik,
>  then my question is what do i need to change in .xml file if i dont
>want anything to be returned back to the application from struts?.
>reading and writing to the stream is handled manually in servlets. Will
>it be like if i dont apecify <forward> in .xml file then nothing will be
>returned to the application.
>regards
>saurabh
>
>On Tue, 2004-08-17 at 10:26, Erik Weber wrote:
>  
>
>>To your HTTP client, there should be no difference between a Struts app 
>>and any other Servlet-based app (or HTTP server app for that matter).
>>
>>Right?
>>
>>Erik
>>
>>Saurabh Bhatla wrote:
>>
>>    
>>
>>>Hi all,
>>>  I have my web application based on struts framework. This application
>>>takes some information from the user. I can submit information using jsp
>>>but now i want to have a java application that would connect to my
>>>webapplication using http connection and submit the information. I know
>>>I can do that if I have a servlet. Now my question is how do that with
>>>struts. What will be action mapping and all that information. 
>>>
>>>Any suggestions
>>>regards
>>>saurabh
>>>
>>>
>>>---------------------------------------------------------------------
>>>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
>
>
>  
>

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


Re: java application to struts

Posted by Saurabh Bhatla <sa...@resolution.com>.
Erik,
  then my question is what do i need to change in .xml file if i dont
want anything to be returned back to the application from struts?.
reading and writing to the stream is handled manually in servlets. Will
it be like if i dont apecify <forward> in .xml file then nothing will be
returned to the application.
regards
saurabh

On Tue, 2004-08-17 at 10:26, Erik Weber wrote:
> To your HTTP client, there should be no difference between a Struts app 
> and any other Servlet-based app (or HTTP server app for that matter).
> 
> Right?
> 
> Erik
> 
> Saurabh Bhatla wrote:
> 
> >Hi all,
> >   I have my web application based on struts framework. This application
> >takes some information from the user. I can submit information using jsp
> >but now i want to have a java application that would connect to my
> >webapplication using http connection and submit the information. I know
> >I can do that if I have a servlet. Now my question is how do that with
> >struts. What will be action mapping and all that information. 
> >
> >Any suggestions
> >regards
> >saurabh
> >
> >
> >---------------------------------------------------------------------
> >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


Failed to build TC because org.apache.commons.logging.Log can not been found

Posted by Chris <po...@softhome.net>.
Howdy , I am building TC after check it out from CVS like this:

C:\Work2\workspace2\jakarta-tomcat>ant
Buildfile: build.xml
detect:
uptodate:
msg.ant15:
     [echo] Detected Ant 1.5
...

but failed by the compile error  though jakarta-commons has been 
checkout to my local disk:
--------------\
   [javac] C:\Work2\workspace2\jakarta-tomcat-connectors\util\java
\org\apache\tomcat\util\compat\Jdk14Compat.java:24
***package org.apache.commons.logging could not been found.***
   [javac] import org.apache.commons.logging.Log;
...
BUILD FAILED

C:\Work2\workspace2\jakarta-tomcat-catalina\catalina\build.xml:542: 
Warning: Could not find file C:\Work2\workspace2\
jakarta-tomcat-catalina\catalina\${commons-logging-api.jar} to copy.

--------------/

Could anybody tell me how to let ant find the class 
org.apache.commons.logging.Log ?

TIA

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Re: java application to struts

Posted by Erik Weber <er...@mindspring.com>.
To your HTTP client, there should be no difference between a Struts app 
and any other Servlet-based app (or HTTP server app for that matter).

Right?

Erik

Saurabh Bhatla wrote:

>Hi all,
>   I have my web application based on struts framework. This application
>takes some information from the user. I can submit information using jsp
>but now i want to have a java application that would connect to my
>webapplication using http connection and submit the information. I know
>I can do that if I have a servlet. Now my question is how do that with
>struts. What will be action mapping and all that information. 
>
>Any suggestions
>regards
>saurabh
>
>
>---------------------------------------------------------------------
>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