Re: JSF and Struts Actions

2003-05-31 Thread Sundar Narasimhan
This is so cool.  I was hoping for this sort of thing.  This is getting 
close to grown up.  I wish I could see this stuff now.  Man!

Don't forget that JavaServer Faces has a two-level architecture -- user
interface components that are render-independent, and renderers that
construct a particular markup language.  HTML is only one possbile output
format, unlike Struts tags where (in JavaServer Faces terms) the rendering
markup is baked in to the UI component tags themselves.

Craig McClanahan

Hmm.. I don't see why this is cool yet. The last time I looked at JSF,
it appeared to be an attempt at re-invention of GUI concepts on the
server side. Will the sophistication of such controls eventually
approach what is available on a reasonable desktop PC today? And even
when it does, the fact that server based UI's are going to involve all
sorts of network/latency issues pre-dominate.. no?

It is clear that rich-client based approaches offer richer interaction
than web pages today, and embedding such controls in web pagesis
possible (using MSFT amongst others) today. Innovative approaches
exploiting java also currently exist (see nexaweb, thinlet etc). I saw
these latter as re-inventing X11 (since they are focussed on the
protocol that transmits bits between the server and client), and now
JSF is proposing to redo the same but at the Xt or Motif level (to use
a much-abused layer separation).

Personally speaking, I find more work at the back-end interesting but
I would like to know how it would impact the front end. The stuff we
(as programmers) have trouble with really is still in the front
end.. take a sampling of struts questions/traffic and I really wonder
what percentatge of the traffic has to do with layout, jsps, event,
security, controls (calendar/pagination etc.) .. all GUI/HTML/frontend
stuff. Will JSF make writing such front-ends easier.. and if so, how?



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Q: more an HTML/JSP issue rather than struts.. but..

2003-05-30 Thread Sundar Narasimhan
Hi, I have the need to scroll the displayed jsp page (as the result of
a struts action) to a specific place on the resultant html page. 

Is there a standard way to do this? (I thought one could use
javascript onLoad or somehow re-write the URL to force the browser to
move to an anchor, but both don't seem to be working.. I suspect it
might be that struts is rewriting the visited page URL to be the
action.do page somehow which always moves it to the top? ).

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts Performance - Any Benchmarks?

2003-05-30 Thread Sundar Narasimhan
I now use dbMonster to generate lots of db data and DiselTest to stress 
test. (linked on baseBeans.com downloads and cheat sheet pages)
Thanks for the pointers Vic.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: more an HTML/JSP issue rather than struts.. but..

2003-05-30 Thread Sundar Narasimhan
1.  With plain HTML, add #anchorName to the URL that appears in your
browser's address bar, and then a name=anchorName where you want it to
be.
Hi, Matt -- thanks for your response. But how do I do this in
struts.. (i.e. just appending the #anchor to a struts form's action
still doesn't make it appear on the browser's address bar -- almost as
though the struts framework is swalling it someplace). I'm beginning
to suspect I need to break and trace down to where it gets the URL and
how it breaks it down.. 

Thanks.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts Performance - Any Benchmarks?

2003-05-28 Thread Sundar Narasimhan
I've been following this thread w/ interest. Thanks for all the posts.

Overall, it sounds like your team is likely to succumb to premature
optimization anti-patterns, and totally fail to understand what is really
important about web application design.  That's pretty tragic when it
happens, because it's totally needless -- most of the things your team is
stressing over are TOTALLY IRRELEVANT to the end user's perception of
performance of your application.  They are worried about the wrong things,
at the wrong time in the development cycle.

Craig -- I think that would be a bit premature. It has been my
experience that a lot of IT shops would like to know what kind of
hardware to buy etc. (i.e. down to the model number of the load
balancer). Personally speaking a lot of it is pre-mature (in fact I've
even had one IT manager proudly point out how he got a fixed price
for 90 days extension from a hardware manufacturer -- firmly
forgetting the fact that if you wait 90 days most such hardware will
go down in price :), but .. people need guidelines because the
lead-cycles organizationally on such architectural decisions tends to
be all over the map.  

One possible approach would be to build a prototype using Struts, and
exactly the same functionality using whatever design approach your team
thinks will work better.  It's pretty much a waste of effort, but some
people won't be convinced any other way.

I think it would be great if people could post their experiences
wrt. performance. i.e. at what point did splitting servers, more
advanced containers make sense etc.

Personally speaking, I'm going through a major struts based project
myself. Things seem to be working well so far, but I must admit that
now the load is going from the tens to the hundreds of simultaneous
users.. and the latency of some of the accesses are from far away
(separated by multiple routers) I'm wondering what our next steps
ought to be -- if customers start complaining :) Thus far we've been
able to get away with apache + tomcat instances.

(The critical piece of our application is one where users sort some
pretty large datasets.. which can also be modified by other
users.. right now the design reads the db. upon each significant
re-sort operation, but paging thru and editing is done entirely w/ the
data set cached in session).

Benchmarks to me are not only about tee-ing off against
alternatives. Benchmarks often tell me what combinations of
hardware/software people ended up using, and I often find that useful.

My $.02 cents.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How do you keep your session junk free?

2003-03-07 Thread Sundar Narasimhan
Over on another mailing list I'm on the consensus is that
continuation-style programming is much better than the present
approaches suggested by struts and other frameworks. In particular,
they solve the back button/refresh type problems much more cleanly
than other languages/frameworks.

As a Lisp programmer I find that appealing, and I just wish people in
the Java camp knew more about it.. here are a few links that I've been
suggested to follow up (I haven't had the time yet to fully evaluate
them :) Unfortunately there doesn't seem to be much by way of tool
support for these frameworks (yet).

http://www.beta4.com/seaside2
http://segment7.net/ruby-code/borges/borges.html
Schecoon -- does anyone know the status on this project btw?

http://youpou.lip6.fr/queinnec/Papers/www.ps.gz
http://youpou.lip6.fr/queinnec/Papers/webcont.ps.gz

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How do you keep your session junk free?

2003-03-07 Thread Sundar Narasimhan
Explain how some other approach handles it in any better way? Use of
token to prevent duplicate submissions works for me. And what do you
mean by a continuation-style programming?
Hi, Rick: CPS is a commonly accepted idiom for representing what a
program does next in your language. Some languages such as
Scheme (a lisp variant/dialect) have strong support for it.. 

In languages such as these.. you can actually write

   int x = 5;
   x = getValue1();
   y = getValue2();

where getValue1 and getValue2 display the appropriate pages etc., and when
the user hits the back button your program's state gets unwound to the
point where it should be.. w/out ANY extra coding! You as a coder
wouldn't have to write any code to set the variable x's value back
to what it was etc.

Obviuosly in languages w/out continuations and closures, people tend
to simulate them w/ tokens, inner classes etc., but these are VERY
POOR substitutes for these things. 

If you google those terms I'm sure you'll get enough hits to keep you
busy for a while (I personally learnt cps stuff when I worked w/ Jeff
Siskind's Screamer which augmented Lisp with non-deterministic
primitives :). I think some of the scheme papers wrt. continuations
are classics, and explain how you can do things like co-routines
etc. w/ them. Be prepared to bend your mind a lot though -- I've never
been able to teach continuations easily -- most programmers (me
included) who grew up with Fortran, Pascal and C etc. have a *very
hard* time grokking them initially. If you run across good
explanations that help you understand it, let me know.. I'm always
looking for new pedagogical tools for this. (I understand that both
Python and Ruby camps are investigating adding support for this sort
of thing :)
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: struts IDE

2003-03-06 Thread Sundar Narasimhan
Jbulider8.0
and Eclipse
Do either of these provide breakpointing ability in JSP's, and
traversing transparently into container code.

My current environment (which is WSAD 5.0 built on top of Eclipse)
doesn't do this, and I find it annoying.

The other annoyance I have is that when I run tomcat and hot code
replace a method -- if I save the file.. tomcat actually restarts
the entire web-app. Does JBuilder do any better? 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Nesting logic:iterate

2003-03-05 Thread Sundar Narasimhan
 Hi all,
 is it possible to nest iterate-tags with Struts 1.1?
Hi, Heiko:

I've had luck with patterns similar to what others have suggested, but
if you have plain lists or vectors inside lists or vectors.. a better
route to go is to try
  logic:iterate id=row name=bean property=myproperty
 logic:iterate id=element collection=%= row % 
do something w/ element
 /logic:iterate
  /logic:iterate
I don't happen to have my examples handy (I'm still at home :), but
hope you get the idea. 

As another person suggested if you have the inner element defined as
a bean property on the object bound to row.. then you can use
name/property as well.
 
The scoping gotchas of struts are plenty -- this is one of them that I
stumble across often :)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Text editor usage (was RE: [OT]: What is vim?)

2003-03-04 Thread Sundar Narasimhan
:). In any case, OTI is an ex-Smalltalk IDE shop, so I presume there's
a strong NIH syndrome there similar to most other IDE's I've run
across --

Then why is there an Emacs keybinding preference setting but none for vi?

David
Huh? I can't quite understand what you are asking David. If you are
asking why emacs instead of vi -- I can only offer that perhaps
Emacs users asked them for it repeatedly (OTI used to build VisualAge
suite of products before being acquired by IBM, and perhaps found the
emacs demands harder to ignore :). 

If you are asking why emacs at all? given what I said about their
NIH syndrome, I have to point out that the emacs key-binding support
in Eclipse is much like the key-binding support within Visual Studio
or .Net IDEs.. they are very poor implementations, and I'd rather not
have them at all. It is a great mistake to think that just by simply
rebinding keys you can get emacs-like behavior.. if you've used things
like the keyboard macros, key-rebinding support, regexp search, file
commands etc. etc., you will see that deeper integration can provide
a lot more benefits. I think an open plugin-based IDE like Eclipse
can do much, much more.. by actually embedding Emacs within the IDE as
a true component plugin, much like it allows the embedding of multiple
HTML/JSP editors, viewers or VCM tools etc.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Text editor usage (was RE: [OT]: What is vim?)

2003-03-03 Thread Sundar Narasimhan

I didn't want to get into this -- since editors are religion :) but
personally I use editors for editing code (although I must admit that
Eclipse's ctrl-space/and factoring helpers are beginning to win me
over :), and IDE's for debugging. (in multi-threaded apps, there's no
comparison -- I can be in and out of a complex remote situation, set
breakpoints on exceptions etc. w/ a couple mouse clicks, in the time it
takes me to figure out where jde or gdb is going to take me next. And
anyone who's still typing print x instead of using modern inspectors
is just asking to be competed with and put out of business :)

In summary, I like my hybrid approach. And I am trying to convince
Eclipse guys to have / create a true Emacs plugin .. although I don't
see any takers yet.

Regards.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] Text editor usage (was RE: [OT]: What is vim?)

2003-03-03 Thread Sundar Narasimhan
In summary, I like my hybrid approach. And I am trying to convince =
Eclipse
guys to have / create a true Emacs plugin .. although I don't see any =
takers
yet.

 wonder why.

I don't see any smileys, so I'll presume you are asking this
seriously. 

I did submit a bug report/enhancement request relating to this, and
got pointed to several others that were similar. (I did this right
after I discovered Incremental Find.. was not really Incremental
:). In any case, OTI is an ex-Smalltalk IDE shop, so I presume there's
a strong NIH syndrome there similar to most other IDE's I've run
across -- but I must admit that the Eclipse approach is a lot more
open -- which is why I tried. I've hacked gnu emacs code in the distant
past (things like rmail/rnews etc. in their very early incarnations
which later morphed into other forms :). If I can rustle up some
free time, I'll probably do that -- but I suspect it's going to be a
low-bandwidth long lead cycle kind of thing. 
 
If you are interested in contributing, let me know. (I have a couple
of others who might volunteer as well).

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wanted: struts-calendar

2003-02-27 Thread Sundar Narasimhan
HI, David: I've used Lea Smart's java script totallysmartit.com
calendar hacked a bit (wrt. colors, clip rectangles and so forth) and
would recommend it.

Hope that helps.


 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Best way to understand Struts

2003-02-26 Thread Sundar Narasimhan

I have longed for something like this too -- because while struts
attempts to solve some very real problems, and does a good job at it,
I think the documentation and the mental model that people need to
have can be reset straight by a key few pieces of documentation that
are still missing. 

- You talk about UML diagrams and class flows. Personally I've used
  WSAD/Eclipse to set breakpoints and follow through the code pieces.
  Typically what I would do is to put a breakpoint in my Action
  class's perform() method, and then traverse up the stack to look at
  how things got there, and then when my action class returned follow
  through how various forwarding logic was working.
  
  The most frustrating aspect about struts is that even though the tag
  semantics is fairly easy to understand.. they sometimes interact in
  mysterious ways. I still stumble over iterate's inside iterate's, or
  with html:link or nested, select etc. Since struts uses reflection
  fairly heavily, your best bet is to make sure you can look at the
  generated java from jsp's. This will help when some of the
  exceptions get thrown as they inevitably will. If you can run your
  container (I use tomcat) in the debugger and set a breakpoint to
  trigger on an exception that is better -- because several of these
  container exceptions, or introspection exceptions are very poorly
  designed. Often they just say exception X -- and you get this huge
  stack trace of catalina design abstractions that no doubt people
  labored over, but won't help you in actually divining and fixing the
  exceptions. 

- So in addition to understanding how struts is put together I think
  we really need a much better user level document that is short,
  devoid of architecture verbosity, and clearly introduces the
  scope/semantics assumptions that guided the tag design and you need
  to know to get work done, the back-end flow and a debugging
  methodology to take when things go wrong. Maybe the struts experts
  have all written books to do this -- and that's probably the
  economic/business model for struts (after all it's open source, and
  you didn't expect to get this kind of software for free, right
  :)?

In any case, I'd be happy to help out in any way I can if people think
such a thing could be useful.

Regards.





 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Struts to JSTL EL - Taglib 1.0 implementation

2003-02-17 Thread Sundar Narasimhan
Seriously ... it would be nice if JavaBeans recognized something like
mapped properties.  But that is for the future -- in the mean time,
you'll need to stay within the limits of what the JVM recognizes *now* if
you want to leverage EL expressions.
Craig -- IMHO, if you look at Lisp.. symbol-plist and friends, one
could argue that such facilities belong at Object not Beans :)

Seriously -- Java is getting better (I hear 1.5 is going to have
generics) at learning from Lisp. Hey.. perhaps one of these days we
might even get defmacro which will make all this jsp/tag/expression
stuff seem well.. just plain passe. :)

Regards.







-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




[OT] RE: validate() method is ActionForm

2003-02-14 Thread Sundar Narasimhan
Any more personal attacks like this, or the previous response's profanity,
are likely to get you banned -- then you won't have to worry about
questions you think are below your dignity to answer politely.
Craig McClanahan

Thank you Craig. 

I think this list is great, and now that I'm slowly getting struts --
this week has been much better than last, I'm able to see it's
power. I still haven't played with DynaAction forms, but if they can
reduce the proliferation of forms classes I seem to have now.. more
power to struts. Thank you (and to the rest of the list) for the
patience w/ which you answer -- it makes the list and struts itself
valuable.

I normally wouldn't say this, but the author posted about whether or
not a form's fields would be filled before validate() is called. My
reaction was the same initially as several others on this
list.. i.e. hmm.. hasn't he read the manual? I then recalled my
frustrations in those early days w/ struts (just a few days
back).. and I remember being unclear about several things. what does
the 'struts' framework do behind your back to make your life easy for
you would be a great topic in the documentation.. it sort of says
that .. but that information is mixed in w/discussions about MVC2, and
then other details .. so a 'just what the code does in 1.1b2' section
would be great. Thankfully, I finally got my source debugger to work
with it, so I've been setting breakpoints and learning. struts is
actually quite simple -- once you see what it's doing. Just a
suggestion. 
ps. when things work .. people don't ask such questions. It's when you
read about bean:define or nested:text and then try it, and it throws
an exception that shakes your mental models, that you need to map,
cross-check your understanding with reality again.

Thanks.

 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: RowSetDynaClass

2003-02-14 Thread Sundar Narasimhan
Hi, Craig: Just catching up on email, and caught your very good
explanation of RowSetDynaClass.. I didn't know it existed, so had
written something like it myself, w/ returning two Collections (one
for the column names, and another for the data set).

But I have a follow up question re. what you say below:
 PS:  There is a performance tradeoff with the approach described above,
 because the data is copied into an in-memory array.  However, one key
 advantage is that you can immediately release the database resources for
 the query, so that the ultimate page that renders the output does not have
 to worry about it.  Most of the no-copy solutions I have seen require you
 to deal with closing the result set, and/or releasing the connection back
 to the connection pool, in the JSP page itself.  To me, that does not seem
 like something you really want to make the page author worry about.

 PPS:  If you're using JSTL in your pages, the
 javax.servlet.jsp.jstl.sql.ResultSupport class can be used in a manner
 very similar to what is described above, but makes the query results easy
 to access via JSTL tags.  That way, you won't be tempted to code the SQL
 queries directly in your page, which doesn't really fit into an MVC
 paradigm :-).

I agree that this approach works well for small result
sets. However, if there are say 10k rows.. it would be nice to have
such a class work together with a Pager tag set.. any thoughts re. that?

Thanks.
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: forwarding to another action ..

2003-02-14 Thread Sundar Narasimhan
From: Sri Sankaran [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]

You haven't given enough information below (seems like a continuation of =
some previous thread).

I *think* what you are trying to do is go forward from one action to =
another [*] but before so doing removing a attribute from the request.  =
If so, some obvious checks would be

 - ensure that the  request.removeAttribute(...) *is* being
   invoked
 - ensure that there isn't some logic in your admin action
   whose role is to add one of these objects into the=20
   request
Sri: Thanks much for your reply. You are right, perhaps I omitted to
state completely what I was/am trying to have happen. Basically I have
an application where there's a master page .. (I mean master in the
master/details sense). The user clicks on ONE of the items displayed
in the master, and goes into a task loop where he or she might spend
several iterations operating on the item they are dealing with. This
dispatches to several actions, queries, updates etc. When they are
done, they close the item, and at that point, I want to go to the
master page again. 

Now .. one could argue that the master jsp is what I should merely
forward to from one of the details panel's close action, but I
really want the view action of the master page
executed.. (since this view action queries the database etc. and
composes the view of the master page).  Forwarding to the master jsp
from the detail would mean that I would need to construct and set up
the request and session attributes for the master page in the close
action of the item, which just doesn't seem right to me.

So I thought.. hmm.. it should be easy to have a goback action on
the detail that dispatches to the view action on the master. Is that
not the right way to be thinking about this?

Does it make sense now?

I have verified that request.removeAttribute() is being called. (I can
step past it.. correctly).

Weird thing is that I notice in struts the same request object is
what struts uses.. but at some point it dispatches to my container's
dispatcher.. so I'm wondering now if this is really not a problem with
struts so much as the container (unfortunately it behaves like this in
tomcat too). Any thoughts on what I might check next? 

Your suggestion about checking if something is not adding the
attribute I'm trying to remove is a good one. I don't think so.. but
I'll double check. 

Sri
[*] Check out the archives for various threads on action-chaining.  It's =
a slippery slope

Why? Is this not a good/blessed way of doing things? Just curious to
learn the right idioms.

Thanks again.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: jsp, multiple forms and beans

2003-02-13 Thread Sundar Narasimhan
Hi: This statement caught my eye because I was about to do something
like this.
 I would avoid using multiple Forms per page.

In my application the user is going to assemble a complex set of
things, and in order to do this needs to view another set of
things. The view step involves querying, and viewing what's available
say .. multiple times.

The common way to do this might be to dispatch to a

ComposeForm .. which then dispatches to a ViewForm and then the latter 
jumps back to the composer once the user is ready to assemble X or Y.

What I was wondering about was to have both these on the same page.
Ideally if I could have two forms on the same page/jsp.. both dispatching to
different actions that each then dispatch to this same jsp, that might
be a better task flow because the user then gets to see both the stuff
being assembled and the results of his queries (the view part) right
next to each other..

Are you saying that struts does not allow this? (I've had several
problems w/ struts so I'd rather not waste time on something that
won't work :)
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




how to forward to another action..

2003-02-13 Thread Sundar Narasimhan
Hi, I have a master form w/ several rows, the user clicks edit and
there's another form with details.. the user edits, and then clicks
save. At that point, I'd like to go back to the master form..

Ideally from the detail Action .. I'd like the save to dispatch to
the master Action that populates other things ..

Is there a clean way to accomplish this sort of thing? 
I see references for Actions forwarding to other actions etc. so I'd
appreciate seeing a detailed example or pointers to relevant docs.

Thanks.
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Q: forwarding to another action ..

2003-02-13 Thread Sundar Narasimhan
Hi, I finally figured out that the problem w/ what I was trying to do
was that the back forward didn't have the .do. Once I included the
.do things seem to work. (i.e. I can have my compose, save
etc. actions forward back to the master action in certain cases).

forward name=back
 path=/admin.do
/forward

However I now have another problem. I'd like to make sure that a
certain request.attribute is removed when I go back to the master
form. So in the above action I do a 
  request.removeAttribute(someName);

But surprisingly I find that in the admin action this attribute is NOT
removed. It's almost as though the someName attribute is saved and
restored when I forward through back.

Why is this happening? I would have that the life-cycle of a request
remains the same.. and struts wouldn't muck with it behind my back..

Any help will be much appreciated.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Newbie Question on Performance

2003-02-10 Thread Sundar Narasimhan

 From: Peder Jakobsen [EMAIL PROTECTED]
 I'm new to Struts, and so far I'm very happy with what I see. But I have
 some suspicion that it'll be dead slow.


What leads you to this suspicion?  There's no way to respond to such a
FUD-sounding :-) comment without specifics.

Craig: While this is true, I think Peder's question deserves a more
thoughtful response. Struts relies exclusively on reflection, and
someone should do some detailed studies and post them. You have
responded before when I asked about interface vs. implementation
etc. and I must say the arguments don't sound very convincing. There
is definitely code-bloat with all these classes and parsing and
dealing with strings repeatedly at multiple layers (and I know about
the Plan9 argument that it's a small % of cpu time :). While it is
true that logically this should all help with design -- my personal
benchmarks against other technologies such as Zope or ASP vs. struts
indicates that the latter is good but still has a ways to go. The
slowness in terms of productivity etc. may be due to other factors
such as lack of documentation, lack of clarify wrt. life-cycle of
certain objects, lack of good debugging tools for jsps' etc., but if
struts promises elegance, productivity and performance, my thoughts
are it still needs a whole lot of work. The perception I also get
wrt. people like you and others moving onto JSTL and JFaces also does
not give the warm and fuzzies to others seeking to adopt struts.
Don't get me wrong, either struts is great stuff, and people are
using it for high-volume sites -- go see 'X', 'Y', 'Z' (which is what
I, (and I suspect Peder) was hoping to hear) or it's supposed to help
you write web applications with Java and JSP, and it's good for small
apps say with 10's of pages, but if you want to do really complex
things, or high volume sites.. you need to do .. which is it?

Don't get me wrong -- struts does do certain things well, and some of
these like dev. tool support, or performance may be entirely out of
struts' hands (as you point out wrt. database vendor choice,
containers etc.). But I firmly believe in the developer hierarchy.. if
you are a framework guy, you've got to listen to people who drive
applications and people who do OS's -- and your statements carry a lot
of weight -- and presumably you've heard from more users of struts out
there than most, so if you know of high volume sites, please do tell :)

 Has anyone had to abandon struts because it was not performant?  Does
 anyone out there serve A LOT of requests?  (We run 12 load balanced quad
 Xeons and we can barely keep up!  We have about 1 million users on our
 site)


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




is there a way to get struts to interact well w/ scriptlets

2003-02-08 Thread Sundar Narasimhan

I notice that if I use nest: I end up getting input fields whose
name looks like so 
 input name=foo.bar

This really doesn't play well with all the java script code we have
that rely on eval'ing target names such as
window.document.someform.somelement.  
If someelement is in dotted notation, eval on the java script side
tries to traverse it and throws errors.

Obviously I like the serverside traversals that nest gives you, but
I'm wondering how I can solve this problem. 

Any ideas will be much appreciated. And please, no suggestions for
avoid java script because I have to use user interface elements like
calendars and spin controls etc. that I need on the client side :)

Basically I'm looking for what the struts sanctioned way of doing this
is..
 
Thanks.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




nested:multibox broken? in 1.1b3?

2003-02-08 Thread Sundar Narasimhan
Hi, I'm trying to use nested:multibox, but I can't seem to get Values
printed out.

I'd like to be able to write
td nested:multibox property=dayStrings
  value=MondayMon/nested:multibox /td
td nested:multibox property=dayStrings 
  value=TuesdayTue/nested:multibox /td
...
etc.

I see that the checkboxes are rendered ok when I do this. But I don't
see any of the Mon or Tue strings.  

If I do a view source.. I see 
input type=checkbox name=selectedPreference.dayStrings value=Monday

No /input tag or the Mon/Tue etc..  
What's going on?

Any help will be much appreciated.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Rendering alternate rows of a table in Struts

2003-02-07 Thread Sundar Narasimhan
Hi, Craig: 

JSTL in particular covers a huge amount of ground on the nitty gritty
things, and (where it overlaps with things in the struts-bean and
struts-logic libraries) does it much better, mostly thanks to the
expression language's power.

I couldn't agree w/ this statement more after spending a bunch of time
struggling with struts's syntax etc.

I would like to ask a question about JSTL though.. admittedly I've
only glanced at the manual and not used it for anything real. Does the
JSTL envision to expand to include/replace struts/forms/action
functionality on the server side? I didn't see any references to such
.. but may be I missed it.

Thanks.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: nest sytax.. looks cool but does it work? :)

2003-02-07 Thread Sundar Narasimhan
Hi, Sri: Thanks much for responding to my post.

You write.. 
nested:form action=3D/someAction.do
  %-- print the userFormName property of UserForm --%
  nested:write property=3DuserFormName/
  %-- Iterate over all the UserPrefForms --%
  nested:iterate property=3DuserPrefForms

I almost have this but my selected preference is a property of the top
level form.. I essentially have 
   nested:form action=/empPrefs

  nested:nest property=selectedPreference
nest:text property=someattribute 

From all I've read this should work. But it doesn't. I get the
exception shown below.. Any help would be much appreciated.

Thanks.
-

javax.servlet.ServletException: BeanUtils.populate
at
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:980)
at
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:779)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:246)
at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
blah de blah :)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: session timeout not working anymore :(

2003-02-05 Thread Sundar Narasimhan
Best Suggestion is:

1)Over Ride ActionServlet and place session expire code(redirect login page
or some other stuff). This will work for if the user clicks any buttons,
action events.

2) Now we need to handle page refreshes (i.e JSPs)

write a simple jsp, which consist simple logic check session, if session is
null redirect to login page or some stuff.
Include this jsp, where ever you required.
But Ashok -- this is exactly what we have. What do you do if 
request.getSession(false)
does NOT return null as advertised when the session has actually
expired? I don't think moving the logic elsewhere will help, and I
don't really care that much about re-factoring etc.

In short, I think this is a bug! and I'd be happy to hear how you've
solved it if you've experienced it.

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




nest sytax.. looks cool but does it work? :)

2003-02-05 Thread Sundar Narasimhan
I finally gave up w/ 1.0 and moved to 1.1b2 (the one that comes w/
WSAD).

And the first thing I try w/ it doesn't work, so I must have the wrong
model again. So here goes;

I have a top level User -- who has a bunch of Preferences.
There is a UserForm, and a UserPrefForm.
The UserForm has a collection of UserPrefForm, and in addition has a
property called selectedPref which actions set to one of the
UserPrefForms.  (The reason I want to do this is simple: I want to
display a table with all the UserPrefForms in summary form, and when
the user clicks on a Preference to display the detail along with the
form). The trouble is how can I display a UserPrefForm's fields when
I'm displaying a User? So I think nested can help.
1. I first try 
   nested:text property=selectedPref.someField /nested:text
   Doesn't work -- PropertyUtils.throw an IllegalArgument exception --
   No bean specified.
2. I then try
   nested:nest property=selectedPref
html:text property=someField...
   /nested:nest
   and
   nested:nest property=selectedPref
nested:text property=someField...
   /nested:nest
   nada .. 
3. Then I think.. hmm I did read something about root and maybe
that's needed to set the scoping right..
nested:root name=selectedPref
...   
/nested:root
Now I get selectedPref not found in any scope!

How is this supposed to work!!! 
Frustrated.

p.s. do I have the right model here.. that if I use the nested tag,
and invoke the action (say Save), the populate process in struts will
find the appropriate selected preference and save the nested fields
in the selected form. Note that this is what the document seems to
imply with all the discussion of bananas and monkeys.. does the code
not correspond to the documentation? (I was assuming that I'd get
bi-directional transfer.. i.e. from the forms to the jsp, and
vice-versa.. i.e. jsp to actions to the forms -- and that such
master-detail traversals are what nesting was designed for).

If I have this wrong, or if the implementation is just plain not
working yet, please could someone let me know. 

Thanks.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




session timeout not working anymore :(

2003-02-04 Thread Sundar Narasimhan
Sigh. We used to have a piece of code included in our jsp's like so:
header-inc
% if (request.getSession(false) == null) { %
  jsp:forward page=logout.jsp?TIMEOUT=60 /jsp:forward
% } %
jsp:useBean id=user scope=session class=webapps.common.User/
header-inc
and that was included in our files like so. That used to work.. but
now when I have struts-html and struts-bean.. it always fails. 
Is there something wrong with getSession(false) now? 

The stack doesn't seem to include the struts generated servlets.. so
I'm really puzzled!!

Any help will be much appreciated even if it's only to say.. it's not
struts :)

I'm running Tomcat 4.18 on Windows XP.
Thanks.
main.jsp
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
html:html
HEAD
%@ page 
language=java
contentType=text/html; charset=ISO-8859-1
pageEncoding=ISO-8859-1
%
META http-equiv=Content-Type content=text/html;
charset=ISO-8859-1
META name=GENERATOR content=IBM WebSphere Studio
META http-equiv=Content-Style-Type content=text/css
LINK href=theme/tigris.css rel=stylesheet type=text/css
TITLE/TITLE
/HEAD

body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0
class=composite
%@ include file=header-inc.jsp %

---
javax.servlet.ServletException: class com.ascent.webapps.common.User :
java.lang.InstantiationException: com.ascent.webapps.common.User
  at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)
at
org.apache.jsp.contactus_jsp._jspService(contactus_jsp.java:355)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:536

-
To unsubscribe, 

Re: session timeout not working anymore :(

2003-02-04 Thread Sundar Narasimhan
You should take this opportunity to refactor your session timeout
functionality. 

Extend the Struts RequestProcessor (or the TilesRequestProcessor) to include
your session check and forward. Take logic out of your JSPs : )
Ok.. I don't see either of these in 1.0. Next suggestion please?



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: question re. struts

2003-02-03 Thread Sundar Narasimhan
You don't have a form here - where are you using PointForm?

The code should be something like - assuming you're using struts 1.0.x:

   execute (... mapping, ... form, ... request, ... response) {
   form = new FooBarBlahForm();
   ...
   // Get model object
   ...
   myForm.setFoo(model.getFoo());
   myForm.setBar(model.getBar());
   myForm.setBlah(model.getBlah());
   return mapping.findForward(success);
}

I'll leave it up to you to find out how to set up your struts-config so 
that the form is available in the JSP.

This may be annoying if you have say 15 different items to get and set, 
but it provides a clean break between the action and the model and I, 
for one, can live with it.
This is exactly what I ended up w/ and as I think you understand, I
wasn't objecting to it, as much as having to write the myForm.setFoo
methods. If I understand the struts position correctly -- there needs
to be a layer (predominantly composed of Strings :) corresponding to
the model layer. 
I'll just add that reducing the number of lines of code shouldn't be a 
goal - generally, code reductions come about as a result of good design. 
Keeping the business logic out of the action as in struts may initially 
produce longer source files, but when you find you can start reusing 
your model code unchanged in the next release of your project, or when 
management makes the decision that you shouldn't be using opensource 
software so you have to write your own framework, you'll see where the 
code reductions lie.
I'm sorry but I don't buy this argument. I have been for example around
production databases long enough to know the benefits of
normalization, but rarely have I seen big databases follow textbook
clean design principles. I believe one can have performance, clean
design and small amounts of code -- 1.1's evolution over 1.0 seems to
indicate that the struts community is not unaware of these concerns
either. 
How is it even possible to produce a usable input form in your UI if you 
have hundreds of attributes - or do you mean each of your tens of 
objects has tens of attributes?
Nope. Perhaps I should have said tens of attributes. And yes, our UI's
are complex -- they often aren't just text/form-based ones.

 
--- End of forwarded message ---

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




