would work.
-- Bill
.
<% User user = (User)pageContext.getAttribute(
"user" ); %>
I don't use this method at all (I prefer jsp:useBean), but maybe the "user" in
getAttribute() should be capitalized as "User"?
- Scott
--
Bill Schn
like everything else it's a trade-off. Your cost-benefit analysis is
going to depend on your individual app. Personally, I'm just salivating
over the MyFaces treeTable plus AjaxAnywhere, because I haven't found a
way to get the same widget off-the-shelf with Struts. :-)
-- Bill
ascript in your Struts app, it's no problem, but if you want to add AJAX to your app while still using Struts' client-side validation, you will have a problem with Rico, prototype.js, JSON, and any other library which modifies the base javascript Object class.
--
Bill Schneider
Ch
omewhat lacking, as there are only two regular
contributors to the project and we both have very limited time to devote
to it (darned customers!) But the example app in the source
distribution would show you how to set it up.
-- Bill
--
Bill Schne
quot; pattern.
If you're using Spring to manage your Hibernate SessionFactory, you can
just pop the OpenSessionInViewFilter in web.xml and go. The only thing
to watch out for is that any writes back to the database need to be
within transactions.
-- Bill
--
Bill Schneider
Chief Architect
k the
way you'd do that is to set up multiple security realms in Tomcat
(one per application or one per database) and then configure your
security constraints in the web.xml for each application. Your Tomcat
books should have more details on how to do that than I can provide
I'm afrai
P.S. By the way, Rod Johnson also said persistent objects that contain only
getters and setters are evil too (same page as dto, 27). In my understanding
it means hibernate and ibatis which use such objects are at least as evil?
How are you supposed to represent data anyway then?
the issue is not
e stateful UI components, with a clearer separation between
stateful client-side components and sorta-stateless (well, there's that
HttpSession thing) server-side ones.
-- Bill
--
Bill Schneider
Chief Architect
Vecna Technologies, Inc.
5004 Lehigh Road, Suite B
College Park, MD 20740
[EMA
objects should use typed interfaces to ensure marshaling to and
from presentation format (string types) is pushed as far up the
application stack as possible. This also enables other, potentially
type-aware, presentation / client tiers to be built on top of the same
value objects (e.g. for a web-servi
touch
a config file for every single page I add, and being able to grab
headers/footers from another context.
Has anyone seen anything that has Tiles' request/response cycle and
runtime footprint, but configures like SiteMesh? :-)
-- Bill
--
Bill Schneider
Chief Architect
Vecna Technologie
I've found that the directive in web.xml works only if the
error is thrown from an Action, before the JSP is processed. Putting
<%@ page errorPage="/errorPage.jsp" %> in your JSP may help.
I believe Tomcat always uses RequestDispatcher.forward for
directives, which breaks if the response is
sion) but it seems to be the widespread
accepted practice.
-- Bill
--
Bill Schneider
Chief Architect
Vecna Technologies
5004 Lehigh Rd., Suite B
College Park, MD 20740
[EMAIL PROTECTED]
t: 301-864-7253 x1140
f: 301-699-3180
-
To
r instance) for
server-side performance tuning when you really need it.
-- Bill
--
Bill Schneider
Chief Architect
Vecna Technologies, Inc.
5004 Lehigh Road, Suite B
College Park, MD 20740
[EMAIL PROTECTED]
t: 301-864-7594
f: 301-699-3180
-
*all* beans,
not just LabelValueBeans. If your own beans happen to have properties
called "label" and "value", will work out of
the box.
-- Bill
--
Bill Schneider
Chief Architect
Vecna Technologies
5004 Lehigh Rd., Suite B
College Park, MD 20740
[EMAIL PROTECTED]
t: 301-
oller, rather than using a base action class. This would
give you greater separation of concerns: loading (possibly cached) menu
items is handled specifically by the tile that displays the menu, rather
than by each individual action.
-- Bill
--
Bill Schneider
Chief Architect
Vecna Technologies
s network as well as processing
overhead for marshalling and unmarshalling cached objects.
In summary, J2EE webapp performance involves a lot of tradeoffs. Caching
is important but has to be used judiciously to be beneficial.
-- Bill
--
Bill Schneider
Chief Architect
Vecna Technologies
5004 Lehi
I raised exactly the same question on this list a week or two ago. I'm
glad to see someone else attempting the same thing.
Two workarounds came out of that discussion--structure your tiles defs
differently, or futz with and . The
first approach doesn't scale well, because for every page that
Thanks for the detailed explanation. So, if I want to represent an HTML
page that has two levels of layout (a tile that extends a layout tile,
which inserts another tile that also extends a layout tile) it sounds
like the "right" way to do the tiles definition is something like this:
The idea is that most tiles extend .mainLayout and look like
HEADER
[body]
FOOTER
But some tiles extend .nestedLayout instead, which in turn extends
.mainLayout for two layers of navigation:
HEADER
Nested Header
[nested body]
Nested Footer
FOOTER
The nested header+body+
ways do something in mainLayout.jsp like
// foreach imported attribute {
// }
This works but doesn't feel right. Is there a better way to export
attributes or otherwise preserve the current Tiles context through a
tiles:insert or tiles:get?
-- Bill
--
Bill Schneider
Chief Architec
DTOs from XDoclet tags in a POJO data model. That way you get
_both_ real DTOs and Form Beans without writing all the classes by hand,
and you can copy between DTOs and form beans with BeanUtils.copyProperties.
-- Bill
--
Bill Schneider
Chief Architect
Vecna Technologies
5004 Lehigh Rd., Suit
to migrate an ad-hoc/Model 1 servlet or
JSP to Struts.
-- Bill
--
Bill Schneider
Chief Architect
Vecna Technologies, Inc.
5004 Lehigh Road, Suite B
College Park, MD 20740
[EMAIL PROTECTED]
t: 301-864-7594
f: 301-699-3180
-
To unsubscrib
tely, but hopefully this points you in
the right direction. There may also be a more elegant solution by
registering a custom JAAS CallbackHandler or LoginContext; you might
want to look into this as well.
-- Bill
--
Bill Schneider
Chief Architect
Vecna Technologies
5004 Lehigh Rd., Suite B
Colle
ts' ActionServlet already appears to do
that. So you have to write an actual servlet.
Hope this helps,
Bill
--
Bill Schneider
Chief Architect
Vecna Technologies
5004 Lehigh Rd., Suite B
College Park, MD 20740
[EMAIL PROTECTED]
t: 301-86
rcDatabaseException"
>> path="/common/exceptionTrcDatabase.jsp"
>> />
>>
>> I have created a JSP, exceptionTrcDatabase.jsp, that contains this
element:
>>
>>
>>
>> However, whenever I test this code (by deliberately creating the
re
25 matches
Mail list logo