aspose file tools*
The moose likes Struts and the fly likes JSPException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "JSPException" Watch "JSPException" New topic
Author

JSPException

aresh babu
Ranch Hand

Joined: Aug 31, 2008
Posts: 65
Hi
i wrote this code in graduateregistration.jsp
Username                         <html:text property="text" name="username" maxlength="20"></html:text>


Password                          <html:password redisplay="false" property="password" name="password" maxlength="20"></html:password>


Re-Enter password            <html:password redisplay="true" property="password" name="retyppassword" maxlength="20"></html:password>


First name                        <html:text property="firstname" name="text" maxlength="20"></html:text>


Last name                        <html:text property="lastname" name="text" maxlength="20"></html:text>


Gender                         <html:select property="gender" name="text"><htmlption value="Male" key="male"></htmlption><htmlption value="Female" key="female"></htmlption></html:select>


Date Of Birth                  <html:text property="date" name="date"></html:text>


E-mail                            <html:text property="email" name="text" maxlength="100"></html:text>


Fax                              


Phone


Home phone


Country


Qualification


University


Specialization


Percentage


Passed out


Position


Industry Preference


Location Preference


Salary Expected


Work Experience


Hobbies


Intrests


Achievements




</td>

When i tried to deploy this application into the server i am getting this exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /graduateregistration.jsp at line 91

88: </td>
89: </tr>
90: </table> 
91:

Username                         <html:text property="text" name="username" maxlength="20"></html:text>

Password                          <html:password redisplay="false" property="password" name="password" maxlength="20"></html:password>

Re-Enter password            <html:password redisplay="true" property="password" name="retyppassword" maxlength="20"></html:password>

First name                        <html:text property="firstname" name="text" maxlength="20"></html:text>

Last name                        <html:text property="lastname" name="text" maxlength="20"></html:text>

Gender                         <html:select property="gender" name="text"><htmlption value="Male" key="male"></htmlption><htmlption value="Female" key="female"></htmlption></html:select>

Date Of Birth                  <html:text property="date" name="date"></html:text>

E-mail                            <html:text property="email" name="text" maxlength="100"></html:text>

Fax                              

Phone

Home phone

Country

Qualification

University

Specialization

Percentage

Passed out

Position

Industry Preference

Location Preference

Salary Expected

Work Experience

Hobbies

Intrests

Achievements




</td>
92: <td ></td>
93: <td >

94:  



Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause

javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find bean: "username" in any scope
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:852)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.graduateregistration_jsp._jspService(graduateregistration_jsp.java:92)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

How can i overcome this exception and how can i start this page?


Please help me

Regards
Areshbabu
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Firstly, I would kick the Ranch Office that they should by default disable HTML in messages. I tried that before with vain. Also parsing of the HTML entities is troublesome since some time (check the quote/edit screens). I don't have the motivation anymore to report forum related bugs/issues myself.

Regarding to your problem: in the future please use the Struts forum for Struts related questions. All what I can tell is that the bean with the managed bean name "username" isn't been placed in any of the scopes.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

I totally can't read that.

Does your ActionForm have a "username" property?
rk palleru
Greenhorn

Joined: Feb 26, 2009
Posts: 22
1.remove the name of <html:text>
2.have you specified username property in formbean


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSPException