JSP and Service on EP 6.0 SP7

Hi,
I can't import my service into my JSP, I have the following error :
Error in executing a process for compilation, F:/usr/sap/NW4/JC00/j2ee/cluster/server0/apps/sap.com/irj/servlet_jsp/irj/root/web-inf/portal/portalapps/appli2menu/work/pagelet/_sapportalsjsp_appli2.java:17: '.' expected import ServiceJW; ^ 1 error .
Exception id: 04:52_28/10/04_0033_3928950
I have modified the jsp.addclasspath in the file workplace.proporties (this variable was empty before i assign it) but I have always the same error...
Somebody could help me ?
Best regards,
Denis

Hi, seems like there's some typo in your jsp. Check the .java file listed with a java editor (like eclipse or devstudio.). Maybe you'll find the typo this way faster.
Most often, a multiline page import hampers jsp compilation,
e.g.
<%@page import="java.util.List,
                java.util.Map"%>
needs to be
<%@page import="java.util.List,java.util.Map"%>
Regards,
Armin

Similar Messages

  • Tomcat JSP HTTP Services, BlazeDS and AMF Help Understanding This in Cairngorm

    Hi
    I have an existing Tomcat application using JSPs and a Flex Client that uses HTTPService (Cairngorm). Can we use BlazeDS to access these JSPs over AMF? How might that work in Cairngorm.
    Thanks

    There may be other ways to do this but here's what I would do:
    1) add a results method to the remote object:
    src.result="onResult(event.result)";
    2) add the callback method: private function onResult(event : * = null)
    :void{
                                                         if(event is
    ArrayCollection)
                                                                myData =
    ArrayCollection(event);
    3) add the variable: private var myData:ArrayCollection;
    4) make the dataProvider for the grid use the my data :
    dataProvider=""
    You can probably avoid all this by adjusting your dataProvider. I am just
    not sure what it would be without experimenting. But definitely not what
    you have. Maybe just {svc.result}.

  • Domain Object and Service oriented pattern

    We have J2EE based application with following components, we are facing some issues with existing system.
    Current System : We have J2EE based application. The following is the flow.
    Client Layer [including JSP, Struts ]&#61664; action classes &#61664; Delegates &#61664; Session fa�ade [Session bean] &#61664; DAO&#61664; EJBDAO &#61664; EJB. We use CMP, xDoclets , JBOSS.
    1.     Our Domain objects are heavy. I know they are suppose to be coarse objects but they take more time in loading. Also, we noticed one thing that lot of methods are called during Domain Object creation process and it takes lot of time in loading. Actually, we dont really know what is happening as we are using CMPs.
    Question :
    -     Any input on what can be done to avoid Domain object excessive loading time.
    -     Anyone can share there experiences with Domain objects. Are you facing issues related with performance.
    -     We dont use DTO, we pass domain objects between. Do you see any problem in doing that.
    2.     Currently, our system was used by one single front end or lets say we have only one client but soon we will have more clients using it.
    Question :
    -     What should be our design approach. How can we make our system more like service oriented. If the two clients demand different business logic then how it will be handled. Business logic common to all the clients will be handled by which layer and business logic specific to client will be handles by which layer.
    -     Please suggest based on our existing infrastructure. We don�t want to use SOAP or cannot make drastic changes to our flow.
    We have domain and services in the same package and we are doing the refactoring of code, your inputs will be valuable.
    Thanks
    Sandipan

    What type of logger do you use and what is the loger-level during production?
    If it is log4j set the logger to level INFO or WARN.
    This might sound trivia but can make a difference between 20seconds and 500 ms.

  • Communication between jsp and abstractportalcomponent

    Hello All
    Communication between jsp and abstractPortalComponent.
    jsp contains one input text field and one submit button.
    when the user clicks on submit button it will call the component and that input value will
    display in same jsp page.
    how this communication will happen?
    Rgrds
    Sri

    Hi Srikanth,
    In the JAVA File, 
    OnSubmit Event,
    String inputvalue ;
    InputField myInputField = (InputField) getComponentByName("Input_Field_ID");
    if (myInputField != null) {
                   inputvalue = myInputField.getValueAsDataType().toString();
    request.putValue("textvalue", inputvalue);
    request is IPORTALCOMPONENTREQUEST Object.
    In JSP File,   to retreive the value,
    <%
    String  textstring = (String) ComponentRequest.getValue("textvalue");
    %>
    In PORTALAPP.XML File,
    <component name="component name">
          <component-config>
            <property name="ClassName" value="classname"/>
            <property name="SafetyLevel" value="no_safety"/>
          </component-config>
          <component-profile>
            <property name="tagLib" value="/SERVICE/htmlb/taglib/htmlb.tld"/>
          </component-profile>
        </component>
    Using the code above, You can pass and read values between abstract portal component and Jsp Page.
    Instead of this, I suggest you to use JSPDYNPAGE Component for Data Exchange.
    Check the [Link|http://help.sap.com/saphelp_nw2004s/helpdata/de/ce/e0a341354ca309e10000000a155106/frameset.htm].
    Hope this helps you.
    Regards,
    Eben Joyson

  • Deploying a WAR file containing .jsp and servlets (also uses JNI)

    Deploying a WAR file containing .jsp and servlets (also uses JNI) on Windows 2000
    We had problems making it initially work on Sun ONE Web Server 6.0 Service Pack 1 because of lack of good iPlanet Web
    Server documentation on deploying such files.
    This is how we went about it:
    1) Make one of the servlet and JSP (must call another Java Class) web application (.war) examples work with iPlanet Web
    Server.
    C:\iPlanet\Servers\plugins\servlets\examples\web-apps\HelloWorld\HelloWorld.war
    and
    C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    a) Go to your Web Server Administration to deploy the application using GUI Web Application Deploy.
    (We usually use command line, we experienced some issues with the GUI version, but maybe it is fixed in the new Web Server
    service packs)
    From browser, open http://yourserver:8888/
    Click on Select a Server:Manage
    Click on Virtual Server Class
    Click on https-yourserver
    Click on the Web Applications Tab
    Then, click on Deploy Web Application
    Enter the following -
    WAR File On: Local
    WAR File Path: C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    Application URI: /jakarta
    Installation Directory: c:\iPlanet\examples\jakarta-examples
    By clicking on OK it deployed the application.
    I can verify that it is deployed by selecting "Edit Web Applications" and I see the following entry:
    Edit     /jakarta     c:/iPlanet/examples/jakarta-examples
    Also, c:/iPlanet/examples/jakarta-examples should have the similar following directory structure ..
    - [images]
    - [jsp]
    - index.html
    - [servlets]
    - [META-INF]
    - [WEB-INF]
    - [classes]
    - [tlds]
    - web.xml
    - index.html
    I restarted the server and accessed it using the following URL from my IE browser:
    http://yourserver/jakarta/index.html
    Then I clicked on the JSP Examples and tried some JSP examples.
    b) Alternatively, you can also deploy the same example from the command-line.
    Make sure C:\iPlanet\Servers\bin\https\httpadmin\bin\ is in your path
    wdeploy deploy      -u /jakarta
              -i yourserver
              -v https-yourserver
              -d c:\iplanet\examples\jakarta-examples
              C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    Restart the web server (I don't think you have to restart, but .. might as well).
    2)Deploy your web-application
    My Foo.war has the following structure.
    You can use jar tf Foo.war to look at the file contents from command line (assuming you have JDK installed and the bin is
    in your PATH)
    Foo.war
    - [META-INF]
    - [WEB-INF]
    - web.xml
    - [classes]
    - Bar.class
    - MoServlet.class
    - [lib]
    - ThirdParty.jar
    - [natlib]
    - extlib.dll
    - foo.jsp
    Here is our application scenario:
    foo.jsp uses a class call Bar (it is not in any package). The Bar java class uses classes from ThirdParty.jar. The
    ThirdParty.jar in turn uses JNI to load library extlib.dll. foo.jsp also calls /servlet/Mo as well.
    Now to deploy it, do the following:
    (a) Make sure that within foo.jsp, you import the Bar class ( I don't know why you have to do it, but if you don't you get
    JSP compile error).
    <%@page language="java" import="Bar" contentType="text/html"%>
    (b) Check web.xml (for Servlets)
    Within web.xml, make sure you have the following mappings:
    <servlet>
    <servlet-name> MoLink </servlet-name>
    <servlet-class> MoServlet </servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name> MoLink </servlet-name>
    <url-pattern> /servlet/Mo </url-pattern>
    </servlet-mapping>
    (c) Deploy the application
    Using command line:
    wdeploy deploy      -u /foo
              -i yourserver
              -v https-yourserver
              -d c:\iplanet\examples\foo-dir
              Foo.war
    (d) Change web-apps.xml file (for picking up ThirdParty.jar)
    It is located in
    C:\iPlanet\Servers\https-yourserver\config
    You should see something similar to following after successful deployment.
    <web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true"/>
    Change it to look like following to pick up the ThirdParty.jar
    <web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true">
    <class-loader reload-interval="300"
              classpath="C:/iPlanet/examples/foo-dir/WEB-INF/lib/ThirdParty.jar"
              delegate="false"/>
    </web-app>
    (e) Change jvm12.conf file (for JNI)
    It is located in
    C:\iPlanet\Servers\https-yourserver\config
    Add or uncomment the following lines:
    #optional - just helps with instrumenting the jsp and servlet code
    jvm.include.CLASSPATH=1
    jvm.enableDebug=1
    nes.jsp.enabledebug=1
    jvm.trace=7
    jvm.verboseMode=1
    #required for JNI
    java.compiler=NONE
    jvm.classpath=.;C:\JDK1.3.1\lib\tools.jar;C:/iPlanet/Servers/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jar;
    jvm.option=-Xrs
    jvm.option=-Xnoagent
    # not sure if this is needed for iPlanet web server
    jvm.option=-Djava.library.path=C:/iPlanet/examples/foo-dir/natlib/ -Djava.compiler=NONE
    (f) Change magnus.conf file (for JNI)
    We HAD to change this file in order for ThirdParty.jar file to pick up the native C++ code using JNI. Apparently, the
    iPlanet Web Server doesn't pick the Environment Variable Path. Because when we had the directory containing the DLL just
    in Path, it didn't work.
    Change Extrapath directive:
    ExtraPath C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
    to
    ExtraPath c:/iPlanet/examples/foo-dir/natlib;C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
    (g) Apply changes from the Web Server Administration Console and Restart the web server.
    You should be able to see the behaviour that you want from your application.
    http://yourserver/foo/foo.jsp
    Hope this was helpful!!!
    Sonu

    Deploying a WAR file containing .jsp and servlets (also uses JNI) on Windows 2000
    We had problems making it initially work on Sun ONE Web Server 6.0 Service Pack 1 because of lack of good iPlanet Web
    Server documentation on deploying such files.
    This is how we went about it:
    1) Make one of the servlet and JSP (must call another Java Class) web application (.war) examples work with iPlanet Web
    Server.
    C:\iPlanet\Servers\plugins\servlets\examples\web-apps\HelloWorld\HelloWorld.war
    and
    C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    a) Go to your Web Server Administration to deploy the application using GUI Web Application Deploy.
    (We usually use command line, we experienced some issues with the GUI version, but maybe it is fixed in the new Web Server
    service packs)
    From browser, open http://yourserver:8888/
    Click on Select a Server:Manage
    Click on Virtual Server Class
    Click on https-yourserver
    Click on the Web Applications Tab
    Then, click on Deploy Web Application
    Enter the following -
    WAR File On: Local
    WAR File Path: C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    Application URI: /jakarta
    Installation Directory: c:\iPlanet\examples\jakarta-examples
    By clicking on OK it deployed the application.
    I can verify that it is deployed by selecting "Edit Web Applications" and I see the following entry:
    Edit     /jakarta     c:/iPlanet/examples/jakarta-examples
    Also, c:/iPlanet/examples/jakarta-examples should have the similar following directory structure ..
    - [images]
    - [jsp]
    - index.html
    - [servlets]
    - [META-INF]
    - [WEB-INF]
    - [classes]
    - [tlds]
    - web.xml
    - index.html
    I restarted the server and accessed it using the following URL from my IE browser:
    http://yourserver/jakarta/index.html
    Then I clicked on the JSP Examples and tried some JSP examples.
    b) Alternatively, you can also deploy the same example from the command-line.
    Make sure C:\iPlanet\Servers\bin\https\httpadmin\bin\ is in your path
    wdeploy deploy      -u /jakarta
              -i yourserver
              -v https-yourserver
              -d c:\iplanet\examples\jakarta-examples
              C:\iPlanet\Servers\plugins\servlets\examples\web-apps\jakarta-examples\jarkarta-examples.war
    Restart the web server (I don't think you have to restart, but .. might as well).
    2)Deploy your web-application
    My Foo.war has the following structure.
    You can use jar tf Foo.war to look at the file contents from command line (assuming you have JDK installed and the bin is
    in your PATH)
    Foo.war
    - [META-INF]
    - [WEB-INF]
    - web.xml
    - [classes]
    - Bar.class
    - MoServlet.class
    - [lib]
    - ThirdParty.jar
    - [natlib]
    - extlib.dll
    - foo.jsp
    Here is our application scenario:
    foo.jsp uses a class call Bar (it is not in any package). The Bar java class uses classes from ThirdParty.jar. The
    ThirdParty.jar in turn uses JNI to load library extlib.dll. foo.jsp also calls /servlet/Mo as well.
    Now to deploy it, do the following:
    (a) Make sure that within foo.jsp, you import the Bar class ( I don't know why you have to do it, but if you don't you get
    JSP compile error).
    <%@page language="java" import="Bar" contentType="text/html"%>
    (b) Check web.xml (for Servlets)
    Within web.xml, make sure you have the following mappings:
    <servlet>
    <servlet-name> MoLink </servlet-name>
    <servlet-class> MoServlet </servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name> MoLink </servlet-name>
    <url-pattern> /servlet/Mo </url-pattern>
    </servlet-mapping>
    (c) Deploy the application
    Using command line:
    wdeploy deploy      -u /foo
              -i yourserver
              -v https-yourserver
              -d c:\iplanet\examples\foo-dir
              Foo.war
    (d) Change web-apps.xml file (for picking up ThirdParty.jar)
    It is located in
    C:\iPlanet\Servers\https-yourserver\config
    You should see something similar to following after successful deployment.
    <web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true"/>
    Change it to look like following to pick up the ThirdParty.jar
    <web-app uri="/foo" dir="C:\iPlanet\examples\foo-dir" enable="true">
    <class-loader reload-interval="300"
              classpath="C:/iPlanet/examples/foo-dir/WEB-INF/lib/ThirdParty.jar"
              delegate="false"/>
    </web-app>
    (e) Change jvm12.conf file (for JNI)
    It is located in
    C:\iPlanet\Servers\https-yourserver\config
    Add or uncomment the following lines:
    #optional - just helps with instrumenting the jsp and servlet code
    jvm.include.CLASSPATH=1
    jvm.enableDebug=1
    nes.jsp.enabledebug=1
    jvm.trace=7
    jvm.verboseMode=1
    #required for JNI
    java.compiler=NONE
    jvm.classpath=.;C:\JDK1.3.1\lib\tools.jar;C:/iPlanet/Servers/plugins/servlets/examples/legacy/beans.10/SDKBeans10.jar;
    jvm.option=-Xrs
    jvm.option=-Xnoagent
    # not sure if this is needed for iPlanet web server
    jvm.option=-Djava.library.path=C:/iPlanet/examples/foo-dir/natlib/ -Djava.compiler=NONE
    (f) Change magnus.conf file (for JNI)
    We HAD to change this file in order for ThirdParty.jar file to pick up the native C++ code using JNI. Apparently, the
    iPlanet Web Server doesn't pick the Environment Variable Path. Because when we had the directory containing the DLL just
    in Path, it didn't work.
    Change Extrapath directive:
    ExtraPath C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
    to
    ExtraPath c:/iPlanet/examples/foo-dir/natlib;C:/iPlanet/Servers/bin/https/bin;${NSES_JRE_RUNTIME_LIBPATH}
    (g) Apply changes from the Web Server Administration Console and Restart the web server.
    You should be able to see the behaviour that you want from your application.
    http://yourserver/foo/foo.jsp
    Hope this was helpful!!!
    Sonu

  • Character Encoding for JSPs and HTML forms

    After having read loads of postings on character encoding problems I'm still puzzled about the following problem:
    I have an instance (A) of WL 8.1 SP3 on a WinXP machine and another instance (B) of WL 8.1 without any SP on a Win2K machine. The underlying Windows locale is english(US) in both cases.
    The same application deployed as a war file to these instances does not behave in the same way when it comes to displaying non-Latin1-characters like the Euro symbol: Whereas (A) shows and accepts these characters as request-parameters, (B) does not.
    Since the war file is the same (weblogic.xml, jsps and everything), the reason for this must either be the service-pack-level or some other configuration setting I overlooked.
    Any hints are appreciated!

    Try this:
    Prefrences -> Content -> Fonts & Color -> Advanced
    At the bottom, choose your Encoding.

  • JSP and Tomcat Problem

    Folks,
    My apologies if this is off-topic for this forum, but I've been having this problem using Tomcat and JSP. I'm fairly new to Java.
    Basically, I'm writing a webapp that uses servlets and JSP together. The servlet and backend classes all compile fine. Now, basic frontend page is called Console.jsp, and one of the commands that it runs is <%@ page import="DJUser">
    Here's the problem: Console.jsp is in $CATALINA_HOME/webapp/
    DJUser (and the rest of the classes I'm using) are in $CATALINA_HOME/webapp/WEB-INF/classes
    When I attempt to run Console.jsp I get this error:
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    Generated servlet error:
    The import DJUser cannot be resolved
    An error occurred at line: 9 in the jsp file: /Console.jsp
    Generated servlet error:
    DJUser cannot be resolved to a type
    An error occurred at line: 11 in the jsp file: /Console.jsp
    Generated servlet error:
    user cannot be resolved
    An error occurred at line: 11 in the jsp file: /Console.jsp
    Generated servlet error:
    DJUser cannot be resolved to a type
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
         org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:409)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    The ROOT CAUSE is listed as:
    java.lang.ClassNotFoundException: org.apache.jsp.Console_jsp
         java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         java.security.AccessController.doPrivileged(Native Method)
         java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:133)
         org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:65)
         org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:596)
         org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:137)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    I'm running Tomcat 5.5.12 on Mac OS X 10.4. Could this be a permissions issue somehow? For right now (testing purposes only) I have tomcat running under my (non root) account.
    I've been scouring the web for a while, and I can't really find anything on this. I'd appreciate any help you could give me.
    Thanks!
    Dylan

    Put the DJUser java file in a package (say com.myClasses) and recompile. Then put the DJUser class file under the WEB-INF/classes directory in the proper package structure (WEB-INF/classes/com/myClasses/DJUser). Stop and restart the server to pick up the new classes. Make sure to change the jsp import statement ( <%@ page import="com.myClasses.DJUser">)

  • Help on JSP and Beans!

    Hi! I am new to JSP and I need help on how to utilize java bean on JSP. I have gone through this forum, I found similar question but did not find any answer that could solve my question. Tons of thanks to anyone who could help me out!
    I have a java bean class called Bean1, which I put under /ROOT/WEB-INF/classes/, and a JSP file that utilizes class Bean1, saved under /ROOT/, which should be a correct way indicated by several posts I found in this forum. But when I try to compile the JSP file over TOMCAT4.1 over http://localhost:8080/beanexample1.jsp, it throws me a lot of error messages (see below). I've been struggling for so long. Any help is greatly apprecitated! Thanks!
    Bo
    The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 0 in the jsp file: /beanexample1.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\beanexample1_jsp.java:41: cannot resolve symbol
    symbol : class Bean1
    location: class org.apache.jsp.beanexample1_jsp
    Bean1 bean1 = null;
    ^
    An error occurred at line: 0 in the jsp file: /beanexample1.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\beanexample1_jsp.java:43: cannot resolve symbol
    symbol : class Bean1
    location: class org.apache.jsp.beanexample1_jsp
    bean1 = (Bean1) pageContext.getAttribute("bean1", PageContext.PAGE_SCOPE);
    ^
    An error occurred at line: 0 in the jsp file: /beanexample1.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\beanexample1_jsp.java:46: cannot resolve symbol
    symbol : class Bean1
    location: class org.apache.jsp.beanexample1_jsp
    bean1 = (Bean1) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "Bean1");
    ^
    An error occurred at line: 13 in the jsp file: /beanexample1.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\beanexample1_jsp.java:66: cannot resolve symbol
    symbol : class Bean1
    location: class org.apache.jsp.beanexample1_jsp
    out.print(JspRuntimeLibrary.toString((((Bean1)pageContext.findAttribute("bean1")).getName())));
    ^
    An error occurred at line: 16 in the jsp file: /beanexample1.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\beanexample1_jsp.java:69: cannot resolve symbol
    symbol : class Bean1
    location: class org.apache.jsp.beanexample1_jsp
    out.print(JspRuntimeLibrary.toString((((Bean1)pageContext.findAttribute("bean1")).getSeventhPrimeNumber())));
    ^
    An error occurred at line: 19 in the jsp file: /beanexample1.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\beanexample1_jsp.java:72: cannot resolve symbol
    symbol : class Bean1
    location: class org.apache.jsp.beanexample1_jsp
    out.print(JspRuntimeLibrary.toString((((Bean1)pageContext.findAttribute("bean1")).getCurrentTime())));
    ^
    An error occurred at line: 27 in the jsp file: /beanexample1.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\_\beanexample1_jsp.java:79: cannot resolve symbol
    symbol : class Bean1
    location: class org.apache.jsp.beanexample1_jsp
    out.print(JspRuntimeLibrary.toString((((Bean1)pageContext.findAttribute("bean1")).getColor())));
    ^
    7 errors
         at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:130)
         at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:293)
         at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:340)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:474)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:184)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
         at java.lang.Thread.run(Thread.java:484)

    you need to put your bean in a package. do this by
    making a sub directory under the classes directory,
    let's say you call it "mybeans".
    so copy Bean1.java to
    /ROOT/WEB-INF/classes/Bean1.java
    add the line "package mybeans;"
    to the top of the Bean1.java file,
    and then compile it there.
    the standard way to use the bean in your jsp file is like this:
    <jsp:useBean id="thisbean" scope="page" class="mybeans.Bean1" />
    this <jsp:usebean> tag instantiates the bean for you.
    then refer to it by its id:
    thisbean.myMethod();
    thisbean.setProperty();
    I have a java bean class called Bean1, which I put
    under /ROOT/WEB-INF/classes/, and a JSP file that
    utilizes class Bean1, saved under /ROOT/, which should
    be a correct way indicated by several posts I found in
    this forum. But when I try to compile the JSP file
    over TOMCAT4.1 over
    http://localhost:8080/beanexample1.jsp, it throws me a
    lot of error messages (see below). I've been
    struggling for so long. Any help is greatly
    apprecitated! Thanks!
    Bo
    The server encountered an internal error () that
    prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile
    class for JSP
    An error occurred at line: 0 in the jsp file:
    /beanexample1.jsp
    Generated servlet error:
    [javac] Compiling 1 source file
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\_\beanexample1_jsp.java:4
    : cannot resolve symbol
    symbol : class Bean1
    location: class org.apache.jsp.beanexample1_jsp
    Bean1 bean1 = null;
    ^
    An error occurred at line: 0 in the jsp file:
    /beanexample1.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\_\beanexample1_jsp.java:4
    : cannot resolve symbol
    symbol : class Bean1
    location: class org.apache.jsp.beanexample1_jsp
    bean1 = (Bean1)
    (Bean1) pageContext.getAttribute("bean1",
    PageContext.PAGE_SCOPE);
    ^
    An error occurred at line: 0 in the jsp file:
    /beanexample1.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\_\beanexample1_jsp.java:4
    : cannot resolve symbol
    symbol : class Bean1
    location: class org.apache.jsp.beanexample1_jsp
    bean1 = (Bean1)
    1 = (Bean1)
    java.beans.Beans.instantiate(this.getClass().getClassLo
    der(), "Bean1");
    ^
    An error occurred at line: 13 in the jsp file:
    /beanexample1.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\_\beanexample1_jsp.java:6
    : cannot resolve symbol
    symbol : class Bean1
    location: class org.apache.jsp.beanexample1_jsp
    out.print(JspRuntimeLibrary.toString((((Bean1)pageCont
    xt.findAttribute("bean1")).getName())));
    ^
    An error occurred at line: 16 in the jsp file:
    /beanexample1.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\_\beanexample1_jsp.java:6
    : cannot resolve symbol
    symbol : class Bean1
    location: class org.apache.jsp.beanexample1_jsp
    out.print(JspRuntimeLibrary.toString((((Bean1)pageCont
    xt.findAttribute("bean1")).getSeventhPrimeNumber())));
    ^
    An error occurred at line: 19 in the jsp file:
    /beanexample1.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\_\beanexample1_jsp.java:7
    : cannot resolve symbol
    symbol : class Bean1
    location: class org.apache.jsp.beanexample1_jsp
    out.print(JspRuntimeLibrary.toString((((Bean1)pageCont
    xt.findAttribute("bean1")).getCurrentTime())));
    ^
    An error occurred at line: 27 in the jsp file:
    /beanexample1.jsp
    Generated servlet error:
    C:\Program Files\Apache Group\Tomcat
    4.1\work\Standalone\localhost\_\beanexample1_jsp.java:7
    : cannot resolve symbol
    symbol : class Bean1
    location: class org.apache.jsp.beanexample1_jsp
    out.print(JspRuntimeLibrary.toString((((Bean1)pageCont
    xt.findAttribute("bean1")).getColor())));
    ^
    7 errors
    at
    org.apache.jasper.compiler.DefaultErrorHandler.javacEr
    or(DefaultErrorHandler.java:130)
    at
    org.apache.jasper.compiler.ErrorDispatcher.javacError(
    rrorDispatcher.java:293)
    at
    org.apache.jasper.compiler.Compiler.generateClass(Comp
    ler.java:340)
    at
    org.apache.jasper.compiler.Compiler.compile(Compiler.j
    va:352)
    at
    org.apache.jasper.JspCompilationContext.compile(JspCom
    ilationContext.java:474)
    at
    org.apache.jasper.servlet.JspServletWrapper.service(Js
    ServletWrapper.java:184)
    at
    org.apache.jasper.servlet.JspServlet.serviceJspFile(Js
    Servlet.java:295)
    at
    org.apache.jasper.servlet.JspServlet.service(JspServle
    .java:241)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.jav
    :853)
    at
    org.apache.catalina.core.ApplicationFilterChain.intern
    lDoFilter(ApplicationFilterChain.java:247)
    at
    org.apache.catalina.core.ApplicationFilterChain.doFilt
    r(ApplicationFilterChain.java:193)
    at
    org.apache.catalina.core.StandardWrapperValve.invoke(S
    andardWrapperValve.java:260)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipe
    ineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.core.StandardPipeline.invoke(Stand
    rdPipeline.java:480)
    at
    org.apache.catalina.core.ContainerBase.invoke(Containe
    Base.java:995)
    at
    org.apache.catalina.core.StandardContextValve.invoke(S
    andardContextValve.java:191)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipe
    ineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.core.StandardPipeline.invoke(Stand
    rdPipeline.java:480)
    at
    org.apache.catalina.core.ContainerBase.invoke(Containe
    Base.java:995)
    at
    org.apache.catalina.core.StandardContext.invoke(Standa
    dContext.java:2415)
    at
    org.apache.catalina.core.StandardHostValve.invoke(Stan
    ardHostValve.java:180)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipe
    ineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.valves.ErrorDispatcherValve.invoke
    ErrorDispatcherValve.java:170)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipe
    ineValveContext.invokeNext(StandardPipeline.java:641)
    at
    org.apache.catalina.valves.ErrorReportValve.invoke(Err
    rReportValve.java:172)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipe
    ineValveContext.invokeNext(StandardPipeline.java:641)
    at
    org.apache.catalina.core.StandardPipeline.invoke(Stand
    rdPipeline.java:480)
    at
    org.apache.catalina.core.ContainerBase.invoke(Containe
    Base.java:995)
    at
    org.apache.catalina.core.StandardEngineValve.invoke(St
    ndardEngineValve.java:174)
    at
    org.apache.catalina.core.StandardPipeline$StandardPipe
    ineValveContext.invokeNext(StandardPipeline.java:643)
    at
    org.apache.catalina.core.StandardPipeline.invoke(Stand
    rdPipeline.java:480)
    at
    org.apache.catalina.core.ContainerBase.invoke(Containe
    Base.java:995)
    at
    org.apache.coyote.tomcat4.CoyoteAdapter.service(Coyote
    dapter.java:223)
    at
    org.apache.coyote.http11.Http11Processor.process(Http1
    Processor.java:432)
    at
    org.apache.coyote.http11.Http11Protocol$Http11Connecti
    nHandler.processConnection(Http11Protocol.java:386)
    at
    org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolT
    pEndpoint.java:534)
    at
    org.apache.tomcat.util.threads.ThreadPool$ControlRunna
    le.run(ThreadPool.java:530)
         at java.lang.Thread.run(Thread.java:484)

  • Basic jsp and servlet question (JSP Model 2)

    Hi
    I want to make an website where i use JSP Model 2 architecture. However I got a basic question
    1. I need to separate business logic from presentation with the use of jsp and servlets. Meaning I want no html code in the servlet. Can you give a simple example of how this can be done? If I map my implementation of httpServlet to a jsp page in web.xml and override doPost() and doGet(). The calls to the jsp page comes to the servlet as it should. I want to process some methods (calling sessionbeans or similar which in turn calls entitybeans) and then show the jsp page.
    How do I show the jsp page without mixing html in the servlet as I've done below:
    doGet(HttpServletRequest req, HttpServletResponse res)
    PrintWriter p = response.getWriter();
    p.print("<html><body>Hello world</body></html>"); //I dont want to do //this, I want to display the JSP site
    doPost(HttpServletRequest req, HttpServletResponse res)
    //doSomething
    }Message was edited by:
    CbbLe

    You should treat your servlet class much like a controller, where you can then use JSP as the view. The way you achieve this is to use the forward() method in RequestDispatcher.
    Say you've got a servlet class org.yoursite.controller.YourController:
    public void doGet(HttpServletRequest req, HttpServletResponse resp)
      throws ServletException, IOException {
      //Set some value for use in the JSP file associated wth me
      req.setAttribute("greeting", "Hello world!");
      //Done with our business logic, off we go to the JSP file
      ServletContext app = getServletContext();
        RequestDispatcher disp;
        disp = app.getRequestDispatcher("/some/jsp/file.jsp);
        disp.forward(req, resp);
    }Now in your JSP file:
    <h1>Example</h1>
    <div>
      I just want to say <%= request.getAttribute("greeting") %>
    </div>Going to that servlet now executes business logic and then points to the JSP file for the view. You can forward from servlet to servlet too if needs be. The string you pass to forward() is whatever would be in the URI of the request so any <servlet-mapping> configurations in web.xml are used ;)
    There is some pretty in-depth documentation on the J2EE blueprints website, namely service-to-worker and front-controller patterns. I dare say if you're looking for this sort of code you'll want to look at the composite view pattern too (also on blueprints).

  • Weblogic 10 jaas and login.jsp and web.xml/weblogic.xml security constaints

    Hello,
    I struggled through and got the examples.security.jaas.SampleCallbackHandler.java and examples.common.utils.ExampleUtils.java/ExampleConstants.java into eclipse where they compile. A bean I made can call SambleCallbackHandler like such:
    mybean.logmein(username,password,url). I can then do a mybean.getStatus() or even a mybean.returnCode(). It does seem to correctly identlify that it is authenticating me (I see in stdout logs that it shows success or failures. The problem I have is I do not know how to apply this weblogic and web.xml/weblogic.xml so that if authentication works it redirects me to the page requiring the authentication. In web.xml I have the following set up:
    <security-role>
         <role-name>Admins</role-name>
    </security-role>
    <login-config>
         <auth-method>FORM</auth-method>
         <realm-name>default</realm-name>
         <form-login-config>
              <form-login-page>/login.jsp</form-login-page>
              <form-error-page>/badlogin.html</form-error-page>
         </form-login-config>
    </login-config>
    <security-constraint>
         <web-resource-collection>
              <web-resource-name>empower</web-resource-name>
              <description>These pages are only accessible by authorized users.</description>
              <url-pattern>/admin/*</url-pattern>
              <http-method>GET</http-method>
              <http-method>POST</http-method>
         </web-resource-collection>
    <auth-constraint>
    <description>These are the roles who have access</description>
    <role-name>Administrators</role-name>
    </auth-constraint>
         <user-data-constraint>
         <description>This is how the user data must be transmitted</description>
         <transport-guarantee>NONE</transport-guarantee>
         </user-data-constraint>
    </security-constraint>
    My weblogic.xml has:
    <?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd http://www.bea.com/ns/weblogic/90 http://www.bea.com/ns/weblogic/90/weblogic-web-app.xsd">
    <wls:security-role-assignment>
    <wls:role-name>Admins</wls:role-name>
    <wls:principal-name>Administrators</wls:principal-name>
    <wls:principal-name>dashap</wls:principal-name>
    </wls:security-role-assignment>
    </wls:weblogic-web-app>
    With this set up, if I try to go to a page in /admin folder in my application, it correctly pops up the login page. The jaas in the bean is doing a loginContext.login(), which I thought does authentication too, but it never goes back to the /admin page I was going to that needed the authentication. With jaas, can I not use the web.xml FORM security option? Do I Need to use j_security in the login.jsp's form's action= option and j_username and j_password for the input type names? How do I use j_username/j_password things if I am using jaas? I could just ignore using the web.xml security stuff and put something in the pages that need authentication, but it would be easier if I could use jaas with the security featurs without doing all that. Note that my code above is using a realm called default just because that was what was in the example I got from the web. Does that need to be something else?

    Hi John,
    I would like magic of course. However, in this case I want something special: my authentication provider uses special means and contents of headers, cookies and service from external identity management systems to determine the user's identity.
    I do not want the application to present the login dialog! I want to derive the identity and the fact that the user is logged in from whatever the authentication provider returns in terms of Subject.
    Ideally, the flow is something like:
    - user accesses an unprotected resource - resource is shown, no interaction with authentication provider
    - user presses a link or button that takes him/her to a protected resource
    - the authentication provider is contacted to work with the identity asserter to establish the identity of the current user and create a subject object for this user
    - the application can access the subject and principals
    - ADF Security recognizes the identity and the roles (based on the principals) and coordinates access based on this.
    the authentication method is client certificate. presumably this prompts WebLogic/OPS to use an identity asserter to work with custom headers and cookies ("... when you configure a web application to use CLIENT-CERT authentication. In this case, WebLogic can perform identity assertion based on values from request headers and cookies. If the header name or cookie name matches the active token type for the provider, the value is passed to the provider."). No login form should be presented to the user, as all information required to perform the authentication is already available.
    I am trying to understand what I must do to have the ADF application adopt the subject set by the authentication provider - if anything?!
    If you more ideas to share - I would love to hear them.
    best regards,
    Lucas

  • Jsp and error 500

    Hi all,
    I have a problem with my jsp, when i try to load my jsp i 've got an error 500 like this :
    Error: 500
    Location: /kimdog/jsp/liste_diff.jsp
    Erreur Interne de Servlet:
    org.apache.jasper.compiler.ParseException: C:\jakarta-tomcat\kimdog\jsp\liste_diff.jsp(73,59) Lattribut {0} n'a pas de valeur
         at org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:519)
         at org.apache.jasper.compiler.JspReader.parseTagAttributes(JspReader.java:635)
         at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:192)
         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:209)
         at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
         at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
         at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
         at org.apache.tomcat.core.Handler.service(Handler.java:287)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
         at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:166)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
         at java.lang.Thread.run(Thread.java:484)
    I work with tomcat 3-2-1, jdk 1.3 and IIS
    What's wrong with this ? Have you an idea ?
    thanks in advance

    Looks like the JSP compiler is failing when trying to figure-out (parse) one of your jsp tags. Try checking
    line 73 column 59 in liste_diff.jsp, and see what might be wrong.
    Good Luck.

  • JSP and CMP EJB 2.0

              Hi there,
              I having a problem every time I try to EJBHome.create( ...) a new
              CMP EJB 2.0 via a JavaBean
              called from an JSP or directly from the JSP.
              However, I successfully can retrieved EJBHome.findByPrimaryKey("myKey")
              from both the
              JavaBean and JSP.
              Could you help me figure out why .create does not work ?
              Here is the exceptions chain :
              weblogic.utils.AssertionError: *****
              ASSERTION FAILED *****[ Unexpected IOException
              marshalling on server-side ] at
              weblogic.rmi.internal.OutboundServerResponse.sendThrowable(OutboundServerResponse.java:63)
              at weblogic.rmi.internal.BasicServerAdapter.handleThrowable(BasicServerAdapter.java:477)
              at
              weblogic.rmi.internal.BasicServerAdapter.postInvoke(BasicServerAdapter.java:449)
              at
              weblogic.rmi.internal.BasicRequestHandler.handleRequest(BasicRequestHandler.java:122)
              at
              weblogic.rmi.internal.BasicRequestDispatcher.dispatch(BasicRequestDispatcher.java:115)
              at
              weblogic.rmi.internal.ServerRequest.sendOneWayRaw(ServerRequest.java:88)
              at
              weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:108)
              at
              weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
              at
              weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:225)
              < ... my
              source file specified here ...>
              at jsp_servlet._jsp._user._results._jspService(_results.java:182)
              at
              weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:213)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:246)
              at
              weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1265)
              at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1622)
              at
              weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              at
              weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              <Mar 22, 2001 5:50:03 PM JST>
              <Error> <AdapterDispatcher> <Error
              in Dispatcher
              Thank you, rivisa
              

    Sorry but I have forgotten to precise that I have also developped a EJB CMP 1.1 where the bean class is not abstract and I have the same error when the JSP page calls this EJB
    (for the EJB CMP 2.0 the bean class is declared abstract)

  • Jsp and corba :help !!!

    Hi,
    i am working about a web application which is willing to extend, so we want to fix in the cleanest way, the architecture. we think for example about CORBA, have you got a better idea, could you send me some addresses where i could find very clear examples about applications using jsp and corba or something else!
    thank you very much if you can help me
    cris

    Hi bx1,
    here iam giving you some example jsp with corba it will help you
    I got from wrox book
    <!-- WroxQuotes.jsp -->
    <html>
    <head>
    <title>
    WroxStocks Quote Service
    </title>
    </head>
    <body bgcolor="#CAFD90">
    <%@ page import="WroxStocks.WroxQuotesPackage.Quote"
    errorPage="WroxQuotesError.jsp"%>
    <jsp:useBean id="WroxQuotesBean" scope="application"
    class="WroxQuotesBean" >
    <%
    String port = application.getInitParameter("ORBInitialPort" );
    String host = application.getInitParameter("ORBInitialHost" );
    WroxQuotesBean.init(port, host );
    %>
    </jsp:useBean>
    <%
    String symbols = request.getParameter( "Symbols" );
    Quote[] quotes = null;
    try {
    quotes = WroxQuotesBean.getQuotes( symbols );
    } catch( WroxStocks.UnknownSymbol us ) {
    response.sendError( 202, "Unknown symbol: " + us.unknown );
    %>
    <table border align="center">
    <tr align="center" bgcolor="FFFFFF">
    <td>
    <table>
    <caption align="top" style="font:14pt">
    <b>WroxStocks Stock Quotes</b>
    </caption>
    <tr align="center" bgcolor=Silver>
    <th width=100>SYMBOL</th>
    <th width=100>VOLUME</th>
    <th width=100>BID</th>
    <th width=100>ASK</th>
    <th width=260>AS OF</th>
    </tr>
    <%
    for(int i = 0; i < quotes.length; i++) {
    if( ( i % 2 ) == 0 ) {
    %>
    <tr align="right" bgcolor="#FFFFFF">
    <%
    } else{
    %>
    <tr align="right" bgcolor="#E0E0E0">
    <%
    %>
    <td align="center"> <%= quotes.symb %> </td>
    <td> <%= quotes[i].volume %> </td>
    <td> <%= quotes[i].bid %> </td>
    <td> <%= quotes[i].ask %> </td>
    <td align="center">6/28/2000 19:59:00</td>
    </tr>
    <%
    } // END: for
    %>
    </table>
    </td>
    </tr>
    </table>
    </body>
    </html>
    Regards,
    Tirumalarao
    Developer TechnicalSupport,
    Sun MicroSystem,India.

  • Interesting single sigon application project using jsp and servlet....Help.

    A customer login's to my website using Enterprise login. I am supposed to have a link on my website to this other website(that also uses our Enterprise login details but hosted by other vendor/company on their server), and when I click this link the customes should automatically get logged in to this other website and get a welcome page(instead of login page).
    Below are the sequence of steps that the other website wants me to perform to get to his welcome page(i.e bypass his login page).
    FYI, I am planning to build a jsp page with a link to this other website. Can some body tell me how should I build the application(i.e) how jsp and servlets be build to interact to perform these operations. Any hep is greatly appreciated.
    1.When a user clicks on to other website link(available on my website), the browser generates an HTTP GET request to the Other website's session servlet. User's name is one of the parameters of this request.
    2.Other website receives the HTTP request and generates a unique session identifier for this user. An HTTP response to the end-user is then sent. The user's name and the session identifier are passed back as parameters in the redirect URL.
    3.The browser sends the HTTP request (GET) to the Verification Service that was specified in the redirect message. The parameters (user name and/or session id) will be passed as URL parameters.
    4.The Verification Service(of other website) authenticates the user. A redirect URL to it's sigon servlet(with parameter's User id and key) is then sent back to the user's browser.
    5.The end-user's browser will perform the redirect (performing an HTTP get operation to Other website's signon servlet with the username and the digest key).
    6.The other website will check if the parameter's passed is the same as the one passed earlier, if the user is who he says he is then he is redirected to the main page of the application.
    7.The browser will then redirect the user to Other website's main page (welcome.jsp).
    There seems's to be many calls to this other website that needs to be performed behind the scenes once a user clicks the link on my website.
    Please suggest and help me out.........
    Edited by: 836726 on Feb 21, 2011 3:41 PM

    Why are you trying to build a whole federated single sign on framework from scratch when you can just use/buy an existing and proven solution instead? There are a lot of security implication and trust issues involved for this so unless you already understand all of those I'd advise you not to re-invent the wheel. There are a lot of products available that do this. Try searching for '<vendor name> Access Manager' or OpenSSO.

  • JSP and compiling

    How do I get weblogic server not to compile the jsp at all and just use the class file that I generated from the JSP?
              

              There is a bug that was fixed in 6.1 SP3 related to the jsp dependency checker
              that was causing jsps to be recompiled when not necessary (i.e. when you'd already
              shipped a valid class file).
              The trouble with setting a working directory as described below is it tends to
              break badly when you want to release the same app across different OS - we develop
              on NT but run on Solaris, and D:\ means nothing there!
              So your best bet for jsp joy is to have your buildsystem precompile all the jsps,
              and upgrade to SP3 if you're still on 6.1
              simon.
              Ann Cao <[email protected]> wrote:
              >Issue 068247 is not really a bug. It's more a documentation issue. The
              >WebLogic
              >on-line doc has fixed it by adding the following at
              >http://e-docs.bea.com/wls/docs70/adminguide/web_server.html:
              >
              >"By default JSPs are compiled into the servers' temporary directory the
              >location
              >for which is (for a server: "myserver" and for a webapp: "mywebapp"):
              ><domain_dir>\myserver\.wlnotdelete\appname_mywebapp_4344862
              >
              >The server deletes the temp directory (and thus the default working directory
              >for the jsps) each time the server is restarted. If the JSPs are configured
              >to
              >be precompiled they will be precompiled each time the server restarts.
              >
              >To avoid this there are following options:
              >
              >
              >Precompile the generated classes into your WEB-INF/classes directory
              >(or a jar
              >file in WEB-INF/lib).
              >
              >Set a workingDir for the jsp-descriptor in your weblogic.xml
              ><jsp-descriptor>
              >
              ><jsp-param> <param-name>workingDir</param-name>
              ><param-value>d:\jsp_store</param-value> </jsp-param>
              >
              ></jsp-descriptor>
              >
              >After this is done the precomiled classes will not be deleted each time
              >the
              >server restarts and they will not be recompiled."
              >
              >
              >
              >
              >
              >Peter Kim wrote:
              >
              >> Hi,
              >>
              >> In the Release Notes for Weblogic 7.x, under Known Issues, it says:
              >> "The JSPs included with WebLogic Server 7.0 are not being pre-compiled
              >> before they are accessed for the first time. If you are deploying
              >> precompiled JSPs, WebLogic Server may recompile them to the /wlnotdelete/
              >> directory. " (068247)
              >>
              >> So apparently it is a known issue that sometimes precompiled pages
              >may not
              >> be recognized
              >> properly and Weblogic will recompile them.
              >>
              >> Could you give more information on the status of this bug?
              >>
              >> My server on Windows is an admin server. Everything else looks good.
              >> I still have problems with recompilation.
              >>
              >> Thank you very much,
              >> Peter Kim
              >>
              >> "Ann Cao" <[email protected]> wrote in message
              >> news:[email protected]...
              >> > It shouldn't matter where you compile it. But the classpath you used
              >to
              >> compile
              >> > JSP and the classpath you used to run the application should contain
              >same
              >> > WebLogic classes and in the same order (weblogic.jar, service pack,
              >> patches,
              >> > etc.). Also, is the server you are running on Windows an Admin server
              >or a
              >> > managed server? There was an issue that managed server always compiles
              >> JSP.
              >> >
              >> > Peter Kim wrote:
              >> >
              >> > > Hello,
              >> > >
              >> > > Does it matter if there's a difference between the operating system
              >on
              >> > > the machine that did the original compilation and the machine that
              >> > > is running the application?
              >> > >
              >> > > I'm currently trying to figure out a problem where the precompiled
              >> > > jsp pages are being picked up properly in UNIX but not on
              >> > > Windows (in Windows, the jsp pages are being recompiled at run-time).
              >> > >
              >> > > Thanks!
              >> > > Peter
              >> > >
              >> > > "Ann Cao" <[email protected]> wrote in message
              >> > > news:[email protected]...
              >> > > > Please compile JSPs into WEB-INF/classes/jsp_servlet directory.
              >When
              >> you
              >> > > compile JSPs, please make sure that the server
              >> > > > build version (WebLogic version, service pack level, and patches)
              > is
              >> the
              >> > > same as the server on which you deploy your
              >> > > > webapp.
              >> > > >
              >> > > > Chris Pesarchick wrote:
              >> > > >
              >> > > > > How do I get weblogic server not to compile the jsp at all
              >and just
              >> use
              >> > > the class file that I generated from the JSP?
              >> > > >
              >> > > > --
              >> > > > Regards,
              >> > > > Ann
              >> > > > Developer Relations Engineer
              >> > > > BEA Support
              >> > > >
              >> > > >
              >> >
              >> > --
              >> > Regards,
              >> > Ann
              >> > Developer Relations Engineer
              >> > BEA Support
              >> >
              >> >
              >
              >--
              >Regards,
              >Ann
              >Developer Relations Engineer
              >BEA Support
              >
              >
              

Maybe you are looking for

  • Exclusion of Sales Orders from CTM Planning

    Gurus, Without customizing, is there a way to exclude selective sales orders, say by certain delivery priority number, from CTM planning? Is there any standard configuration setting that SAP APO offers for this? I want to exclude the SOs with deliver

  • Iphone 5 battery drain issue, a question to all tech gurus.A challenge to those who can figure out the problem!

    Hi guys! I bought an iPhone 5 approximately 18 months back (warranty over) and have been running into battery problems for the past 1 month my phone drains about 10% per hour while on sleep mode (no usage at all other than picking up calls) ,hence it

  • How to get the Summary details of jpg file like (title, subject, author)

    Hi All, Plz help me out of this Reading Windows file summary properties (title, subject, author) in Java. When select properties giing right click on the file after that window open with the three tabs containg General,Security,Summary. From the Summ

  • At New event

    Hi All,    When we use At New event. Eg:   at new f1.       and when we use write statement i am able to see only the field f1 in the output and all other are displayed in the form of ***** ***** ***** What is the reason for this thanks & regards sha

  • Configuring conditions in Interface Determination

    Hi, We have a scenario where the Message has to be sent to 2 different business systems(say BS1, BS2). with in one business system(BS2) we need to send the message to 2 different locations based on the Value we received in the Message. For the above