I have put a java project as a .jar (="Calculator_Project") into the WebContent/WEB-INF/lib folder.
This"Calculator_Project"need some temporary folders (debug,temp) and two folders with models and scripts in it (models,scripts).
I cannot change the way the "Calculator_Project" in the .jar need this folders. If i use the .jar in a normal java project and call the classes/methodes of the project with the needed folders it works fine.
When i put the code into a servlet the methodes of the "Calculator_Project" don't find the scripts and the folders. Where do i have to place this temporary and script-folders?
I already tried WEB-INF and WebContet folder of my dynamic web project. Do i need to declare this folders somewhere?
Edit: structure of the Dynamic Web Service:
Code of the Servlet where the classes and methodes of the normal project "Calcultor_Project" are executed:
/**
* Servlet implementation class MasterServlet
*/
@WebServlet("/MasterServlet")
public class MasterServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public MasterServlet() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see Servlet#init(ServletConfig)
*/
public void init(ServletConfig config) throws ServletException {
Calculator calculator = new Calculator();
final String modeldirectorypath = "model" ;
final String modelname = "QualityCheck" ;
// this methode need the extra-folders "debug","temp","models","scripts"
CalculatorSlots [] slots = calculator.runEval(modeldirectorypath,modelname);
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//stuff to do
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
}
}