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 (http://java.sun.com/cgi-bin/bugreport.cgi).
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>
    </applet>
    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$jsp.java:77: 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 (http://java.sun.com/cgi-bin/bugreport.cgi).
    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
    params.DTO();
    but setting it up as I would a bean allows me to simply use
    DTO();
    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:
    shukla_arvind

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

  • How to call java bean from jsp

    hi
    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:
    ${requestScope.name}

  • 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"/>
    Micheal

  • 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.
    regards
    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..
    Regards
    Renu

  • 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/password@database -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?
    Cheers
    David

    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.
    Regards,
    Daniel.

  • 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:
    com.Database.Employee
    the method is called : UpdateEmployeeDetails
    the button
    <input type="button" value="Save" onclick="submitForm('save')" />the javascript
    <script language="javascript">
            function submitForm(process){    
                document.myForm.action="update.jsp";
                document.myForm.submit();
    </script>

    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

    Hi,
    � need to get a tag to get a java class for example Test.java 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]
    thanks
    Ashok

    Hi Ashok,
    You can use rwservlet - nothing really to do with JDeveloper. Once you have report server up and running (hint: read http://download-uk.oracle.com/docs/cd/B14099_19/bi.1012/b14048/toc.htm), 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,
    John

  • Can we call Java class from LiveCycle Process?

    hi..
    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,
    Ambika

    Yes.
    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 http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/help/000934.html.
    Jasmin

  • 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
    Jose.

    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.
    Explanation
    1. Download and install the JDK 1.2.2.
    Possibly available at: http://java.sun.com/products/archive/
    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% )
    3. Set the CLASSPATH to set CLASSPATH=%CLASSPATH%;C:\Dev6iR2\TOOLS\COMMON60\JAVA\IMPORTER.JAR;.
    (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.
    C:\Dev6iR2\bin\ifbld60.exe
    Now the Java Importer Should Run fine.
    Francois

Maybe you are looking for

  • Comparing two ResultSets for equality

    Hello, I wish to test if two separate ResultSet objects are identical. By identical I mean that two different ResultSet objects are identical if they contain the same rows in the same order, and each row contains identical values in the two ResultSet

  • Error while Installing R12.1.1 on Windows 2003

    Dear all, i have error while Installing ebs on stage 3-5 log file here : http://www.mediafire.com/download/fc91007a6rcaj09/ebslog.rar   |      3% completed         /      3% completed         -      3% completed         \      3% completed         | 

  • Internal table data 1E2 automatically convert to scientific format

    Dear all, I have been searched for solution moths from the forums and tried all possible methods, but still no way to solve my above problem.  I found a way to solve it partially for us, but may be very helpful for others who meet similly case like m

  • Device Error - Sense Code(5 26 00)??

    Hi everyone.. Another problem with PrE8.01.  I am arriving at this error code: "Device Error - Sense Code (5 26 00) - Invalid Field in Parameter List - General" after the encoding and compiling media stage of burning to disk.  I have a pioneer dvd/bl

  • Error calling method of a PBNI object

    Dear All, We are facing issue of "Error calling method of a PBNI object". We are calling web services of WCF after some time to refresh data.We need help to solve this issue as we have to go live with client. It's really urgent! Regards Imran Zaheer