You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (Jira)" <ji...@apache.org> on 2022/09/14 18:39:00 UTC
[jira] [Closed] (WW-4617) Johannes Register.java needs to be copied to Struts-2.3.4
[ https://issues.apache.org/jira/browse/WW-4617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lukasz Lenart closed WW-4617.
-----------------------------
Resolution: Won't Fix
> Johannes Register.java needs to be copied to Struts-2.3.4
> ---------------------------------------------------------
>
> Key: WW-4617
> URL: https://issues.apache.org/jira/browse/WW-4617
> Project: Struts 2
> Issue Type: Bug
> Components: Example Applications
> Affects Versions: 2.3.4.1
> Environment: Struts-2.3.4
> Reporter: Martin Gainty
> Priority: Major
> Fix For: 6.1.0
>
>
> Johannes updated Register.java located at
> https://github.com/apache/struts-examples/blob/master/form-processing/src/main/java/org/apache/struts/register/action/Register.java
> needs- to be copied to processing-forms example:
> $STRUTS2_HOME/src/apps/processing-forms/src/main/java/org/apache/struts/register/action/Register.java
> Here is new code from Johannes:
> package org.apache.struts.register.action;
> import com.opensymphony.xwork2.ActionSupport;
> import org.apache.struts.register.exceptions.SecurityBreachException;
> import org.apache.struts.register.model.Person;
> /**
> * Acts as a controller to handle actions related to registering a user.
> * @author Johannes Geppert
> */
> public class Register extends ActionSupport {
> private static final long serialVersionUID = 1L;
> private Person personBean;
> @Override
> public String execute() throws Exception {
> // call Service class to store personBean's state in database
> return SUCCESS;
> }
> public void throwException() throws Exception {
> throw new Exception("Exception thrown from throwException");
> }
> public void throwNullPointerException() throws NullPointerException {
> throw new NullPointerException("Null Pointer Exception thrown from "
> + Register.class.toString());
> }
> public void throwSecurityException() throws SecurityBreachException {
> throw new SecurityBreachException(
> "Security breach exception thrown from throwSecurityException");
> }
> public Person getPersonBean() {
> return personBean;
> }
> public void setPersonBean(Person person) {
> personBean = person;
> }
> }
--
This message was sent by Atlassian Jira
(v8.20.10#820010)