JSP Userbean tag

hi everyone,
I am fairly new to JSP and I am trying to understand some of the basics of JSP, so I am wondering if anyone can tell me if the JSP usebean tag case sensitive, for example I have this, which works perfectly fine:
For JSP page:
<%@ page language="java" import="simple.simplebean" %>
<jsp:useBean id="sample" class="simple.simplebean" scope="page">
</jsp:useBean>
<html>
<body>
<jsp:setProperty name="sample" property="sample" value="IT Works!" />
<jsp:getProperty name="sample" property="sample" />
Hope this works and it does work
</body>
</html>
For JavaBean:
package simple;
import java.io.*;
public class simplebean implements Serializable
     private String Sample;
     public simplebean(){}
     public void setSample(String s) {Sample=s;}
     public String getSample() {return Sample;}
But, if I have this:
<jsp:setProperty name="sample" property="Sample" value="IT Works!" />
<jsp:getProperty name="sample" property="Sample" />
It won't work because "S" is capital for the property attribute "Sample", which is really strange, so I am wondering what is the limitation in the usage of <jsp:setProperty> and <jsp:getProperty> tag?
I am can I do this?:
<jsp:setProperty name="sample" property="setSample" value="IT Works!" />
<jsp:getProperty name="sample" property="getSample" />
The setSample and getSample method name.

Whenever you declare a variable, industry standard says that the variable name should begin with a lowecase letter. Hence
private String Sample;
should be declared as:
private String sample;
If you have a variable name with more that two words then the first letter of the first word should be lower case and the 2nd word should be uppercase. For example:
private String mySample;
The industry standard also says that if you are creating a class then the first letter of every word should be capitalized. Hence, when you declare a class it should be as follows:
public class SimpleBean{}
Not:
public class simplebean{}
The reason the industry standard is done this way is to make it easy to distinguish between classes and variables and it makes it easier to read variable and class names.
Imagine trying to read a variable name like this:
private String thisismypersonalvar;
as opposed to this:
private String thisIsMyPerasonalVar;
The latter is easier to read. The same applies for classes.
Also, when the first letter of a variable name is lowecase then everyone knows that it is a variable and not a class. Likewise when a classname is capitalized everyone knows that it is a class.
For example:
String myString = "this is a string";
I know that String is a class because the first letter is capitalized and I know that myString is a variable name because the first letter is lowercase.
It may seem silly but when you are debugging over 500 lines of code then it makes it much easier to understand which name is a class and which one is a variable name.
After all that being said.
if you were to use
<jsp:setProperty name="sample" property="setSample" value="IT Works!" />
<jsp:getProperty name="sample" property="getSample" />
this would not work because the name of the property in the Bean is "Sample".
if this code did not work
<jsp:setProperty name="sample" property="Sample" value="IT Works!" />
<jsp:getProperty name="sample" property="Sample" />
then I would assume that the jsp specification automatically assumed that all the bean property names would begin with a lowercase letter, therefore, it expects the bean property name to be lowercase when it is passed as a parameter to the property attribute.
For example, the following code you wrote is correct:
<jsp:setProperty name="sample" property="sample" value="IT Works!" />
<jsp:getProperty name="sample" property="sample" />
If your bean property was
private String mySample;
then the signatures of the get and set method would be:
public void setMySample(String a);
public String getMySample();
The get and set property in the JSP page would be:
<jsp:setProperty name="sample" property="mySample" value="IT Works!" />
<jsp:getProperty name="sample" property="mySample" />
I hope this helps.
logikalone

