Solved

Invocation of JSP in a JAR File

Posted on 2004-04-07
1
321 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 250 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

HOW TO: Install and Configure VMware vSphere Hypervisor 6.5 (ESXi 6.5), Step by Step Tutorial with screenshots. From Download, Checking Media, to Completed Installation.
In this step by step tutorial with screenshots, we will show you HOW TO: Enable SSH Remote Access on a VMware vSphere Hypervisor 6.5 (ESXi 6.5). This is important if you need to enable SSH remote access for additional troubleshooting of the ESXi hos…
This video discusses moving either the default database or any database to a new volume.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now