Justifications needed for using tags in JSP, Please reply

Hi forum
My question is to those java people who have also done JSP. I m sound in java server side (servlet programming), now I have asked by my project manager to do server side programming in JSP using tagLibraries (as these are used by those ppl who didnt have much java knowledge). I have worked inserver side java, then my question is y should I start working on tags,
On the other hand I can do all the work in java embedding in JSP (on some extent, seperated by diffrent helper/util classes to reduce the thickness of JSP page).
so I want to ask u ppl that should a java programmer needs to use tag libraries to code a JSP page, however he can code it in java directly.
I will feal great pleasure if u will write ur opinions and help me to ease my life.
thanx in advance
Best Regards
Tahir

You should use tag libraries whenever you can because:
1) They increase code re-useability. You can insert the same tag in many pages using just a few lines to do complex tasks, as opposed to writing a lot of scriptlet code in each JSP.
2) Enhance your ability to seperate logic from display. Everything in your tags is logic. Everything in your JSP is display - with the tags bridging the logic to the display.
3) Make the JSPs cleaner and easier to maintain. They read easier with tags than with a lot of scriptlets. Non-java people can be used to update the look and feel of the web page, or to debug the HTML later on, relieving the Java programmers for the tag work, or other jobs more suited to them.
4) Your boss said to do tags, so do tags.

Similar Messages

  • Plugin for eclipse for using log4j in jsp ?

    Hello all,
    Plz tell me is there any plugin (eclipse) for using log4j in jsp pages similar to log4e. As log4e is not working with jsp in Myeclipse
    Thanx

    Hello Prasad,
    I used log4e plugin to use log4j in eclipse. Its also working fine with servlets in eclipse. For working with web applications i installed MyEclipse. In this when i right click on the servlet editor log4e item is shown for automatic adding of log4j instructions(like adding logger etc) but when i try to use it by opening the jsp page log4e option is not in menu when right clicked. So i think for jsp seperate plugin is needed.
    What do u think.

  • I cannot sync my iphone to my macbook since the highest software upgrade on it is 10.5.8.  I cannot upgrade to the min. software necessary to upgrade to the itunes version that I need for the iphone 5!  Please help!

    I cannot sync my iphone to my macbook since the highest software upgrade on it is 10.5.8.  I cannot upgrade to the min. software necessary to upgrade to the itunes version that I need for the iphone 5!  Please help! 

    The iPhone 5 requires iTunes 10.7 or later and iTunes 10.7 requires OS X Snow Leopard (10.6.8). If your profile is correct it looks like you need to update your OS X on you Mac. You can contact Apple and purchase the software from them.

  • Onshow event needed for using behavior with AP elements

    Lector has "onShow" and "onHide" actions for layout objects (the equivalent of AP elements). They are my favorite and most used actions. Unfortuneately, Lector will does not reveal the code, so I can't see how they accomplish the actions. I am using Dreamweaver to build my wife's elementary school library web site. I want to use the same onShow and onHide actions (events/functions) for AP elements in Dreamweaver, but they don't exist on the tag inspector list for using with behaviors. Does anyone know how I can make behaviors work when an AP element hides or shows on the screen? This is not the same thing as showing or hiding an AP elemeent for events such as onClick or onmouseover. I find it very curious why Dreamweaver does not have onShow or onHide events along with onClick, onMouseOver, etc. Thanks.

    "Lector" was a late night typo. It is "Lectora", which is an industry leading WBT development tool. My main gripe about it is its proprietary nature--over protective of the code it generates. Lectora will not allow you to see the complex xml code it generates when it creates a web page. (When I display one of the Lectora generated pages in Dreamweaver, it is all xml giberish.) But Lectora is an easy to use, well organized, powerful, automated WBT development tool. Two of its most useful actions for AP elements are the onShow and onHide actions. So when you show or hide an AP element, the physical action of the element hiding or showing will cause a behavior to occur on the same AP element or another AP element.
    For example, say the mouseover Show event for "Element0" causes "Element1" to become visible on the screen. The onShow action provided by Lectora can cause a behavior to automatically occur on Element1 when it "shows" on the screen--no mouse action on elment1 is needed to cause the behavior to happen. Dreamweaver seems to require some sort of mouse action with regard to Element1 to cause a behavior to happen. A problem seems to occur with stacking AP elements and having to use exclusively mouseover and mouseout events on an AP element to cause a behavior(s) to occur. The browser seems to always get confused as to which of the stacked AP elements is supposed to be acting on the mouse action, even if the z order is correct. That is why the onShow and onHide events are so poweful--they don't require another mouse action while the mouse pointer is over the stacked group of AP elements to cause a behavior to happen on the element that was just caused to show or one that was just exposed by another element being hidden. With Lectora's onShow and onHide actions, it works all the time--the browser never gets confused.
    The onShow and onHide actions in Lectora are my favorite because they don't require a second mouse action on an element to cause a behavior to happen. I find that very distressing in Dreamweaver in trying to create highly interactive web pages in Dreamweaver that I can't use onShow and onHide events. It is hard to imagine that only the Lectora creators have the ability/genius to create onShow and onHide code that works for AP element on web pages.
    I can't show you any examples because I create WBT for Federal government projects and I am not allowed to publicly display any of the content. And I can't tell you how Lectora accomplishes it bacause I can't understand their complex, criptic, auto-generated xml code. So I hope I have been able to adequately explain problem here.I can't use Lectora to create the web pages for my wife because she needs to be to maintain her web site using Dreamweaver.
    Thanks in advance for your help.

  • Is Mobi server needed for using SBO Explorer on iPhone/iPad

    Hello,all.
    We started BOE XI R3.1, SBO explorer 3.2, SBO Mobile 3.1 all of it at win2003 server.
    SBO Explorer Works via browser at PC, but does't work at iPhone/iPad SBO Exporer app.
    SBO Mobile seems to be stated.
    Which server should set to get it?
    None of next settngs work:
      MobileServer checkbox is on: http://<mobiserver>.<company>.com:8080 -> Unable to access Mobi Server
      MobileServer checkbox is on: http://<mobiserver>.<company>.com -> Unable to access Mobi Server
      MobileServer checkbox is off: http://<SBOExplorer server>.<company>.com:8080 -> "No server configuration detected... Check url validity" when verifying link in settings
      MobileServer checkbox is off: http://<SBOExplorer server>.<company>.com -> unsupported URL
    Which link should I use? Do need Mobi Server to access SBOE from iPhone/iPad?

    Ok. Problem is solved.
    MOBI server is not needed for Exporer for iOS.
    Right link in iOS is
    http://<SBOExplorer server>.<company>.com:8080/polestar (case sensetive)
    SYSTEM - fully qualified CMS name and port (server.company.com:6400)
    Edited by: Emerald on May 25, 2011 2:50 PM
    Edited by: Emerald on May 25, 2011 5:22 PM

  • Strategies for using Tags in Mavericks

    I'm very curious to find out how some of you plan to use Tags in Mavericks (feel free to post screenshots).
    Apple uses generic tags to give people a sense of their purpose:
    While their example works to clarify the basic concept of tagging, I don't think such broad top-level tags as Home, Work, and Travel would suffice if you plan to incorporate tagging into your general workflow.
    I know this is a highly individualized concept and none of you are likely to post a tagging strategy that works perfectly for any other one of us, but I think we could all learn a little something by seeing how others plan to implement tagging.
    Couple of specific questions I have are:
    Do you plan create hundreds of tags, or a more static/refined collection of tags?
    How about using tags to denote level of importance/priority (i.e. tags simply called: 1, 2, 3, 4, 5)
    Does it make sense to group related tags using color labels? (i.e. Assign the color blue to Work related tags such as receipt or invoice, then using the color red to group together tags pertaining to my personal life such as kids, soccer, landscaping).
    Feel free to chime in and answer these questions, or to give a brief explanation of your tagging strategy. Thanks!

    Highly intersted in that, too. Haven't found out how to make them useful.
    The basic issue I see is to search for documents. I can't select more than one tag in order to only show the cut set, e.g. Important + Home.

  • Is there any internet security needed for use with the ipad 2??

    is there any internet security needed for the ipad 2?  I.e. For when you're shopping online etc?

    You don't have to purchase a mouse. You already have one, it's wireless and the only one that will work on an iPad.
     Cheers, Tom

  • Appstore back down for 3.1.3 users (please reply)

    i speak for many people with 3.1.3  ios on the ipod touch iphones 1g2g3g  the pay button is distorting horribly when you click itin the appstore and it will no longer download apps. *i am not the only person with this problem all 3.1.3 users are haveing this problem(please reply)

    You are not addressing Apple in this forum. We are just users like yourself.
    Yes, it appears that all users of iOS 3.1.3 have this problem. One user contacted Apple and Apple responded that they are away of the problem and are working on it.
    That is all we know.

  • Urgent help needed for XML Tags using XMLForest()

    Folks
    I need some urgent help regarding getting use defined tag in your
    XML output.
    For this I am using XMLElement and XMLForest which seems to work fine
    when used at the SQL prompt but when used in a procedure throws and error
    SQL> Select SYS_XMLAGG(XMLElement("SDI",
                                       XMLForest(sdi_num)))
         From sdi
         where sdi_num = 22261;- WORKS FINE
    But when used in a procedure,doesnt seem to work
    Declare
        queryCtx  DBMS_XMLQuery.ctxType;
        v_xml     VARCHAR2(32767);
        v_xmlClob CLOB;
        BEGIN
        v_xml:='Select SYS_XMLAGG(XMLElement("SDI",
                                             XMLFOREST(sdi_num)))
        From sdi
        where sdi_num = 22261';
        queryCtx :=DBMS_XMLQuery.newContext(v_xml);
        v_xmlClob :=DBMS_XMLQuery.getXML(queryCtx);
        display_xml(v_xmlClob);
    End;
    CREATE OR REPLACE PROCEDURE  display_xml(result IN OUT NOCOPY CLOB)
    AS
         xmlstr varchar2(32767);
         line varchar2(2000);
    BEGIN
         xmlstr:=dbms_lob.SUBSTR(result,32767);
         LOOP
         EXIT WHEN xmlstr is null;
         line :=substr(xmlstr,1,instr(xmlstr,chr(10))-1);
         dbms_output.put_line('.'||line);
         xmlstr := substr(xmlstr,instr(xmlstr,chr(10))+1);
         END LOOP;
    end;
    SQL> /
    .<?xml version = '1.0'?>
    .<ERROR>oracle.xml.sql.OracleXMLSQLException: Character ')' is not allowed in an
    XML tag name.</ERROR>
    PL/SQL procedure successfully completed.
    SQL>HELP is appreciated as to where I am going wrong?

    Hi,
    if you want to transform something to something else, you should declare, what is your source.
    I would prefer to use plain XSL-Transformations, because you have a lot more options to transform your source and you can even better determine, how your output should looks like.
    Kind regards,
    Hendrik

  • Href and target tags tutorial/help needed for use with an existing website

    I have a website, (built through iweb), and an intro movie. I have spent a lot of time trying to understand the proper tags and how to use them without much luck. My goal is to have the homepage associated with my domain name load in a browser while at the same time have my intro movie open in a Quicktime Player window, play, and automatically close leaving the webpage visible. If anyone can point me to a tutorial or walk my through the process I would appreciate it.

    Poster movie style. Requires QuickTime Pro:
    Create an image (or a frame from your movie). This becomes the "poster". You could add text to it (Click to Play) in a graphic editor app to help your viewers or add text to the page under the image with these instructions.
    Save this new file as poster.mov
    It becomes the src="poster.mov" (source tag in the html code). Set its dimensions to fit your page layout.
    Your "intro movie" will be your href="intro.mov" (href tag in the html code).
    Open it with QuickTime Pro and then open the Movie Properties window. Click on the Presentation tab to see the choices. Automatically close option will close the QuickTime window. Automatically quit option will quit the running QuickTime Player app. This would be a better option as the browser should come back as the "front" application. You also want to check "auto play".
    Use Save As (preserves fast start feature) and name this file intro.mov
    In your html code for the QuickTime files you need to set target="quicktimeplayer" (this launches the QuickTime Player app instead of using the browser plug-in). It may also help if you use the full URL to both files in each tag (http://myserver.com/foldername/intro.mov).
    One of mine as an example. It uses automatically close window:
    http://homepage.mac.com/kkirkster/mycareerfuture/
    View the source code to see the tag structure. My page uses javascript instead of the older object/embed tag code.
    More useful links:
    http://developer.apple.com/internet/ieembedprep.html
    http://www.qtbridge.com/pageot/pageot.html

  • Help needed for using BASIC authentication through JDBCRealm

    Help needed.
    Hello,
    I am doing a degree project, so far it works fine in my local machine, I need to try it on my virtual hosting (as it is a live server).
    My project requires JDBCRealm, that is BASIC authentication loading access data from mysql database. Normally this setup can be done in Server.xml file, because my Tomcat hosting is a virtual one, I only have permission to access the web.xml file.
    My question is: is it possible to get it done in an alternative way? In web.xml? Some properties file maybe?
    Thank you very much.

    You can set this up for your context using META-INF/context.xml instead of working with server.xml.
    Make a directory called META-INF under your webapp ( it'll be at the same level as WEB-INF ). Under this, add a context.xml with all your context specific configuration including the realm. A sample is below
    <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/myApp" reloadable="true">
        <Realm
            className="org.apache.catalina.realm.JDBCRealm"            
            driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"         
            connectionURL="jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=myDB;SelectMethod=Cursor;"
            connectionName="username" connectionPassword="password"
            digest="MD5" userTable="users" userNameCol="userid" userCredCol="userpassword"
            userRoleTable="user_roles" roleNameCol="rolename"
        />
    </Context>Hope this helps.
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    ----------------------------------------------------------------

  • Details needed for using two hard drives with one iTunes library

    I posted this under the iTunes section but now that I think of it, it's more of an Apple TV question since I'm only concerned about how it affects my 2 ATVs.
    I have a MacMini(G4) that acts as a media server for our 2 ATVs. I use one library on the Mini which has been using an external 750GB drive. However, I'm at nearly 95% capacity now and want to invest in another external drive and use both. So the question I posted on the iTunes section was...
    "With far too much content in iTunes (mostly for the Apple TVs) and after reading numerous posts about using external hard drives with iTunes I'm convinced that using two external drives is my best solution.
    However, I did want to understand a bit more about the details of how iTunes will manage or at least keep track of, the media. Specifically, I'm thinking of the case were I add a movie to iTunes library (of course it will not copy the file into the iTunes folder).
    What will occur if I later change any of the tags for the movie (e.g., name, genre, year, etc.). Will iTunes update this information and then update the Apple TVs once they resync with the iTunes library?"
    So for the very knowledgeable folks here on the ATV section, what exactly does iTunes do in this case? Will my genres be updated correctly if I change something even though the content is not copied to the iTunes folder?

    If you want to use two external drives to store your itunes content, there are a couple of ways you could go about it.
    You could choose to have just movies (for example) on one HDD and everything else on the other. You could further choose to have your itunes music folder on one HDD and have all content copied to it by default. When it comes to movies (in this example) you can place these on your second HDD and add them to itunes by using OPT-drag, which will temporarily disable itunes from copying the file to your itunes library.
    You could also entirely disable disable itunes copying files to your itunes music folder from the itunes preferences and manually manage all your content.
    Personally I'd just buy a 2 TB (for example) drive and ebay your old drive once you have moved everything from it to your new one.

  • Advice needed for using date type in leave quota generation.

    Requirement:   Seniority for quota generation of long service leave must be based on date "02" in IT0041.
    Although all the relevant config has been done using the date type 02, the quota is still being generated based on date type 01. 
    My Question:  What is required to make this scenario work?
    Thanks
    Maureen.

    Validity/Deduction
    Validity:  Valid From = Date type 02 -1Days; Valid To =  Date Type 02 999Months
    Deduction: From = Start of Val +1Day, To =  End of Val +999 Months
    Base Entitlement:
    Rule: 002
    Sequence 001; Seniority = 0 - 5 years; Constant= 5 days; Related to = Accrual period
    Sequence 002; Seniority = 5 - 999 years; Constant=10 days; Related to = Accrual period
    Selection Rules:
    Applicability:  default values
    Accrual Period: Rel to date type = 02; Length = 60 Months
    Base Entitlement: Rule = 002; Key for seniority = For exact day
    Accrual Entitlement: No pro-rata calc
    Transfer time:  Upon accrual
    All fields not mentioned are standard defaults.
    Employee:
    IT0041
    Date Type 01 = 01/09/2005
    Date Type 02 = 06/04/1995
    IT0000
    Current position:  Begda: 01/02/2009 - 31/12/9999
    Previous position:  Begda: 01/03/2008 = 31/01/2009
    Testing by running Time Evaluation till 31/09/2012
    Result:
    5 days accrued on 05/04/2010
    IT2006:  Deduction from = 06/04/2009 To 31/12/9999;  Validity from = 05/04/2009 To 31/12/9999
    Please note I've used different dates in an attempt to clearly illustrate the problem. Hope it doesn't serve to confuse.
    Thanks for the help.

  • Converting a class for use in a jsp page.

    I was just wondering if it is possible/normal to convert complex(ish) classes to change the output from the system.out, to a return value from a method that is displayed via a jsp page. (I am just beginning, and trying to make the coversion from asp with COM to jsp with beans/servlets and I am not yet fully understanding the technologies, and how you import classes etc - please bear with me!)
    first, I made a class that has a method that just returns a string. like:
         public String GetAValue()
              return "Hello there.";
         }and then I made a jsp page that imported the class (test) like:
    <%@ page import="Test" %>
    <jsp:useBean id="tst" scope="page" class="Test" />
    st = tst.GetAValue();
    out.println(st);
    Which to my delight, worked fine! Then I made another class that retrieved a value from a web service. kind of like...
         public String GetAValueFromAWebService(){
              return theWebService.GetValueFromWebServiceMethod();
         }This class also works good when I just run via "java testit". But when I went to do the same as above ,ie, import the class, do a usebean then do st=tst2.GetValueFromWebServiceMethod(), I could not get it to work at all. This class does lots more tricky stuff then the first one though - it loads its properties from a .properties file via an instance of another class, and imports funky stuff like - import org.uddi4j.* and import java.util.Vector; and more.
    Ok, now the question! Is what I am trying to do stupid? If so, how should I do it? If its not stupid, how do I include all the extra import statements on the jsp page (there are about 10)
    Wow, sorry about the length of this post. I hope someone can understand my ramblings!
    Thanks,
    nmoog.

    Sorry, yeah...
    I am actually using the UDDI4J package, and it loads various settings with the
    config = Configurator.load(); (a seperate class to load stuff in with)
    The Configurator.Load method basically just does:
    config.load(new java.io.FileInputStream("samples.prop"));
    and then does System.setProperty() with the config.getProperty()
    values.
    I have a test class when I do "java Test" it runs and in the Main method just instantiates the MyWebService class and does the MyWebService.GetAWebServiceValue() which returns a string.
    As I said, this runs fine. But from the JSP code if I do the same thing it gets a NullPointerException.
    "java.lang.NullPointerException
    at java.util.Hashtable.put(Hashtable.java:389)
    at java.util.Properties.setProperty(Properties.java:102)
    at java.lang.System.setProperty(System.java:654)
    at Configurator.load(Configurator.java:43)"
    Why can it load okie-dokey from the test class, but not the jsp page? Any ideas?

  • Custom Tag - how to use tag value= %=jsp% / ?

    Hello friends,
    I am new to custom tags. I have written simple tags that handle value="some hard-coded stuff">.
    But cannot not implement jsp-supplied values? Could you please help with advice?
    Basically, how to implement a custom tag that would allow:
    <mylib:mytag value=<%=somejsp%> />
    Thank you!

    Just define it in your .tld ...
    Example:
    <attribute>
    <name>comments</name>
    <required>false</required>
    //IF this is set to true, u can add your jsp stuff... in your value
    <rtexprvalue>true</rtexprvalue>
    <type>String</type>
    </attibute>
    Usually, the .tld goes in WEB-INF/lib ... some people just put it in WEB-INF/

Maybe you are looking for

  • 2nd Gen iPod shuffle is not recognized by iTunes or computer

    I read the other posts about people's 2nd Gen Ipod shuffles not being rcognized by iTunes or their computer, but none of them seemed to fit. I have had my iPod shuffle for less than a week. Last time I had my iPod connected to iTunes in the "Settings

  • External dvd drive won't work on USB macBook air

    External dvd drive won't work on my macBook air usb port.  It works on older versions of air and iMac. Any ideas.  Tried the left shift, control, option and power button sumultaniously, but did not work.

  • Where in the MIDlet life-cycle should I create multiple forms with LWUIT ?

    Hi all, I must create two LWUIT forms in my application. Where should I create the two forms ? I created the first form in the startApp life-cycle method , and when I tried to create also the second form in the startApp method then there is a NullPoi

  • TDS Payment Setup based on following

    How do we set the TDS in the SAP B1 TAX Calculation – Contractors For Company Bill Amount                                             – 100.000 TDS (10%)                                                -    2.000 TDS Surcharge(10% on TDS)             

  • Xml attribute value

    I'm having trouble getting a specific attribute value when parsing the xml tree. I need to get the chidNode that matches my attribute request. Is there an easy way to say if the attribute value = 1234 then return its nodevalue myXML = new XML(); myXM