Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get parameter using struts Tag

 
lyo Yashnoo
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone:
There is a.jsp pass a parameter to b.jsp.How to get the parameter in b.jsp using struts Tag?I also want to add the parameter to a hyperlink in b.jsp.For example in b.jsp <html:link forward=.....>cxxxx</html:link>.How to add the parameter(get from a.jsp) to cXXXX in b.jsp? :roll:
 
Junilu Lacar
Bartender
Posts: 7466
50
Android Eclipse IDE IntelliJ IDE Java Linux Mac Scala Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could use bean:parameter & bean:write. Or you could use a JSP expression: <%= request.getParameter("theParam") %>
[ October 08, 2003: Message edited by: Junilu Lacar ]
 
lyo Yashnoo
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I think use the bean:write or bean arameter will be better.Because I don't want to see any java code in my jsp.
But the problem is that the Tag bean:write need a javabean for storing the "id" parameter.It means I must create a new javabean for only one property "id" and pass it to request.The id has its getter and setter method.
Have any good idea? :roll:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic