Okay, I was round the houses a few times before I got this to work.

What worked for me (which may not be the only solution) is to package the
bean in an archive file (*.jar) and specify this file in the
weblogic.properties file:


weblogic.httpd.servlet.classpath=C:/weblogic/myserver/servletclasses;C:/Bean
sDeploy/jspBeans.jar;

(enter as a single line) where 'C:/BeansDeploy/jspBeans.jar;' is the bit I
added.

I am starting weblogic using their startWebLogic.cmd file which handles the
specification of a classpath - this may or may not have an affect.


A second point is that the JAR file needs to be created in a certain way (or
I  may have been doing it wrong initialy - I'm not an expert). JBuilder
would create an archive file that would work but when I did this manually
mine failed. I eventually found the following would work.

1. Create a manifest file named 'manifest.mf' with the following content

   Name: packageName/className.class
   Java-Bean: True

2. Place your JavaBean in a folder that has the same name as the package.

3. Place the manifest file in a folder named "meta-inf"

4. Place both these folders below a 'working' folder.

5. From a command line execute the following from this 'working' folder,

   jar cvmf meta-inf/manifest.mf jarName.jar packageName/*.class

   where packageName is the folder containing your classes and package name
of your bean.

For more JAR stuff explaining above steps check out:

  http://java.sun.com/docs/books/tutorial/jar/TOC.html#basics

Hope this helps, good luck.

Regards

Alastair Gulland


-----Original Message-----
From: Mulay, Pramod [mailto:[EMAIL PROTECTED]]
Sent: 17 March 2000 22:13
To: [EMAIL PROTECTED]
Subject: Re: jsp and bean(Help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)
Importance: High


Hi Joyti,

The bean class that you are using in the jsp page may not be in the
classpath.

Try and place the Contact.class in a dir that is accessible by the jvm. (eg.
whatever..\weblogic\classes\ just an example)

Hope this helps.
Pramod.

-----Original Message-----
From: Jyoti Bongarala [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 17, 2000 12:16 PM
To: [EMAIL PROTECTED]
Subject: jsp and bean(Help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!)


HI! Everyone,
I am new in the list.
Well I just started working with java,JSP,Beans....
I have a background in ASP.

Well my question is :
Everytime I request a jsp(without a bean in it), it
works well and gets compiled into a servlet and gives
me the desired results. BUT when I call a bean in the
jsp, it just doesn't work. Invariably I get the
following error message.

Parsing of JSP File
'C:\weblogic\myserver\public_html\JSPfiles\SetName12.jsp'
failed:
----------------------------------------------------------------------------
----

C:\weblogic\myserver\public_html\JSPfiles\SetName12.jsp(2):
Could not create a bean of type: Contact:
java.lang.ClassNotFoundException: Contact
probably occurred due to an error in
C:\weblogic\myserver\public_html\JSPfiles\SetName12.jsp
line 2:
"session" class="Contact"/>




BTW , I am using WebLogic as my app server.  Can some
one please help me with this and tell how can I get my
code to work. I would appreciate any help I get.

Thanks,
Jyoti.

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to