Calling java class from jsp page

Dear Friends.
I wrote jsp page and java class.
Am calling java class from jsp page. after processing result,
I have to refresh jsp page from java class.
processing time may take 5 minutes or 1 minute etc. that depends on user.
Can It be possible ? if possible , How ?

Ok, I get a very strange error now:
org.apache.jasper.JasperException: Unable to compile class for JSPerror: An error has occurred in the compiler; please file a bug report (
What is this??? Anyone?

Similar Messages

  • How to load java class from jsp page?

    hi all!
    Does anyone know how to load java class from jsp page?
    I try to load java class from jsp page.
    Is it possible to load java class fom jsp page?
    thanks and have a good day!

    What I mean is How to load/open java class file from jsp page?
    I think we can open Applet from jsp page by using
    <applet code=helloApplet.class width=100 height=100>
    but, how to open java class which is an application made by Frame?
    thanks and have a good day

  • Calling my Java class from JSP page

    Hello, I am trying to call my Java class from my JSP page passing parameters to it and getting back a collection of result sets. Can someone tell me what I might be doing wrong:
    JSP code to call Java class:
    String strEssUser = "test";
    String strProcessingMonth = "JUL";
    String strProcessingYear = "2002";
    strQueryList=new ListReturn(strEssUser.toString(), strProcessingMonth.toString(), strProcessingYear.toString());
    I get this error when I try to run this JSP page using tomcat:
    C:\Program Files\Apache Tomcat 4.0\work\Standalone\localhost\em\jsp\Test_0005fSummarySBU_0005fscreen$ Class org.apache.jsp.ListReturn not found.
    strQueryList=new ListReturn(strEssUser.toString(), strProcessingMonth.toString(), strProcessingYear.toString());
    I'm not sure if this problem is the way I am calling the Java class, or if I have a problem in the Java code itself. Can anyone help?

    Ok, I get a very strange error now:
    org.apache.jasper.JasperException: Unable to compile class for JSPerror: An error has occurred in the compiler; please file a bug report (
    What is this??? Anyone?

  • Using java class from JSP page

    I have a class that connects to the database and return the result in form of array of objects, now I wrote a tester and I was able to print the result on the console but when it came to JSP how can I use this class I am a bit confused, how can I declare an array of objects and save the result that comes from the class method
    note: my class is not a bean it is a service class that contain methods to retreive different information from the database.
    I would apritiate any help but please make it in sequence for example declaring an array to hold the result then call the method that returns the array of objects..etc
    please help, I am really confused and don't know what to write
    thank you

    You can access a class in the same way as a bean, after all a bean is just a class that follows a set of rules.
    You need to put your classes in packages to access them.
    I have 2 packages, params and DTO. I set the class that returns the Data Transfer Object, or array of objects up as I would a bean
    <jsp:useBean id="DTO" scope="request" class="params.DTO" />
    I think you skip the above declaration and access it directly in code using
    but setting it up as I would a bean allows me to simply use
    DTO is the class that passes back the array of objects.
    Objects themselves I have in a seperate package, also called DTO (sorry if this is confusing, made sense at the time :-) ) You dont need them in seperate packages, just helped me keep DTO objects seperate from business logic classes......
    Now before I use params.DTO() I declare a variable of the Object type DTO() returns
    <%! DTO.workSheet[] ws; %>
    So, ws is the object type that will be returned by params.DTO()
    Then to get my array of objects back from params.DTO() :-
    ws = DTO.workSheet(day);
    or if you dont like the bean declaration
    ws = params.DTO.workSheet(day);
    You need to put your packages under WEB-INF/Classes when using Tomcat
    So I have
    Tomcat 5.0\webapps\myApplication\WEB-INF\classes\params
    Tomcat 5.0\webapps\myApplication\WEB-INF\classes\DTO
    Under which reside the classes

  • Getting error when calling Java program from JSP page.

    Hi All,
    I'm getting below error msg, previously the page use to display and also java program use to run properly, but suddenly today i came across this error. May be some settings have been changed on my server, since number of developers uses this common webserver here.
    Any help would be much appreciated. Pls let me know if if anyone requires much info regarding this one.
    javax.servlet.ServletException: sun/tools/javac/Main
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at java.lang.Throwable.fillInStackTrace(Compiled Code)
         at java.lang.Throwable.(Compiled Code)
         at java.lang.Exception.(Compiled Code)
         at javax.servlet.ServletException.(Compiled Code)
         at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
         at javax.servlet.http.HttpServlet.service(Compiled Code)
         at org.apache.tomcat.core.ServletWrapper.doService(Compiled Code)
         at org.apache.tomcat.core.Handler.service(Compiled Code)
         at org.apache.tomcat.core.ServletWrapper.service(Compiled Code)
         at org.apache.tomcat.facade.RequestDispatcherImpl.doForward
    Root cause:
    java.lang.NoClassDefFoundError: sun/tools/javac/Main
         at org.apache.jasper.compiler.SunJavaCompiler.compile(Compiled Code)
         at org.apache.jasper.compiler.Compiler.compile(Compiled Code)
         at org.apache.jasper.servlet.JspServlet.doLoadJSP(Compiled Code)
         at org.apache.jasper.servlet.JasperLoader12.loadJSP(Compiled Code)
         at org.apache.jasper.servlet.JspServlet.loadJSP(Compiled Code)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(Compiled Code)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Compiled Code)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(Compiled Code)
         at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
    Message was edited by:

    did u happen to upgrade ur jdk?????

  • How to call java bean from jsp

    How to call a java bean from jsp page..
    Is any other way to call javabean from jsp page apart from this sample code...
    <jsp:useBean id="obj" class="com.devsphere.articles.calltag.TestBean"/>
    thnx in advance

    If you also use servlets, you can attach beans to the request or session and use them directly in your JSP's. So if you do:
    request.setAttribute("name", yourBean);and then forward to a JSP, you can reference the bean like:

  • How to call Java Beans from JSP (eg.put them in a WAR or package)

    Can anyone explain to me what are the steps and ways to call java beans from JSP?

    1st, put the javabean classes in the right place:
    the web-inf/classes/your_bean.class directory of corresponding web application
    2nd in your jsp page:
    <jsp:useBean id="obj_var_name" class="your_bean"/>
    <jsp:setProperty name="obj_var_name" property="smthg" value="smthg_calue"/>

  • Calling java class from abap function moduile

    Is it possible to call java class from function module.
    i am a java guy. my need is to call a java class from a  function module in the backend. which in turn performs certain functions.
    i would be highly obliged if someone could let me know if this is possible.
    Srikumar V

    Hi Srikumar ,
    you can call a java webservice in ABAP .
    u can call the webservice and via that u can trigger the java class..

  • Calling java classes from plsql procedures

    I'm attempting to call java classes from plsql procedures which will create cmsdk users, folders, groups etc, however when I attempt to load a java class into the oracle schema using the command:
    loadjava -user user/[email protected] -resolve classname.class
    It generates error messages to the effect that classes (cmsdk classes) required by the class cannot be found. The class is loaded and marked with the status "invalid". Is it therefore necessary for me to load the cmsdk packages into the schema?

    Using CMSDK Java API within the database has never been supported
    (see Problems loading IFS's java class into database
    When we needed to invoke CMSDK code from our PL/SQL code, we used one of two approaches:
    (1) use advanced queues to send requests to an external Java program (the CMSDK code, running outside the database) and receive the results back (asynchronous choice); or
    (2) make an HTTP request to a Java servlet (the CMSDK code, running in some Java web container like iAS) and get the response back in some custom format (XML or something) (synchronous choice).
    It seems to me that the CMSDK Java API was designed to be used only in middle-tier, not in database tier.

  • How to call java classes from javascript?

    i have a button which calls javascript i need to access a class to update the values in the database.. how do you call the java code from within the javascript?
    the class is stored under tomcats classes directory and is accessed:
    the method is called : UpdateEmployeeDetails
    the button
    <input type="button" value="Save" onclick="submitForm('save')" />the javascript
    <script language="javascript">
            function submitForm(process){    

    is it not possible?
    do i have to refresh the page and read in the values like...
    String ename = request.getParameter( "EmployeeName");
         session.setAttribute( "ename", ename);
    %>and then call the class from here?
    looking around ive come across ajax but i dont know how to use it and what you need to install and if its compatable with tomcat and jsp?
    is ajax better or not really worth it?
    i have anything up to 100 fields that need saving at one save click

  • Tag to take a java class in JSP page

    � need to get a tag to get a java class for example into a JSP page like MyJSP.jsp so that � can ,after doing this, call its methods, variables etc.
    Thank you !

    � know a way to do th�s us�ng JRun but the programme � have (NETBEANS IDE 3) does not accept �t.

  • Can not call bean class from JSp/Tomcat 5.5

    hello everyone...
    i m using one bean class Parser which is called by discussion.jsp page. i put class file in webapps/grid/WEB-INF/classes and JSP page is in webapps/grid/. The whole combination is working fine for tomcat 3.3.2 but not working properly in tomcat 5.5.
    Error is as follow...
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 38 in the jsp file: /discussion.jsp
    Generated servlet error:
    Parser cannot be resolved or is not a typeplease help me....
    Thank in Advance

    You still need to import the class from the default package. As a word of advice you should put the class in a package. The later versions of Tomcat do not play well with bean classes that are not in packages.

  • How to call RDF report from JSP page

    Dear all,
    I want to call a RDF report from JSP page. I am creating the JSP page using j developer 10G.
    Can anyone help me out in this case. Is there any tag or procedure or any other way by of that i can perform this work.
    please help and send the reply on [email protected],[email protected]

    Hi Ashok,
    You can use rwservlet - nothing really to do with JDeveloper. Once you have report server up and running (hint: read, you can call a report like this:
    http://server:port/rwservlet?report=my_report.rdf&destype=cache&desformat=html&p_my_parameter=xxx etcHope this helps,

  • Can we call Java class from LiveCycle Process?

    I have a general query, is it possible to call customeized java class from Workbench Process?
    I found dat we can invoke a web service... is there some operation like that for calling a java class...
    Thanks and Regards,

    You can use the Script service and put your Java code in there
    Or build your own component, which is really a Java pojo, and deploy it to LiveCycle. See

  • How to call Java class from Forms 6i?

    Hi friends,
    I need to call a Java class from my Forms 6i application.
    (It runs under WIndows XP. It's a client/server application and I have only the client and the Form builder installed on my PC)
    I don't know almost anything about Java's world so your help would be very useful for me.
    Could you tell me exactly what i have to do?
    I've read in metalink several Notes, but they supposed that the Java architecture is already installed in the computer.... I only have the default installation of Developer 6i... so I would need to know:
    - How to install/configure the neccesary to execute Java classes without problem
    - How to invoke the .class from Forms 6i.
    Thanks a lot

    And also this one:
    Problem Description
    Installed Forms 6i Rel 2 on a MS Windows machine. When trying to Import the Java
    Classes getting the errors
    PDE-UJI0001 Failed to create the JVM
    Solution Description
    You need to to install JDK 1.2.2 to run the Java Importer. And set the PATH's
    and classpath's correctly.
    1. Download and install the JDK 1.2.2.
    Possibly available at:
    2. Assuming the JDK 1.2.2 is installed in c:\jdk1.2.2 directory and the JRE in
    C:\PROGRA~1\JAVASOFT\JRE\1.2 directory; ORACLE_HOME=C:\Dev6iR2.
    Set the PATH to
    set PATH=c:\jdk1.2.2\bin;C:\PROGRA~1\JAVASOFT\JRE\1.2\bin;C:\PROGRA~1\JAVASOFT\JRE\1.2\bin\classic;%PATH%
    ( If you are using ias9i then the JDK 1.2.2 comes with the ias installtion ,
    in this case please set the PATH to
    D:\ias9i\Apache\jdk\bin;D:\ias9i\Apache\jdk\jre\bin;D:\ias9i\Apache\jdk\jre\bin\classic;%PATH% )
    (If you do not set the CLASSPATH correctly you will get the error
    PDE-UJI002 Unable to find the required java importer classes)
    4. Now run the Forms Builder by using the command.
    Now the Java Importer Should Run fine.

Maybe you are looking for