Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

JSPException

 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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"><html:option value="Male" key="male"></html:option><html:option value="Female" key="female"></html:option></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"><html:option value="Male" key="male"></html:option><html:option value="Female" key="female"></html:option></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
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I totally can't read that.

Does your ActionForm have a "username" property?
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1.remove the name of <html:text>
2.have you specified username property in formbean


 
If we don't do the shopping, we won't have anything for dinner. And I've invited this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic