| |

VerySource

 Forgot password?
 Register
Search
View: 910|Reply: 8

A strange struts problem! (Urgent)

[Copy link]

2

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-17 20:40:01
| Show all posts |Read mode
My previous jsp page can still be opened. Why did I add an error after adding <html: form>?
The page code is as follows:
(Page header omitted)
<html: html>
 <head>
    <title> :::: Online examination system :::: </ title>
    <meta http-equiv = "Content-Type" content = "text / html; charset = gb2312">
<link href = "/ exam / css / Style.css" rel = "stylesheet" type = "text / css">
<META content = CnSohoW design name = description>
<META content = "firekinger@163.com" name = author>
</ head>
  <body>
  <p>&nbsp; </ p>
<table width = "506" border = "0" align = "center" cellpadding = "2" cellspacing = "1" bgcolor = "# d2ebff" class = "Xsmall">
<tr bgcolor = "# FFFFFF">
<td height = "28" colspan = "4">
<TABLE cellSpacing = 0 cellPadding = 0 width = "100%"
border = 0>
          <TBODY>
            <TR>
              <TD
                 height = 25 background = / exam / img / backt.gif class = "Xsmall"> <strong> Examination questions </ strong> </ TD>
            </ TR>
          </ TBODY>
      </ TABLE>
</ td>
</ tr>
<html: form action = "/ questionSearch">
  <tr bgcolor = "# FFFFFF">
    <td height = "30" colspan = "4"> <div align = "center">
      <font color = "# 0000FF"> </ font> </ div>
      </ td>
    </ tr>
  <tr bgcolor = "# FFFFFF">
    <td height = "30" colspan = "4"> <div align = "center">
      <table width = "490" border = "0" cellpadding = "0" cellspacing = "0" class = "Xsmall">
        <tr>
          <td width = "126"> <div align = "center"> <img src = "/ exam / img / query_1.gif" width = "12" height = "13" align = "absmiddle"> Quick search
              -&gt; </ div>
            <div align = "center"> </ div> </ td>
          <td width = "221"> Keyword:
          <html: text property = "keyText" styleClass = "Sborder" styleId = "keyText" size = "18" maxlength = "20"> </ html: text>
          <td width = "51">
            <div align = "left">
            <html: submit property = "enter" styleClass = "Sborder" styleId = "enter" value = "OK"> </ html: submit>
            </ div> </ td>
          <td width = "92"> <div align = "center"> </ div> </ td>
        </ tr>
      </ table>
       </ div> </ td>
    </ tr>
    
    
     <tr bgcolor = "# FFFFFF">
    <td width = "100" height = "25"> <div align = "center"> title </ div> </ td>
    <td width = "350"> <div align = "center"> Options </ div> </ td>
    <td width = "200"> <div align = "center"> type </ div> </ td>
    <td width = "50"> <div align = "center"> remove no </ div> </ td>
    <td width = "50"> <div align = "center"> Update </ div> </ td>
  </ tr>
  <logic: iterate id = "e" name = "coll">
  <tr bgcolor = '# FFFFFF'>
  <td height = '25 '>
  &nbsp; ⊙ <bean: write name = "e" property = "detail" />
  </ td>
         <td>
  <div align = 'center'> <bean: write name = "e" property = "choices" /> </ div>
  </ td>
  Ranch
  <td>
  <div align = 'center'> <bean: write name = "e" property = "note" /> </ div>
  </ td>
  Ranch
  <td>
  <div align = 'center'> <html: link page = "/ questionDel.do" paramId = "id" paramName = "e" paramProperty = "id"> Remove </ html: link> </ div>
  </ td>
  <td>
  <div align = 'center'> <html: link page = "/ questionPreUpdate.do" paramId = "id" paramName = "e" paramProperty = "id"> Update </ html: link> </ div>
  </ td>
  </ tr>
  <tr>
  </ tr>
  </ logic: iterate>
  <tr bgcolor = "# FFFFFF">
    <td height = "30" colspan = "4">
<div align = "center">
</ div> </ td>
    </ tr>
  </ html: form>
  </ TABLE>
 
</ html: html>



The following error occurred:
javax.servlet.ServletException: Cannot retrieve definition for form bean null
org.apache.jasper.runtime.PageContextImpl.doHandlePageException (PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException (PageContextImpl.java:800)
org.apache.jsp.WEB_002dINF.admin.question_005flist_jsp._jspService (question_005flist_jsp.java:256)
org.apache.jasper.runtime.HttpJspBase.service (HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service (HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service (JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile (JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service (JspServlet.java:248)
javax.servlet.http.HttpServlet.service (HttpServlet.java:856)
org.apache.struts.action.RequestProcessor.doForward (RequestProcessor.java:1069)
org.apache.struts.action.RequestProcessor.processForwardConfig (RequestProcessor.java:455)
org.apache.struts.action.RequestProcessor.process (RequestProcessor.java:279)
org.apache.struts.action.ActionServlet.process (ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet (ActionServlet.java:507)
javax.servlet.http.HttpServlet.service (HttpServlet.java:743)
javax.servlet.http.HttpServlet.service (HttpServlet.java:856)

Please help me, thanks!
Reply

Use magic Report

0

Threads

6

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-23 10:54:01
| Show all posts
There is no such a form defined in struts to encapsulate the data between <html: form> on the jsp page.
If you use <html: form> to represent a form in struts, you must define the form.
Reply

Use magic Report

2

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-1-27 23:45:02
| Show all posts
Oh i got it
Reply

Use magic Report

2

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-1-27 23:54:01
| Show all posts
thank!
Reply

Use magic Report

0

Threads

10

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-1-29 22:45:01
| Show all posts
Hehe, the formBean corresponding to your html: form is not defined.
Reply

Use magic Report

2

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-2-5 08:00:01
| Show all posts
Hehe, yeah, I am a beginner, but this is very illustrative for beginners!
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-2-5 13:15:01
| Show all posts
Strange? Khan
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-23 21:30:02
| Show all posts
No corresponding form
Reply

Use magic Report

0

Threads

1

Posts

1.00

Credits

Newbie

Rank: 1

Credits
1.00

 China

Post time: 2020-8-24 14:07:35
| Show all posts
Learned thank you
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list