[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
Re: Some questions
Alexey Parshin wrote:
> 1) The .csp files contain a lot of bad HTML, like:
>
> <font face=Courier size=2><A HREF="StudentView.html">Student 1 (359
> points)</A></font><br>
> <font face=Courier size=2><A HREF=" StudentView.html">Student 2 (412
> points)</A></font><br>
> <font face=Courier size=2><A HREF="StudentView.html">Student 3 (87
> points)</A></font><br>
> <font face=Courier size=2><A HREF=" StudentView.html">Student 4 (210
> points)</A></font><br>
>
> This, IMHO, should be define through stylesheets. Is it a practical
> reason for such design?
Retarded design tool.
>
> 2) The fragment below uses several types of "<%". What's the reason
> for not using just "<%" (besides import)? Is there a documentation on
> these tags?
>
> <%@ page import="libui/UuServlet.h"%>
> <%# using namespace std; %>
header - i.e. before servlet class declaration.
> <%! typedef shared_ptr<CUserSession> user_t; %>
Something similar. Don't remember the difference.
> <%
> user_t user;
> ....
> HttpSession* session = request.getSession(false);
> if (session && session->hasAttribute("user_session")) {
> user =
> static_pointer_cast<CUserSession>((session->getAttribute("user_session")));
> isLoggedIn = true;
> }
> %>
Code inside service function.
Just check what goes where in the generated code.
>
> 3) The request has methods like hasAttribute(), getAttribute(), etc..
> Is there a way to remove an attribute, or I just set it to NULL?
don't remember, but I think there should be removeAttribute.
>
> --
> Alexey Parshin,
> http://www.sptk.net
--
Ilya A. Volynets-Evenbakh
Total Knowledge. CTO
http://www.total-knowledge.com