You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Brian K. Buckley" <bb...@surfglobal.net> on 2001/09/24 18:09:31 UTC
how to capture html
Is there a good way to capture the output from a snippet of jsp into a
String variable that can be reused multiple times in a page?
- Brian
As a simple example, if one needed to have the line:
<tr><th align='left' >Name</th><td align='right' ><html:text
property='name'/></td></tr>
appear in several places, how can one set a String namerow so that the line
can be redisplayed by saying <%=namerow%> instead of repeating the whole
snippet? Note that the snippet includes a custom tag.
Re: how to capture html
Posted by Ted Husted <hu...@apache.org>.
You might want to try this one on the JSP list. The archives are also
quite extensive.
http://archives.java.sun.com/archives/jsp-interest.html
-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel +1 716 737-3463
-- http://www.husted.com/about/struts/
"Brian K. Buckley" wrote:
>
> Is there a good way to capture the output from a snippet of jsp into a
> String variable that can be reused multiple times in a page?
>
> - Brian
>
> As a simple example, if one needed to have the line:
>
> <tr><th align='left' >Name</th><td align='right' ><html:text
> property='name'/></td></tr>
>
> appear in several places, how can one set a String namerow so that the line
> can be redisplayed by saying <%=namerow%> instead of repeating the whole
> snippet? Note that the snippet includes a custom tag.
Re: Struts with SilverStream
Posted by Graham King <gr...@gointernet.co.uk>.
Wolfgang,
I haven't done it myself, but I know that in Silverstream 3.7.1 the
SilverBooks demo has been re-written to use Struts, and I believe Struts
has some strong supporters within Silverstream. Try looking for info on
http://devcenter.silverstream.com, or try the newsgroups from
news.silverstream.com.
Hope this helps,
Graham.
Wolfgang Frank wrote:
> Hi there,
>
> does anybody have experienece how to integrate STRUTS in the SilverStream J2EE
> Server?
> I uploaded my struts WAR ... i can see the jsp if i directly link up to them but
> i get an
> "bad request error" when i call an action. The same application ran without
> failure on tomcat ...
>
> Any ideas?
>
> thanks and greets
> Wolfgang
>
>
>
Re: Struts with SilverStream
Posted by Joey Gibson <jo...@joeygibson.com>.
On Tue, 02 Oct 2001 10:19:20 +0200, Wolfgang Frank <wo...@bms.com>
wrote:
||| Hi there,
|||
||| does anybody have experienece how to integrate STRUTS in the SilverStream J2EE
||| Server?
||| I uploaded my struts WAR ... i can see the jsp if i directly link up to them but
||| i get an
||| "bad request error" when i call an action. The same application ran without
||| failure on tomcat ...
Did you create a deployment plan and then use 'silvercmd deploywar' to
deploy it? What are you using for a URL to try to hit the jsp? I have
deployed some struts apps with SS 3.7.1 and while it was tedious, it wasn't
a problem. Give me a bit more info on how you deployed and what exactly
happened, and perhaps we can figure it out.
Joey
-- Sun Certified Java2 Programmer
-- My Pocket Smalltalk Stuff: www.joeygibson.com/st
--
-- "We thought about killin' him, but we kinda
-- hated to go that far...." - Briscoe Darling
Struts with SilverStream
Posted by Wolfgang Frank <wo...@bms.com>.
Hi there,
does anybody have experienece how to integrate STRUTS in the SilverStream J2EE
Server?
I uploaded my struts WAR ... i can see the jsp if i directly link up to them but
i get an
"bad request error" when i call an action. The same application ran without
failure on tomcat ...
Any ideas?
thanks and greets
Wolfgang
Re: how to capture html
Posted by Gregor Rayman <gr...@gmx.net>.
"Brian K. Buckley" <bb...@surfglobal.net> wrote:
> Is there a good way to capture the output from a snippet of jsp into a
> String variable that can be reused multiple times in a page?
>
> - Brian
>
> As a simple example, if one needed to have the line:
>
> <tr><th align='left' >Name</th><td align='right' ><html:text
> property='name'/></td></tr>
>
> appear in several places, how can one set a String namerow so that the line
> can be redisplayed by saying <%=namerow%> instead of repeating the whole
> snippet? Note that the snippet includes a custom tag.
Not really. The only way I know, is to enclose the snippet into a method
with a variable called "out". HTML in JSP will be translated into
out.print("....");
--
gR
Re: how to capture html
Posted by John Raley <jo...@moonlight.com>.
This might be useful:
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg14326.html
Brian K. Buckley wrote:
>Is there a good way to capture the output from a snippet of jsp into a
>String variable that can be reused multiple times in a page?
>
>- Brian
>
>As a simple example, if one needed to have the line:
>
><tr><th align='left' >Name</th><td align='right' ><html:text
>property='name'/></td></tr>
>
>appear in several places, how can one set a String namerow so that the line
>can be redisplayed by saying <%=namerow%> instead of repeating the whole
>snippet? Note that the snippet includes a custom tag.
>
>
>
Re: how to capture html
Posted by Matt Raible <ma...@yahoo.com>.
<%
BodyContent bc = pageContext.pushBody();
%>
<tr><th align='left' >Name</th><td align='right' ><html:text
property='name'/></td></tr>
<%
String namerow = bc.getString();
pageContext.popBody();
%>
Matt
--- "Brian K. Buckley" <bb...@surfglobal.net> wrote:
> Is there a good way to capture the output from a snippet of jsp into a
> String variable that can be reused multiple times in a page?
>
> - Brian
>
> As a simple example, if one needed to have the line:
>
> <tr><th align='left' >Name</th><td align='right' ><html:text
> property='name'/></td></tr>
>
> appear in several places, how can one set a String namerow so that the line
> can be redisplayed by saying <%=namerow%> instead of repeating the whole
> snippet? Note that the snippet includes a custom tag.
>
>
>
__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com