Servlet Spec violation

          From the servlet 2.2 spec, section 7.1, for session tracking, the url rewriting
          should using ";jsessionid" and cookie name should be "JSESSIONID", but the weblogic
          is using "?WebLogicSession". Should that be considered as violation of the spec
          Thanks!
          weicong
          http://www.geocities.com/wweicong
          

          I set the cookie name to JSESSIONID in weblogic.properties
          so I can sleep at night.
          Mike
          "WEICONG WANG" <[email protected]> wrote:
          >
          >From the servlet 2.2 spec, section 7.1, for session tracking, the url
          >rewriting
          >should using ";jsessionid" and cookie name should be "JSESSIONID", but
          >the weblogic
          >is using "?WebLogicSession". Should that be considered as violation of
          >the spec
          >?
          >
          >Thanks!
          >
          >weicong
          >
          >http://www.geocities.com/wweicong
          

Similar Messages

  • Getting EJB spec violation error - please help

    I'm getting following error while trying to deploy my stateless SB.
    17:13:30,399 WARN [verifier] EJB spec violation:
    Bean : UnifiedMsg
    Method : public abstract UnifiedMsg create() throws CreateException, RemoteExcep
    tion
    Section: 7.10.6
    Warning: The method return values in the home interface must be of valid types f
    or RMI/IIOP.
    17:13:30,399 ERROR [MainDeployer] could not create deployment: file:/C:/AddOnPkg
    /jboss-3.2.5/server/all/deploy/webmail_ejb_session_umm.jar
    org.jboss.deployment.DeploymentException: Verification of Enterprise Beans faile
    d, see above for error messages.
    at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:517)
    at org.jboss.deployment.MainDeployer.create(MainDeployer.java:790)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:644)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
    at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    I've double check the section 7.10.6 requiremnts and do not find anything wrong. Stuck at this from many days,PLEASE HELP
    SB home interface is as follow:
    import java.util.*;
    import javax.ejb.*;
    import java.rmi.*;
    public interface UnifiedMsgHome extends EJBHome {
    public UnifiedMsg create() throws CreateException, RemoteException;

    Hai,
    My dear friends, I am getting some problem. In my system only. mean. I am getting from the CVS and as our batch file i am deploying. I thing, this problem i am only getting in my team. By givein this error. i repleace the JBoss server from my backup softwares. Even it is giving same error. three of our team also check the bug, but not able to resolve. Let me know any external errors instemd of ejb method errors. because it is working in the other systems.
    the bug details:
    14:20:56,717 INFO [EARDeployer] Init J2EE application: file:/D:/jboss-4.0.2/server/default/deploy/matrix.ear
    14:21:02,530 WARN [verifier] EJB spec violation:
    Bean : AddressManagerSessionBean
    Section: 22.2
    Warning: The Bean Provider must specify the fully-qualified name of the Java class that implements the enterprise bean's busines
    Info : Class not found on 'uk.ses.matrix.address.bean.AddressManagerSessionBean': Unexpected error during load of: uk.ses.matr
    14:21:02,530 WARN [verifier] EJB spec violation:
    Bean : ADMCustomerSessionBean
    Section: 22.2
    Warning: The Bean Provider must specify the fully-qualified name of the Java class that implements the enterprise bean's busines
    Info : Class not found on 'uk.ses.matrix.address.bean.ADMCustomerSessionBean': Unexpected error during load of: uk.ses.matrix.
    14:21:02,530 WARN [verifier] EJB spec violation:
    Bean : ADMServicePointSessionBean
    Section: 22.2
    14:21:02,608 ERROR [MainDeployer] could not create deployment: file:/D:/jboss-4.0.2/server/default/tmp/deploy/tmp17389matrix.ear
    org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
    at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:553)
    at org.jboss.deployment.MainDeployer.create(MainDeployer.java:918)
    at org.jboss.deployment.MainDeployer.create(MainDeployer.java:910)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:774)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
    at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    please give suggestions to solve this.

  • Where should I put Java Servlet Spec

    Dear all,
    I'm in the process of installing Oracle Application Express Listener where it needs Java Servlet Spec 2.3. I got the Spec downloaded, but I don't know where should I put it. How come it's hard to find documentation about this? Please help....
    Currently I'm using Linux 64.
    Best regards,
    Val

    Oh,
    haha.. I just realized that....
    About System Requirements
    Oracle Application Express Listener system and space requirements are as follows:
          Oracle Database (Enterprise Edition, Standard Edition or Standard Edition One) release 10.2.0.3 or higher, or Oracle Database 10g Release 2 Express Edition or higher.
          Java 6 Update 20 JDK or higher.
          Java Servlet Specification 2.3 or higher.
          Web browser requirements:
              o
                Microsoft Internet Explorer 8.0 or higher.
              o
                Mozilla Firefox 3.0 or higher.
              o
                Google Chrome 2.0 or higher.

  • What version of servlet spec is WAS running?

    Hi!
    Can anyone tell me what version of the servlet spec WAS 6.40 SP12 is running?
    Thanks
    Alex.

    Hello Alex,
    From here http://help.sap.com/saphelp_webas630/helpdata/en/88/523e3ed87b561ee10000000a114084/content.htm
    +The Web components are:
    · Java Servlets – defined by Java Servlet Specification, version 2.3.
    · Java Server Pages (JSP pages) – defined by Java Server Pages Specification, version 1.2.
    +
    Best regards, Maksim Rashchynski.

  • DOM + servlet = sealing violation. Why?

    I use "JavaServer Web Development Kit (JSWDK) 1.0.1"
    ,JDK 1.3 and jaxp-1.1. The following code in servlet raise "java.lang.SecurityException: sealing violation
    ". Code:
    db = dbf.newDocumentBuilder();
    How to avoid this problem? I look a few similar questions, but no one suitable solution for me.
    Thanks.
    Max

    The reason a .jar file is sealed is to ensure that all class files in the jar come from that jar file.
    Basically the jaxp.jar and j2ee.jar file both contain the class files for the org.w3c.dom package. I believe j2ee.jar contains v1.0 of these classes. Since j2ee.jar contains multiple APIs, it may become neccessary to replace one API with a newer version. Sealing the .jar file of the new API ensures that only those classes in the .jar file (current version) are loaded from that jar file.
    If you place the JAXP .jar files (jaxp, xalan, crimson) before the j2ee.jar file in your classpath, this problem will go away. Doing this will replace the JAXP classes in the j2ee.jar file with those in the three JAXP jar files since they come first.
    If the order was j2ee.jar THEN the jaxp jars, the jaxp classes in the j2ee.jar file (old version) would be loaded, then any new classes would be loaded from the jaxp jars. This leaves open the possibility for mismatched class versions in the same API (if JAXP contained new classes or versions). This is why the jar file is sealed.
    Hope this helps.

  • Clarification of Servlet Spec for forwarding and filters

    Hi everybody,
    I'm having a problem trying to use SiteMesh in WebLogic 9.1 vs Tomcat 5.5.17. The issue seems to come up because the two containers have different behavior when it comes to forwarding and filters.
    The scenario is this: A request comes in to a servlet, that servlet forwards to a JSP page using RequestDispatcher.forward(). The SiteMesh filter looks at request.getServletPath() after the chain has executed and determines whether or not to apply the decoration based on the path of the page. The filter's doFilter() method looks something like :
    chain.doFilter(request, response)
    if(request.getServletPath() = matchingPath)
        applyDecoration();
    }Now, in Tomcat, a call to request.getServletPath() before and after the call to chain.doFilter() returns the exact same thing, regardless of whether the target servlet executes a forward. But in WebLogic, the call to getServletPath() after chain.doFilter() returns the forwarded path, not the original path.
    Who is right? Or is this one of those gray areas?
    Thanks,
    Scott

    Thanks for the info. You are correct, I was using 'forward'. I changed it to use 'sendRedirect' and this time the request goes via the filter. However, the request parameters that were in the original request have disappeared after the 'sendRedirect'. I could just add all the request parameters to the string I pass to sendredirect but was wondering if there was a better/simpler way.
    Thanks,
    Paul

  • Please explain servlet spec portion

    Hi all,
    In section SRV 8.3(Include method) of Servlet specification v2.3 it is said that
    "It can only write information to the ServletOutputStream or Writer of the response object and commit a response by writing content past the end of the response buffer, or by explicitly calling the flushBuffer method of the ServletResponse interface."
    Does this mean that an included servlet must explicitly call flushBuffer method or its output must exceed the buffer size to send the output to client ?.
    Does the end of the service method automatically flushes the output ?

    The full quote:
    The target servlet of the include method has access to all aspects of the request
    object, but its use of the response object is more limited:
    It can only write information to the ServletOutputStream or Writer of the
    response object and commit a response by writing content past the end of the
    response buffer, or by explicitly calling the flushBuffer method of the
    ServletResponse interface. It cannot set headers or call any method that affects
    the headers of the response. Any attempt to do so must be ignored.
    Does this mean that an included servlet must explicitly call flushBuffer method or its output must exceed the buffer size to send the output to client ?. I think what it means is that it should avoid flushing the buffer it at all possible.
    I think the reasoning behind this is that the responsibility for flushing the buffer/commiting the response should be with the including servlet, not the included one.
    Most of the time, the including servlet passes its own response object to the included servlet.
    The included servlet shouldn't automatically commit its output, because the servlet including it might want to veto it and send something different. So it should only flush the buffer when it has no choice - ie when it has no more room in the buffer, or the programmer tells it to explicitly.
    This leaves as much control of the response as possible with the including servlet.

  • Servlet Spec 2.5  && 3.0  pdf Location

    Hi,
    I have been trying to locate Servlet 2.5 and 3.0 pdf location; i get to a site which gives me javadocs and not the pdf document ... Am i missing something ?
    Regards
    Vyas, Anirudh

    I entered the tag libs in the web.xml
    <taglib>
              <taglib-uri>c</taglib-uri>
              <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
         </taglib>
         <taglib>
              <taglib-uri>fmt</taglib-uri>
              <taglib-location>/WEB-INF/tld/fmt.tld</taglib-location>
         </taglib>
         <taglib>
              <taglib-uri>fn</taglib-uri>
              <taglib-location>/WEB-INF/tld/fn.tld</taglib-location>
         </taglib>and use this uri for the tags....
    NOW: <%@ taglib uri="c" prefix="c" %>
    BEFORE: <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    and it works...

  • Global data in a servlet using iPlanet Web Server

    Our configuration is an Applet->Servlet->JNI->C/C++ code.
    We have C code that does a number of lengthy mathematical calculations. This C code not only uses its own global variables but, it is also comprised of numerous subroutines that all call each other, reading and writing global C variables as they go. These globals are all isolated to the C code shareable object (.so) library that is included using the LoadLibrary call when the servlet is initialized.
    The problem is that in a multi-user environment (3-5 simultaneous users) we need to have each user have their own "copy" of the servlet (and the C code) so that users will not be accessing each other's global data. We can NOT have only one copy of the C code and define it as synchronized because the calculations that are performed can take a very long time and we can not hold off user requests while the firs user finishes.
    Our hope is that there is a way to configure the iPlanet Web server such that each new user that starts up a copy of the Applet/Servlet combination will get their own "space" so that they can work independently of any other user. We have at most 20 users of this system and only 3-5 simultaneous users so we should not have a problem with memory or CPU speed.
    If anyone has a solution, I would greatly appreciate it!

    The C library is shareable. But you don't want it to be shared. That's your question summarized, isn't it?
    You probably can't prevent it from being shared, so to prevent multiple use of it you would have to queue up the requests to be done one at a time. WynEaston's suggestion of having the servlet implement SingleThreadModel would help, but I believe the servlet spec allows servers to run multiple copies of a servlet that does that (as opposed to running a single copy in multiple threads).
    Your other alternative is to rewrite the math in Java, or at least in some object-oriented language where you don't need global variables (which are the source of your problem). All right, I can already hear you saying "But that wouldn't be as fast!" Maybe not, but that isn't everything. Now you have a problem in queueing theory: do you want a single server that's fast, but jobs have to wait for it, or do you want multiple servers that aren't as fast, but jobs don't have to wait? That's a question you would have to evaluate based on the usage of your site, and it isn't an easy one.

  • How can I have a default servlet and an index.html?

    Hi,
    I writing a small webapp to test/understand the 2.2 Servlet Spec. I am deploying this as a WAR to Orion, Tomcat and Silverstream.
    The app's name is: "myapp"
    My application has an index.html, which is listed as the sole welcome-file in the welcome-file-list element in the app's web.xml.
    The interesting thing is that, after adding a default Servlet (<url-pattern>/</url-pattern>), I can no longer access the app's index.html either implicitly or explicitly:
    1. Implicit:
    - http://localhost/myapp
    - http://localhost/myapp/
    2. Explicit:
    - http://localhost/myapp/index.html
    - http://localhost/myapp/index.html/
    All of these invoke the Default Servlet in all 3 app servers.
    Question: How can I have both a default Servlet and an index page?
    Thanks in advance.
    Miles

    you can define it in the web.xml file
    look at the dtd, element "welcome-file-list"

  • Error loading servlet.jar

    I deployed a web application in tomcat server. I'm getting following error when starting the server
    WebappClassLoader: validateJarFile(D:\jakarta-tomcat-4.1.27\webapps\registeruser
    \WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2.
    Offending class: javax/servlet/Servlet.class

    I am trying to deploy a web application using Netbeans 6.1 but when I am running it I am getting the following errors:
    deployed with moduleid = S
    validateJarFile(/home/aadhya/sanju/S/build/web/WEB-INF/lib/servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
    ##### Error java.lang.ClassNotFoundException: com.mysql.Driver
    ##### Error java.lang.ClassNotFoundException: com.mysql.Driver
    Can any body please tell me how to solve this problem???
    I tried even by deleting servlet.jar from my application but still the same problem exists.
    Thanks & Regards,
    Sanjeev K
    Edited by: sanjeev.pk on Sep 2, 2008 3:35 PM

  • MIME Multipart/related to embed images in html files - Servlet

    Hello,
    My goal is to embed images in html/xhtml files to decrease latency when using slow networks. Think about mobile phones, if I have 10 images in one page, I will have 11 requests/responses to get the whole page.
    The solution would be to embed all images using Content-type multipart/related, so I have one request to the whole pack.
    How to do that in java? I mean, I need to set the content-type and build all parts encoding the images to base64.
    I tried JavaMail API, there I can build messages like this and instead of send an e-mail, I can write:
    myMimeMultipart.writeTo(response.getOutputStream());
    The problem is: I am getting everything as text in my browser, including the MIME headers of each part. Another think is that the first header (the main one) doesn't appear too.
    Any thoughts/other ideas?
    Thanks in advance,
    Andr� Carlucci

    If memory serves me right, I believe in the Servlet spec you have access to the Response object. You "should" be able to set any headers you need there. In addition, you can get the output streams just as you described.
    I did a similar thing, although slightly modified, to output dynamically-generated XLS (Excel Spreadsheet) files using a reporting engine called JasperReports. It wasn't a multipart response, however, so you may need to figure out how to handle that part of it, but in my case I set the mime-type header, then grabbed the output and started writing my XLS file too it. Once done, you close the streams and return the response. Worked perfect.

  • Using a custom tag with a 2.3 servlet descriptor BUG?

    Hi,
    I just developed a Custom Tag and I'd like to use in my jsps.
    If I add the jsp in my JDev project with the custom tag when I try to build the project I got this error:
    Error(11): oracle.xml.parser.v2.XMLParseException: Invalid element 'listener' in content of 'web-app', expected elements '[context-param, servlet, servlet-mapping, session-config, mime-mapping, welcome-file-list, error-page, taglib, resource-ref, security-constraint, login-config, security-role, env-entry, ejb-ref]'.
    It seems like when the jsp parser encounters the line with taglib it tries to parse the web.xml against a 2.2 version of the dtd. My web.xml begins with the correct dtd version (2.3). Can anyone tell me if this is a bug and eventually tell me how to solve it?
    thanks,
    Giovanni

    I repost this issue again, now with a simple test case.
    If I wrote a simple custom tag:
    import java.io.IOException;
    import javax.servlet.jsp.tagext.TagSupport;
    public class MyCustomTag extends TagSupport {
    public int doStartTag() {
    try {
    pageContext.getOut().print("FOO");
    } catch (IOException ioe) {
    pageContext.getServletContext().log(ioe.getMessage(),ioe);
    return(SKIP_BODY);
    with the associated tld:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.2</jspversion>
    <shortname>try</shortname>
    <uri>try</uri>
    <info>A short description...</info>
    <tag>
    <name>mytag</name>
    <tagclass>MyCustomTag</tagclass>
    <bodycontent>EMPTY</bodycontent>
    </tag>
    </taglib>
    and a jsp using the custom tag:
    <%@ page contentType="text/html;charset=windows-1252"%>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>
    Hello World
    </TITLE>
    </HEAD>
    <BODY>
    <H2>
    The current time is:
    </H2>
    <P>
    <% out.println((new java.util.Date()).toString()); %>
    <%@ taglib uri="try.tld" prefix="try" %>
    <try:mytag />
    </P>
    </BODY>
    </HTML>
    all runs fine if I have a web.xml with the dtd version 2.2
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
    <description>Empty web.xml file for Web Application</description>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    </web-app>
    but if I use the version 2.3 because I want filters,context listeners and so on:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
    <web-app>
    <description>Empty web.xml file for Web Application</description>
    <filter>
    <filter-name>FilterRedirector</filter-name>
    <filter-class>org.apache.cactus.server.FilterTestRedirector</filter-class>
    </filter>
    <!-- Filter Redirector URL mapping -->
    <filter-mapping>
    <filter-name>FilterRedirector</filter-name>
    <url-pattern>/FilterRedirector/</url-pattern>
    </filter-mapping>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    </web-app>
    I get the error I report in my last post. (the jsp doesn't compile) If I remove the custom tag from my jsp all works fine (filters, listeners,etc). In my project settings I use the 2.3 version of servlet.jar instead of the ServletRuntime that comes with JDeveloper.
    Can anyone tell me how to resolve this issue (Using simple custom tag with a web application using the 2.3 servlet specs)?
    Thanks in advance,
    Giovanni
    If I remove the filter secion all

  • Servlet 2.2 conformity of web-app deployment?

    Hi,
              I am having quite a bit of difficulty getting a standard Servlet 2.2 app
              that runs in Resin, Tomcat and Orion app server just fine, to work at all on
              WebLogic. Is there some sort of trick? I installed WebLogic 5.1 trial via
              the download on my Win2K box. I set the weblogic.properties to use a webApp.
              When I hit the web-app via html pages..its fine. When I try to display JSP
              pages I get problems. I then figured out that for some reason WebLogic
              couldn't find tools.jar to compile JSP pages, so I added that to my System
              Environment classpath. Why it needs to be set there..and its not
              automatically done by the install I don't know. It seems obvious to me that
              to display JSP pages they have to be compiled, so tools.jar is needed.
              Anyways, the pages started converting into .java files, but when compiling I
              am getting some compile-time errors and thus the .class isn't showing up.
              I have:
              weblogic.httpd.webApp.myapp=c:/applications/bm/www
              in weblogic.properties. I am not trying clustering yet, so this is just to
              deploy a single instance of weblogic to run our site. I also commented out
              the docRoot=/public or whatever the line is..since I only want to run a
              Servlet 2.2 web-app, not a simple web-site.
              Below is the output of the console. I am not sure why it is giving me a
              class loader error. I am going to try the SP4 patch, but for some reason the
              wlconfig utility doesn't change the settings that I keep applying to it. I
              am trying to add a path to the classpath with wlconfig.
              Anyways..if anyone can shed some light I would be much appreciated.
              Thank you.
              Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp: init
              Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp: param verbose
              ini
              tialized to: true
              Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp: param
              packagePref
              ix initialized to: jsp_servlet
              Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp: param
              compileComm
              and initialized to: javac
              Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp: param
              srcCompiler
              initialized to weblogic.jspc
              Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp: param
              superclass
              initialized to null
              Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp: param
              workingDir
              initialized to: C:\applications\bm\www\_tmp_war
              Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp: param
              pageCheckSe
              conds initialized to: 1
              Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp:
              initialization co
              mplete
              Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp:
              pageCheckSeconds over-ruled in JSPServlet to : 1
              Mon Aug 14 11:02:55 PDT 2000:<E> <ServletContext-myapp> error checking JSP
              'jsp_
              servlet._index' for freshness, forcing re-compile
              java.lang.LinkageError: Class javax/servlet/ServletConfig violates loader
              constr
              aints
              at java.lang.ClassLoader.defineClass0(Native Method)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:426)
              at
              weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
              ClassLoader.java:415)
              at
              weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
              cClassLoader.java:316)
              at
              weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader$Slave.
              loadClass(RecursiveReloadOnModifyClassLoader.java:234)
              at
              weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
              Loader.java:146)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
              at jsp_servlet._index._isStale(_index.java:45)
              at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:158)
              at
              weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
              java:164)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:99)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:123)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java:742)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java:686)
              at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
              ContextManager.java:247)
              at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
              a:361)
              at
              weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> Generated java file:
              C:\
              applications\bm\www\_tmp_war\jsp_servlet\_index.java
              Mon Aug 14 11:02:58 PDT 2000:<E> <ServletContext-myapp> Servlet failed with
              Exce
              ption
              java.lang.LinkageError: Class javax/servlet/ServletConfig violates loader
              constr
              aints
              at java.lang.ClassLoader.defineClass0(Native Method)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:426)
              at
              weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
              ClassLoader.java:415)
              at
              weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
              cClassLoader.java:316)
              at
              weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader$Slave.
              loadClass(RecursiveReloadOnModifyClassLoader.java:234)
              at
              weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
              Loader.java:146)
              at
              weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader.findLo
              calClass(RecursiveReloadOnModifyClassLoader.java:109)
              at
              weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
              cClassLoader.java:316)
              at
              weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
              Loader.java:172)
              at
              weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
              Loader.java:146)
              at weblogic.servlet.jsp.OneOffJspLoader.loadClass(JspStub.java:429)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
              at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
              at jsp_servlet._index._jspService(_index.java:58)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:105)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:123)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java:742)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java:686)
              at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
              ContextManager.java:247)
              at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
              a:361)
              at
              weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              

    Thanks. Playing with this now. The initial running does the same thing. I
              get the same ClassLoader problem. I sent you an email about editing these
              and I figured it out. Didn't find the .cmd files originally. Anyways,
              another problem I have..I had to set in the Win2K classpath the location of
              tools.jar. Is this not allowed to be distributed in the JRE? I am surprised
              if WebLogic (and other app servers too) need access to the javac compiler,
              why it is not part of JRE so they can access it. I set that in my
              environment. Are you saying I shouldn't need to set any environment
              variables..not to my WEB-INF\classes, \ib, or any JAVA dir? That instead I
              can just set it in the .cmd script to start the server?
              Lastly, I will need to run WebLogic as a service. I have a Java as NT
              service utility that works pretty easily..so can I just use that?
              Thanks.
              "Roberto Nanamura" <[email protected]> wrote in message
              news:[email protected]...
              > Hi Kevin,
              >
              > WebLogic should work just fine without setting any environment variables
              but
              > setting them in the startWebLogic.cmd script (I am supposing you are
              starting WL
              > through the command line). Look for the first lines in the
              startWebLogic.cmd
              > script like that:
              >
              > if "%JAVA_HOME%" == "" set JAVA_HOME=.\jre1_2\jre
              > set JAVA_HOME=.\jre1_2\jre
              >
              > And see if the JAVA_HOME is already set up and if the value is where your
              jre
              > 1.2 should be. That should take care of the 'tools.jar' problem.
              >
              > Try to run it again and see if the problem still persists.
              >
              > Hope this will help,
              >
              > Roberto N Nanamura
              > Technical Consultant
              > Summa Technologies
              >
              > Kevin Duffey wrote:
              > >
              > > Hi,
              > >
              > > I am having quite a bit of difficulty getting a standard Servlet 2.2 app
              > > that runs in Resin, Tomcat and Orion app server just fine, to work at
              all on
              > > WebLogic. Is there some sort of trick? I installed WebLogic 5.1 trial
              via
              > > the download on my Win2K box. I set the weblogic.properties to use a
              webApp.
              > > When I hit the web-app via html pages..its fine. When I try to display
              JSP
              > > pages I get problems. I then figured out that for some reason WebLogic
              > > couldn't find tools.jar to compile JSP pages, so I added that to my
              System
              > > Environment classpath. Why it needs to be set there..and its not
              > > automatically done by the install I don't know. It seems obvious to me
              that
              > > to display JSP pages they have to be compiled, so tools.jar is needed.
              > > Anyways, the pages started converting into .java files, but when
              compiling I
              > > am getting some compile-time errors and thus the .class isn't showing
              up.
              > >
              > > I have:
              > >
              > > weblogic.httpd.webApp.myapp=c:/applications/bm/www
              > >
              > > in weblogic.properties. I am not trying clustering yet, so this is just
              to
              > > deploy a single instance of weblogic to run our site. I also commented
              out
              > > the docRoot=/public or whatever the line is..since I only want to run a
              > > Servlet 2.2 web-app, not a simple web-site.
              > >
              > > Below is the output of the console. I am not sure why it is giving me a
              > > class loader error. I am going to try the SP4 patch, but for some reason
              the
              > > wlconfig utility doesn't change the settings that I keep applying to it.
              I
              > > am trying to add a path to the classpath with wlconfig.
              > >
              > > Anyways..if anyone can shed some light I would be much appreciated.
              > >
              > > Thank you.
              > >
              > > Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp: init
              > > Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp: param
              verbose
              > > ini
              > > tialized to: true
              > > Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp: param
              > > packagePref
              > > ix initialized to: jsp_servlet
              > > Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp: param
              > > compileComm
              > > and initialized to: javac
              > > Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp: param
              > > srcCompiler
              > > initialized to weblogic.jspc
              > > Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp: param
              > > superclass
              > > initialized to null
              > > Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp: param
              > > workingDir
              > > initialized to: C:\applications\bm\www\_tmp_war
              > > Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp: param
              > > pageCheckSe
              > > conds initialized to: 1
              > > Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp:
              > > initialization co
              > > mplete
              > > Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> *.jsp:
              > > ######
              > > ########
              > > ############
              > > ##############
              > > pageCheckSeconds over-ruled in JSPServlet to : 1
              > > ##############
              > > ############
              > > ########
              > > ######
              > >
              > > Mon Aug 14 11:02:55 PDT 2000:<E> <ServletContext-myapp> error checking
              JSP
              > > 'jsp_
              > > servlet._index' for freshness, forcing re-compile
              > > java.lang.LinkageError: Class javax/servlet/ServletConfig violates
              loader
              > > constr
              > > aints
              > > at java.lang.ClassLoader.defineClass0(Native Method)
              > > at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
              > > at java.lang.ClassLoader.defineClass(ClassLoader.java:426)
              > > at
              > > weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
              > > ClassLoader.java:415)
              > > at
              > > weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
              > > cClassLoader.java:316)
              > > at
              > > weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader$Slave.
              > > loadClass(RecursiveReloadOnModifyClassLoader.java:234)
              > > at
              > > weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
              > > Loader.java:146)
              > > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
              > > at jsp_servlet._index._isStale(_index.java:45)
              > > at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:158)
              > > at
              > > weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
              > > java:164)
              > > at
              > > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              > > pl.java:99)
              > > at
              > > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              > > pl.java:123)
              > > at
              > > weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              > > textImpl.java:742)
              > > at
              > > weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              > > textImpl.java:686)
              > > at
              > > weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
              > > ContextManager.java:247)
              > > at
              > > weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
              > > a:361)
              > > at
              > > weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
              > >
              > > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              > >
              > > Mon Aug 14 11:02:55 PDT 2000:<I> <ServletContext-myapp> Generated java
              file:
              > > C:\
              > > applications\bm\www\_tmp_war\jsp_servlet\_index.java
              > > Mon Aug 14 11:02:58 PDT 2000:<E> <ServletContext-myapp> Servlet failed
              with
              > > Exce
              > > ption
              > > java.lang.LinkageError: Class javax/servlet/ServletConfig violates
              loader
              > > constr
              > > aints
              > > at java.lang.ClassLoader.defineClass0(Native Method)
              > > at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
              > > at java.lang.ClassLoader.defineClass(ClassLoader.java:426)
              > > at
              > > weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
              > > ClassLoader.java:415)
              > > at
              > > weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
              > > cClassLoader.java:316)
              > > at
              > > weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader$Slave.
              > > loadClass(RecursiveReloadOnModifyClassLoader.java:234)
              > > at
              > > weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
              > > Loader.java:146)
              > > at
              > > weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader.findLo
              > > calClass(RecursiveReloadOnModifyClassLoader.java:109)
              > > at
              > > weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
              > > cClassLoader.java:316)
              > > at
              > > weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
              > > Loader.java:172)
              > > at
              > > weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
              > > Loader.java:146)
              > > at
              weblogic.servlet.jsp.OneOffJspLoader.loadClass(JspStub.java:429)
              > > at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
              > > at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
              > > at jsp_servlet._index._jspService(_index.java:58)
              > > at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              > > at
              > > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              > > pl.java:105)
              > > at
              > > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              > > pl.java:123)
              > > at
              > > weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              > > textImpl.java:742)
              > > at
              > > weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              > > textImpl.java:686)
              > > at
              > > weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
              > > ContextManager.java:247)
              > > at
              > > weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
              > > a:361)
              > > at
              > > weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
              > >
              > > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              

  • Servlets and JNI

    Hi,
    We have a C library which does financial computations and some of our customers have expressed the need to access our library from their servlets.
    This is why we have developed a JNI wrapper which encapsulates all functionality of our library.
    Now, do the specs allow using JNI in conjunction with servlets? I've studied the Java EE, JSP and servlet specs but JNI isn't mentioned anywhere...
    I've also found this thread with a quite similar question but without a clear answer whether it's allowed or not.
    -- Vincent

    yes, if the server's security policy allows it. In a basic server environment you can do just about anything you can do in a regular java application.

Maybe you are looking for