RE: how can I use the tag value in another tag?
Note that using the EL (JSTL expression language, with Struts-EL and JSTL) is not really script. It's considered a good idea to avoid using runtime JSP expression scriptlets, which these are not. If you don't use either Struts-EL or the JSTL, it's difficult to do this sort of thing without using scriptlets, and you will find that real scriptlets to do this will be messier than EL expressions. -Original Message- From: cnyinhua [mailto:[EMAIL PROTECTED]] Thank you. I hope the jsp file can have script as little as possible. Do you have some other way to implement it? cnyinhua wrote: Hi, all I'm new in struts. Now I want to show some information in a tag, which is showed by another tag. html:link page=/testaction.do?page=bean:write name=turnpage property=pagenumber-1previous /html:link You can't embed one tag within another like you're doing here. Take a look at the struts-el contributed taglib by David M. Karr -- you can (usually) find it in the contrib folder of the Struts distribution. (I say usually because there's some weird build anomoly that's causing it to disappear from time to time). Using struts-el, you could do something like: htmlel:link page=/testaction.do?page=${turnpage.pagenumber}-1previous/ htmlel:lin k -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: how can I use the tag value in another tag?
Why are JSP scriptlets to be avoided? snip It's considered a good idea to avoid using runtime JSP expression scriptlets... /snip -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
how can I use the tag value in another tag?
Hi, all I'm new in struts. Now I want to show some information in a tag, which is showed by another tag. html:link page=/testaction.do?page=bean:write name=turnpage property=pagenumber-1previous /html:link it doesn't work. And I even can't use the bean:write name=turnpage property=pagenumber / to show the pagenumber, it tells that Cannot find message resources under key org.apache.struts.action.MESSAGE. Can anybody give me a hand? Any help will welcome! Best regard! Frank Software Engineer Bleum Incorporated 9E East Building, Hi-Tech King World 668 East Beijing Road. Shanghai, P.R.C.21 Phone: (8621) 5308 1196 http:// www.bleum.com
Re: how can I use the tag value in another tag?
cnyinhua wrote: Hi, all I'm new in struts. Now I want to show some information in a tag, which is showed by another tag. html:link page=/testaction.do?page=bean:write name=turnpage property=pagenumber-1previous /html:link You can't embed one tag within another like you're doing here. Take a look at the struts-el contributed taglib by David M. Karr -- you can (usually) find it in the contrib folder of the Struts distribution. (I say usually because there's some weird build anomoly that's causing it to disappear from time to time). Using struts-el, you could do something like: htmlel:link page=/testaction.do?page=${turnpage.pagenumber}-1previous/htmlel:link it doesn't work. And I even can't use the bean:write name=turnpage property=pagenumber / to show the pagenumber, it tells that Cannot find message resources under key org.apache.struts.action.MESSAGE. Which servlet container are you using? Is the ActionServlet marked as load on startup? It should be. Can anybody give me a hand? Any help will welcome! Best regard! Frank Software Engineer Bleum Incorporated 9E East Building, Hi-Tech King World 668 East Beijing Road. Shanghai, P.R.C.21 Phone: (8621) 5308 1196 http:// www.bleum.com -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: how can I use the tag value in another tag?
I use the tomcat4.0.3 How to mark ActionServlet as load on startup? Thx Which servlet container are you using? Is the ActionServlet marked as load on startup? It should be. Can anybody give me a hand? Any help will welcome! Best regard! Frank Software Engineer Bleum Incorporated 9E East Building, Hi-Tech King World 668 East Beijing Road. Shanghai, P.R.C.21 Phone: (8621) 5308 1196 http:// www.bleum.com -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: how can I use the tag value in another tag?
Thank you. I hope the jsp file can have script as little as possible. Do you have some other way to implement it? cnyinhua wrote: Hi, all I'm new in struts. Now I want to show some information in a tag, which is showed by another tag. html:link page=/testaction.do?page=bean:write name=turnpage property=pagenumber-1previous /html:link You can't embed one tag within another like you're doing here. Take a look at the struts-el contributed taglib by David M. Karr -- you can (usually) find it in the contrib folder of the Struts distribution. (I say usually because there's some weird build anomoly that's causing it to disappear from time to time). Using struts-el, you could do something like: htmlel:link page=/testaction.do?page=${turnpage.pagenumber}-1previous/htmlel:lin k it doesn't work. And I even can't use the bean:write name=turnpage property=pagenumber / to show the pagenumber, it tells that Cannot find message resources under key org.apache.struts.action.MESSAGE. Which servlet container are you using? Is the ActionServlet marked as load on startup? It should be. Can anybody give me a hand? Any help will welcome! Best regard! Frank Software Engineer Bleum Incorporated 9E East Building, Hi-Tech King World 668 East Beijing Road. Shanghai, P.R.C.21 Phone: (8621) 5308 1196 http:// www.bleum.com -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: how can I use the tag value in another tag?
cnyinhua wrote: I use the tomcat4.0.3 Please upgrade. That isn't the current release for the 4.0-series tomcat. There have been bugfixes and ... even a security patch I think since that came out. How to mark ActionServlet as load on startup? Here's an excerpt form the web.xml for the example application: servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param load-on-startup2/load-on-startup /servlet Thx Which servlet container are you using? Is the ActionServlet marked as load on startup? It should be. Can anybody give me a hand? Any help will welcome! Best regard! Frank Software Engineer Bleum Incorporated 9E East Building, Hi-Tech King World 668 East Beijing Road. Shanghai, P.R.C.21 Phone: (8621) 5308 1196 http:// www.bleum.com -- Eddie Bush -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]