2 java1996 java1996 于 2017.08.28 09:27 提问

求教这个代码是什么意思。。。

package org.owasp.webgoat.plugin;

import org.apache.ecs.Element;
import org.apache.ecs.ElementContainer;
import org.apache.ecs.StringElement;
import org.owasp.webgoat.lessons.Category;
import org.owasp.webgoat.lessons.LessonAdapter;
import org.owasp.webgoat.session.WebSession;

public class HowToWork extends LessonAdapter
{
/**
* Description of the Method
*
* @param s
* Description of the Parameter
* @return Description of the Return Value
*/
protected Element createContent(WebSession s)
{
makeSuccess(s);
ElementContainer ec = new ElementContainer();
ec.addElement(new StringElement("Welcome to WebGoat !!"));
return (ec);
}

/**
 * Gets the category attribute of the HowToWork object
 * 
 * @return The category value
 */
protected Category getDefaultCategory()
{
    return Category.INTRODUCTION;
}

private final static Integer DEFAULT_RANKING = new Integer(10);

protected Integer getDefaultRanking()
{
    return DEFAULT_RANKING;
}

/**
 * Gets the title attribute of the DirectoryScreen object
 * 
 * @return The title value
 */
public String getTitle()
{
    return ("How to work with WebGoat");
}

}

Csdn user default icon
上传中...
上传图片
插入图片