Re: Struts question <html:text>



"Scott Phelps" <root@xxxxxxx> wrote
>
> Actually the first time the page is loaded it is not submited. Just the
jsp
> page is called. right?
>

Obviously, that's possible, but it is not The Struts Way in which every
request goes through an Action. Many (most?) of us go to great lengths to
prevent a user from ever navigating directly to a JSP.

(Either with a security constraint in web.xml, or else just putting the JSP
files under WEB-INF where the container is forbidden to serve them
directly.)

You are correct in that the first time the page loads, the form will not
have been submitted. So you might be able to look for POST in
request.getMethod() to decide whether to use the cookie or not.

--
Wendy Smoak


.



Relevant Pages

  • Re: JSP/Servlet performance related question
    ... Aside from the delay the first time you access a JSP, ... major delay in running the JSP. ... with only one DB call (i.e very first time user requests results I make ...
    (comp.lang.java.programmer)
  • Re: Struts question
    ... >> I am tring to make the user login filled in by a cookie, ... When the user submits the form, the framework ... > To decide whether this is the "first time" you can do a number of things. ... Just the jsp ...
    (comp.lang.java.programmer)
  • Re: Struts question
    ... >> Actually the first time the page is loaded it is not submited. ... > prevent a user from ever navigating directly to a JSP. ... > files under WEB-INF where the container is forbidden to serve them ...
    (comp.lang.java.programmer)
  • A weird problem about AJAX+JSP
    ... 1.Write a HTML page. ... 2.Write a JSP page to recieve the request. ... is only be excuted one time - the first time you click the button. ...
    (comp.lang.javascript)
  • Re: jsp, containers, beans and persistence
    ... refering to the 'scope' of a variable. ... Session parameters are available during the lifetime and in the context ... In your jsp you can use request.getParameter, ... > use of the Tomcat container to pass variables for use from one jsp page ...
    (comp.lang.java.programmer)