Solved

Invocation of JSP in a JAR File

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
String format issue 13 91
lessBy10  challenge 15 95
own marker interface 1 58
designing in object programming 12 94
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
Use Windows Task Scheduler to print a Word document weekly so your printer ink won't dry out.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

821 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