use of html:radio w/out a form possible?

2003-02-03 Thread Sundar Narasimhan
Hi, Kris: You posted in Oct the foll. snippet, which I found
helpful to understand html:radio. You say assuming the form has a
foundPerson property below - my confusion is which form are you
talking about.  

For example, consider an application that displays all foundPersons to the
user w/ some summary information. Using the radio button let's say I
want the user to select a foundPerson and then send the selected
user's key to a doOperation action.

In the jsp I can see having a 
   html:form action=/doOperation 
logic:iterate your code below /logic:iterate
   /html:form

What's confusing me is that now we seem to have two forms: the form
that could have created the set that logic:iterate is operating
over (imagine a query/search), and the form that will get submitted
when the user selects the radio button and then hits Operate :)

Obviously I'd like the radio and the iterate to operate over the first
form's members, but the page scope in the snippet above is within the
second form textually, so I wonder if the property attribute of the
radio will do the right thing. 

I'm probably not quite understanding how struts radios are supposed to
work. This is fairly typicaly in master detail traversals.. and I'd
like to know what people typically do in situations like this. 

In my non-struts jsps, I've accomplished this through a small piece of
javascript that iterates over the radio buttons, finds the one that
was checked, and attaches the key from that selected radio button as
an additional attribute to the form (see ruleID below). Any idea on
what the struts-blessed way of doing something like this is? Thanks.

function setRuleFromForm(the_form)
{
 var idx=0;
 var ruleID = ;

 for (idx=0; idxthe_form.request.length; idx++) {
  if (the_form.request[idx].checked) {
   ruleID = the_form.request[idx].value;
  }
 }

 if (ruleID == ) {
  ruleID = the_form.request.value;
 }

 the_form.ruleID.value = ruleID;
 return true;
}


Thanks.
Assuming the form has a foundPerson property, I think you need
something like 
this:

logic:iterate id=resView name=foundPersons
  html:radio property=foundPerson value=%= resView.getKey() %/
  bean:write name=resView property=key filter=true/
/logic:iterate

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




question re. struts

2003-02-02 Thread Sundar Narasimhan
Hi, I have a master form that displays a bunch of object.

I'd like for the user to select a radio button corresponding to one of
those objects and then click Edit.

The editaction should obviously display a form corresponding to the
selected object.

What I'm failing to understand is what I need to do? (i.e. in
order to do something like this)..
  - i need to create an editaction
  - in it's perform method I need to create/get my model class
  - write a form class with getter/setter for my model class
(this largely reproduces methods from the model, but this
 class derives from ActionForm)?
  - set each individual attribute of my model into request parameters
  - forward to the jsp that contains an input form with the
same input parameters
All this to do something as simple as display a bunch of fields? :)
I must be missing something. 

Is there a way to reduce the number of classes, and maybe reduce the
individual getting and setting code everywhere??




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




ok.. but how?

2003-02-02 Thread Sundar Narasimhan
David -- Apologies.. but I'm a newbie to struts, and can't understand
your statement. Can you perhaps show me what you mean by concatenate
strings together? In short, are you saying struts cannot do somehting
like this?
ps. I have tried different syntaxes such as:
 li html:link page=%= /action + type % ...
etc. but none of them seem to work. 

--

 Sundar == Sundar Narasimhan [EMAIL PROTECTED] writes:

Sundar Hi, I have a variable type which I'd like to use like so
Sundar logic:iterate id=element collection=%= myVector %
Sundar   li html:link page=/action%= type %.do
Sundar bean:write name=element 
/ /html:link/li
Sundar /logic:iterate

Sundar But no matter what I try I don't seem to be able to get
Sundar the link to do
Sundar the right thing.. Ideas?

Well, one problem is that if you use a scriptlet expression for a
custom tag
attribute, the expression scriptlet has to be the entire attribute
value, not
just a portion of it.  You'll have to concatenate strings together.

-- 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




struts 1.1 b2 messes up w/ CSS?

2003-02-02 Thread Sundar Narasimhan
Hi, I have a web application that was working fine w/ struts 1.0. I
updated to 1.1 (by update the tld's the jars etc.), and now the
web pages that had css attributes just don't seem to work!!!

Does 1.1. interfere w/ the the loading/reading of css attributes? 
Thanks.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: struts 1.1 b2 messes up w/ CSS?

2003-02-02 Thread Sundar Narasimhan
Hi, David: Thanks for your notes.

Sundar Does 1.1. interfere w/ the the loading/reading of css attributes? 
Sundar Thanks.
You'll have to be much more specific, showing exactly what you mean by
doesn't
work, along with showing relevant portions of your pages, and the
resulting
output.  What container and version are you using?

Well I tracked it down to the foll. I don't quite understand why it
happens, but at least I now have a workaround. 

The tool I'm using WSAD / eclipse generates struts pages with css like
so:
META http-equiv=Content-Type content=text/html;
charset=ISO-8859-1
META name=GENERATOR content=IBM WebSphere Studio
META http-equiv=Content-Style-Type content=text/css
LINK href=/theme/tigris.css rel=stylesheet type=text/css
TITLE/TITLE

Now, I'd moved the jsp which had the above lines into a sub-directory
called jsp (I now have tens of jsps and it was becoming unweildy to
have them all at the same root level). 

The tool changed the lines to 
LINK href=../theme/tigris.css rel=stylesheet type=text/css

That should work.. but go figure, it doesn't. I tried both 1.0 and
1.1b2 of struts.

Now if I change it to 
LINK href=theme/tigris.css rel=stylesheet type=text/css
it works again.

When I say it doesn't work, it means that css styles are just silently
ignored.. my output pages appear from the jsp, but it looks ugly :)

Thanks for your time and help.

ps. hmm.. I wonder if WSAD/Eclipse should be generating html:link in
this case.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: question re. struts

2003-02-02 Thread Sundar Narasimhan
 - set each individual attribute of my model into request
   parameters
Why would you do this if you have the form bean from the previous
step?

Hi, Paul: Thanks for your thoughtful reply. Your above statement is
what I guess I'm having trouble with. (i.e. if I have a Point model
object.. say read from the db.. according to a unique ID..
 Point -- getX(), getY(), setX(int x), setY(int y) .. 
now I need a 
 PointForm 
with similar methods.. may be getting and setting with String instead
of ints :). and Let's postulate a PointAction. 

The point of confusion I have is.. I understand that the struts
servlet instantiates PointAction, and can map parameter X, and Y from/to
PointForm's X and Y.. but in my perform method .. I still need to
have:

perform.. () {
 Point p = new Point(id);
 request.setAttribute(X, p.getX());
 ..
 call the jsp
}
do I not? 
What I would have liked to be able to do is..

class PointForm extends Point implements SomeStrutsFormInterface { 
}

in cases where this is possible. The advantage of this is that it
still maintains and allows for the *Form classes to be decoupled from
the Model classes, but allows for code re-use.. I don't have to
write several lines of repeated code.. or just spend a lot of time
writeing to string and from string methods for every single
attribute. In a language such as Java where no pointers exist taking
the reflection overhead seems like a big waste -- and writing all
these repeated methods seems such a productivity reducer :)

Am I making sense? 

If it does, what I'd like to know is what people do to reduce the
amount of code.. is there a tool that can perhaps 'generate' the form
given a model.. ? Or something.. I have tens of objects w/ hundreds of
attributes and I'm overwhelmed w/ the amount of code Struts seems to
imply. 

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: question re. struts

2003-02-02 Thread Sundar Narasimhan
You should really go back through some of the archives to review the
pro and con arguments; and (among other things)
you will find that I am adamantly against what you propose -- it would
encourage people to reuse the wrong thing for the wrong reasons.
Craig -- thanks for your response. Will go and read them, since this
list seems like a really useful resource and undoubtedly people have
run against this sort of issue before.

But your suggestion doesn't help me.. because I am on 1.0 (I tried to
go to 1.1b2 this afternoon and failed -- 1.1 seems like several jars
-- 17M? yikes, and undoubtedly was interacting w/ some tomcat jars
that I've yet to fully debug) and I think even though I may not have
the right solution -- I think this remains a problem. 

So I guess it's back for me to try and put in the 1.1 stuff and give
that a go again. Sigh. 

Thanks.






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




what's the right syntax for logic:iterate

2003-02-01 Thread Sundar Narasimhan
Hi, I have a variable type which I'd like to use like so

logic:iterate id=element collection=%= myVector %
  li html:link page=/action%= type %.do bean:write name=element / 
/html:link/li
/logic:iterate

But no matter what I try I don't seem to be able to get the link to do
the right thing.. Ideas?

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




semi-newbie questions re. struts

2003-01-31 Thread Sundar Narasimhan
Hi, I was told that jsp-jsp through a href=foo.jsplink/a in an
html file is not recommended struts practice.

If this is not good.. and I can understand why.. I was told that
replacing it with
  html:form action=/foo 
html:submit value=foo/html:submit
  /html:form
was the way to go.

However, form's submits appear as buttons and not as links. How do
I get a link-like appearance within a form. I have looked at
html:link but tools such as IBM's struts diagramming don't grok that
so if form's are the recommended best practice here, how can I make a
link appear inside of a form.

BTW. if I use html:link is the struts controller invoked if I use
the action attribute correctly? The reason I ask is that I tried that
but my beans on my jsp are not getting populated correctly.

Thanks in advance.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




proper use of back button -- design patterns

2003-01-31 Thread Sundar Narasimhan
I notice that w/ the default configuration on most browsers is to ask
the user wheter form data should be resent.

I wonder if there are concise descriptions/tutorials on web
application design that deal with somewhat (I expect :) thorny
issue. Do people just set the pragmas for cache-control and forget
about it, or .. 

In particular I wonder if there's any support in the struts framework
for detecting disabling such traversals.

Thanks.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




what does RT Expr mean

2003-01-29 Thread Sundar Narasimhan
In the bottom of the documentation on the attributes of several tags I
see [RT Expr].. what does that mean? Is it documented anywhere?

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: what does RT Expr mean

2003-01-29 Thread Sundar Narasimhan
Thank you for all your replies. I had guessed RT Expr might mean that.

But now for the follow up.

As others have said, it means run-time expression.  Specifically, it
means the value CAN be specified by a JSP expression scriptlet
(beginning with %=).  Ironically, calling it a run-time expression

I'm now confused. I've been able to previously put %= % in similar
places in other JSP's that did not use the struts tags. Are you all
telling me that there are now cases when certain tags are marked w/out RT
Expr .. that these struts tags explicitly disallow me typing %= % in
those attributes?

If so that would be a step backward IMHO.

Thanks.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]