Experiences developing iViews with JSP tags

Hi,
has anyone experiences in the development of iViews using JSPs and the JSP tags ? Especially the useBean tag... I think it should be no problem to store beans in the session. If I want to share the bean among iView is it enought to synchronized each method of the bean ?
Thanks

Hi O.,
please, before going on guessing around what synchronization means, read some tutorial, that's what the link was thaught for. It is no problem at all not to know this topic, it's definitely some more advanced topic within the language, but it doesn't help if you don't know it to guess how it <i>could</i> work/behave.
> if I declare all getters and setters of the bean with
> synchronize I avoid the issue of inconsistent data
Once again: For pure getters and setters this sentence is definitely wrong. As long as complex class members are not manipulated / accessed concurrently, there is no need for synchronization (within the class).
> thread 1 sets a value a concurrent thread 2
> could read the data and would get a not actual value...
> if I synchronize the get and set, thread 2 will be
> able to invoke the getter after thread 1 finished the
> setter.
Once again: You don't have it in your hands which thread comes first. And synchronizing a method only means that a thread calling this method will run through it as an atomic operation, no other thread will disturb. But getters and setters normally are atomic, you cannot reach more... If a thread calls two (synchronized) methods of the same object, between these two calls, "the race is open again...".
A good example is http://www-106.ibm.com/developerworks/java/library/j-threads1.html
See the example at the end of this link, that's somehow just what we are talking about. The solution would be to synchronize the <i>setFoo(getFoo() + 1)</i> itself (for example with the bean object as locker). Whereas the synchronization of the methods is superfluous (and time consuming).
Hope it helps
Detlev

