• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

This weeks giveaway

 
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This week we are giving away 4 copys of the book "Struts in Action: A Practical Guide to the Leading Java Web Framework".
And the best part... the Author, Ted Husted, will be online to answer your questions
Read Chapter 12 - Validating user input on-line!<br>
<br>
Thanks to the people at [url=http://www.manning.com/>Manning Publishing[/url] for the Books!
 
Ranch Hand
Posts: 8953
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Doesn't using struts shield the developer from underlying details of servlet, tags etc.
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am currently using Web Development Kit in Documentum, in which Servlet is built-in and a lot of JSPs. Is that possible to add struts in such a structure?
 
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Carl,
I would like to thank you. I'm very interested by this book.I'm preparing SCWCD and i directly intend to go to Struts for MVC acchitecture.
I already developped with Struts but not enough knowledge about it and EJB. I want to develop EJB with Struts. How much is important to develop whith Struts ? more security ? and about hacking ?Thank you for understanding.
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Doesn't struts take care of all validation itself. I thought it had built in routines for integer and nulls?
 
Author
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is information about an example application I created demonstrating a nice way to deal with validation in Struts. It uses XDoclet to generate the validation.xml file from tagged form bean setters. Below is from a post where I announced this application to the world. Please only contact me about this application using the e-mail address below, do not reply about it in this forum as I am not a frequent visitor here. I'm tuning in this week to check out the Q&A with Ted Husted!
----------
The application I used in my September TriJUG presentation, and thereafter at several symposiums, another JUG (NOVA JUG) and ApacheCon has now been bundled for mass release.
It is a trimmed down version of the application Steve and I developed for our Java Development with Ant book.
Relevant to Struts folks are these tidbits:
- XDoclet is generating struts-config.xml, validation.xml, web.xml, and antbook.tld
- LabelTag (currently mysteriously busted for required tagging) is included. This tag styles field labels differently if its in error, and (when its not busted, it works on my production app actually) it shows an asterisk by required fields.
- strutsgen: a one-off starter generation for JSP's and ApplicationResources.properties snippets for cutting and pasting into the main application. It uses XDoclet to process a specified form bean and uses the fields it finds for generation.
- Use of StrutsTestCase for Cactus testing.
- Maybe some other Struts goodies lurking there that I've forgotten to mention.
For XDoclet folks, these are of interest:
- The strutsgen subproject uses custom templates and a custom tag handler demonstrating some powerful features of XDoclet.
- Use of Ant property substitution in XDoclet tags.
- Use of XDoclet template tags in merge points, showing how to do some conditional things out-of-the-box with XDoclet (turning Cactus servlet on and off, in this example).
The application itself is a document search engine, based on Lucene, and should run out of the box in Tomcat or JBoss. It even has the ability to (at build time) toggle between whether to use a session bean or not (functionality is the same either way). By default, you can simply deploy the WAR that you've built and it will work without EJB, but if you are interested in exploring the session bean piece it can be turned on.
I am in the process of creating much more detailed documentation, but I wanted to get this out sooner rather than later. If you find any problems or have any questions, please do not hesitate to let me know so I can refine it and post updates.
The one documentation I need to provide now is to note that you'll need j2ee.jar to build (from the J2EE 1.3+ SDK). I include all other API's. To build, unzip the file (link below) and it will expand into JavaDevWithAnt directory. In that directory, run Ant. If you have J2EE_HOME set you shouldn't need to do anything... just "ant". You'll also need to build a site index, so run "ant build-site-index". This is intentionally two separate steps. If you don't have J2EE_HOME set, then you need to provide j2ee.jar to the build. Do it this way:
ant -Dj2ee.jar=/path/to/my/j2ee.jar
Where "/path/to/my/j2ee.jar" is the actual path to your j2ee.jar
Post any questions/problems to me directly. E-mail me at [email protected].
Download:
http://www.ehatchersolutions.com/downloads/
Latest version is 0.3, and its been proven to work on Windows and Mac OS X. You will need Ant 1.5(.1) and JUnit 3.8(.1).
 
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ted,
I would also like to know about validation with Struts. What happens if I want to validate a number to make sure it is greater than 0. For instance if I wanted to check someone's age on a form. Could the user enter -17 and would that be a valid answer since that is a valid integer? When I validate could I validate on a range of numbers?
Thanks in advance for your time,
Ryan
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have also started working on Struts Frame work recently.I am still in the process of getting to understand Struts fully.
I wanted to know , what TILES and VELOCITY does . Are they also used along with Struts ?
 
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does the book cover DispatchAction?
Also - what exactly are tiles? Where can I find more info on them?
Thanks!
Graff
 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Ted,
I'm working on my second site using Struts and really like it, but some days it can drive me up the f@#$% wall. Others have the same problem and the reason is simple. No CRUD examples w/Struts distribution. All the .war files that come with
the distribution are 'taste testers'. I'd love to work on struts-crud.war for the next release.
It would contain a CRUD with at least one example of all the struts tags and have ample code documentation.
Many developers have to go to your site and download Artimus or Scaffold, which are okay, but are not really suited for learning. We also search the web for struts issues and normally find ourselves in a threaded message boards or some site in japan....
Anyway, I don't mean to offend, as you've obviously given rebirth to JSP open source, but I hope you'll continue to keep up the good with Struts.
Thanks,
PP
Sun Certified Programmer for the Java 2 Platform
Sun Certified Web Component Developer for J2EE
 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Peter, as someone new to struts, I'd like to avoid as many pitfalls as possible. could you please elaborate on the nature of CRUD and why it has made your life difficult when developing with struts? thx.jh
 
peter parker
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey John,
CRUD - Create Retrieve Update Delete.
CRUD is used to describe common application functionality.
As for developing a CRUD using Struts, the Framework is very rigid, because it's so new which makes doing simple things complex. For instance, the Struts framework promotes using tags in JSP. However, let say you wanted to display 50 records and change the background color of the odd records. To do this you'll have to 'bend' the framework and use a scriptlet within JSP or create a custom tag...
That's a simple example, but in essence providing the purety of MVC (model-view-controller) architecture using Struts is not a simple task.
However, Struts is a big-step in the right direction.
Hope this helps
PP
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Roger Garner:
Doesn't struts take care of all validation itself. I thought it had built in routines for integer and nulls?


Unfortunately Struts does not take care of all
validation. You can careful write `ActionForm'
beans to do this. When I developed a professional
Struts app for a financial bank, I called
the validation code in the action forms from
my `Action' classes. This is because the Action
hook into the business tier, calling the EJBs
via a business delegate or session facade.
Struts is a framework for the presentation tier.
I am also a core committer to the ``Expresso
Framework'', which integrates the Struts 1.0.2
MVC. For more infos
http://www.jcorporate.com/
I am also looking for Server Side Java developer
job in London, England
http://www.xenonsoft.demon.co.uk/curriculum-vitae.html
I have also written an article for `TheServerSide.com'
Regards
Peter Pilgrim
 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does this book contain tutorials also?
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
where do I see the winners of previous giveaway?
I am participating for the first time.
 
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ted,
I'm also new to Struts and I'm very interested hear any tip/examples you might have for the framework as a whole. I'm especially interested in incorporating Tiles in the views I'm working on.
Thanks,
E
 
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Rajani Deshpande:
where do I see the winners of previous giveaway?
I am participating for the first time.


You can see a list of past winners here.
 
Ranch Hand
Posts: 782
Python Chrome Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Peter Parker,
In terms of the CRUD example, have you looked at the code generated by Karapan Sapi Struts code generator ?
Pho
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ted,
Warmly welcome here.
I wonder how to write Unit test cases against Struts application? Does your book cover that topic?
Thanx.
 
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ram Bal:
I have also started working on Struts Frame work recently.I am still in the process of getting to understand Struts fully.
I wanted to know , what TILES and VELOCITY does . Are they also used along with Struts ?


Can't comment on TILES. Velocity you can think of as being a Perl-like way of writing JSP pages. I worked on a couple of projects where we used it, and we found it to be a pain in the neck. Some people seem to really like it, so I guess it comes down to "your mileage will vary". If your intent is to have a clean MVC implementation, then you really have to think carefully about how you will organize your Velocity code. Struts the breakdown into MVC is already there for you.
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JUnit is a good question! However, I was wondering about Log4j versus the new built-in logging capabilities of Java 1.4??? Does anyone have any pros/cons for Logging in Frameworks such as Struts?
 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello..
i am totaly new to this,how it going to help me in development, how is differnet from others.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Folks,
still working with JSPs, but Struts are coming next. (Maybe the book could help getting into the topic )
Greetz!
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi What is Struts anyway?
 
Pho Tek
Ranch Hand
Posts: 782
Python Chrome Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To Doug Wang,
To unit test your struts code, check out
http://sourceforge.net/projects/strutstestcase/
Cheers,
Pho
 
Ram Balasubramaniam
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Reid,
Thanks for your inputs. I guess it saved me some time in finding out about Velocity. I do see a lot of posts on the struts forum abt the TILES and VELOCITY. So was interested.
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wow, 25 posts, and Ted has yet to respond to any. Hmmmmmmmm.
 
Doug Wang
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Pho for your useful link.
Hi Gregg,
I think the discussion among participants here is very helpful to me.
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ted,
I have some question regarding Struts & its futures :
1. How would you compare Struts to other Java-MVC frameworks like Turbine, Maverick, WebWork ?
2. Where do you see the place (how it can works together) for Struts in regarding with the coming Java Server Faces standard ?
3. Is there any standard about how to integrate Struts with IDE (as J2EE IDE/App generator are coming their way...) ?
4. What are direction that Struts will be evolved into (ie. features...) ?
Thanks for you time,
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Gregg Bolinger:
Wow, 25 posts, and Ted has yet to respond to any. Hmmmmmmmm.


Ted has responded to a few posts, but not any in this particular thread.
 
Author
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One of the greatest benefits of Struts is the active user community. I've been watching for orphan threads with no replies, but when others are already replying, I like to let the community speak for itself =:0)
If there are posts here that haven't been addressed, I'd suggest starting a new thread so it shows up on the BBS.
-Ted.
 
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ted,
Great to have you on the forum.How can Struts be used in conjunction with a Enterprise application.
Rishi Singh
SCJP,SCWCD
 
Pradeep bhatt
Ranch Hand
Posts: 8953
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ted,
How is ur book different from other books available in the market.
 
Ram Balasubramaniam
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ted,

Originally posted by See El:
Where do you see the place (how it can works together) for Struts in regarding with the coming Java Server Faces standard ?


Does this mean Struts is going to integrate with Java Server Faces or is it going to be a framework similar to struts. Just like the Java Logging API in 1.4 to Log4J.
 
Engin Okucu
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can i see the winners of this book ?
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Engin Okucu:
How can i see the winners of this book ?


A list of the winners may be found here.
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Ted and every body,
I have been working on some project using the struts frame work. I have never heard of jakarta struts before to be honest but I was forced to work on it since my friend left the job which he has started in struts a while ago. Ever since then, I have been working hard to get to know this framework. This forum has been the biggest help and I want to thank the whole community for that. I am almost done with the project now. I think for a person new to stuts, the best thing will be to provide them with a simple, fully functional example that they can always refer to when they get lost. I did not get a good example that encapsulated most of the concepts of struts. So Ted do you have such an example in your upcoming book? Do you think it is a good idea to have an example like that people can have so that they learn faster?
Thank you and have a blessed day to you all.
Lee.
 
reply
    Bookmark Topic Watch Topic
  • New Topic