gudii9
asked on
eclipse buid path vs tomcat lib path
Hi,
to run servlets and JSPs(assuming they do some CRUD operations on oracle database), JDBC java programs etc do i need to set ojdbc5.jar both to eclipse build path and also to tomcat lib directory?
how eclipse build path different from web container like tomcat lib directory?
(like C:\Program Files\Apache Software Foundation\Tomcat 9.0\lib)
when i set to eclipse build path where does that jar go and sit? which location?
Servlet jar on the contrary we only set at eclipse build path only as that is already present in tomcat lib directory?
please advise
to run servlets and JSPs(assuming they do some CRUD operations on oracle database), JDBC java programs etc do i need to set ojdbc5.jar both to eclipse build path and also to tomcat lib directory?
how eclipse build path different from web container like tomcat lib directory?
(like C:\Program Files\Apache Software Foundation\Tomcat 9.0\lib)
when i set to eclipse build path where does that jar go and sit? which location?
Servlet jar on the contrary we only set at eclipse build path only as that is already present in tomcat lib directory?
please advise
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That's not what i said. Read my comment again
ASKER
Personally if i were doing it on Windows, i would use the Tomcat lib directory as part of the build path. Why?
a. it's runtime-realistic: it's a good sanity check on the runtime dependencies
b. i don't like duplicating jars unnecessarily
you are saying while setting eclipse build path go to below path and include jars like Servlet.jar
C:\Program Files\Apache Software Foundation\Tomcat 9.0\lib
but above directory do not have ojdbc5.jar though which is in oracle directory
but above directory do not have ojdbc5.jar though which is in oracle directoryBut if you're using that library in your web app, it will have to be in Tomcat lib won't it?
ASKER
But if you're using that library in your web app, it will have to be in Tomcat lib won't it?
that is my question?
if i use ojbc5.jar etc in my jsp or servlet web app i need that must and should in tomcat lib?
That wasn't actually your question. But the answer to this (new) related question is yes
ASKER
Personally if i were doing it on Windows, i would use the Tomcat lib directory as part of the build path. Why? a. it's runtime-realistic: it's a good sanity check on the runtime dependencies
b. i don't like duplicating jars unnecessarily
above comment applicable only to tomcat provided jars like Servlet.jar etc right not for other vendor jars like ojdbc5.jar etc
ASKER
import java.util.Arrays;
import java.util.Scanner;
public class PyramidSorting
{
public static void main(String[] args)
{
Scanner scanner = new Scanner(System.in);
String input = scanner.nextLine();
int integers[] = new int[input.length()];
String inputArray[] = input.split("");
for(int i = 0; i < inputArray.length; i++){
integers[i] = Integer.parseInt(inputArray[i]);
}
Arrays.sort(integers);
for(int i = 0; i < integers.length; i++){
for(int j = 0; j< i; j++){
System.out.print(integers[i]);
}
System.out.println();
}
}
}
1.read the input string
2. sort the input string
3.find the length of the sorted string
above code satisfy your 3 steps right
i need to figure out step 4 and step 5 which is bit tricky?
What's meant to go in the Tomcat lib folder are jars that are used in more than one app or jars that are general
ASKER
you mean eclipse build path.
i always use windows mostly
you mean i do not need to put ojbc jar in below web container path like?
C:\Program Files\Apache Software Foundation\Tomcat 9.0\lib
i got many errors by not doing that.
any good and complete example on this illustrating setting these paths?