22.07.2013 Views

Download File

Download File

Download File

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Step 2:<br />

91<br />

create a directory (work in e:\) and copy struts.jar,servelet-appi.jar into work d<br />

directory.Then set the classpath as<br />

set classpath=struts.jar;servlet-api.jar;<br />

then copy the ActionOne.class file to webapps/ts/WEB-INF/classes<br />

ActionOne.java:<br />

import java.io.*;<br />

import javax.servlet.*;<br />

import javax.servlet.http.*;<br />

import org.apache.struts.action.*;<br />

public class ActionOne extends Action<br />

{<br />

publicActionForwardexecute(ActionMappingmapping,ActionFormform,HttpServletRequ<br />

est request,HttpServletResponse response)throws Exception<br />

{<br />

System.out.println("---Action executed----");<br />

PrintWriter pw=response.getWriter();<br />

pw.println("HELLO WORLD!");<br />

return null;<br />

}<br />

}<br />

Step 3:<br />

HYDERABAD INISTITUTE OF TECHOLOGY AND MANAGEMENT

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!