dcsimg
Interpreting jsp-output from a bean during runtime
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Se_Pr
Posted On:   Sunday, August 4, 2002 09:48 AM

Hi, my problem is to interpret jsp-output (own tags for a taglib) from a bean during runtime. e.g.: public class Bean { ... public String getTag() { return " "; } } <% Bean myBean = new Bean(); // Not working, because sends only the String // " " to the client without interpreting it out.println(myBean.getTag()); %> Is there a way to get the tag-string from the bean interpreted during runtime by the JSP-Engine? Thanks in advance for your help Best regards Sebastian    More>>

Hi,

my problem is to interpret jsp-output (own tags for a taglib) from a bean during runtime.

e.g.:


			public class Bean {
			

...

public String getTag() {

return " ";

}

}



<%

Bean myBean = new Bean();

// Not working, because sends only the String

// " " to the client without interpreting it

out.println(myBean.getTag());

%>




Is there a way to get the tag-string from the bean interpreted during runtime by the JSP-Engine?

Thanks in advance for your help
Best regards
Sebastian    <<Less

Re: Interpreting jsp-output from a bean during runtime

Posted By:   Carsten_Eider  
Posted On:   Sunday, August 4, 2002 11:33 PM


Hi Sebastian,

maybe u should learn more about JSP. A JSP is translated into a "normal" java-file in order to be compiled into a class.
While transforming your JSP-File, any JSP-Commands are translated into JAVA-Statements. If u access your JSP, the servlet is executed.

The way u want to get your data out of your bean will not work (and will never be working) as u try do modify your page at runtime and not an compilation-time.


By the way, your design is very bad. A bean is dedicated to be a data-container and should not contain any layout-information.

About | Sitemap | Contact