JSF or struts\JSP?

Hello;
I am creating a portlet.
1) For the portal window, should I use HTML, DHTML, or Swing?
2) If HTML, should I use struts/JSTL/JSP or JSF?
3) What�s easiest for the UI development � IntelliJ/Dreamweaver, BEA�s Workshop, Java Studio Creator, Sun ONE Studio, or ???
4) Any books or urls you can suggest for the above?
thanks - dave

http://www.coreservlets.com/JSF-Tutorial/
=> http://courses.coreservlets.com/Course-Materials/pdf/jsf/01-JSF-Intro.pdf

Similar Messages

  • JSF or Struts

    Hi,
    We have a web application designed using MVC framework. Besides a web view, we now need to support mobile users using WML.
    We are considering JSF and struts (customising struts to handle WML client).
    I have read that JSF supports disparate clients efficiently using RenderKits.
    Can anyone suggest whether JSF has an easy to use WML RenderKit. How does a renderkit work? Is there any good documentation online?
    Is there a Renderkit for WML readily avaialble or will I have to make one? I know there was a link posted in one of the questions in this forum, but it is a dead link.
    Thanks in advance,
    Harsha

    JSF is better than Sturts. ("Until now there is no sucess story on JSF.")
    Becoz, Struts inventor has been hired by SunMicroSystems to work with JSF. The same guy mentioned in an interview, that struts developement will be stopped in future.
    Also..,
    Until now there is no sucess story on JSF. Only time can decide which is best.
    My suggestion is, better spend your time in learning more jsp and servlets specifications, XML/XSLT, JMS, Webservices rather JSF/Struts.
    All these frameworks like JSF/Sturts will depends on your project requirement. There is a nice book and online document in this website about design patterns. Read those things if you have time. You will get good idea.
    Well.., this is all my personal opinions.

  • JSF, JPF, Struts, SDO小探

    一直对这几个概念不是非常清楚,一直对学习JPF心存疑虑。这几天,花了一点时间,大致上看了一下这几个东西的文档,有了一点收获,和大家探讨一下。
    Struts:不用多说,大家都非常熟悉了。
    Service Data Object(SDO)是JSR235讨论的一种简化数据访问的结构。在Web应用中,可以使数据源对开发人员透明。
    J2EE标准的Java Server Faces(JSF),BEA的JPF,都是基于Struts的,那么有一些什么区别呢?
    JSF更多的是关注于页面的表现,很多结构和Struts非常相似。事实上,JSF的操刀者正是Struts的作者。可以在JSF中非常明显地看到,设计思路是在Struts上的提高和完善。比如,在Struts中,ActionForm事实上就是一个Bean,储存了数据。在JSF中,直接引入了Managed-Bean的概念,这些储存有数据的Bean可以直接放到页面上,这些Bean由程序员完成,美工只是直接把BEAN拖放到页面上,这样,进一步分割了Model和View,简化了开发过程,更加便于协作开发。
    BEA的JPF更多地注重页面和数据的绑定。事实上,绝大多数的动态Web页都涉及到数据的读取和存储,JPF封装了大量的数据绑定功能,也简化了这一类的开发。
    从IBM的红皮书上可以看到,现在IBM的所有涉及到JSF的例子,都用了WDO(WebSphere Data Object)。我的理解,这是SDO的一种。事实上,SDO还只
    是处于JSR状态下,IBM实现了部分的SDO规范的功能。在IBM的例子中,可以看到,通过JSF和WDO/SDO,页面可以很容易地绑定数据,显示数据。
    这一点,和BEA的JPF有异曲同工之妙。巧合的是,JSR235 SDO规范专家组的领头人正是BEA和IBM。
    由此,我得出如如下的结论:
    1、JPF是基于Struts的,将来会基于JSF
    2、JPF和Struts/JSF不是一个层面的东西,JPF是比后两者更高级的框架
    3、JPF在某种程度上,是BEA的SDO实现,将来的SDO正是规范中,必将有JPF的影子
    4、虽然IBM现在在热推JSF,但是其红皮书中承认,JSF目前还是非常新的技术,并不完善,还有待于得到广泛的支持。Apache正在开发JSF-Struts库,
    以便于Struts到JSF的迁移。所以,现在不必急追JSF,有了扎实的Struts知识,迁移到JSF不会太困难
    5、学习JPF是安全的,(这和我以前的观点不同,以前对于JPF了解不深刻,向BEA致歉),将来的SDO会有JPF的影子。
    欢迎大家讨论。

    都劳动高人了,荣幸荣幸。
    在JPF刚出现的时候,就得知BEA非正式地提供了可以迁移到Tomcat的工具。凭借BEA的实力,我毫不怀疑,将来的Java Control和JPF等,都可以顺利地移植到Tomcat或者WAS上运行,甚至连运行库都不需要,直接翻译成标准的Servlet代码。这是完全可行的。
    我前面所说的都是从程序员开发的角度谈,不涉及运行时兼容的问题。Beehive把Workshop Runtime开源了,大家都可以来研究了,非常有利于Workshop的推广。但是,并不是开源的东西一定可以成为标准,承认吗?Tapestry也很不错,也是开源的,但是偏偏Struts最为市场接受,成为了事实上的标准。
    我们是不是不能排除这样一种可能,Beehive开源了,也在一定程度上被广泛接受了,但是就是没有成为标准。成为标准的是JSF+SDO,假设这样。那么,作为程序员,我就有风险了。我花了时间精力,学习了Workshop Framework,也很精通Java Controls了。我毫不怀疑,我写的程序,可以被deploy到任何J2EE兼容的App Server上去。
    另一方面,移植的过程是很复杂的,谁都不能保证移植的程序100%可运行。但是客户的平台是多样化的,出于以后维护的考虑,比如客户是小公司,一直运行Tomcat,他的维护工程师只懂JSP/Servlet/Struts,不懂JPF,那么为了维护,他也希望我用他懂得技术开发。即使我的JPF应用顺利部署到他的Tomcat上,他对今后他将面对的维护也会有畏惧。我总不能强迫他学JPF吧。
    而且客户,都有一种惯性。用惯了.NET的,你向他推荐J2EE都很困难;同理,如果向他推荐非常先进的JPF,客户未必接受。
    我,作为程序员,有交流的问题。比如说,JSP/Servlet,只要是J2EE程序员,大家都懂。无论在Team内部,还是到dev2dev,developerWorks, TSS上,大家都用同样的语言,JSP/Servlet规范和相关的术语。同样的道理,Struts由于是事实上的标准,也是可以被无障碍交流的,大家都懂ActionForm, ActionServlet。但是,只要Workshop一天没有成为标准,就有可能成为一种外语。我在BBS上跟人讲,NetUI:XXXX,不是人人都懂,我讲JCS,JPF,别人就未必懂。我只能到dev2dev,找你Hilaser请教。
    其实,我认为,标准的含义对我而言,就是方便与人交流。UML语言诞生的初衷也是为了交流。虽然,大家都知道,JPF的底层就是Struts,但是偏偏封装后,名字改了,虽然都是巧克力,但是你说它叫“朱古力”,可我只知道他叫“巧克力”怎么办?那就要求我必须同时懂得Struts和JPF,自己给自己翻译了。或者用工具,把JPF转换成Struts,然后拿着机器生成的Struts代码和人讨论?
    谈到这里,所有问题的根出现了,那就是
    * BEA是否有足够的实力,把自己的专有技术推广成标准 ? *
    是要所有的人都接受,成为标准;而不仅仅是开源。
    这里有太多的非技术因素。且不说BEA的股价,庞然大物如IBM或者Oracle的态度。作为客户,他是否愿意押宝在BEA身上,明确BEA的JPF等技术就是将来的J2EE规范呢?恐怕比较难。即使庞大如IBM,客户也不会下这种赌注。客户一般都喜欢用成熟的技术。EJB2.0的规范出现是在哪一年?看看EJB2.0开始广泛运用又是在哪一年?
    这也是,WebLogic这么多年来备受青睐的原因,因为他的技术最标准。所以,我的建议是,在JPF明确成为事实上的标准前,还是持观望态度比较合适。因为JPF和基于J2EE规范的不同Implementation不同,JPF的API是独特的,事实上一个程序员如果只精通JPF,而不懂Struts和JPF的关系的话,那他就真的被绑在BEA上了。对于Struts、JSP/Servlet群来说,他是一个外星人。那么用漂亮的Workshop开发JPF的人,又有多少会想到去了解底层的Struts呢?
    其实,BEA为什么要重新搞一套特殊的API呢?Struts的不足,可以在保留Struts API的基础上,进行扩展,没有必要全部改头换面。保留Struts API的TAG要省多少事啊,再加上BEA的扩展,不一样可以吗。为什么全部换掉呢?
    JPF的技术真的不错,但是,我只了解大致原理,我不去看具体的语法API,我等它成为标准。

  • JSF vs  Struts  And  Best O/R mapping  tech.

    I want to start working again after 3+ years gap from 2003 to 2007.Earlier for 4 years I have worked on web/enterprise applications and technical platform was JSP1.2,SERVLET 2.x,Oracle's xsql servlet,JDBC ,Struts1.0/1.1,statleless Session Bean ,Web Service generated by BEA WEBLogic server 8.1,jdk1.3.
    I've been looking through too many documents and forums, there are so many choices now .Could you please suggest which of the following should I learn to update my skills :
    1.JSF OR Struts 1.2,1.3 OR Struts2 ( There are no books for Struts 2)
    2.Hibernate OR EJB3 OR Torque OR TopLink
    3. jdk 1.4 OR java 5
    Can you help me to findout documentation and tutorials to learn these .
    Thanks

    You're wanting to get back into writing web applications?
    Web services?
    1 - If you worked with struts before, I'd probably continue with that line. Or at least start there.
    2 - I'd say Hibernate, but then I don't know that much about the others ;-)
    3 - Java1.5.
    I would also recommend you catch up with the changes between JSP1.2 and JSP2.0, particularly regarding JSTL and EL.
    For learning JSTL, you can't past go the JSTL spec. It is quite readable, and an excellent reference. http://java.sun.com/products/jsp/jstl/reference/api/index.html

  • How to retrieve values from the struts DAO to Struts JSP

    Hi friends,
    I have one question. i want to display values in the struts jsp file from the struts DAO class. can anyone tell how do it.
    Appreciated for your help.
    Thanks
    G1 :)

    Hi Santosh,
    Thanks for your prompt reply.
    Actually, my problem is i want to display complete rows from the DAO to JSP page. I'm displaying all the rows in the DAO from DB.
    But i dont know how to retrieve all these data from DAO. Can i take arraylist.??
    DAO:
    ------------     public Customers getData(Customers customers){ // Reading data from DB
         //ArrayList list = null ;
         try
              Connection conn = getSQLConnection();
              Statement statement = conn.createStatement();
              String qry = "select * from register";
              ResultSet resultSet = null;
              PreparedStatement pstat = conn.prepareStatement(qry);
              // pstat.setString(1, customers.getFname());
              resultSet = pstat.executeQuery();
    //Print the data to the console
    while(resultSet.next()){
              String fnam = resultSet.getString(1);
              String lnam = resultSet.getString(2);
              String gen = resultSet.getString(3);
              String addres = resultSet.getString(4);
              String cit = resultSet.getString(5);
              String zip = resultSet.getString(6);
              String county = resultSet.getString(7);
              String emal = resultSet.getString(8);
              System.out.println("First name:"+fnam);
              System.out.println("Last name:"+lnam);
              System.out.println("Address:"+addres);
              customers.setFname(fnam);
              customers.setLname(lnam);
              customers.setGender(gen);
              customers.setAddress(addres);
              customers.setCity(cit);
              customers.setZipcode(zip);
              customers.setCountry(county);
              customers.setEmail(emal);
                   statement.close();
                   conn.close();
              }catch(Exception e1){
                   e1.printStackTrace();
              return customers;
    Bean:
    I have specified in this line in Bean:
    request.getSession().setAttribute("customers", customers);
    But in JSP. how will i populate all these data. Pls..send some code.
    I'm sorry this is just practicals. i'm not doin any real time project. that;s why i have placed all these code.
    Thanks for your patience for resolving my problems.
    Thanks
    G1

  • How to use VPD in Java/Struts JSP portlet with SSO

    DB = 10.1.0 (Standard Edition)
    Portal = 9.0.4.1
    10gAS = 9.4.0.1 (EE)
    I am in the beginning stages of developing some portlets that will be Java/Struts JSP based. We use SSO and have implemented some VPD security in our DB by creating some views that use SYS_CONTEXT('USERENV','CURRENT_USERID').
    These Java portlets connect to the DB using a defined JDBC connection for the OC4J container they are deployed in. The problem I'm having is that the call to SYS_CONTEXT is returning the user of the JDBC connection and not the SSO user. So far I have been unable to find any documentation that will point me in the right direction to get this configured properly.
    Deployment and configuration are as follows. Deploy war file to custom container on app server. In the configuration of the OC4J contain the app used the containers default JDBC connection using the oracle.jdbc.pool.OracleDataSource class. Max and Min open connections are blank.
    In the portal configuration under Navigator - Providers tab we defined a new Registered Provider. In the Connections tab for the provider we Specify the URL Http://hpsrv02.simsol.com:7777/discovery-portlets/providers. Under "Specify how the user's identity will be set by the Portal..." the "The user has the same identity in the Web providers application as in the Single Sign-On identity" is selected. Under "User/Session Information" User is selected and Login Frequency is set to "Once per user session". Then we created a new portal page and created a new portlet with the new provider.
    Just an FYI I do have Discoverer working with VPD and any report portlet, dynamic page portlet and any other type of portlet I created all work correctly with VPD it is just the java/struts one that is not working.
    So does any one have any insight into what configuration steps I have missed?
    Any help is much appreciated,
    Ed Klinger

    Ed,
    Your java code must get the SSO username (it's just a HTTP header variable) :
    ie: code sample...
    Enumeration e = request.getHeaderNames();
    while (e.hasMoreElements()) {
    String name = (String)e.nextElement();
    String value = request.getHeader(name);
    out.println("<br> "+name + " = " + value);
    if (name.toUpperCase().trim().equals("OSSO-USER-DN")){
    dn_user=value;
    out.println("<br>******** USER DN = "+dn_user);
    Then, the SSO username can be used in the VPD policy.
    Note that there is a difference between the sso username and the database username . SSO username is not known by database (CURRENT_USERID will return a database username)
    Discoverer worked OK in your case with the SYS_CONTEXT (.. CURRENT_USERID) because authentication is made by database user, probably.

  • Adf-Struts/JSP/BC4J- and setting date fields from jsp

    Hi,
    I'm working with the new ADF Frameworks (JDev 9.0.5.1) and ran into some questions regarding exception handling using BC4J, Struts and JSPs.
    I have a DATE column in database and an entity and VO with a datefield with type oracle.jbo.domain.Date.
    My JSP shows a textfield and the user should enter a valid date. Everything fine, until date is of wrong format or contains illegal characters...
    Problem:
    ADF tries to do a setAttribute on the datefield in VO row which expects a parameter with type oracle.jbo.domain.Date. When the user entered e.g. "NiceWeather" as date, I get an IIlegalArgumentException while converting to the correct Date format. This exception isn't thrown by bc4j as AttrValException and therefore my JSP renders a global error instead of a message directly behind the date field.
    I tried to validate the datefield in my DataForm and in my Action in the validateModelUpdates() method, but with no fitting solution.
    Any ideas how to validate a datefield with adf/struts/jsp/bc4j?
    Thanks for your help!
    Torsten.

    Torsen - In the first instance I'd recommed that you try and handle it declaritively using the Struts Validator Framework . See http://otn.oracle.com/products/jdev/howtos/10g/StrutsValidator/struts_validator_howto.html
    There is a section in there on how to use the validator with ADF databound pages and you can check the format the user enters via generated JavaScript.
    Also check out the matching sample project:
    http://otn.oracle.com/sample_code/products/jdev/10g/ADFandStrutsValidator.zip - this has a data field check on it as well

  • How to use javascript functions in struts jsp page

    hi
    iam using struts jsp pages. here iam calling one javascript function. but iam not able to access the form in javascript.
    wat i have to give as form name to get the elements of the form.
    please reply me soon
    it is urgent
    vamsi

    your form has no name liek this one:
    <html:form action="/userRegistration.do" >so you cannot access the elements inside your form?
    accessing the elements inside the form will be like this:
    document.forms[0].propertyName.value;

  • JSF And Struts Integration

    Can any body give some info on integration of JSF to existing struts application

    I describe the main differences between JSF and Struts in this sample Chapter from my JSF book:
    http://www.oreilly.com/catalog/jsvrfaces/chapter/ch01.pdf
    Hope that helps.

  • JSF and Struts - differences and integration goal.

    I am a newbie J2EE developer and I am not clear about main differences between JSF and Struts also I saw couple of articles describing integration between JSF and Struts. Could someone give me an explanation, what the main conceptual differences between those technologies and what's the goal of integration both of them?

    I describe the main differences between JSF and Struts in this sample Chapter from my JSF book:
    http://www.oreilly.com/catalog/jsvrfaces/chapter/ch01.pdf
    Hope that helps.

  • Using jsf with struts

    hi;
    i am trying to understand the proper architecture when using jsf and struts together.
    i think i understand the differences between the technologies . it seems to me that instead of justifying jsf there should be a focus on how the two technologies actually collaborate.
    specifically, i would like to know or see examples of things like replacing the view portion of struts and plugging in the jsf framework instead or how to i replace the struts actions with jsf commands or maybe they are totally different things.
    where can i get information like this?
    thanks.

    At present, i think the best thing to do is to look at the example provided with the struts-faces integration taglib. I don't know any documentation about it.
    http://cvs.apache.org/builds/jakarta-struts/nightly/struts-faces/

  • JSF page IS JSP page?

    Hi, experts,
    Can we say "JSF page IS JSP page"?
    I will appreciate any comments and opinions.
    Cheers,
    Tao

    Hi,
    No sure what you question is... but....
    Currently we can say a JSP page can contain Faces tags
    (as well as JSTL tags), etc....
    -roger

  • Jsf component in jsp page

    Hi sir,
    I have developed one jsf application where jsp page has been created , and jsf components were embedded. I m little bit confused regarding,
    1. is there no jsp components as its own.
    2. if I create jsf page instead of jsp, then can i get all the functionalities of jsp to avoid the jsp extension.
    I m getting lots of help from all of you. so i m grateful to you.
    Regards
    Inam

    Hi,
    I dont think that developers check your question at 'Database security' forum.
    Good luck.

  • Urgent: Portletizing an struts JSP application

    Hello all,
    I have a struts JSP application. I want to portletize this whole
    application, so that navigation is always within the portal
    framework.
    Using URL Services all I can see is that the first page will be a
    portlet.
    Can anyone suggest the best way to portletize the application?
    This is quite urgent and your help will be greatly appreciated.
    Thanks in advance.
    Faisal.

    Hi all,
    Concerning the message below, does the struts framework affect how normal JSP applications are added to Portal? Or is it as simple as just importing the portal classes and referencing them in the JSP's?
    We would like to use struts for our next web application using JSPs, but need to display them within Portal. I've done this before by just changing the way our hrefs work, but am wondering if using struts will affect any of this.
    Thanks in advance,
    Gillian
    Hello all,
    I have a struts JSP application. I want to portletize this whole
    application, so that navigation is always within the portal
    framework.
    Using URL Services all I can see is that the first page will be a
    portlet.
    Can anyone suggest the best way to portletize the application?
    This is quite urgent and your help will be greatly appreciated.
    Thanks in advance.
    Faisal.

  • COMMIT problem in TopLink, Struts, JSP and ADF Databinding sample

    In the sample Developing a J2EE Application using TopLink, Struts, JSP and ADF Databinding,
    I followed all the steps to build a department browse page and a edit page.
    But when I get to Step number 23 in "Create a JSP to Edit Departments" I have a problem with the commit.
    Only after I make a change in the form and click the sumbit button, the commit and rollback buttons become active. And After I click the commit button the data gets commited to the database but the page inofmation changes to the very first department record, not the current one.
    How do I make those buttons active with out the extra click on the submit?
    After I click the commit button, how do I keep the current data on the screen?
    Thanks for you help.

    Shay,
    Thanks for the reply.
    For #1, I was able to do the following and get away with not having to press submit first. I just removed the bindings for disable. I hope that does not cause any problems?
    <input type="submit" name="event_Commit" value="Commit" />
    <input type="submit" name="event_Rollback" value="Rollback" />
    For #2, How I add an action on an HTML button? My UIModel.xml for the edit department page currently has two actions on it. Commit and RollBack. Is it linked through the "name" attribute of the input tag?

Maybe you are looking for