Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Invocation of JSP in a JAR File

Posted on 2004-04-07
1
Medium Priority
?
333 Views
Last Modified: 2008-03-03
I'm learning JSP and Java.  My development environment is BEA Weblogic Workshop (BWW) the last few days.  Prior to using BWW, I had a working "application" consisting of several HTMLs, several JSPs, and one Java class.  To start the application I would...

 * Start server listening on port 8080.
 * Go into web browser and enter http://localhost:8080/ApplicationName.jsp<return>

And, the JSP would be found that would in turn call the HTML files at the proper time, and the Java class too.  Everything fine so far.  But, now I'm trying to understand JAR files.  They seem pretty straightforward.  But, it seems that to invoke a program in a JAR file, it has to be a Java class with a 'main' method that is invoked.  Is this right?

Conversely, is it right that a JSP in a JAR can't be invoked as the starting program for the application?  (And, if so, how would I modify my application to run?)

I hope my question makes sense!
0
Comment
Question by:LarryAndro
1 Comment
 
LVL 92

Accepted Solution

by:
objects earned 1000 total points
ID: 10779138
A jar is simply a convenient way to store a collection of class files and resources required by the class loader. From an application perspective there is no real difference between a jar file, and a directory containing the contents of the jar.

> But, it seems that to invoke a program in a JAR file, it has to be a Java class with a 'main' method that
> is invoked.  Is this right?

Regardless of whether class is in a jar or not, a class must have appropriate main method to be invoked as an application.

> is it right that a JSP in a JAR can't be invoked as the starting program for the application?

that is correct, but not really to do with jar

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
It’s a season to be thankful, and we’re thankful for users like you who engage on site, solve technology problems, and network with others in the industry. What tech are we most thankful for? Keep reading.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Loops Section Overview

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question