Problem linking jsp with javabeans

Hey guys,
I am new at this jsp stuff, but have read a few threads as well as a few tutorials. however, i dont understand why i keep getting this error. any help would be appreciate it!
i m currently running it off tomcat 4.1, and the hierarchy that i have currently is set like this:
"xxx/build/array.jsp"
"xxx/build/WEB-INF/classes/arraymap/javaBeans/ArraysBean.java"
the content of my jsp is as follows:
<%@ page import="arraymap.javaBeans.ArraysBean" %>
<html>
<head>
     you are in the array page!
</head>
<jsp:useBean id="test" class="arraymap.javaBeans.ArraysBean" scope="page"/>
<body>
<a href="index.html"> LOG OUT</a>
<center>
Please choose one of the following queries:
</h3>
</center>
</body>
</html>and my simple bean code:
package arraymap.javaBeans;
import java.util.*;
import arraymap.*;
public class ArraysBean {
    ArrayMapModMain a = ArrayMapModMain.instance();
    public Object[] getArrayTypes()
     return a.getArrayTypes();
}but i get this error:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 6 in the jsp file: /cds_jsp/build/array.jsp
Generated servlet error:
[javac] Compiling 1 source file
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\cds_jsp\build\array_jsp.java:7: package arraymap.javaBeans does not exist
import arraymap.javaBeans.ArraysBean;
^
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\cds_jsp\build\array_jsp.java:46: package arraymap.javaBeans does not exist
arraymap.javaBeans.ArraysBean test = null;
^
An error occurred at line: 6 in the jsp file: /cds_jsp/build/array.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\cds_jsp\build\array_jsp.java:48: package arraymap.javaBeans does not exist
test = (arraymap.javaBeans.ArraysBean) pageContext.getAttribute("test", PageContext.PAGE_SCOPE);
^
An error occurred at line: 6 in the jsp file: /cds_jsp/build/array.jsp
Generated servlet error:
C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\cds_jsp\build\array_jsp.java:51: package arraymap.javaBeans does not exist
test = (arraymap.javaBeans.ArraysBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "arraymap.javaBeans.ArraysBean");
^
4 errors
any idea on why i cant recognize the package? the file is on the tomcat server (the class file is physically there when i manually check it), and i couldnt figure out what i went wrong with either the jsp or hte beans. i have been stuck on this problem for several hours and it is painful sitting in a cube not knowing what is goin on. any help would be GREATLY appreciated! thanks in advance!
kev

I copied your files into my environment and it worked fine for me (I had to strip out the ArrayMapModMain stuff to get a compilation though), so it looks like an environment thing as opposed to an issue with your code.
Possibilities include (shots in the dark):
1.) The path it showed in the error messages
"C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\cds_jsp\build\array_jsp.java"
looks a little funny, mainly the underscore between localhost and cds_jsp. Maybe there's something wrong in your Tomcat config file (see #3).
2.) Maybe your directory has a permissions issue. Is it readable? Likely not an issue as you're using windows, but it bites me all the time in linux.
3.) I haven't used Tomcat in a while, but I'll bet it has a config file. Are you sure it's pointing to your WEB-INF/classes dir for your servlets?
Sorry I can't be of more help.
jengi

Similar Messages

  • The deployment problem in JSP using JavaBean

    Hi there,
    I followed the descriptions in Writing Enterprise Applications with
    Java 2 SDK, Enterprise Edition tutorial to build a set of programs to run JSP with JavaBean, and I also followed the steps in creating new WAR file, but some how it wouldn't work after I deployed them. I run the JSP in IE and got a message like this:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 20 in the jsp file: /1bonus.jsp
    Generated servlet error:
    c:\j2sdkee1.3.1\repository\orbit\web\JSPRoot\$1bonus$jsp.java:63: Class org.apache.jsp.JBonusBean not found.
    JBonusBean jbonus = null;
    ^
    I used the deploytool to create the WAR file, and after I added the 1bonus.jsp, I also added JBonusBean into the WAR file. I found 1bonus.jsp was added into the WAR file, but there's no JBonusBean appeared under the WAR file.
    Could you please tell me is there anything wrong?
    Thanks for your time.
    Regards,
    Eric

    I think you have not imported 'BonusBean' in your jsp. Code this line in your jsp at the top.
    <%@page import="BonusBean" %>
    Sudha

  • Problem in jsp with container(JEUS)

    Hi I am a developer in Korea
    Nowadays I have a problem in jsp pages which have contained some pakage directive in a library path
    so my problem is changing some of the classes in the package during service time.
    Error result is
    -Root Exception stack trace :
    -jeus.servlet.jsp.compiler.JspCompileException: fail to compile : source = C:\TmaxSoft\JEUS6.0\webhome\epims_container1\_generated_\j2ee-modules\harweb\jeus_jspwork\_custermg\_html\_mypage\_600_MyReqJob_5fjsp.java, -error msg = C:\TmaxSoft\JEUS6.0\webhome\epims_container1\_generated_\j2ee-modules\harweb\jeus_jspwork\_custermg\_html\_mypage\_600_MyReqJob_5fjsp.java:76: cannot access custermg.MyPageQuery
    bad class file: C:\epims\harweb\WEB-INF\classes\custermg\MyPageQuery.class
    -class file has wrong version 8241.8224, should be 49.0
    -Please remove or make sure it appears in the correct subdirectory of the classpath.
    -     MyPageQuery myquery = null;
    I don't know why this could be happed in random period of time It happens nearly each 10 hours . after this failure, the same error happen in other classes.
    Before ten hours?.... No problem with the jsp pages
    The number 8241.8224 tells me that it is not generated by java compiler but I don't have any clue but the above error
    my run time environment is
    - HP Server, Windows Server 2003, 64bit
    - Jeus, jdk1.5.0_15
    so any help from you will be appreciated...
    thanks

    Mr. Ahmed,
    Excuse-me by my bad english.
    I experienced the same problem when surrounded my scripts with comment caracters:
    <!--
    < SCRIPT ...
    -->
    If this is your case, simply uncomment it and the script will work fine.

  • Problem compling JSP with struts tags on Weblogic 8.1

    I have deployed a web application in Weblogic 8.1. However, I am facing a problem while the JSPs are getting compiled. The JSPs ahve taglib declarations referring to Struts tag library files that are present in WEB-INF folder.
    Stacktrace:
    C:\java\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_epgonline_epgonline\jsp_servlet\_approve\__approve_home.java:209: cannot resolve symbol
    probably occurred due to an error in /approve/approve_home.jsp line 53:
    <logic:notPresent name="<%=JobBean.ID%>" scope="request">
    C:\java\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_epgonline_epgonline\jsp_servlet\_approve\__approve_home.java:209: cannot resolve symbol
    symbol : variable EVAL_BODY_BUFFERED
    location: interface javax.servlet.jsp.tagext.BodyTag
    if (_int0 == BodyTag.EVAL_BODY_BUFFERED) { //[ /approve/approve_home.jsp; Line: 53]
    I believe other people have also faced this issue with Weblogic8.1 and struts. Any solutions???
    Thx
    KP

    KP,
    Does this code run in the development environment but not in production? How
    was this code compiled?
    - john
    "KP" <[email protected]> wrote in message
    news:405b9b56$[email protected]..
    I have deployed a web application in Weblogic 8.1. However, I am facing aproblem while the JSPs are getting compiled. The JSPs ahve taglib
    declarations referring to Struts tag library files that are present in
    WEB-INF folder.
    Stacktrace:
    C:\java\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\m
    yserver_epgonline_epgonline\jsp_servlet\_approve\__approve_home.java:209:
    cannot resolve symbol
    probably occurred due to an error in /approve/approve_home.jsp line 53:
    <logic:notPresent name="<%=JobBean.ID%>" scope="request">
    C:\java\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\m
    yserver_epgonline_epgonline\jsp_servlet\_approve\__approve_home.java:209:
    cannot resolve symbol
    symbol : variable EVAL_BODY_BUFFERED
    location: interface javax.servlet.jsp.tagext.BodyTag
    if (_int0 == BodyTag.EVAL_BODY_BUFFERED) { //[/approve/approve_home.jsp; Line: 53]
    >
    I believe other people have also faced this issue with Weblogic8.1 andstruts. Any solutions???
    >
    Thx
    KP

  • Problem in JSP with JavaScripts, which works perfectly in TOMCAT

    The peice of code below works without any problem in tomcat, which assign some values from a form named "frmOffice" which is in another jsp. In 9iAS it seems the values are not found. Also it says 'error on page'. What could be the reason. Please respond as soon as possible. Thanks.
    <SCRIPT Language="JavaScript">
    function Opennewwindow(url,size)
    window.open (url,"Newwindow",size);
    function NewContact()
    var UserID =
    parent.parent.frmMenubar.document.frmOffice.UserID.value;
    var GroupID =
    parent.frmFolderHead.document.fomFolderHead.FolderID.value;
    var intDomainID =
    parent.parent.frmMenubar.document.frmOffice.DomainID.value;
    Opennewwindow('../../modules/contact/Contact_New.jsp?
    UserID='+UserID+'&GroupID='+GroupID+'&Email=&DomainID='+intDomainID,'scrollbars=1,width=680,height=190');
    </SCRIPT>

    Mr. Ahmed,
    Excuse-me by my bad english.
    I experienced the same problem when surrounded my scripts with comment caracters:
    <!--
    < SCRIPT ...
    -->
    If this is your case, simply uncomment it and the script will work fine.

  • HELP! Beginning JSP with JavaBean Class

    First of all, I'm using jdk1.4 beta and Jakarta's tomcat version 4.0.1 release build.
    Hello. I desparately need help. I have a JavaBean class ("CarBean.class") saved in %catalina_home%\webapps\root\myapp\web-inf\classes\com\wrox\cars\CarBean.class
    I also have a jsp page saved as carpage.jsp in %catalina_home%\webapps\root\myapp\
    So when I point my browser to http://localhost:8080/myapp/carpage.jsp, I get an internal server error. It appears it can't find the JavaBean class for some reason. I'm pretty sure I have my envionment variables set up right. I can get it to work, if I save the JavaBean class in c:\jdk1.4\jre\class\com\wrox\cars
    Here's my JavaBean class source file:
    package com.wrox.cars;
    import java.io.Serializable;
    public class CarBean implements Serializable {
    public CarBean() {
    private String make = "Ford";
    public String getMake() {
    return make;
    public void setMake(String make) {
    this.make = make;
    and here's my jsp page:
    <html>
    <head>
    <title>Using a JavaBean</title>
    </head>
    <body>
    <h2>Using a JavaBean</h2>
    <% com.wrox.cars.CarBean myCar = new com.wrox.cars.CarBean(); %>
    I own a <%= myCar.getMake() %>
    <% myCar.setMake("Ferrari"); %>
    Now I own a <%= myCar.getMake() %>
    </body>
    </html>
    I'm not new to java, just JSP. I just don't know why I can't get the jsp to locate the JavaBean class. I remember I used to have an older version of Tomcat and I recall not having any problems. It seems the Tomcat 4.XX is somewhat significantly different than previous versions. Perhaps I configured my Tomcat wrong? Help would be greatly appreciated. Thanks.

    hi
    i am not using Tomcat server but as i worked in JWS you have to import the bean class from jsp files.
    so the first code in jsp file will be like this
    <%@ page import = "CarBean">
    becoz JWS cant automatically find the bean class we have to explicitly import bean.but i dont know if tomcat finds
    bean or one have to import.
    hope this will help u.
    regards
    manoj choudhury.

  • Paging problem in jsp with resultset

    Could you please take a look at this post.
    http://forum.java.sun.com/thread.jspa?threadID=632626&tstart=10

    public class PagingBean{
       private int pageSize;
       private int pagePointer;
       private int pages;
       private int startPage;
       private int lastPage;
       private List dataList;
       private List resultantList;
       //respective getters and setters
       // write getResultantList() method in such a way that it gives the resultantList which is to be displayed as per persisted   values of all other properties in Bean and use it for displaying on your view.
    }write your backing bean / Action Class to manage the respective persisted values according to the actions done.
    Or if you are not intrested in re-inventing the wheel please go ahead and use custom built solutions.
    please google for finding such.
    could startup with the one below
    http://java-source.net/open-source/jsp-tag-libraries
    REGARDS,
    RaHuL

  • Errors in a program jsp with javabeans

    With the following program time.jsp from the book bigjava by
    horstmann, I get from tomcat 5.0 the following errors. Who helps me?
    My O.S. is win pro.
    Thanks
    Eugenia Mariani
    this is the program:
    time.jsp
    inside the folder
    C:\Programmi\Apache Software Foundation\Tomcat 5.0\webapps\bigjava
    <jsp:useBean id="formatter" class="TimeFormatterBean"/>
    <jsp:setProperty name="formatter" property="date" value="<%= new
    java.util.Date() %>"/>
    <html>
    <head>
    <title>Time JSP</title>
    </head>
    <body>
    <h1>Time JSP</h1>
    <p>The current time is:
    <jsp:getProperty name="formatter" property="time"/>
    </p>
    </body>
    </html>
    this is the program TimeFormatterBean.java with
    TimeFormatterBean.class
    inside the folder:
    C:\Programmi\Apache Software Foundation\Tomcat
    5.0\webapps\bigjava\WEB-INF\classes
    import java.text.DateFormat;
    import java.util.Date;
    This bean formats the time of day from a given date.
    public class TimeFormatterBean
    Initializes the formatter.
    public TimeFormatterBean()
    timeFormatter = DateFormat.getTimeInstance();
    Write-only date property.
    @param aDate the date to be formatted.
    public void setDate(Date aDate)
    theDate = aDate;
    Read-only time property.
    @return the formatted time
    public String getTime()
    String timeString = timeFormatter.format(theDate);
    return timeString;
    private DateFormat timeFormatter;
    private Date theDate;
    these are the errors fro TOMCAT 5.0
    HTTP Status 500 -
    type Exception report
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    description The server encountered an internal error () that prevented
    it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 1 in the jsp file: /time.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    C:\Programmi\Apache Software Foundation\Tomcat
    5.0\work\Catalina\localhost\bigjava\org\apache\jsp\time_jsp.java:42:
    cannot resolve symbol
    symbol : class TimeFormatterBean
    location: class org.apache.jsp.time_jsp
    TimeFormatterBean formatter = null;
    ^
    An error occurred at line: 1 in the jsp file: /time.jsp
    Generated servlet error:
    C:\Programmi\Apache Software Foundation\Tomcat
    5.0\work\Catalina\localhost\bigjava\org\apache\jsp\time_jsp.java:44:
    cannot resolve symbol
    symbol : class TimeFormatterBean
    location: class org.apache.jsp.time_jsp
    formatter = (TimeFormatterBean)
    jspxpage_context.getAttribute("formatter", PageContext.PAGE_SCOPE);
    ^
    An error occurred at line: 1 in the jsp file: /time.jsp
    Generated servlet error:
    C:\Programmi\Apache Software Foundation\Tomcat
    5.0\work\Catalina\localhost\bigjava\org\apache\jsp\time_jsp.java:46:
    cannot resolve symbol
    symbol : class TimeFormatterBean
    location: class org.apache.jsp.time_jsp
    formatter = new TimeFormatterBean();
    ^
    An error occurred at line: 10 in the jsp file: /time.jsp
    Generated servlet error:
    C:\Programmi\Apache Software Foundation\Tomcat
    5.0\work\Catalina\localhost\bigjava\org\apache\jsp\time_jsp.java:63:
    cannot resolve symbol
    symbol : class TimeFormatterBean
    location: class org.apache.jsp.time_jsp
    out.write(org.apache.jasper.runtime.JspRuntimeLibrary.toString((((Time
    FormatterBean)_jspx_page_context.findAttribute("formatter")).getTime()
    ^
    4 errors
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultError
    Handler.java:83)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.
    java:306)
    org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:398)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:441)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:422)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.
    java:507)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.
    java:274)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:29
    2)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
    note The full stack trace of the root cause is available in the Apache
    Tomcat/5.0.24 logs.
    Apache Tomcat/5.0.24

    Cross Post
    http://forum.java.sun.com/thread.jsp?thread=526883&forum=45&message=2528346

  • SetProperty in JSP with JavaBeans

    Why do they always talk about the following code in JSP's for getting or setting property's in a JavaBean.
    <jsp:setProperty name="dbb" property="dbDriver" value="<%= set.getDbDriver()%>" />
    Because it is also possible by just calling this "dbb.setDbdriver(set.getDbDriver())" setting-methode.
    Is there also a specific code to call normal methods, no set or get method, of a JavaBean in a JSP
    for something like "dbb.execSQL(String sql)".

    One of the reasons for JSPs existence is to separate the presentation logic from the business and control logic. The rationale is that the skills required to design a user interface are different than programming skills, so creators and maintainers of JSPs may not be Java programmers. In this scenario, there is no Java scripting in a JSP. All data and business logic is encapsulated in beans and/or custom tags accessed from the page. That's why the useBean, getProperty and setProperty tags exist. Check out the web for info on the Model, View, Controller framework.
    There are no built-in JSP tags to call bean methods that require arguments or do not have get/set methods. Custom tags could do this job if necessary.
    Whether you follow this approach is your call and, among other things, depends on the skills of those who will be maintaining your JSPs in the future.

  • JSP with JavaBeans

    Hello,
    I'm trying to write my first page of JSP using a JavaBean.
    I've created a simple bean :
    package dalpkg;
    public class DalBean
    public DalBean()
    setName("DIMA");
    private String myName;
    public void setName(String name)
    this.myName=name;
    public String getName()
    return myName;
    }Now i've created a JSP :
    <jsp:useBean class="dalpkg.DalBean" id="info" scope="session"> 
    <html> 
    <head> 
    <title>Simple JSP Document</title> 
    </head> 
    <body> 
    Initial name is <%=info.getName()%><br> 
    <% info.setName("Adi"); %> 
    New name is <%=info.getName()%><br>
    </body> 
    </html>
    </jsp:useBean>I'm Getting this error : "/DIMA/hello.jsp(1,1) The value for the useBean class attribute dalpkg.DalBean is invalid"
    I couldn't find the solution any where.
    Where should I put the .Java file for it to work?
    Could this be the reason why this isnt working?

    Well thats wierd.. the class file looks ok.. starts just like you said CA FE BA BE.
    Recomiling didnt help..
    but this code works :
    package dalpkg;
    public class HelloWorld
    public void HelloWorld()
    public String ReturnHello()
    return "Hello";
    <jsp:useBean class="dalpkg.HelloWorld" id="info" scope="session"> 
    <html> 
    <head> 
    <title>Simple JSP Document</title> 
    </head> 
    <body> 
    Print Hello :  <%=info.ReturnHello()%><br> 
    </body> 
    </html>
    </jsp:useBean>Edited by: dimamah on Mar 6, 2009 4:43 PM

  • Can somebody solve a problem of jsp with xml

    I have written the following code to generate a web page.
    the application will get some data from a xml file and show it in the web page.
    The problem is it is showing null for all the xml properties.
    When i used the java scriplet as a seperate java file, it seems to be running fine.
    Can somebody help me:-
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%>
    <%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
    <%@ taglib uri="netui-tags-template.tld" prefix="netui-template"%>
    <%@ page import="java.io.*" %>
    <%@ page import="java.util.*" %>
    <%@ page import="org.w3c.dom.*" %>
    <%@ page import="org.xml.sax.*" %>
    <%@ page import="javax.xml.transform.TransformerFactory" %>
    <%@ page import="javax.xml.transform.Transformer" %>
    <%@ page import="javax.xml.transform.TransformerException" %>
    <%@ page import="javax.xml.transform.dom.DOMSource" %>
    <%@ page import="javax.xml.transform.stream.StreamResult" %>
    <%@ page import="javax.xml.transform.*" %>
    <%@ page import="javax.xml.parsers.*" %>
    <%@ page import="javax.xml.*" %>
    <%@ page import="javax.xml.transform.stream.StreamSource" %>
    <%!
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    %>
    <html>
    <head>
    <title>Main Page</title>
    <link rel="stylesheet" href="Styles1.css" type="text/css">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body leftmargin="0" topmargin="0">
    <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                   <td>
                        <table width="100%" height="50" border="0" cellspacing="0" cellpadding="0">
                             <tr>
                                  <td>
                                  </td>
                             </tr>
                        </table>
                        <table width="100%" height="17" bgcolor="#FFCC00" border="0" cellspacing="0" cellpadding="6">
                             <tr>
                                  <td>
    <%
    try
    DocumentBuilder builder = factory.newDocumentBuilder();
    System.out.println("Builder: "+builder);
    Document document = builder.parse("config.xml");
    System.out.println("Document: What happened "+document);
    document.getDocumentElement().normalize();
    Node ParentNode = document.getDocumentElement();
    System.out.println("Node: "+ParentNode);
    //NodeList list = document.getElementsByTagName("TimeSheet");
    for(Node child= ParentNode.getFirstChild(); child != null; child = child.getNextSibling())
    try{
    if(child.getNodeType()==Node.ELEMENT_NODE)
    String Vals = child.getFirstChild().getNodeValue().toString();
    System.out.println("Hi: "+Vals);
    %>
                                  <%=Vals%> |
    <%
    catch (NullPointerException nex)
    System.out.println("Null Exception : "+nex);
    catch (Exception ex)
    System.out.println("Exception : "+ex);
    %> <a href="Log-out |
                                  </td>
                             </tr>
                        </table>
                        </td>
              </tr>
         </table>
    </body>
    </html>
    I wil be thankful for that
    Ottran

    Hi can anyone solve the above problem

  • First Try and JSP with JavaBeans

    Hi:
    I've installed Tomcat 3.3.2, and have made no configuration changes.
    I'm trying to create a JSP that uses a JavaBean. This is my first attempt, and there's nothing exciting about my try.
    Below is the JavaBean, that compiles just fine:
    import java.io.Serializable;
    import java.util.*;
    import java.text.*;
    public class today implements Serializable {
    public String getToday() {
    Date df = new Date();
    String today = DateFormat.getDateInstance().format(df);
    return today;
    The class for this .java file is stored in webapps\exampiles\web-inf\classes
    Here is the JSP file:
    <%@ page language="java" import="today" %>
    <jsp:useBean id="jsp" class="today" scope="session" /></jsp:useBean>
    <html><body>
    Today is: //<%= getToday() %>
    </body></html>
    This is stored in webapps\examples\jsp.
    When I try to run the JSP, I receive the following:
    Method getToday() not found in class jsp.today_3.
    out.print( getToday() );
    I have tried many things, but have not succeeded.
    Any suggestions? Thanks.

    <%@ page language="java" import="today" %>
    <jsp:useBean id="jsp" class="today" scope="session"
    /></jsp:useBean>
    <html><body>
    Today is: //<%= getToday() %>
    </body></html>
    }You're not referencing your bean instance when you're trying to access the getToday() method in the code above. It should be jsp.getToday()

  • How to Upload in Servlet or JSP with JavaBean?

    Anybody used to be familiar with these techs?I want to implement a function of upload files.Can you help me with some suggestions?

    Hi,
    This might help you
    read the file and upload to database
    Read that file using java.io.
    File f= new File("give the file name");
    FileInputStream fis= new FileInputStream(f);
    byte[] data= null;
    Vector tempVector = new Vector();
    int tempInt=fis.read();
    while(tempInt!=-1){
    tempVector.add(new Byte((byte)tempInt));
    tempInt=fis.read();
    data= new byte[tempVector.size()];
    for(int k=0;k<tempVector.size();k++){
    data[k]=new Byte(tempVector.get(k).toString()).byteValue();
    System.out.println("The byte[] data is : " +data);
    stmt= conn.prepareStatement("insert into <tableName>(blobValue, key) values ( ? , ? ) " );
    stmt.setObject(1,data);
    stmt.setString(2,"filename");
    stmt.executeUpdate();

  • Linking jsp with Crystal reports

    i want to generate a report(using CR) from database (SQL SERVER) using my jsp coding...could anyone tell me such tutorial or a simple code..
    also tell me where i can find CRYSTAL REPORT 10.
    i have to use that
    thanks

    i want to generate a report(using CR) from database (SQL SERVER) using my jsp coding...could anyone tell me such tutorial or a simple code..
    also tell me where i can find CRYSTAL REPORT 10.
    i have to use that
    thanks

  • Problem with JavaBeans in JSP.IT'S URGENT!!!

    Hi, i have problems with JavaBeans in JSP.
    In a jsp file( locating in ROOT directory of tomcat 4.0.6 :jakarta-tomcat-4.0.6\webapps\root ) i have this code:
    <jsp:useBean id="paramBean" class="licentza.ParamBean" />
    <jsp:setProperty name="paramBean"
    property="nume"
              value='<%= request.getParameter("numeUser") %>' />
    where ParamBean it's a "bean" class locating in jakarta-tomcat-4.0.6\webapps\examples\web-inf\classes\licentza (licentza is the package i'm using).
    And i get this error:
    Generated servlet error:
    D:\jakarta-tomcat-4.0.6\work\Standalone\localhost\_\dora\intrare2$jsp.java:67: Class licentza.ParamBean not found.
    ParamBean paramBean = null;
    What is the problem?Thank you.

    Hi,
    Put the class file or the package under :jakarta-tomcat-4.0.6\webapps\root\WEB-INF\classes.
    Rajesh

Maybe you are looking for

  • Application problems! Please help.

    I have 1,496 songs, 11 Vids, 105 photos, 125 Applications. I can hold 29.1 GB and have 10.2 GBs left. my version is 4.3.3. I use two IDs to download Apps from. I have 30 Apps on one and 95 on the other. the 95 on this account, keep imediately returni

  • Apple ID for Enterprise

    Hello, I work at a large organization and we are interested in using iPads for certain business functions. Currently we have a few in the environment. The Apple IDs for these devices are personal ones that belong to the user who it is assigned to. We

  • Nokia N73 & PC Suite 6.82.22.0

    I recently purchased a Nokia N73 from 3 Australia, and installed PC Suite from the CD, and upgraded to PC Suite 6.82.22.0 During one of the installs my computer had a problem and seemed to hang the installation (it stalled for some five minutes befor

  • Long Text of PO line item

    Hi, In my PO history report, im displaying new and changed values of various fields (like net amount, quantity etc.) by taking data from CDPOS.  Now the problem is that for PO item long text value (both new and changed) CDPOS is not showing the New,

  • FLEX debugger not hitting breakpoints, because Flash sometimes embeds source file paths with wrong letter case?

    I was trying to figure out why breakpoints were working fine for source files in some locations but not others.  FlashDevelop's debugger (which I believe is actually the FLEXSDK debugger) was successfully connecting, tracing output, and hitting break