umm, first of, java bean, ( if we are not talking about ejbs) are a myth. There
are no significant
differences between java beans and java classes. If I remember correctly, there are
only 3. Something
like you have to have a constrcutor takes no parameters, you need to code public
get and set methods.
Anyway, the differences are not important. You can use just about any java classes
in your jsp. make sure
they are in your path. then simply call it like you would call it in the code:
let's say your class is xmlParser
you do:
<%
xmlParser xp = new xmlParser("test.xml");
xp.parse();
%>
something like that. There are a LOT of differences between ejb and java beans.
but just a regular
java bean is not that different from java classes.
yan
kal inuganti wrote:
> Hi all
>
> Happy Thanksgiving!
>
> I have a small problem at hand and wanted to check if anybody could help me
> with it. I have a html form that submits a string to a JSP. The JSP then calls
> a BEAN that needs to check if that particular string is found in a particular
> XML file and then return the result to the HTML throught the jsp. I have a
> java class file that can do the search locally but I am not sure of how to
> convert this class file to a bean. can someone tell me how I can go about
> converting this class to bean.
>
> This class takes the XML file name as a parameter and then it parses the XML
> file. After that it just needs to do String comparison if this text exists.
> (in my example, the user input from the HTML form can be compared with the
> string kal and check if it works.)
>
> It would be great if someone can provide some tips regarding Java Beans.
>
> My Java file (Students.java)is located at
> http://24.181.167.18:8080/Students.java. You guys can look it up from there
> and suggest how I can convert this into a bean.
>
> Thank you,
> Kalyan
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
> 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".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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