dcsimg
JSP translation at the top of HTML page
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Marcelo_Demestri
Posted On:   Thursday, December 13, 2001 11:41 AM

I call a bean from one jsp page but the result (HTML code) throw by the bean appars at the top of the HTML page served by the web server (I use Tomcat 4.0.1)instead of the position i call it Example: 1) My jsp page ... <% fmngt.getPage(request, response); %> ... 2) Result <--"HTML code generated for the bean"--> ... Why? How I can do appear the generated code in the right position? Don't shall be done by default? Thanks in advance. Marcelo    More>>

I call a bean from one jsp page but the result (HTML code) throw by the bean appars at the top of the HTML page served by the web server (I use Tomcat 4.0.1)instead of the position i call it


Example:

1) My jsp page

			


...

<% fmngt.getPage(request, response); %>
...


2) Result

			
<--"HTML code generated for the bean"-->


...




Why? How I can do appear the generated code in the right position? Don't shall be done by default?
Thanks in advance.



Marcelo    <<Less

Re: JSP translation at the top of HTML page

Posted By:   Stephen_McConnell  
Posted On:   Thursday, December 13, 2001 01:14 PM

The jsp:useBean tag does not generate any HTML.


The page is compiled into a Java Servlet. That is where the code to load the bean and access it appears.


Your result (the HTML you see) is from a series of:


out.println("");
out.println("");
....
out.println("");
out.println("");

instructions that are found in the generated servlet.


If you look around in the documentation, you will find where the Servlets are and you can look through the code that is generated.... It's an interesting exercise.


Stephen L. McConnell

CrossLogic Corp

About | Sitemap | Contact