I recommend SDN's JSP forum : http://forum.java.sun.com/forum.jspa?forumID=45

And for JSP Tag Libraries this mailing list : 
http://jakarta.apache.org/taglibs/#MailingLists

1) I tested your jsp: include, both files returned the same size when tested 
with Firefox's page size extension tool. I got 19KBs in both cases. 
    But if you just look at the size of test.jsp *before* it translates and 
processes the request, it's size is 0.1 KB because of the code it contains.

2) This syntax <%@ include file="request.getParameter("f")" %> , is not 
correct. The correct syntax only allows a URL in the file attribute as shown 
here:
http://java.sun.com/products/jsp/syntax/2.0/syntaxref209.html#1003408  , since 
the include is a directive and not a JSP action. 

Another option is to use JSP Tag Library (JSTL 1.1) : c:import tag. The details 
for this tag are here: 
http://java.sun.com/products/jsp/jstl/1.1/docs/tlddocs/index.html 
But this first requires you to install JSTL 1.1, and knowledge of how JSTL and 
Expression Language works (If you want to use JSTL - since it is better than 
JSP scriplets and JSP expressions)

-Rashmi


----- Original Message ----
From: Xuekun Hu <[EMAIL PROTECTED]>
To: Tomcat Users List <users@tomcat.apache.org>
Sent: Monday, January 15, 2007 1:23:21 AM
Subject: Questions about JSP programming


Hi,

Sorry for the off-topic questions, since I didn't find a good forum to
discuss JSP programming. :-). If you have any recommendations, I would
be very appreciated.

I have two questions.
1.  I wrote a test.jsp to test dynamically return a static file from
the request parameter.
////--- test.jsp
<jsp:include page='<%= request.getParameter("f") %>' />
The problem is that the return size is always greater than the request
file size by 1. For example, the static file is 512byte, however it
return 513 byte. The result is repeatable. Does anyone know the
reason?

2.  I implemented the test.jsp by another include usage.
////---test.jsp
<%@ include file="request.getParameter("f")" %>
However tested with lots of simulaneous request of the same jsp, some
request will get "500 internal server error"!. What's wrong?

Thanks in advance.

Thx, Xuekun

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


 
____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to