my dog learned polymorphism
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Scriptless JSPs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Scriptless JSPs" Watch "Scriptless JSPs" New topic

Scriptless JSPs

Nabila Mohammad
Ranch Hand

Joined: Nov 05, 2007
Posts: 661

Can some tell me when how to run the basic scriptless java bean code. What all files you require to run them and the file structure
I thought all appls required a Deployment Decriptor but the Counter appl mentiioned in HFSJ just reqiured a class file and a JSP and no Web.xml
I mean the web.xml file WAS mentioned but it worked with out it !

I am prettty confused and have almost finished the "Scriptless JSPs " chapter with the hope that things would get clearer as i move ahead.. instead , just kept on comng across new topic and it became more complicated . And now I have ended up not getting anything at all... n I dont know where to start from!
Some how I just cant link things together- the jsp , the bean ,the theory , the practical.. n all that is in between!

Like how do you run this code.. The first scriptless code mentioned

or how to do you write the Deployment Descriptor for the "Sample Appl " metionied in HFSJ with a TLD file
In this cse there is no servlet ,only a jsp , a tld and a java file .so what do you write in the web.xml file
I know its pretty silly (which is why i have been hesitant to put it on a post),
But its been quite some time and , and I have been wasting my time running away from it !
But now I really need to know how to get started on it

Any help would be greatly appreciated....

The future belongs to those who believe in the beauty of their dreams.Dream BIG!
vani venkat
Ranch Hand

Joined: Nov 21, 2006
Posts: 142
hi Nabila,

scriptless jsps chapter has loads of information. i read it many times still i get doubts. here is my approach. you start with standard actions using useBean and getProperty, setProperty. i had web.xml but it doesnot have any mappings. just

now break down your questions as you go one by one. i will try running my application without web.xml and let you know the result. i thought that web.xml is a must.

SCJP 1.4, SCWCD 1.5
vani venkat
Ranch Hand

Joined: Nov 21, 2006
Posts: 142
I am able to run jsps without web.xml.
my applocation has 2 jsps.

and printBean.jsp

class files of person and Employee are in WEB-INF/classes/foo

that's it. play with person employee combinations for standard actions useBean, getProperty, setProperty and try different examples. thanks to you for trying an example without web.xml. Incase you have any more doubts, post them here. no doubt is silly.
Nabila Mohammad
Ranch Hand

Joined: Nov 05, 2007
Posts: 661
Thanks vani - you have been a great help..

Got my interest back in studying , I was beginning to get really frustrated!
The code is wrking.
Now I am gona start playing with th code

Thanks once again.
Take Care. Have a great day ahead!
I agree. Here's the link:
subject: Scriptless JSPs
It's not a secret anymore!