Calling Classes From JSP pages

I am importing an application specific class in a JSP page and calling it
          (Win NT). It compiles the servlet successfully but cannot appear to find the
          class during execution.
          I have tried placing the class file / jar file containing the class in
          CLASSPATH environment / weblogic JAVAPATH variable / weblogic ServletClasses
          directory .. so far without any luck.
          I would appreciate any suggestions.
          Regards,
          Pradeep
          

Put it in WEBLOGICCLASSPATH variable. And make sure it is only in
          WEBLOGICCLASSPATH , nowhere else.
          Cheers - Wei
          John Brown <[email protected]> wrote in message
          news:39693f9e$[email protected]..
          > I am importing an application specific class in a JSP page and calling it
          > (Win NT). It compiles the servlet successfully but cannot appear to find
          the
          > class during execution.
          > I have tried placing the class file / jar file containing the class in
          > CLASSPATH environment / weblogic JAVAPATH variable / weblogic
          ServletClasses
          > directory .. so far without any luck.
          > I would appreciate any suggestions.
          >
          > Regards,
          >
          > Pradeep
          >
          >
          >
          

Similar Messages

  • 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?

  • 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 Beans from JSP page

    hi,
    I tried to my best to call java beans from JSP page but it generate error that "unable to load class....", please help me that in which directory jsp file and bean *.class file reside, currently my setting are as follows.
    Note: I am using tomcat server and my jsp and servlet files are running seccessfuly, there is any special change in classpath for java beans? if any please tell
    My jsp file is in tomcat-->webapps-->jsp--><my file>
    My bean (*.class) file-->webapps-->Root-->web-inf-->classes--><my file>
    Pleae help me for the above problem.
    Mubashar ([email protected])

    According to J2EE standards:
    The web appl directory structure should be:
    WebAppRootDirectory
    |
    |---html, jsp, images etc
    |
    |---WEB-INF---
    |---classes--
    |---lib
    |
    |
    1) Make sure WEB-INF is in capital letters
    2) Place all ur beans in classes dir or sub-directory in
    classes
    3) In Tomcat place WebAppRootDirectory in webapps
    directory
    [email protected]

  • How to call Servlet from jsp page and how to run this app using tomcat..?

    Hi ,
    I wanted to call servlet from jsp action i.e. on submit button of JSP call LoginServlet.Java file.
    Please tell me how to do this into jsp page..?
    Also i wanted to execute this application using tomcat.
    Please tell me how to do this...? what setting are required for this...? what will be url ..??
    Thanks.

    well....my problem is as follows:
    whenever i type...... http://localhost:8080/appName/
    i am getting 404 error.....it is not calling to login.jsp (default jsp)
    but when i type......http://localhost:8080/appName/login.do........it executes servlet properly.
    Basically this 'login.do' is form action (form action='/login.do').....and i wanted to execute this from login jsp only.(from submit button)
    In short can anyone please tell me how to diaplay jsp page using tomcat 5.5
    plz help me.

  • 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?

  • Cant find bean class from jsp page using Tomcat 4

    Hi
    I have searched numerpus forums and seen many posts from people who seem to have the same problem however none of the solutions seem to work for me.
    I have a jsp page which is trying to call a bean method however I get an error
    saying that the class for the bean cannot be found. I have :
    1. put the class in a package called kolaBean under
    C:\Program Files\Apache Tomcat 4.0\webapps\ROOT\begjsp-ch01\WEB-INF\classes\kolaPackage
    2. included the package statement in the java file for the bean
    3. included an empty constructor in the java file for the bean
    4. I have declared the above constructor as public (is this necessary?)
    5. used the full package name:
    kolaPackage.kolaBean bakedBean = new kolaPackage.kolaBean();
    6. imported import java.beans.*; (is this necessary ?)
    7. still got the same error...
    Any pointers really really appreciated
    Thanks
    Kola

    in reply to David Rons email:
    Is this a fresh install of tomcat? If so, it could be a configuration
    problem.Yes it is
    Is the class public in the package (I forget that all the time)?Yes it is. I have also declared the constructor to be public is this
    necessary?
    What's the error message?here is the error message:
    An error occurred between lines: 11 and 14 in the jsp file:
    /begjsp-ch01/kolaBean.jsp
    Generated servlet error:
    C:\Program Files\Apache Tomcat
    4.0\work\localhost\_\begjsp-ch01\kolaBean$jsp.java:59: Class
    kolaPackage.kolaBean not found.
         kolaPackage.kolaBean bakedBean = new
    kolaPackage.kolaBean();
         ^
    2 errors
    Thanks in advance
    Kola

  • IllegalAccessError trying to instantiate public class from JSP page

    I have a public class called UrlHolderClient located in both
    WEB-INF/classes/UrlHolderClient.class and
    WEB-INF/lib/urlholder.jar.
    This client class is used as a wrapper class around a simple ejb which holds urls. I have a JSP which tries to create an instance of UrlHolderClient in jspInit(), but the call to the constructor throws a java.lang.IllegalAccessError. I have no idea what the problem is here. I import the classes using the page directive.
    Any suggestions?

    Is this tomcat you are deploying on or some other App Server?
    Also, you reference JspInit(), have you tried instanting in
    Scriplet Code <% UrlHolderClient urlHolderClient = new UrlHolderClient() %>
    Does that not work either?

  • 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

  • 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

  • How to call cystal report8 report file from jsp page

    hi guys
    present i am using cystal report8 already i am having ReportViewer.jar and ReportviewerBean.jar files
    using that please send me sample code how to call that report from jsp page..
    and how to pass the parameters from jsp page to crystalreport8 report file.
    it was very urgent task to me..so please send sample code on above topic..
    or send me crystalreport8 API
    thanks
    regards

    Hi,
    I also want to work on crystal report but i dont have the ReportViewerBean.jar and ReportViewer.jar. So, please tell from where will i get those jar files.
    Thanks in advanced.

  • Calling WEB-INF/lib/.Jar class from JSP

    Hi everybody.
    I have a problem about calling my jar file class from JSP .My development plotform is WSAD 5.1.2 and application server : WebSphere Test Server 5.1.This is the my server console error:
    error: IO exception sun.io.MalformedInputException
    D:\Projeler\Mustafa Yilmaz\WFR\WTIREAR\WTIRSD.jar&#40;dvo/utb_part_tai_tool_code_bilgi_DVO.java&#41;:4: cannot access ortak.dvo.AnaDvo
    bad class file: D:\Projeler\Mustafa Yilmaz\WFR\WTIREAR\ERPOrtak.jar&#40;ortak/dvo/AnaDvo.java&#41;
    file does not contain class ortak.dvo.AnaDvo
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    &#40;source unavailable&#41;
    3 errors
    ]: org.apache.jasper.JasperException: Unable to compile class for JSP
    D:\Projeler\Mustafa Yilmaz\WFR\WTIREAR\WTIRSD.jar(dvo/utb_part_tai_tool_code_bilgi_DVO.java):8: class utb_part_tai_tool_code_bilgi_DVO is public, should be declared in a file named utb_part_tai_tool_code_bilgi_DVO.java
    (source unavailable)
    error: IO exception sun.io.MalformedInputException
    D:\Projeler\Mustafa Yilmaz\WFR\WTIREAR\WTIRSD.jar(dvo/utb_part_tai_tool_code_bilgi_DVO.java):4: cannot access ortak.dvo.AnaDvo
    bad class file: D:\Projeler\Mustafa Yilmaz\WFR\WTIREAR\ERPOrtak.jar(ortak/dvo/AnaDvo.java)
    file does not contain class ortak.dvo.AnaDvo
    Please remove or make sure it appears in the correct subdirectory of the classpath.
    (source unavailable)
    3 errors
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:129)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.loadJSP(JspServlet.java:941)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:285)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:317)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:669)
         at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:767)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
         at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
         at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
         at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:983)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
         at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
         at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
         at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
         at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
         at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
         at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
         at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
         at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
         at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
    can you help me ?

    class utb_part_tai_tool_code_bilgi_DVO is public,
    should be declared in a file named utb_part_tai_tool_code_bilgi_DVO.java...
    cannot access ortak.dvo.AnaDvo bad class file:
    D:\Projeler\Mustafa Yilmaz\WFR\WTIREAR\ERPOrtak.jar(ortak/dvo/AnaDvo.java)
    file does not contain class ortak.dvo.AnaDvoThe error messages say it all. Rename the .java files so that they match the class names. Then recompile and repack the JAR file.

  • Wot all ways are there to call servlet from jsp

    hi all
    i want to know wot all methods are available
    so that i can call servlet from jsp
    the one which i know is using RequestDispatcher
    wot are others ?
    thanx

    hi all
    i want to know wot all methods are available
    so that i can call servlet from jsp
    the one which i know is using RequestDispatcher
    wot are others ?
    thanxhi here are few ways... to call servlet from jsp...
    these are just generic syntax.
    Form:     
    <form action="ServletPath">
    Link:     
    Directives & Action tags :
    <%@ page import="ServletPath" %>
         <%@ taglib uri="ServletPth" %>
         <jsp:include page="ServletPath">
         <jsp:forward page="ServletPath">
         <jsp:useBean class="ServletPath"> (Not sure about this useBean)
    hope you got your answer.
    regards,
    immu

  • Calling JApplet from jsp

    Hi,
    Can any one tell me how to call JApplet from JSP? I am using <jsp:plugin>
    tag but it is not working.

    use the jsp:plugin tag like this in your jsp page..
    <jsp:plugin  type="applet"
         code="appletclsname.class"
         codebase="ourapplets"
         jreversion="1.5"
         width="400px"
         height="200px">
    </jsp:plugin>

Maybe you are looking for

  • How to achieve this tree table (displaying/modifying non leaf level details) ?? Image inside

    Region location Dept Budget Available Allot Budget Unused Budget Decision for unused budget US 200$ User Input NY 100$ User Input CA 100$ User Input HR 50$ User Input IT 50$ User Input ---------30$-------- 20$ LOV Add to Location Use for Future Proje

  • Volcano 7+ too heavy?

    i have the kt3 ultra aru is the volcano 7+ with the 3 lug clip too heavy? what do you guys think?

  • Colorize a black and white photo

    Hello all! I'm new to Mac and Aperature and sure would appreciate a little help. I'm wondering if I can add color to a black and white photo. For example, a picture of my daughter, and I'd like to add color to the flowers in her hair. Thank you! dwat

  • Using a list to rs

    PHP/MySQl Dear All, how do I achieve the following. The field, "general.emails", contains a list such as "1, 3, 5". The rs only produces the first email name. SELECT email.emlID, email.fname, email.title, general.emails FROM email INNER JOIN general

  • Acrobat 8 updates: Cannot find / download AcrobatUpd810_efgj_incr.msp

    It is beyond me how Acrobat 8, with known auto-update issue(s), cannot be easily updated manually. I downloaded a number of the incrementals, 8.1.1 > 8.1.2 > 8.1.3, but 8.1.0 cannot be found! Adobe - Search: acrobat%208%2E1%2E0 Extremely frustrating,