URL-адрес, который я пытаюсь посетить:
Код: Выделить всё
http://localhost:8080/basic-struts/registerInput.action?userid=1
Код: Выделить всё
public class Register extends ActionSupport implements Preparable {
private String userid;
public void prepare() throws Exception {
// Call the service, load data,
// every time even if validation fails
System.out.println("----------");
System.out.println(userid); //
Подробнее здесь: [url]https://stackoverflow.com/questions/68204135/how-to-get-url-parameter-in-prepare-method-of-action-class-in-struts-2[/url]
Мобильная версия