Java Installation Doubts...

P

Prashanth

Hello...
I am new to java programming. I need to know, where to put the .jar
files, because the taglib directive element inside a .jsp file/program
did not work, it gave an error message.
Also, where to place other addons.
Suggest any references to look into later....
Thanks
Prashanth
 
P

Prashanth

Hello...
I am new to java programming. I need to know, where to put the .jar
files, because the taglib directive element inside a .jsp file/program
did not work, it gave an error message.
Also, where to place other addons.
Suggest any references to look into later....
Thanks
Prashanth

Hai there
any valuable suggestions for the above problem...
thanks very much
Prashanth
 
D

Dave Miller

Prashanth said:
Hello...
I am new to java programming. I need to know, where to put the .jar
files, because the taglib directive element inside a .jsp file/program
did not work, it gave an error message.
Also, where to place other addons.
Suggest any references to look into later....
Thanks
Prashanth

Recommended practice depends on the container that you're using to run
the .jsp - which are you using?
 
A

Arne Vajhøj

Dave said:
Recommended practice depends on the container that you're using to run
the .jsp - which are you using?

WEB-INF/lib inside the war file should work with any container
since it i specified in the standard.

It requires one to deploy war files instead of messing
around directly in the file system - and deployment of war
file is still container specific. But still a good approach
IMHO.

Arne
 
P

Prashanth

WEB-INF/lib inside the war file should work with any container
since it i specified in the standard.

It requires one to deploy war files instead of messing
around directly in the file system - and deployment of war
file is still container specific. But still a good approach
IMHO.

Arne

The following statements give an error message....

<%@ page language='java' contentType='text/html' %>
<html>
<head><title>Taglib Directive'</title></head>
<body>
<b><u>Monthly Sales</u></b><br/>
<%@ taglib uri='taglib.tld' prefix='bar' %>
<bar:Vbar width='200' height='75'
bgcolor='#C0C0C0' fgcolor='#000000'
values='4,3,6,8,7' labels='J,F,M,A,M' />
</body>
</html>

What is wrong with the above ? .....

Prashanth
 
A

Arne Vajhøj

Prashanth said:
The following statements give an error message....

<%@ page language='java' contentType='text/html' %>
<html>
<head><title>Taglib Directive'</title></head>
<body>
<b><u>Monthly Sales</u></b><br/>
<%@ taglib uri='taglib.tld' prefix='bar' %>
<bar:Vbar width='200' height='75'
bgcolor='#C0C0C0' fgcolor='#000000'
values='4,3,6,8,7' labels='J,F,M,A,M' />
</body>
</html>

What is wrong with the above ? .....

What error message ?

Arne
 
R

Roedy Green

I am new to java programming. I need to know, where to put the .jar
files, because the taglib directive element inside a .jsp file/program
did not work, it gave an error message.
Also, where to place other addons.

The nice thing about Jar files is they are very insensitive to
placement.

just do
java.exe -jar x:\dir\xxx.jar

The jar can be anywhere.

Library jars are most easily handled by putting them in the ext dir.

See http://mindprod.com/jgloss/classpath.html
for details
 
A

Arne Vajhøj

Roedy said:
The nice thing about Jar files is they are very insensitive to
placement.

just do
java.exe -jar x:\dir\xxx.jar

The jar can be anywhere.

Not in Java EE context.

(which jsp and taglibs clearly indicates that it is)

Arne
 
A

Arne Vajhøj

Lew said:
ext directories are good for things that you want as part of your Java
platform generally. Things like log4j and commons-collections are good
candidates for this sort of primacy.

I am not even sure that I would put those in ext. Too global in scope.
And to much trouble with upgrades.
The trick for JAR files run via the 'java -jar' command, the classpath
in your local environment is ignored at levels below the ext directory
level. The JAR is sort-of self-contained with respect to classpath,
ignoring both the CLASSPATH environment variable and the -cp
(-classpath) option to the 'java' command. Inside its own manifest, it
will often specify its own classpath, and that will comprise JARS that
it specifically needs. Usually those JARs go in the same directory as
the application JAR itself.

For example:

approot-directory/
|==foo/
|
|= foo.jar
|= postgresql-8.3-603.jdbc4.jar

Inside the 'foo.jar' manifest would be

Manifest-Version: 1.0
Class-Path: postgresql-8.3-603.jdbc4.jar

<http://java.sun.com/docs/books/tutorial/deployment/jar/downman.html>

That is definitely the way to go for Java SE apps.

Java EE containers has their own rules.

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top