Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Invocation of JSP in a JAR File

Posted on 2004-04-07
1
Medium Priority
?
331 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 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Check out what's been happening in the Experts Exchange community.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

704 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