Как вызвать метод действия из JSP и передать параметр в Struts 2JAVA

Программисты JAVA общаются здесь
Гость
Как вызвать метод действия из JSP и передать параметр в Struts 2

Сообщение Гость »


I have the following code in JSP that would call an action method and then pass a parameter value.

Код: Выделить всё

 [*] Your fullname is:   
This is how it looks like in the action method:

Код: Выделить всё

public String getFullname (String lastname) throws Exception {      String firstname = someClass.getFirstname();      return firstname + lastname; } 
Unfortunately, when I use the param name to pass the value, the passed value is . But when I do it like the code below, it successfully passes the value.

Код: Выделить всё

[*] Your fullname is:   


Источник: https://stackoverflow.com/questions/781 ... n-struts-2

Вернуться в «JAVA»