Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > Pro JSP
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Pro JSP Advanced JSP coding questions. Beginning questions will be redirected to the Beginning JSP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro JSP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 9th, 2006, 09:35 AM
Registered User
Join Date: Mar 2006
Location: delhi, delhi, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to kousik
Default what wrong with thi code(Jsp:useBean)

hi every body Iam unable run the program.plz help me.When I give request it says comilation error :- canot resolve symbol
<TITLE> New Document </TITLE>
<BODY bhcolor = pink>
<form method=post action="bean.jsp">
<p>Plz enter u r Name:
<input type="text" name="name">
<br>What is u r favorite language?
<select name="language">
<option value= "c"> C
<option value= "c++"> C++
<option value= "Java"> Java
<input type="submit" Value ="Submit Value"></BODY>
<jsp:useBean id="languageBean" scope="page" class="LanguageBean">
<jsp:setProperty name="languageBean" property="*">
<html><head><title>UseBean Action test</title>
<body bgcolor=yellow>
<p>Hello,<jsp:getProperty name="languageBean" property="name" /></p>
<p>Your Favorite Language is:
<jsp:getProperty name="languageBean" property="language" /></p>
<p>My coment on this Language is:
<jsp:getProperty name="languageBean" property="languageComent" /></p>
 public class LanguageBean
    private String name;
    private String language;
    public LanguageBean(){ }
    public void setName(String name) {
        public String getName(){
            return name;
    public void setLanguage(String language){

        public String getLanguage() {
            return language;
            public String getLanguageComent() {
                if (language.equals("c")){
                    return "The Mother of all Language";
                    else if(language.equals("c++")){
                    return "The king of OO Language";
                    else if(language.equals("Java")){
                    return "The Powerful Language for OO";
                        return "Sorry I have no idea about this language";

Reply With Quote
  #2 (permalink)  
Old March 10th, 2006, 06:21 AM
Authorized User
Join Date: Jan 2006
Location: , , USA.
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to longjava

In your bean.jsp file, replace the line:

<jsp:setProperty name="languageBean" property="*">

with <jsp:setProperty name="languageBean" property="*"/>

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
jsp:useBean and ArrayList IronStar JSP Basics 1 October 30th, 2008 04:32 AM
<jsp:useBean> action problem austinf JSP Basics 1 August 21st, 2006 04:23 PM
What is wrong with code? rtr1900 Classic ASP Databases 1 April 3rd, 2006 03:20 AM
Please Help. mr_newreq.jsp:78: jsp:useBean can't f batken JSP Basics 0 February 22nd, 2006 09:56 PM
What is wrong with this code? SaharaWizard VB Databases Basics 2 January 28th, 2006 08:20 AM

All times are GMT -4. The time now is 01:24 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.