Results 1 to 2 of 2
  1. #1
    srengvichet is offline Member
    Join Date
    Jun 2010
    Posts
    4
    Rep Power
    0

    Default Please help me to solve it(jsp)

    i am a young programmer (jsp), i used netbeans ide 8.6. i had two code :one is java code and second is jsp code. i created java store in web(project name)/Source Packages/beans/SendMessage.java and i created jsp code store in web(project name)/Web Pages/MBean.jsp

    <%--
    this is java code
    --%>
    package beans;
    public class SendMessage {
    public String str="Hello World";
    public String getMessage(){
    return str;
    }
    public SendMessage(){
    }
    }

    <%--
    this is jsp code
    --%>

    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

    <HTML>
    <HEAD>
    <TITLE>Setting a Property Value</TITLE>
    </HEAD>

    <BODY>
    <H1>Setting a Property Value</H1>

    <jsp:useBean id="mess" class="beans.SendMessage" >

    The message is :<jsp:getProperty name="mess" property="sendMessage"/>

    </jsp:useBean>
    </BODY>
    </HTML>


    <%--
    this is message error :
    init:
    deps-module-jar:
    deps-ear-jar:
    deps-jar:
    library-inclusion-in-archive:
    library-inclusion-in-manifest:
    compile:
    compile-jsps:
    org.apache.jasper.JasperException: PWC6054: Cannot find any information on property 'sendMessage' in a bean of type 'beans.SendMessage'
    C:\Java\JavaInJoptionpane\JavaWeb\WebApplication1\ nbproject\build-impl.xml:469: Java returned: 1
    BUILD FAILED (total time: 2 seconds)
    --%>

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,374
    Blog Entries
    1
    Rep Power
    18

    Default

    Good practice is, if you solved the problem yourself then just explain it how did you solve it. Because your comment could be useful to someone else.

Similar Threads

  1. Please help me solve them
    By quangtrung89 in forum New To Java
    Replies: 2
    Last Post: 11-26-2009, 10:08 PM
  2. PLS PLS PLS PLS solve this
    By unagie in forum New To Java
    Replies: 10
    Last Post: 07-11-2009, 09:10 PM
  3. Plz solve this....
    By theone3nu in forum Java 2D
    Replies: 3
    Last Post: 01-08-2009, 05:01 PM
  4. Plz solve this....
    By theone3nu in forum New To Java
    Replies: 9
    Last Post: 12-23-2008, 09:42 AM
  5. Solve my Problem
    By kyo in forum New To Java
    Replies: 1
    Last Post: 12-16-2008, 02:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •