Summary of the experience of developing a bug management system using Jdbc+servlet

Source: Internet
Author: User

Development background:

The company currently uses teambition inside the task as the bug management system, neither the current state of the bug, nor the details of the bug can be written to reproduce the steps, was assign the task (the Fix bug or verify that the bug was repaired) also no mail notification

Nor can you see how many bugs are currently in your name and which items belong to each.

Harvest:

1. Front-desk JSP:

1.1. <a href= "mailto: Email address" > Clicking this link when Outlook is installed opens a new mail interface

1.2. <meta http-equiv= "Refresh" content= "5; url=/index.jsp "> Page 5s Auto Refresh, jump to page index.jsp

1.3. <div style= "width:100%;height:500px;" > page layout dimensions can use both percentages and fixed pixels

1.4. <iframe width=100% height=100% frameborder=0 scrolling= "yes" name= "Buglistframe" src= "/bugList.jsp" ></ The iframe> iframe is used to include other pages that will be displayed as part of this page. This is used here to display the list of bugs in the query on the current page. There is a property in the form form that the target is used to control the object that was changed after the form was submitted and set its value to the name of the IFRAME.

1.5. If you want to check the field when the button is clicked on the current page, add onsubmit= "return Checkform (This)" (<form onsubmit= "return Checkform (This)" in the form. ......>) then implement this function

<script type= "Text/javascript" >
function Checkform (obj) {

1.6. Page gets the value of the field in the cookie

function GetCookie (name) {
var arr, reg=new RegExp ("(^|)" +name+ "= ([^;] *)(;|$)");

if (Arr=document.cookie.match (reg)) {
Return unescape (arr[2]);
}else{
return null;
}
};
document.getElementById ("Cookie_text"). InnerHTML = GetCookie ("Bugtrackcookie");

Document is the object defined by this page in IE

1.7. Add other JSP pages to this page, unlike 4, the JSP page added here cannot be refreshed individually. <jsp:include page= "loginname.jsp" ></jsp:include>

1.8. <c:if test= "${requestscope.loginer eq ' creator '}" > C:if is used on the page if judged, need to import package Jstl.jar and Standard.jar

1.9. Let select display the value in the database, you need to add the function when the page loads.

<body onload= "Go ()" >

<select id= "Buga" name= "Bugstatus" >

<option value= "1-new" >1-new</option>

<option value= "2-new" >2-new</option>

</select>

<script>
function Go ()
{
document.getElementById ("Buga"). Value= "<%=bn.getbugstaus ()%>";
}
</script>

</body>

2. Background code:

Jdbc+servlet frame is too old, not to elaborate, now basically use spring. But as a 0-based learner, servlets are easier to use than spring, so I'm learning servlets. Anyway, I'm just a tester, the project that the company delivered to the customer is not going to involve me in the development, I just need to develop a few tools for the auxiliary tests, and the servlet is enough.

2.1. E-Mail: There is a jar package Mail.jar. The main use of Mail.jar in the Message,messagingexception,session,transport,internetaddress,mimemessage class. It doesn't seem to support setting multiple recipients at once

2.2. servlet jumps to the page either with response or with request:

2.2.1. You cannot pass parameters to the page when using response jump form Response.setheader ("Location", "./query.action?bugid=" + BugID);

2.2.2. Parameters can be passed when using the request jump, and this request has a parameter that was passed to the servlet by the previous page

Setting Parameters: Request.setattribute ("Bugnote", BN);
Jump: Request.getrequestdispatcher ("/query.jsp"). Forward (request, response);

Summary of the experience of developing a bug management system using Jdbc+servlet

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.