Similar Messages

  • Connection Pooling and JSP Custom Tag Library - is code (inside) the best way/correc?

    Hi, can anyone advise as to whether my tag library code (based
    on Apache Jakarta Project) will actually achieve connection
    pooling functionality across my entire JSP based application? I
    am slightly concerned that my OracleConnectionCacheImpl object
    may exist multiple times, hence rendering my conection pooling
    attempt useless.
    package com.solved.tag.dbtags.connection;
    import java.io.IOException;
    import java.sql.Connection;
    import java.sql.SQLException;
    import javax.servlet.jsp.tagext.TagSupport;
    import javax.servlet.jsp.JspTagException;
    import javax.sql.DataSource;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import oracle.jdbc.pool.OracleConnectionCacheImpl;
    * <p>JSP tag connection, used to get a
    * java.sql.Connection object.</p>
    * <p>JSP Tag Lib Descriptor
    * <pre>
    * &lt;name>connection&lt;/name>
    &lt;tagclass>com.solved.tag.dbtags.connection.ConnectionTag&lt;/t
    agclass>
    * &lt;bodycontent>JSP&lt;/bodycontent>
    &lt;teiclass>com.solved.tag.dbtags.connection.ConnectionTEI&lt;/t
    eiclass>
    * &lt;info>Opens a connection based on a jndiName.&lt;/info>
    * &lt;attribute>
    * &lt;name>id&lt;/name>
    * &lt;required>true&lt;/required>
    * &lt;rtexprvalue>false&lt;/rtexprvalue>
    * &lt;/attribute>
    * </pre>
    * @author Matt Shannon
    public class ConnectionTag extends TagSupport {
    static private OracleConnectionCacheImpl cache = null;
    public int doStartTag() throws JspTagException {
    try {
    Connection conn = null;
    if (cache == null) {
    try {
    InitialContext ic = new InitialContext();
    DataSource ds = (DataSource) ic.lookup
    ("jdbc/pool/OracleCache");
    cache = (OracleConnectionCacheImpl)ds;
    catch (NamingException ne) {
    throw new JspTagException(ne.toString());
    conn = cache.getConnection();
    pageContext.setAttribute(getId(),conn);
    catch (SQLException e) {
    throw new JspTagException(e.toString());
    return EVAL_BODY_INCLUDE;
    package com.solved.tag.dbtags.connection;
    import java.sql.Connection;
    import java.sql.SQLException;
    import javax.servlet.jsp.tagext.TagSupport;
    * <p>JSP tag closeconnection, used to close the
    * specified java.sql.Connection.<p>
    * <p>JSP Tag Lib Descriptor
    * <pre>
    * &lt;name>closeConnection&lt;/name>
    &lt;tagclass>com.solved.tag.dbtags.connection.CloseConnectionTag&
    lt;/tagclass>
    * &lt;bodycontent>empty&lt;/bodycontent>
    * &lt;info>Close the specified connection. The "conn"
    attribute is the name of a
    * connection object in the page context.&lt;/info>
    * &lt;attribute>
    * &lt;name>conn&lt;/name>
    * &lt;required>true&lt;/required>
    * &lt;rtexprvalue>false&lt;/rtexprvalue>
    * &lt;/attribute>
    * </pre>
    * @author Matt Shannon
    * @see ConnectionTag
    public class CloseConnectionTag extends TagSupport {
    private String _connId = null;
    * The "conn" attribute is the name of a
    * page context object containing a
    * java.sql.Connection.
    * @param connectionId
    * attribute name of the java.sql.Connection to
    close.
    * @see ConnectionTag
    public void setConn(String connectionId) {
    _connId = connectionId;
    public int doStartTag() {
    try {
    Connection conn = (Connection)pageContext.getAttribute
    (_connId);
    conn.close();
    } catch (SQLException e) {
    // failing to close a connection is not fatal
    e.printStackTrace();
    return EVAL_BODY_INCLUDE;
    public void release() {
    _connId = null;
    package com.solved.tag.dbtags.connection;
    import javax.servlet.jsp.tagext.TagData;
    import javax.servlet.jsp.tagext.TagExtraInfo;
    import javax.servlet.jsp.tagext.VariableInfo;
    * TagExtraInfo for the connection tag. This
    * TagExtraInfo specifies that the ConnectionTag
    * assigns a java.sql.Connection object to the
    * "id" attribute at the end tag.
    * @author Matt Shannon
    * @see ConnectionTag
    public class ConnectionTEI extends TagExtraInfo {
    public final VariableInfo[] getVariableInfo(TagData data)
    return new VariableInfo[]
    new VariableInfo(
    data.getAttributeString("id"),
    "java.sql.Connection",
    true,
    VariableInfo.AT_END
    data-sources.xml:
    <?xml version="1.0"?>
    <!DOCTYPE data-sources PUBLIC "Orion data-
    sources" "http://xmlns.oracle.com/ias/dtds/data-sources.dtd">
    <data-sources>
    <data-source
    class="oracle.jdbc.pool.OracleConnectionCacheImpl"
    name="jdbc/pool/OracleCache"
    location="jdbc/pool/OracleCache"
    url="jdbc:oracle:thin:@oracle1:1521:pdev"
    >
    <property name="maxLimit" value="15" />
    <property name="cacheScheme" value="2" />
    <property name="user" value="console" />
    <property name="password" value="console" />
    <description>
    This DataSource is using an Oracle-native DataSource Class so as
    to allow Oracle Specific extensions.
    A getConnection() call on this DataSource will return
    oracle.jdbc.driver.OracleConnection.
    The connection returned is a logical connection.
    The caching scheme in place is Fixed Wait. Refer below to
    possible values.
    Dynamic 1
    Fixed Wait 2
    Fixed Return Null 3
    </description>
    </data-source>
    </data-sources>
    many thanks,
    Matt.

    Hi. Show me your pool definition.
    Joe
    Ramamurthy wrote:
    I am using the jsp custom tag library from BEA called sqltags.tld which came with Weblogic 5.1. Currently I am using Weblogic6.1 sp2 on Solaris.
    I have created a Connection Pool for Sybase database using the driver com.sybase.jdbc.SybDriver.
    When I created jsp page to connect to the connection pool using sqltags custom tag library, I am getting the error
    "javax.servlet.jsp.JspException: Failed to write body content
    at weblogic.taglib.sql.ConnectionTag.doAfterBody(ConnectionTag.java:43)
    at jsp_servlet.__hubwcdata._jspService(__sampletest.java:1014)"
    After this message, whenever I try to access the same jsp page I am getting the message
    "javax.servlet.jsp.JspException: Failed to load JDBC driver: weblogic.jdbc.pool.D
    river
    at weblogic.taglib.sql.ConnectionTag.doStartTag(ConnectionTag.java:34)
    at jsp_servlet.__hubwcdata._jspService(__sampletest.java:205)".
    Can you please help me the reason why this problem is happening and how to fix this ?
    This problem doexn't happen consistently. This occurs once in a while.
    I tried to increase Login delay Seconds parameter in the Connection Pool to 15 sec. It didn't help me much.
    Thanks for your help !!!
    Ram

  • How to use JSP custom tag lib in PAR file?

    Hi All,
    I am trying to customize mastheaderpar file. For that I have downloaded relevant par file and making the changes accordingly.
    As part of the changes I would require to use JSP custom tag library in my par file.
    I have the TLD file and relevant classes in the jar file. I would like to know where and what kind of modifications have to be done to use the jsp custom tag library.
    I tried modifying some things in portalapp.xml but was not successful.
    Please help me on how to proceed with this? It would be great if you can provide the xml entry to use this tag library
    Thanks
    Santhosh

    Hi Johny,
    Thanks for the reply. Actually I am able to change colors etc. with out any problem.
    My requirement is to use XMLTaglib in mastheader par file. This tag lib is from apache tomcat. I have the relevant TLD and class files. I copied TLD file into taglib dir of portal-inf and class file in src api.
    And I have added the following line in portalapp.xml under component-profile section of default
    <property name="tlxtag" value="/SERVICE/Newmastheader/taglib/taglibs-xtags.tld">
    Is this the right way to use tag lib? Actually before adding this line I used to get the error saying "Error parsing taglib", but now the error does not occur and I am getting new error. This is an exception in one of the taglib classes.
    Could any one provide me some inputs on how to check this error?
    Thanks
    Santhosh

  • Data Streaming in JSP custom tag

    We have a JSP custom tag which uses a StringBuffer object to store the HTML content. In the doEndTag method, we use the JSPWriter's print method to send the buffer's content to the browser.
    Now, there are cases when the HTML content becomes very large,in the order of 1 - 10MB. In such cases, is there a way we can start streaming the data from the custom tag as the buffer is being built, rather than waiting for the entire buffer to be written out in the doEndTag.

    Yeah, just call the JSPWriter's print method instead of using the StringBuffer, or write your own subclass of StringBuffer (or StringBuilder if Java 5+) which will do this for you automatically when the size is at a certain point, and clear it out)

  • Can I write Design-time for JSP custom tag(not JSF components)

    I have some old JSP custom tags(not JSF components), and I want to use them in the IDE through the toolbox.
    Now I have already written the BeanInfos for these tags, and they can be drag from the toolbox; but it will throw a Exception when render the tags, and the properties in the Property Editor are not which I describe in the BeanInfos.
    How can I write Design-time for these tags? or whether it is possible to write the Design-time for these tags?
    the Exception is shown as follow:
    java.lang.ClassCastException
         at com.sun.rave.insync.faces.FacesPageUnit.renderNode(FacesPageUnit.java:1347)
    [catch] at com.sun.rave.insync.faces.FacesPageUnit.renderBean(FacesPageUnit.java:1086)
         at com.sun.rave.insync.faces.FacesPageUnit.getFacesRenderTree(FacesPageUnit.java:993)
         at com.sun.rave.css2.FacesSupport.getFacesHtml(FacesSupport.java:152)
         at com.sun.rave.css2.CssContainerBox.addNode(CssContainerBox.java:373)
         at com.sun.rave.css2.CssContainerBox.createChildren(CssContainerBox.java:354)
         at com.sun.rave.css2.DocumentBox.createChildren(DocumentBox.java:90)
         at com.sun.rave.css2.DocumentBox.relayout(DocumentBox.java:160)
         at com.sun.rave.css2.PageBox.layout(PageBox.java:392)
         at com.sun.rave.css2.PageBox.relayout(PageBox.java:454)
         at com.sun.rave.css2.DocumentBox.redoLayout(DocumentBox.java:313)
         at com.sun.rave.css2.PageBox.redoLayout(PageBox.java:460)
         at com.sun.rave.css2.DocumentBox.changed(DocumentBox.java:634)
         at com.sun.rave.designer.DesignerPaneUI$UpdateHandler.changedUpdate(DesignerPaneUI.java:1012)
         at com.sun.rave.text.Document.fireChangedUpdate(Document.java:851)
         at com.sun.rave.text.Document$5.run(Document.java:631)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

    I have some old JSP custom tags(not JSF components), and I want to use them in the IDE through the toolbox.
    Now I have already written the BeanInfos for these tags, and they can be drag from the toolbox; but it will throw a Exception when render the tags, and the properties in the Property Editor are not which I describe in the BeanInfos.
    How can I write Design-time for these tags? or whether it is possible to write the Design-time for these tags?
    the Exception is shown as follow:
    java.lang.ClassCastException
         at com.sun.rave.insync.faces.FacesPageUnit.renderNode(FacesPageUnit.java:1347)
    [catch] at com.sun.rave.insync.faces.FacesPageUnit.renderBean(FacesPageUnit.java:1086)
         at com.sun.rave.insync.faces.FacesPageUnit.getFacesRenderTree(FacesPageUnit.java:993)
         at com.sun.rave.css2.FacesSupport.getFacesHtml(FacesSupport.java:152)
         at com.sun.rave.css2.CssContainerBox.addNode(CssContainerBox.java:373)
         at com.sun.rave.css2.CssContainerBox.createChildren(CssContainerBox.java:354)
         at com.sun.rave.css2.DocumentBox.createChildren(DocumentBox.java:90)
         at com.sun.rave.css2.DocumentBox.relayout(DocumentBox.java:160)
         at com.sun.rave.css2.PageBox.layout(PageBox.java:392)
         at com.sun.rave.css2.PageBox.relayout(PageBox.java:454)
         at com.sun.rave.css2.DocumentBox.redoLayout(DocumentBox.java:313)
         at com.sun.rave.css2.PageBox.redoLayout(PageBox.java:460)
         at com.sun.rave.css2.DocumentBox.changed(DocumentBox.java:634)
         at com.sun.rave.designer.DesignerPaneUI$UpdateHandler.changedUpdate(DesignerPaneUI.java:1012)
         at com.sun.rave.text.Document.fireChangedUpdate(Document.java:851)
         at com.sun.rave.text.Document$5.run(Document.java:631)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

  • Using variables in a jsp:useBean tag

    I was wondeing if it is possible in any way to use variables in a jsp:useBean tag. Here is an example of what I am trying to do.
    <%
    String beanType = request.getParameter( "bean" );
    if( beanType.equals( "Bean1" ) ) {
    beanClass = "com.myCompany.Bean1";
    } else {
    beanClass = "com.myCompany.Bean2";
    %>
    <jsp:useBean name="<%= beanType %>" class="<%= beanClass %>"/>
    I also tried using this approach
    <%
    if( beanType.equals( "Bean1" ) ) {
    %>
    <jsp:useBean id="bean" class="com.myCompany.Bean1"/>
    <%
    } else if( beanType.equals( "Bean2" ) ) {
    %>
    <jsp:useBean id="bean" class="com.myCompany.Bean2"/>
    <%
    %>
    Neither approach seems to work. Is there any way around this problem?
    Thanks,
    Marcus.

    Hi,
    check:
    http://forum.java.sun.com/thread.jsp?forum=45&thread=398998&tstart=75&trange=15

  • How can i load A gui JTable bean through jsp:useBean tag in a jsp page

    Hi,
    i am chiranjit , i am in a jsp project . i am desparately looking a solution for below stated problem:
    i want to make a jsp page for master entry , that why i want to load a GUI Java bean in my jsp page.This GUI Bean contaning a JTable in which allow grid type data entry in the jsp page. But i am unable load that bean in the jsp page through jsp:useBean tag in my page.So if you have any solution then send in the forum as early as possible.
    Thank you
    chiranjit

    No can do. JSPs can only output plain HTML (and javascript...) They are not used like normal Java classes.
    If you need a complex GUI then you might use an Applet instead. If you want to use a JSP then you are stuck using normal HTML components, like <table> <form...> <input type="text"> etc...

  • Calling an inner class in a jsp:usebean tag

    Hi everybody !
    Here's my problem : working in my project on multiple pages, I'm using inner classes/beans to limitate my '.java' files but I'm stuck when calling that 'inner-bean' in my jsp:usebean tag.
    First, I tried to declare in the class parameter : 'class="MyPrincipalBean.theInnerBean" but jsp returns me a 'not found' message.
    I tried an other issue with this :
    'class="MyPrincipalBean$theInnerBean" but I encountered a 'Attempt to use a bean type without a void constructor in jsp:useBean tag (JSP 1.1 specification, 2.13.1)'. Since I can't find that specification, I'm sending an SOS.
    Am I on the good way ? If somebody as encoutered that sort of problem, it would be very kind of you to help me.
    Thanks for your help !
    [email protected]

    Thanks for your help!
    I must recognize that my explainations weren't really precise.
    My principal bean owns a table of my inner-class type :
    public class FirstBean extends EntityBean {
    private SecondBean[] tabSB;
    public SecondBean[] getTabSB() {...}
    public void setTabSB(SecondBean[] p_tabSB) {...}
    public class SecondBean {...}
    So I can call a specific bean from the tab in my Servlet for another page.
    But I think I have the solution and I need your advise :
    I tried this :
    <jsp:useBean id="FirstBean" class="<...>.FirstBean" scope="session" />
    <jsp:useBean id="SecBean" beanName="<...>.FirstBean$SecondBean" type="<...>.FirstBean$SecondBean" scope="request" />
    And would you believe it ? It seems to work ! But I have to test this farther to be sure. What do you think of it ?

  • Problem with flush=true in the jsp:include tag

    Hello
    I have deployed a JSP based application , based on the apache struts framework. The web server is Sun One Webserver 6 Service Pack4, on a windows 2000 machine
    The same application was tried on SunONE application server 7, and it works without any problem. However in this case the following error , on the page
    javax:servlet.jspexception:Illegal to flush within a custom tag
    Does this mean flush="true" is not allowed within custom tags
    Or is there a workaround for this
    Any help is appreciated
    thanks
    - Aniruddha

    Hi,
    This is a known problem, ��flush before you include�� limitation in JSP 1.1.
    As a result, you have to state flush="true" every time you include a jsp using <jsp:include> tag if you are using JSP1.1.
    Fortunately, it is fixed in JSP1.2. The flush attribute controls flushing. If true, then, if the page output is buffered and the flush attribute is given a ��true�� value, then the buffer is flushed prior to the inclusion, otherwise the buffer is not flushed. The default value for the flush attribute is ��false��.
    Gary Wang
    Developer Technical Support
    SUN Microsystems
    http://www.sun.com/developers/support/

  • JSP declaration Tag

    Dear All,
    Is it ok to use JSP declaration tag? I have heard if we use the declaration tag then this variable name will be shared by all threads and the particular variable will be overridden. Is it true? please advise me on this? can we use this tag in our Jsp files.
    Thanking you in advance.
    Regards,
    Venkat

    Yes, it is true that the scope of variable in decalaration tag becomes global. It is as good as declaring a public variable in core java context.
    In my opinion one should avoid using the declaration tag.
    As there should be less and less public variable in core java class. Every variable should be private to the class and accessing the variable should be only through the instance of the class.

  • JSP applet tag X Html applet tag (what is the difference?)

    what is the advantage in using the JSP applet tag instead of a simple Html applet tag ?
    second question:
    I have an applet in a Html frame, and a menu on the left side.... When the user select the applet option at first time, everything runs ok.. after the user select another option and then select the applet again, it fails in some features .. Why ?

    well, if by "the JSP applet tag", you mean the jsp:plugin tag.. that will just generate the same HTML tag you would write. The only advantage would be it should be less typing to use the taglib.
    second answer:
    without seeing any code, it'd be hard to figure out the problem. The obvious thing is you are setting some state of something that is preventing further action.

  • Is Tomcat 4's jsp:plugin tag hardwired to 1.2?

    Is Tomcat 4's <jsp:plugin > tag hardwired to version 1.2 of the JPI?
    I was absolutely horrified today at a job interview when, proudly navigating to the page containing the 1.4-demanding applet I embedded in the page using <jsp:plugin ...> the plugin installation dialogue came up -- asking whether they wanted to install the 1.2 plugin (up until recently, I had the applet's object tag embedded manually... switching to jsp:plugin was fairly recent).
    As it turns out, the <object> tag generated by Tomcat was specifying the download path for the 1.2 plugin, even though I specified jreversion="1.4" in the <jsp:plugin> tag:
    <OBJECT
       classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
       name="theApplet"
       width="550" 
       height="400" 
       align="middle" 
       codebase="http://java.sun.com/products/plugin/1.2.2/jinstall-1_2_2-win.cab#Version=1,2,2,0">The "clsid" value can be changed in web.xml by changing the jsp servlet's "ieClassId" initParam, but as far as I can tell there's NO mechanism for changing the "codebase" value anywhere.
    Is the <jsp:plugin> tag (under Tomcat 4, at least) just useless for Applets that must have 1.4, or is there a configuration parameter somewhere to set the "codebase" value generated by the tag?
    I know I could always put the manually-specified code back in, but I'd prefer to stay with the <jsp:plugin> tag if possible just because it makes the jsp source cleaner. What's strange is that nobody seems to have complained about that problem on the usual places (Usenet/dejanews/Google, jguru.com, etc). Whether that's just because nobody writes applets that actually demand 1.4, or whether everybody who does just embeds the <object> tag manually, I'm not sure.
    In any case, I'm trying to figure out how to make <jsp:plugin> generate the right HTML for 1.4-using applets... or whether it's even possible.

    Sigh. I found it. It's actually specified as the "iepluginurl" property of the <jsp:plugin> tag.
    <emotion:frustration variation="anger">
    Now I just need to figure out what *$%!# value to use for it.
    The JPI's developer guide has to be the worst document I've ever seen from Sun. Normally, Sun's documents are good. Often, exceptionally so. But the JPI guide... well, after reading http://java.sun.com/j2se/1.4.1/docs/guide/plugin/developer_guide/using_tags.html multiple times, I'm still not sure what #$%^&* URL corresponds to "The newest released JPI equal to or newer than 1.4.0". The only URL on the whole page that they even imply works is hardwired to 1.4.0, and in the same breath they imply that every other codebase URL on the page is wrong, hypothetical, and shouldn't be used... oh, and for that matter, the 1.4_0 one shouldn't really be used ether, because it might change in the future. Grrrrr.
    If there's a pattern to the following URLs (all used on the same page) that's supposed to illustrate something besides abyssmally bad editing and apparent indecision, I haven't seen it yet:
    http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,0,0
    http://java.sun.com/products/plugin/1.4/jinstall-14-win32.cab#Version=1,4,0,mn
    http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,1,mn
    http://java.sun.com/products/plugin/autodl/jinstall-1_4_0-win.cabHmmm. Let's see here. They're all the same up to http://java.sun.com/products/plugin, but from that point one diverges into /1.4/, while the others continue into /autodl/. But even past that point, two imply that the filename follows the pattern jinstall-1_4-windows-i586.cab#Version=1,4,x,* ... but whether developers who really, truly, don't care about the specific maintenance release should use "0" or "mn" is left up in the air.
    Furthermore, the ONE URL on the entire page that they come halfway close to implying will work is the last one I listed above, which itself goes totally against whatever hypthetical pattern they were trying to imply with the other three. For now I'll probably stick the last one listed as the parameter because it's the only one they actually come out and say will work, but I suspect the first one is probably the "right" one.
    Of course, there's always the matter of Macintosh users running IE. Or Windows users running Mozilla (which is technically Netscape, but uses MSIE ActiveX plugins). Does Mozilla get fed the value of "iepluginurl", or the value of "nspluginurl"? Sigh.
    </emotion:frustration>

  • Weired behavior of jsp:plugin tag

    Hi.
    When I use <jsp:plugin type="applet".....></jsp:plugin> tag, jsp page shows a applet correctly in IE but not in mozilla(1.7). I've tried to solve this problem and found that if I use <applet></applet> tag it works fine both of them.
    Does anyone have idea? the reason of this, and isn't there anyway to use jps:plugin tag to work correctly in both browers?

    What version of Jdk are you using? The Java plugin is not consistent across browsers and browser versions.
    The jsp:plugin tag gets coverted to the OBJECT tag after compliation.
    Just go through this page to find out which tag suits your need.
    http://java.sun.com/products/plugin/versions.html
    This link might also be helpful to you.
    http://www.mail-archive.com/[email protected]/msg32719.html

  • Is the jsp:plugin tag supported in Weblogic 5.1?

    I am running Weblogic 5.1 and I can't get the <jsp:pluging> tag to work.
              The server is not even translating the tag to anything usefull. When I do a
              'View Source' in the browser, the tag is exactly as I wrote it in the page.
              Is this feature supported in 5.1. I've tried the phonebook example and it
              doesn't work either. All my other JSP pages work just fine.
              Any help would be appreciated...
              Steven Carter
              Senior Software Developer
              VideoSpheres Inc.
              Office: 613-270-9646 Ext. 3025
              FAX: 613-271-9442
              e-mail:[email protected]
              

    Thanks for your response! Yes it was a typo in the message :). Would you have any idea why it is not working for me? Any special configuration required? A property I don't have correctly set in the properties file? I've tried the phonebook example shipped with the product and it doesn't work.
              "Kumar Allamraju" <[email protected]> wrote in message news:[email protected]..
              I never tested it myself. But i think we do support
              in 5.1 . Shouldn't it be <jsp:plugin>
              Was it a typo?
              Steven Carter wrote:
              I am running Weblogic 5.1 and I can't get the <jsp:pluging> tag to work.
              The server is not even translating the tag to anything usefull. When I do a
              'View Source' in the browser, the tag is exactly as I wrote it in the page.
              Is this feature supported in 5.1. I've tried the phonebook example and it
              doesn't work either. All my other JSP pages work just fine.
              Any help would be appreciated...
              Steven Carter
              Senior Software Developer
              VideoSpheres Inc.
              Office: 613-270-9646 Ext. 3025
              FAX: 613-271-9442
              e-mail:[email protected]
              [att1.html]
              

  • Error in JSP Custom Tag Program

    Hi Dear,
    when I compile my JSP Custom tag program on weblogic Its give that Error..
    Parsing of JSP File '/Home.jsp' failed: /Home.jsp(-1): cannot load TLD: weblogic.xml.dom.ChildCountException: missing child tagclass in tag
    probably occurred due to an error in /Home.jsp line -1:
    Tue Sep 09 18:46:56 GMT 2008
    My Files are:
    Home.jsp:
    <%@ taglib uri="/WEB-INF/tlds/taglib.tld" prefix="neeraj" %>
    <neeraj:hello name="Vijay">
    It is a Tag Body<br>
    </neeraj:hello>
    taglib.tld:
    <taglib>
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    <uri>WEB-INF/tlds/taglib.tld</uri>
    <tag>
    <name>hello</name>
    <tag-class>mypack.MyTag</tag-class>
    <attribute>
    <name>name</name>
    <required>true</required>
    </attribute>
    </tag>
    </taglib>
    MyTag.java:
    package mypack;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    public class MyTag extends TagSupport
    String name;
    public void setName(String c)
    try
    name=c;
    catch(Exception e)
    count=1;
    public int doStartTag()
    return EVAL_BODY_INCLUDE;
    public int doAfterBody
    JspWriter out=pageContext.getOut();
    out.print("Good Night "+name);
    catch(Exception e)
    return EVAL_PAGE;
    web.xml:
    <web-app>
    <welcome-file-list>
    <welcome-file>/Home.jsp</welcome-file>
    </welcome-file-list>
    <taglib>
    <taglib-uri>taglib</taglib-uri>
    <taglib-location>/WEB-INF/tlds/taglib.tld</taglib-location>
    </taglib>
    </web-app>
    Please resolve my issue..

    I had the same problem. In your .tld change tagclass to tag-class and bodycontent to body-content and that should do the trick. The names slightly changed for JSP spec 1.2.
              

Maybe you are looking for

  • How to find the User who changed the connection settings

    Hi Gurus, I am basically a BW guy but i am looking at your precious Guidance in this issue. We have a situation in our BW production system. The job loads are working fine till now but seems like someone has meddled with RFC connection with R/3 prod.

  • Client copy taking too much time to start

    hi... i have two client 100 (golden )& 200( testing) on dev server . now i have create 300 client for training. i have start client copy of 100 on 300. but after taking 5 hours , it didnot copy even 1 table. it s status is given below. Target Client 

  • How to format better my query for a report?

    I have a shell script to run sql queries to get database information everyday. However here below, I want some columns to be indented to the right, and I also want to format the column with %. Also for the column name , underneath the column name, th

  • (AIR) out of memory error when building workspace

    Hi, I created a very simple AIR project. But during the load the workbench gave me out of memory errors. Please find below the relevant .log entries. Thanks for your help, -Rogier !SESSION 2007-06-13 14:13:10.241 eclipse.buildId=unknown java.version=

  • Our corporate proxy prevents downloading and installing Photoshop CC and makes the installer crash.

    What IP's and ports the downloader/installer is connecting to so we can make changes to our firewall & proxy settings. Can't find them on Adobe site. The installer crashes on every installation attempt and does leave an error report in win7 applicati