You can write a controller servlet that put attributes in the request, or you can use a framework like Spring MVC or struts.
You don't need java code in the JSP files. You can access the attributes with something like ${myVariable} or JSTL tags Luis On Wed, Dec 8, 2010 at 2:03 PM, Tommy Fannon <tfan...@gmail.com> wrote: > I come from a .Net background where we get a page_load event whereby we can > populate the DOM from server with whatever we need when constructing the > page. > > I don't see this in JSP-land. It looks like you can put code in <% much > like with old-ASP pages, but that is really ugly and non-maintainable in my > opinion. > > The only thing I can think of is to basically make a small jsp that I > include in each jsp page which makes a call to a server class passing in the > request, response objects. > > <% > MyClass myclass = new MyClass(HttpRequest, HttpResponse) > myClass.doPageLoad() > %> > > This class would basically be a gatekeeper, determine the calling page, and > process accordingly. > > Thoughts? Is there a better pattern for Java/JSPs? > > Thanks, > TF > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to > google-appengine-j...@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.