Solved

Invocation of JSP in a JAR File

Posted on 2004-04-07
1
329 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

Getting to know the threat landscape in which DDoS has evolved, and making the right choice to get ourselves geared up to defend against  DDoS attacks effectively. Get the necessary preparation works done and focus on Doing the First Things Right.
This article is in regards to the Cisco QSFP-4SFP10G-CU1M cables, which are designed to uplink/downlink 40GB ports to 10GB SFP ports. I recently experienced this and found very little configuration documentation on how these are supposed to be confi…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

615 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