I have a servlet that is taking parameters passed to it, I need to pass it to another java class. Can anyone help me out here..
public class CMInputServlet extends HttpServlet {
//Initialize global variables
public void init(ServletConfig config) throws ServletException {
super.init(config);
}
//Process the HTTP Post request
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html"
CMCommand = request.getParameter("CMCmnd"
CMUsername = request.getParameter("CMusrnm"
CMAuthToken = request.getParameter("CMAthTkn"
CMFirstName = request.getParameter("CMFN"
CMLastName = request.getParameter("CMLN"
and I want to pass these parameters to class called parameters in file parameters.java.
public class parameters
//variables
...
//constructor
...
//set and get methods
...
//main
public static void main(String[] argv)
...
parameters pm = new parameters();
//perform some operations on parameters
//passed by the servlet here.
public class CMInputServlet extends HttpServlet {
//Initialize global variables
public void init(ServletConfig config) throws ServletException {
super.init(config);
}
//Process the HTTP Post request
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setContentType("text/html"
CMCommand = request.getParameter("CMCmnd"
CMUsername = request.getParameter("CMusrnm"
CMAuthToken = request.getParameter("CMAthTkn"
CMFirstName = request.getParameter("CMFN"
CMLastName = request.getParameter("CMLN"
and I want to pass these parameters to class called parameters in file parameters.java.
public class parameters
//variables
...
//constructor
...
//set and get methods
...
//main
public static void main(String[] argv)
...
parameters pm = new parameters();
//perform some operations on parameters
//passed by the servlet here.