Similar Messages

  • Help with JSP Tag Libraries

    Could someone please help me with the setup process of tag libraries? I've looked on the Internet and found some instructions, but they are all for Tomcat. I'm using Jserv, and I'm not sure how to setup my environment to work with custom/tag libraries. Could someone help me by giving me some instructions or sending me to an article that could help me?
    Thanks in advance!
    -PV

    Hi pvongboupha
    The best source for getting to know how to set up tag libraries is the JSP specification. You can download this from :
    http://java.sun.com/products/jsp/download.html
    See the chapter on Tag libraries. Any J2EE compliant server will conform to these rules.
    You can also see a chapter from Core Servlets & JSP by Marty Hall. This chapter is on Tag Libraries
    http://developer.java.sun.com/developer/Books/javaserverpages/cservletsjsp/
    Keep me posted on your progress.
    Good Luck!
    Eshwar R
    Developer Technical Support
    Sun microsystems
    http://www.sun.com/developers/support

  • Sp9 / pre-release / problem with jsp tags

              WLS 5.1, sp9 pre-release, solaris 2.7, WLCS 3.2
              JSP compile fails with the exception...
              weblogic.servlet.jsp.JspException: (line -1): Error in tag library
              at: 'wl':
              The Tag class 'weblogicx.jsp.tags.CacheTag' has no setter method
              corresponding to
              TLD declared attribute 'async', (JSP 1.1 spec, 5.4.1)
              at weblogic.servlet.jsp.StandardTagLib.jspException(StandardTagLib.java:138)
              at weblogic.servlet.jsp.StandardTagLib.processTag(StandardTagLib.java:264)
              at weblogic.servlet.jsp.StandardTagLib.processTagElements(StandardTagLib.java:146)
              at weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:125)
              at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:95)
              at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:3873)
              at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:3623)
              at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:3484)
              at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:1817)
              at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1658)
              at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1548)
              at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:888)
              at weblogic.servlet.jsp.JspParser.doit(JspParser.java:69)
              at weblogic.servlet.jsp.JspParser.parse(JspParser.java:125)
              at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:109)
              at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:242
              

              It could just be me - I an un-jarred a version of weblogic-tags-510.jar where WLS
              could find it.
              mike
              Kumar Allamraju <[email protected]> wrote:
              >Yes, my JSP is referring the tag libs. I 'm using counter example given
              >in
              >examples/jsp/tagext/counter directory
              >
              ><NT Performance Pack> NATIVE: created IoCompletionPort successfully.
              >I
              >oPort=0x000001d4
              >Sun Apr 01 12:44:00 PDT 2001:<I> <WebLogicServer> WebLogic Server star
              >ted
              >Sun Apr 01 12:44:40 PDT 2001:<I> <NT Performance Pack> Allocating: '2'
              > NT reader threads
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: init
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
              > verbose initialized to: true
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
              > packagePrefix initialized to: jsp_servlet
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
              > compileCommand initialized to: c:/java/java122/bin/javac.exe
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
              > srcCompiler initialized to weblogic.jspc
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
              > superclass initialized to null
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
              > workingDir initialized to: D:\releases\510\myserver\classfiles
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
              > pageCheckSeconds initialized to: 1
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: Using
              > Encoding : ISO-8859-1 when constructing PrintWriter instead of Servle
              >tOutputStream
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: initi
              >alization complete
              >Sun Apr 01 12:44:42 PDT 2001:<I> <ServletContext-General> looking for
              >taglib uri /counter.tld as resource /WEB-INF/counter.tld in Web Applic
              >ation root:
              >Sun Apr 01 12:44:43 PDT 2001:<I> <ServletContext-General> Generated ja
              >va file: D:\releases\510\myserver\classfiles\jsp_servlet\_pagehits.jav
              >a
              >Sun Apr 01 12:44:45 PDT 2001:<I> <ServletContext-General> file: init
              >
              >
              >what's the change number you get from weblogic.Admin VERSION?
              >
              >
              >--
              >Kumar
              >
              >Mike Reiche wrote:
              >
              >> From the zip file.
              >>
              >> It has to be a jsp that references those tag libraries.
              >> Other than that it works like a charm.
              >>
              >> Mike
              >>
              >> Kumar Allamraju <[email protected]> wrote:
              >> >Did you extracted the SP9 zip or exe?
              >> >I do not see the following errors when accessing a jsp with SP9? Could
              >> >you tell us how to
              >> >reproduce it?
              >> >
              >> >BTW, i will ask our docs folks to correct the startup scripts..
              >> >
              >> >--
              >> >Kumar
              >> >
              >> >Mike Reiche wrote:
              >> >
              >> >> I had to remove the 'async' attribute from taglib.tld
              >> >>
              >> >> And when I use WLCS I have to remove it from weblogic.tld
              >> >>
              >> >> And the startup scripts provided do not include weblogic-tags-510.jar
              >> >> in the classpath.
              >> >>
              >> >> Mike
              >> >>
              >> >> "Mike Reiche" <[email protected]> wrote:
              >> >> >
              >> >> >WLS 5.1, sp9 pre-release, solaris 2.7, WLCS 3.2
              >> >> >
              >> >> >JSP compile fails with the exception...
              >> >> >
              >> >> >weblogic.servlet.jsp.JspException: (line -1): Error in
              >> >> >tag library
              >> >> >at: 'wl':
              >> >> >The Tag class 'weblogicx.jsp.tags.CacheTag' has no setter
              >> >> >method
              >> >> > corresponding to
              >> >> >TLD declared attribute 'async', (JSP 1.1 spec, 5.4.1)
              >> >> > at weblogic.servlet.jsp.StandardTagLib.jspException(StandardTagLib.java:138)
              >> >> > at weblogic.servlet.jsp.StandardTagLib.processTag(StandardTagLib.java:264)
              >> >> > at weblogic.servlet.jsp.StandardTagLib.processTagElements(StandardTagLib.java:146)
              >> >> > at weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:125)
              >> >> > at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:95)
              >> >> > at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:3873)
              >> >> > at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:3623)
              >> >> > at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:3484)
              >> >> > at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:1817)
              >> >> > at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1658)
              >> >> > at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1548)
              >> >> > at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:888)
              >> >> > at weblogic.servlet.jsp.JspParser.doit(JspParser.java:69)
              >> >> > at weblogic.servlet.jsp.JspParser.parse(JspParser.java:125)
              >> >> > at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:109)
              >> >> > at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:242
              >> >
              >
              

  • Problem with jsp tag in jsf file c:import

    <!-- <c:import url="#{backing_Home.whichMenu}"/>-->
    <jsp:include page="#{backing_Home.whichMenu}"/>
    I am trying to use a JSF variable in jsp tag
    I am getting error like this
    javax.servlet.jsp.JspTagException: /#{backing_Home.whichMenu}     at org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:318)     at org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:186)     at _Home_2e_jsp._jspService(Home.jsp:24) I want to add a page dynamically using that variable
    Is there any other method

    This code works fine for me:
    <%@ taglib uri="/jstl-c" prefix="c" %>
    <html>
         <body>
         <%
              int array[] = new int[] {1,2};
              session.setAttribute("array", array);
              String arrayNames[] = new String[]{"One", "Two"};
              session.setAttribute("arrayNames", arrayNames);
         %>
              <form action="?">
              <select name="select">
                   <c:forEach items='${ sessionScope.array}' var="row">
                        <c:choose>  
                             <c:when test="${param.select== row}"> >
                                  <option value="<c:out value='${row}'/>" selected><c:out value="${sessionScope.arrayNames[row-1]}"/></option>
                             </c:when>   
                             <c:otherwise>
                                  <option value="<c:out value='${row}'/>"><c:out value="${sessionScope.arrayNames[row-1]}"/></option>
                             </c:otherwise>
                        </c:choose>
                   </c:forEach>
              </select>
              <input type="submit" name="submit" value="submit"></input>
              </form>
         </body>
    </html>
    good luck.
    MatrixPooh
    www.bizdisplay.com

  • Problem with JSP Tag class

    Hi,
              After some time of work, WLS ends up with the following error message:
              weblogic.servlet.jsp.JspException: (line -1): Error in tag library at:
              'cm': There is no setter method for property 'limit', for Tag
              class 'com.hp.module.cm.tag.GetDocumentsTag'
              at
              weblogic.servlet.jsp.StandardTagLib.jspException(StandardTagLib.java:138)
              at
              weblogic.servlet.jsp.StandardTagLib.processTag(StandardTagLib.java:272)
              at
              weblogic.servlet.jsp.StandardTagLib.processTagElements(StandardTagLib.java:146)
              at
              weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:125)
              at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:87)
              at
              weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:3811)
              at
              weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:3561)
              at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:3422)
              at
              weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:1760)
              at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1601)
              at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1491)
              at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:880)
              at weblogic.servlet.jsp.JspParser.doit(JspParser.java:69)
              at weblogic.servlet.jsp.JspParser.parse(JspParser.java:116)
              at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:97)
              at
              weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:242)
              at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:302)
              at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:217)
              at
              weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:164)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:101)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:124)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:907)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:851)
              at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:252)
              at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:364)
              at
              weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
              The class does contain the setter, so we don't know why the message pops
              up. After rebooting the server, the page works properly (!) Does anyone
              know how to get rid of it ? We're running out of ideas, and rebooting
              the server every 2-3 days is not acceptable.
              The configuration consists of BEA WebLogic 5.1.0 SP8 + JDK 1.2.2_07 +
              HPUX 11.0.
              Any help is greatly appreciated.
              Jacek Laskowski
              

    so doesn you bean have a
              void setLimit(String) {}
              String getLimit() {}
              or does it have mismatched getter and setter?
              like
              setLimit(String) {}
              int getLimit() {}
              take a look at :
              http://developer.java.sun.com/developer/bugParade/bugs/4407050.html
              -Nagesh
              Jacek Laskowski wrote:
              > Hi Mike,
              >
              > Thanks for the response. Unfortunatelly, it's happening on a production
              > server and nobody's changing anything. The error message pops up every
              > 2-3 days and the only way to get rid of that is to reboot the server.
              > Hmmm...I could even say it's hitting us quite regularly.
              >
              > The first time I've seen this I thought that there might be somewhere a
              > class which does not really have the necessary setter. It might've been
              > a case, but it's not. Even though we assume it might happen, what's
              > going on with the WLS classloaders that they pick up the right class at
              > the startup and after some time they change their mind and pick up the
              > wrong one. That would be a bug, shouldn't it ?
              >
              > What's more annoying is the fact that we're not able to open a case in
              > the support as there is nothing to be shown. There is merely the error
              > message which anybody can clearly explain that it relates to a wrong
              > class - no setter in it.
              >
              > The only way I can think of would be to enable remote debugging and as
              > soon as it's happend, connect to the WLS JVM and see what's wrong. We
              > don't have the WLS sources, though.
              >
              > -Jacek
              >
              > Mike Reiche wrote:
              > >
              > > Is it possible that the tag was changed - an attribute was added in the .tld and
              > > to the class?
              > >
              > > The new .tld is seen immediately. The new class is not - not until you restart
              > > WL.
              > >
              > > Mike
              > >
              > > Jacek Laskowski <[email protected]> wrote:
              > > >Hi,
              > > >
              > > >After some time of work, WLS ends up with the following error message:
              > > >
              > > >weblogic.servlet.jsp.JspException: (line -1): Error in tag library at:
              > > >'cm': There is no setter method for property 'limit', for Tag
              > > > class 'com.hp.module.cm.tag.GetDocumentsTag'
              > > > at
              > > >weblogic.servlet.jsp.StandardTagLib.jspException(StandardTagLib.java:138)
              > > > at
              > > >weblogic.servlet.jsp.StandardTagLib.processTag(StandardTagLib.java:272)
              > > > at
              > > >weblogic.servlet.jsp.StandardTagLib.processTagElements(StandardTagLib.java:146)
              > > > at
              > > >weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:125)
              > > > at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:87)
              > > > at
              > > >weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:3811)
              > > > at
              > > >weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:3561)
              > > > at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:3422)
              > > > at
              > > >weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:1760)
              > > > at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1601)
              > > > at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1491)
              > > > at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:880)
              > > > at weblogic.servlet.jsp.JspParser.doit(JspParser.java:69)
              > > > at weblogic.servlet.jsp.JspParser.parse(JspParser.java:116)
              > > > at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:97)
              > > > at
              > > >weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:242)
              > > > at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:302)
              > > > at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:217)
              > > > at
              > > >weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.java:164)
              > > > at
              > > >weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:101)
              > > > at
              > > >weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:124)
              > > > at
              > > >weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:907)
              > > > at
              > > >weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:851)
              > > > at
              > > >weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:252)
              > > > at
              > > >weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:364)
              > > > at
              > > >weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:252)
              > > > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
              > > >
              > > >The class does contain the setter, so we don't know why the message pops
              > > >up. After rebooting the server, the page works properly (!) Does anyone
              > > >know how to get rid of it ? We're running out of ideas, and rebooting
              > > >the server every 2-3 days is not acceptable.
              > > >
              > > >The configuration consists of BEA WebLogic 5.1.0 SP8 + JDK 1.2.2_07 +
              > > >HPUX 11.0.
              > > >
              > > >Any help is greatly appreciated.
              > > >
              > > >Jacek Laskowski
              

  • Output collection value individually with JSP tags?

    Hi all,
    I am able to use struts to iterate through a collection (Map for example) and print the keys/values with tags as below:
    <bean:define id="sampleMap" name="helper" property="values" type="java.util.Map"/>
    <logic:iterate id="item" name="syllabusContent">
    "<bean:write name="item" property="key"/>"="<bean:write name="item" property="value"/>"
    </logic:iterate>
    I am wondering if it is possible to print only one key within the map (say the key was "sampleKey"), would there be a way using struts/another tag library (not customized) to print out this value - something like:
    <bean:write name="item" property="key" key="sampleKey">
    I hope this makes sense (obviously i'm pretty new to this stuff) - any help is greatly appreciated.
    Tks,
    Broseed

    Do you mean something like this:
    <%@page contentType="text/html"%>
    <%@taglib uri="/tagstrutsbean" prefix="bean"%>
    <html>
    <head><title>JSP Page</title></head>
    <body>
    <%-- Set up test data --%>
    <% java.util.Map map = new java.util.HashMap();
    map.put("key1", "value1");
    map.put("key2", "value2");
    request.setAttribute("mymap", map);
    %>
    <%-- Write map value to Writer --%>
    Value is: <bean:write name="mymap"  property='key2' />
    </body>
    </html>

  • ResultSet in combo with JSP tag

    Hi,
    according to MVC, I use an EJB to get data from database and then I make it available to JSP page through a servlet.
    In my JSP page I'd want to show my data using a code like this:
    <select name="profile">
    <c:forEach var="profileString" items="${lstProfile}" >
              <option>${lstProfile}</option>
    </c:forEach>
    </select>where lstProfile is an ArrayList<String> containing my query result (in my EJB I have converted the resultset to an ArrayList<String> ).
    But I'm not able to make this code run: is it a correct way to achieve this result? Is it correct converting ResultSet in ArrayList or it's more convenient converting it in anything else? How can correct the code I have reported?
    Thanks,
    Matteo

    I've found the solution: http://forums.sun.com/thread.jspa?threadID=679283
    Sorry for this double topic.

  • I can't use JSP tags lib in IWS6

    I was trying to use JSP tags lib but the web server doesn't find the *.tld file. Some messages are shown:
    25/Jun/2002:19:40:28] info ( 5604): JSP: JSP1x compiler threw exception
    org.apache.jasper.compiler.CompileException: /local/iplanet/docs/menu_principal.jsp(1,0) Unable to open taglibrary http://apache.org/taglibs/dbtags : Could not locate TLD http://apache.org/taglibs/dbtags
    at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:707)
    at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:110)
    at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
    at org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
    at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
    at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:218)
    at com.iplanet.server.http.servlet.NSServletEntity.load(NSServletEntity.java:252)
    at com.iplanet.server.http.servlet.NSServletEntity.update(NSServletEntity.java:173)
    at com.iplanet.server.http.servlet.NSServletRunner.Service(NSServletRunner.java:416)
    [25/Jun/2002:19:40:28] warning ( 5604): Internal error: Failed to get GenericServlet. (uri=/menu_principal.jsp,SCRIPT_NAME=/menu_principal.jsp)
    I have some doubts about how to work with JSP Tags in iws6. What should I do to get this work?
    The tag lib is gotten from jakarta project and I'd like to know which steps i have to follow.
    Thank you very much

    Hi,
    What you have to do is this:
    - Include the jar file in the WEB-INF/lib
    - Include the tld file in a directory under WEB-INF, for example tlds
    - Create a mapping in the deployment descriptor (web.xml), to make the taglib available, something like this:
    <taglib>
    <taglib-uri>http://jakarta.apache.org/taglibs/io</taglib-uri>
    <taglib-location>/WEB-INF/tlds/io.tld</taglib-location>
    </taglib>
    Then in the jsp, you have to invoke it like this:
    <%@ taglib uri="http://jakarta.apache.org/taglibs/io" prefix="io" %>
    <io:http url="http://mustang:4004/NASApp/fortune/fortune" action="GET"/>
    Hope this helps
    Juan

  • Can't create dynamic html elements with jsp????? important

    Hi All,
    I am having problem creating dynamic html elements with jsp tags, i have tried to use EL and java scriplet, both of them don't work.
    i am trying to create dynamic menu in my "rightMenu.jspf", based on, if user has logged in or not.
    some like this!
    <jsp:if test ="${validUser == null}">
    some simple text menu here
    </jsp:if>
    but it is not working. it simply loading all and images with in statement, regardless of whether user has logged in or not. i think some how if statement is not working properly.
    "validUser" is a session bean, which is not creating at this point, it will created when user will log in successfully. and also this session bean does not exist at the page, where i am trying to check that .
    Is there any way to create dynamic values in jsp. It is really important, is there any body who help me in this matter. i would be really grateful.
    zaman

    hi jaspre,
    thanks for replying me. you know what, is it not something wrong with web.xml file. i remember once, i deleted some from there, a property with "*.jsp". i can't remember what exactly was it though.
    all if statements works on files ending with extension ".jsp" but don't work only on with extension ".jspf". there must be to do with this.
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <servlet>
    <servlet-name>ValidateServlet</servlet-name>
    <servlet-class>ValidateServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ValidateServlet</servlet-name>
    <url-pattern>/ValidateServlet</url-pattern>
    </servlet-mapping>
    <servlet>
    <servlet-name>dwr-invoker</servlet-name>
    <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
    <init-param>
    <param-name>debug</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>pollAndCometEnabled</param-name>
    <param-value>true</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>dwr-invoker</servlet-name>
    <url-pattern>/dwr/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
         <welcome-file>
    main.jsp
    </welcome-file>
    </welcome-file-list>
    </web-app>
    if any one can figure it out. i would be grateful.
    zaman

  • Error developing iViews in Java

    Hi @ all,
    I'm trying to develop iViews with Java. After connecting to the BW I try to get the content from different tables. But I always get this error message:
    java.lang.ClassCastException: com.sapportals.connectors.SAPCFConnector.connection.BWConnectorConnection incompatible with com.sap.ip.bi.sdk.dac.connector.IBIConnection
    This happens at the last line of the code. "IBIRelational....."
    IConnectorGatewayService cgService = (IConnectorGatewayService)PortalRuntime.getRuntimeResources    ().getService(IConnectorService.KEY);
    ConnectionProperties cp = new ConnectionProperties(request.getLocale(), request.getUser());   
    try {
          connection = cgService.getConnection(jdbcSystem, cp);                         
          IBIRelational rel =((IBIConnection)connection).getRelational();
    Can someone help me plz?
    And can someone tell me if I'm on the right way.
    Thx

    Above problem is solved .I found the missing jar file.
    But now I am having a following error:
    oracle.dmt.odm.ODMException: Exception in Java stored procedure: "It is failed.
    Failure Description: ORA-00942: table or view does not exist
    I am using 'sys as sysdba' username for connecting.I am able to build but i could not apply the model even from oracle data miner.
    Thanks.
    Prabesh Shrestha

  • Problems in developing custom JSP tags

    I have problems in debugging custom JSP tags. Sometimes the doStartTag is not called on tags but the doEndTag is called. I don't know why.
    Thanks.

    Fahr--
    A word of caution -- NetUI did not ship a JSP tag SDK in 8.x, and
    we're making no compatibility guarantees for custom JSP tags written on
    the 8.x release and future releases.
    You can accomplish the same sort of functionality with a combination
    of the <netui-data:getData> tag and JSTL 1.0. This solution would
    probably provide similar functionality and be more future-proof relative
    to JSTL and the NetUI tags currently being developed in Beehive.
    Hope that helps.
    Eddie
    Fahr Vegnugen wrote:
    We are in the midst of creating our own JSP tags to work with datasources.
    In an example where you would need to compare two different datasources how would you do this?
    ie.
    <prefix:isGreater dataSource="{pageflow.column1}" dataSourceToCompare="{pageFlow.column2}" />
    How would I evaluate what column2 is since the tag will only resolve one data source
    this.evaluateDataSource();
    Any pointers you can provide would be appreciated, or if there is a library of jsp tags that evaluate objects using datasources already created, that would even be better.

  • Register 12 VerifyError exception when compiling jsp with that jsp tag!

              Hi everybody,
              We implemented a tag which is charged with a simple task like just "out.println"s,
              on production with WL5.1 SP11,jdk1.2.
              Then we got java.lang.VerifyError exception which is also denoted at Giuseppe Madonna's
              mail on ( http://newsgroups2.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.jsp&item=6834&utag=
              ) that "java.lang.VerifyError: Register 12 contains wrong type"
              To be able to find the inconsistency in class files denoted at VerifyError exception,
              we delete the tmp dir. of web app resides in a war.
              Also the related java beans used in jsp tag and related jsp, are in a jar on our
              classpath and .tld file resides in the .war file of our web application.
              But also, I must define that it is our first tag implemented after we migrate to
              the .war file after the web application directory structure of same application(that
              old dir. also deleted), I know it is silly but, is it possible that WL can now refer
              to something related our previous directory structure of our app. like that old .tld
              file or classes?
              Or may it be related with the difference between jdk versions on the test and the
              production server?
              Any help will be really appreciated..
              Many thanks,
              Banu
              

              Start up weblogic with -
              java -noverify ....
              Mike
              "banu" <[email protected]> wrote:
              >
              >Hi everybody,
              >We implemented a tag which is charged with a simple task like just "out.println"s,
              >on production with WL5.1 SP11,jdk1.2.
              >
              >Then we got java.lang.VerifyError exception which is also denoted at Giuseppe
              >Madonna's
              >mail on ( http://newsgroups2.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.jsp&item=6834&utag=
              >) that "java.lang.VerifyError: Register 12 contains wrong type"
              >
              >To be able to find the inconsistency in class files denoted at VerifyError
              >exception,
              >we delete the tmp dir. of web app resides in a war.
              >
              >Also the related java beans used in jsp tag and related jsp, are in a jar
              >on our
              >classpath and .tld file resides in the .war file of our web application.
              >
              >But also, I must define that it is our first tag implemented after we migrate
              >to
              >the .war file after the web application directory structure of same application(that
              >old dir. also deleted), I know it is silly but, is it possible that WL can
              >now refer
              >to something related our previous directory structure of our app. like that
              >old .tld
              >file or classes?
              >
              >Or may it be related with the difference between jdk versions on the test
              >and the
              >production server?
              >
              >
              >Any help will be really appreciated..
              >Many thanks,
              >Banu
              >
              

  • JSP Tag libs with struts Urgent

    Hi
    Has anyone implemanted jsp tag libs with the help of struts-bean.tld,struts-html.tld etc,
    I need to use these , but I am not clear with how the page retrives the key values
    example:
    table width="400" cellpadding="10" cellspacing="0" border="0" bgcolor="#cccccc">
    <tr>
    <td valign="top" colspan="2">
    <bean:message key="logon.welcome"/>
    <html:errors/>
    </td>
    </tr>
    <tr>
    <bean:message key="logon.welcome"/>----?
    I don't no how the"message bean" gets its key value dynamically? how it retrieves from its Application resource file? any idea?
    Also has anyone implemanted jsp templates if so kindly guide me thru these
    thanks!

    Hi..
    I am myself involved in implementing custom taglibs extending struts functionality. This can be done by extending the struts base classes and tag handlers. If you're still working on this topic, please let me know and we might share experiences.
    Best regards,.
    - Bj�rn Syse, [email protected]
    Hi
    Has anyone implemanted jsp tag libs with the help of
    struts-bean.tld,struts-html.tld etc,
    I need to use these , but I am not clear with how the
    page retrives the key values
    example:
    table width="400" cellpadding="10" cellspacing="0"
    border="0" bgcolor="#cccccc">
    <tr>
    <td valign="top" colspan="2">
    <bean:message key="logon.welcome"/>
    <html:errors/>
    </td>
    </tr>
    <tr>
    <bean:message key="logon.welcome"/>----?
    I don't no how the"message bean" gets its key value
    dynamically? how it retrieves from its Application
    resource file? any idea?
    Also has anyone implemanted jsp templates if so
    kindly guide me thru these
    thanks!

  • Error while running JSP with custom tag

    I am trying to run a jsp with a tag and I am getting the following error when I run the jsp:
    "Unable to open taglibrary /WEB-INF/jsp/mytaglib.tld : Parse Error in the tag library descriptor: External parameter entity "%(DOCTYPE);" has characters after markup."
    I have no idea what this is, can anyone help me here?
    tx
    -AB

    Its difficult to tell without looking at your TLD file i.e. mytaglib.tld
    However, a guess is that you may be refering to an invalid or otherwise corrupted DTD from your TLD.
    Check that out.
    The official DTD for TLDs in JSP 1.1 is http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd
    and the official DTD for TLDs in JSP 1.2 is http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd

  • Can't get out.print to work with XML jsp tags

    <jsp:scriptlet>
    if(ErrorTrap == true) {
         out.println("<tr><td colspan=\"center\" align=\"center\">There was" an error while processing the form</td></tr>");
         ErrorTrap = false;
    </jsp:scriptlet>
    I can't get this script to work with the XML stype jsp tags. It keeps telling me the <jsp> tags are untermintaed. Is there a special trick to fix this or do I have to use the non-XML type tags?

    Sorry, I didn't mean to put the extra " in the out.println text string. :-/

Maybe you are looking for

  • PDF Preview in Outlook 2007 not working

    Hello, I have Acrobat Pro 8.1.2 installed and for the life of me, I cannot get the pdf previewer to work in Outlook. All I get when I click on a pdf in outlook is the message: "This file cannot be previewed because there is no previewer installed for

  • How to add check box to the forms in scripts

    Hello experts,          i got one requirement. to add a check box to the form. how can we add a check box in form. is it possible to adda check box in scripts? thanks in advance.

  • Lyrics and artwork widget

    I'm after a lyrics and artwork lyric that embeds into the MP3 files. I'm on ML v10.8.2, and used to use Amazon Art downloader and the lyrics widget Tunestext, but they both now dont work Does anyone know of any that do? I know that iTunes downloads a

  • External drive not letting go

    I tend to turn on my external hard drive to backup my data at the end of my work day using Silverkeeper. When the backup is done, I try to eject the two partitions I've created on the drive so that I can turn it off. Regularly, however, the system cl

  • Auto Select Available Shipping Options

    After a user enters a zip code they must choose an Available Shipping Options. In my case I am only offering one shipping option and would prefer this to be auto-selected for them to ease the process. I have attempted the following code but it did no