i `m alen smith a java architect.
if you want learning J2ee you must choose a powerful framework first.such as shine or struts.
but to my idea you learn and use shine frame work,because of this frame work is wery powerfull and also using shine is so easy because shine frame work`s team write sevral document and sample about that.
you can go to www.J2sos.org and find sevral document about learning shine.
and you can find download link for download shine frame work.
if you have a problem in any part of learning shine,you can get help fromshine framework`s support team.
you can ask your question and they answer to your questions.
I give you a hello world sample that I copyed from www.j2sos.org in technical forum.
you can find complet learning document in this site.
""this sample copyed from www.J2SOS.org ""
Hi! I'm Mehdi Mousavi, member of Shine Framework's support team.
Today I'll teach you developing Hello world sample.
I want teach & show you this powerful technology.
We use (jdeveloper10g) IDE for develop this project by shine framework.
In start , make new application with name "learning-shine" like this step :
1- Right click on application
2- choice new application workspace
3- complete this step follow up picture 2
As you see , new application have 2 part (model and view).
Now in continue, we should add Shine library to our project as below:
For do this , do this step:
Double-click on view ? library ? add shine, jsp runtime & servlet runtime
If the shine library isn't in your list, add it as below:
Click on New button in the bottom of the page ? Edit ? Add Entry ? find Shine.jar & click on Select ? ok
As you see Shine library has added to your library list.
Create request page
in next step we should create a JSP request page :
Right-click on view ? New ? jsp page ? ok ? name your page as "Request.jsp" ? ok
As you see, your page has created.
now , we must design this page .
For do this , in source tab write this code:
<%@ page contentType="text/html;charset=windows-1252"%>
We design one HTML form with two text field for give Fname (First name) & Lname (Last Name) .
also if you want, you can design your page without write .
component pallet will help you to Create your HTML form
Create response page :
Now we need create one response page (a service) .
Right-click on view ? New ? jsp page ? ok ? name your page as "ResponseServer.jsp" ? ok
As you see, your page has created.
Now we write this code in that page like beneath code:
<%@ taglib uri="/WEB-INF/shine.tld" prefix="shine"%>
String x=(String) request.getParameter("Fname");
String y=(String) request.getParameter("Lname");
out.print("welcome Mr/Mrs "+x+" "+y);
<%out.print("Hello.I am "+x+" "+y);
<%out.print("Email Address:"+" ");%>
As you see in the source we have a taglib named "shine.tld" that is at "shine-framework/lib/tld". You should copy it at this address:
After this tag, we have "Header" & "Footer" in our source. Use Header & Footer to write the codes & massages you want to be shown on the top & bottom of all pages. Like welcome massage you see on the top of the pages while mail checking. As you see, we put welcome massage & the codes of getting two variables of the form and store them in two public variables, in header & the mail address in footer in this sample.
You can use all of the programming codes in header & footer.
** Interesting tip for the developers who had worked with other frameworks like Struts:
If you want, you can use all struts codes throw the tags. (Although after working with Shine, you'll understand that Shine is more strong that you won’t need to do like that.)
In the source continuation we have "tag" & "shine:tag" that are related to the Shine's own architecture, JWMS.
In Shine, instead of having a lot of response pages we can have one or more services that include our response pages as some tags.
e.g. / The Bank is the service & its operations are the tags.
Indeed in this ways, shine create all response pages in one response page (package).
In this sample, we have a tag named "tag1" that shows this output massage:
"Hello . I am fname (First name) lname (Last name)"
*developer saved with tags of shine in create more and work with many response pages.*
Now let's create the Mapping class:
MappingClass is the engine of the Shine framework. To create it do the instructions as below:
Right-click on view ? New ? java class? ok ? name your class as "ShineMappingClass" ? ok
Now you have a class named "ShineMappingClass".
Ok, write these codes in it now:
public class ShineMappingClass extends Mapping
public void rater()
String b=(String) getRequest().getParameter("Fname");
String c=(String) getRequest().getParameter("Lname");
System.out.print("Hello"+b+c+"How are you?");
As you see all of the executive functions implements in "rater ()" method.
In this sample first we get Fname & Lname of the input then cast them to String mode and store them in "b" & "c" variables.
The "System.out.print("Hello "+b+" "+c+". How are you?!")" code makes just a test output that is visible only in IDE.
"forward("ResponseService","tag1")" code says go to "ResponseService" & run "tag1".
Now we just need to set the properties of "web.xml" file.
Open "web.xml" file & write this source in it:
<!--?xml version = '1.0' encoding = 'windows-1252'?-->
Empty web.xml file for Web Application
As you see, we set colored parts as below:
Blue part: say the name & the address of "ShineMappingClass".
Red part: set the name of "ResponseService.jsp" as ResponseService. (Indeed it is the same name that had used in "forward" in "ShineMappingClass".)
* An applicable tip:
If we had more services, we should do this definition for each one, separately.
Brown part: introduce ShineMappingClass as executive class.
Now us project is ready , and you must run it.
For do this , you must run request.jsp page .
After run , one page be open with two text field like this picture:
Now if you insert fname (First name) and lname (Last name) , after push submit you see this Response:
Now, You can deploy one simple project by shine
I hope you would enjoy yourself!
you can find complete samples about shine framework in:
and for downloading shine framework you must visit this link in sourceforge.net: