JSPs and Servlets do not work on Apache HTTP- Procesor Intel P4

Computer description: Intel Pentium 4 processor with 20GB HD
drive, 1GB RAM, Windows 2000Pro, Service pack II
Before installation:
We created a temporary directory on our Intel Pentium. 4
processor server (e.g. \TEMP).
Copied the contents of the Oracle* Server CD to the temporary
directory.
Renamed each copy of the SYMCJIT.DLL to SYMCJIT.OLD.
Set the java_compiler=none environment variable.
Installation:
We run the SETUP.EXE from the \TEMP\install\win32 directory and
install Oracle 8.1.7 EE Rel 3 Typical
Configuration tool Net8 Configuration Assistant succeeded
Configuration tool Oracle Database Configuration Assistant
succeeded
Configuration tool Starting Oracle HTTP service: 7 times error
message (java.exe has generated errors and will be closed by
Windows, You will need to restart the
program, An error log is being created)
HTTP server responses.
All Java programs do not respond (e.g. IsItWorking does not work)
After installation:
Open the jserv.conf file chack that ApJServManual is set to Off.
set ApJServLogLevel debug (will give more informative errors for
debugging)
set ApJServDefaultHost www.in.oracle.com (to your machine name
with the
domain name or IP address)
set ApjServDefaultPort 80000
Open the jserv.properties files and make the following changes:
bindaddress=www.in.oracle.com (Same name as ApJServDefaultHost
in jserv.conf)
port=80000 (same port as in the jserv.conf)
Enable all log options in jserv.properties:
log=true
log.file=/usr/local/apache/var/log/jserv.trace
log.timestamp=true
log.dateFormat=[yyyyMMdd HHmmss:SSS]
log.channel.init=true
log.channel.terminate=true
log.channel.serviceRequest=true
log.channel.authentication=true
log.channel.requestData=true
log.channel.responseHeaders=true
log.channel.signal=true
log.channel.exceptionTracing=true
log.channel.servletManager=true
Java servlets and JSP still do not redspond.
If we try to start HTTP server from Windows service, we always
get message: unable to locate dll: The dynamic link
library Perl.dll could not be found in the secified path (our
path: C:\oracle\ora81\bin;C:\oracle\ora81\Apache\Perl\5.00503
\bin\mswin32-x86;
C:\Program Files\Oracle\jre\1.1.7
\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;) and
error message: Could not start
OracleOraHome81HTTPServer service on local computer. The service
did not respond to the start or control request in a
timely fashion.
Starting Oracle HTTP service from Start/Programs/Oracle: 7 times
error message (java.exe has generated errors and will be closed
by Windows, You will need to restart the
program, An error log is being created)
We tested also modifications of oraparam.ini
a. Copy only the install directory from the CD to the hard
disk ,say, e:\temp.
b. Open oraparam.ini and make the following modifications
(Assuming CD
drive is f:)
* Change the "SOURCE=" line to use the full path to the CD
instead of a
relative path. (i.e., SOURCE=f:\stage\products.jar)
* Change the "JRE_LOCATION" line to use the full path to the CD
instead of a
relative path. (i.e.,
JRE_LOCATION=f:\stage\Components\oracle\swd\jre\1.1.7\1
\DataFiles\Expanded)
* Change the "OUI_LOCATION" line to use the full path to the CD
instead of a
relative path. (i.e.,
OUI_LOCATION=f:\stage\Components\oracle\swd\oui\1.6.0.9.0\1
\DataFiles\Expanded
* Change the "JRE_MEMORY_OPTIONS" line to add "-nojit" as the
first argument.
(i.e., JRE_MEMORY_OPTIONS=-nojit -ms16m -mx32m)
^^^^^^
* Other entries should remain the same
c. Launch setup.exe from the temporary location on your hard
drive (i.e.
e:\temp\install\ win32\setup.exe). This will use the modified
oraparam.ini and pick up the information from the CD since the
absolute
locations are specified.
After that modification of oraparam.ini, the HTTPServer does not
respond at all.
So we undo changes on oraparam.ini and reinstall HTTP.
We copied SYMCJIT.DLL and jvm.dll from JDK 1.1.8_008 to
Apache\jdk\..
Since then at least the demo IsItWorking responses, but database
connection can not be established. But jsp demo still do not?
THX in advance
Neja

I'm still having problems with Portal config (as part of 9iAS) on
a P4 but i have cleared the hurdle of the HTTP listener (i
think).
I downloaded and installed the JRE that is P4 compatible from
www.sun.com (it puts it under c:\program files)
then overwrote all the files in the jre directories in the cd
staging area with the files from Sun (i.e. all symcjit.dll
locations). I also had to put a file "javai.dll" in the same
directory as the file "java.exe". This got the install all
working.
The service will fail first time because the install creates
another set of incompatible jre files. You must again search for
symcjit and repeat the above procedure.
You must also overwrite the files in the c:\program
files\oracle\inventory\jre directories (sorry cant remember exact
path).
Hope this helps.
Mark Gornicki
PS if anyone knows why Portal config hangs at 67%
(before/during/after processing "bulkload.jar" section) please
let me know :-)

Similar Messages

  • In jdev jsp and Html is not working

    My JDevloper is showing some problem,
    when i m writing code in simple java file (class) its working.
    but when i m writing code in JSP it is getting compiled but when i m trying to run it ,it not getting,Even ocj server is getting started and the adsress is also getting generated but ,request time completes .Even i have checked the proxy setting .

    Hi,
    your question doesn't help solving the probem. What code did you write in a JSP ? Also, if you create a JSP file and simply type "hello world" into it, does it show ?
    Frank

  • Help,JSP and SERVLETS!

    hello:
    i've downloaded ECLIPSE 3.2,TOMCAT 5.5 .
    i tried to build simples examples o servlets but i failed could you please tell me how to proceed?i'm new at this plus i've got a project to do with all this so plz can you give some links to go,i tried but no links was clear.
    i've got to give to my professor an examples executed (servlets,jsp)
    thank you

    HISSO wrote:
    i wil give up on talking about stupid gossip
    you must act professional and i you can't help it's ok
    so plz i juste want help
    i'm so busy finishing my studies
    when it comes to talk about development with tomcat and eclipse together i'm new so i need some advices,so plz let's be serious!
    i'm working hard to finish my project!Try to communicate less like a monkey with electrodes attached to it's genitals. This means stop using words like "plz" and write "please" instead.
    If you want specific help with a specific problem then you should ask a specific question. "help, JSP and SERVLETS" is not a specific question. And you should also note that if your specific question is about Tomcat specifically or Eclipse specifically then you are in the wrong place to begin with.
    So do you want to try again?

  • 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

  • Implement SSL in JSP and servlets

    hi there,
    i needed some help in implementing ssl in JSPs and servlets. My idea was to have a login page and also use it where sensitive data is being sent. I have used the basic socket programming (socket.class and serverSocket.class) in GUI applications using threads to listen and send simultaniously and understand how it works but how do I implement it in JSP and servlets and where do i store the certificate?
    i do know that using SSL sockets is very much the same as using the normal sockets.
    can anyone tell me any useful links or give me a step by step guide how to implement it and which classes to use
    your help would be very much appreciated.
    mani

    hi,
    soory for late reply.
    i think you need to use keytool program in your JDK to generate a certificate signature file and you need to configure the server.xml to open and use the HTTPS port. I have not had any additional info on this but i would assume that you simply enter https:// on the file you wish to load in your form and it should use the HTTPS port provided it can find the certificate which must be stored somewhere in your tomcat web server. i would recommend you see tomcat website or search on google for "ssl support in tomcat".i hav not had time to look into this but i will as soon as i am free from my work load.
    mani

  • How to setup my computer to run JSP and Servlets

    I want to setup my computer to run JSP and Servlets.
    What kind of Servers and other tool i need to install to run JSP and Servlets.
    Plz, Help me to start my work on JSP.
    Regards,
    Usman Ali

    hello
    JSP and servlet is web programming, may be little bit different to development local application.
    1st, you should have two computers: one is server and the other is local workstation. This server should have a static IP address, that other people can go into your server. Workstation is any computer normal you use it.
    2nd, you need to setup your server in: OS(linux or windows 2000), web server (jrun, apach or Tomcat etc. ), as well as install JDK, servlet.
    3rd, your local workstation just use as programming editor and open a browser to testing, anytime you write your code, then ftp to server to test.
    Reality, you have many technical thing to solve, eg setup web server etc. However, you can write your source code and test it, then open to outside people.
    hope to helpness, if anything don't uderstand, you can post again or send email to me [email protected] Since I just have setup this configuration in my university for my project.

  • Load balancing for JSPs and servlets

    Hi:
              I am using IIS as the proxy server, with the WLS plug-in, to a WLS
              cluster. This provides round robin load balancing just fine. Will it
              provide weight based load balancing if I set 'weblogic.system.weight'
              differently on each server, or is that not relevant for clustering JSPs
              and servlets?
              Sincerely,
              Ashish
              

    Currently the plugins ( for NES, IIS and Apache) just use the round robin
              algorithm. the property
              weblogic.system.weight is used only be weblogic's replica aware clusterable
              RMI/EJB stubs.
              To use this property for your JSP/Servlet load balancing you have to use
              weblogic server as proxy fron-ending your weblogic cluster.
              --Viresh Garg
              Ashish Vimal wrote:
              > Hi:
              > I am using IIS as the proxy server, with the WLS plug-in, to a WLS
              > cluster. This provides round robin load balancing just fine. Will it
              > provide weight based load balancing if I set 'weblogic.system.weight'
              > differently on each server, or is that not relevant for clustering JSPs
              > and servlets?
              > Sincerely,
              > Ashish
              

  • JSP and servlets

    Am I correct in assuming that JSP is an extention of servlets and that to learn JSP in effect means learning about servlets? My point is, is JSP the superior technology a bit like learning JDK1.4 is now a pointless excercise as it has been superceded by 1.5 ?
    thanks

    Am I correct in assuming that JSP is an extention of
    servletsYes.
    and that to learn JSP in effect means
    learning about servlets? No. This isn't necessary, as a matter of fact, it is one of the reasons why JSP exists - so people with little or no Java knowledge can build dynamic web sites using Servlet containers, assuming they have Java programmers behind them to build the tags / glue to the web app.
    Still, I say having basic understanding of Servlets (at least) will help you out.
    My point is, is JSP the
    superior technology No. JSP has a different role. It makes display easier to code for non-Java programmers (looks more like HTML/XML), and easier to support and understand later on.
    JSP does horribly bad at complex application control, data selection and manipulation, or as an interface to external resources. Java and Servlets are better at these tasks (but conversly, are horrible to work with for display purposes).
    They are different, JSPs and Servlets, in what task they do. J2EE is far superior when you use them both appropriately.
    a bit like learning JDK1.4 is now
    a pointless excercise as it has been superceded by
    1.5 ?No.
    JSP is a newer technology, but should not be used to replace Servlets, but used along side Servlets to provide a better designed and manageable application.
    Let the servlets control what pages the user sees when, to gather data, to talk with external resources. Then forward to a JSP which simply displays what the Servlet did all the work in getting.
    >
    thanks

  • SQLJ JSP and SERVLETS which Environment?

    Hello,
    I am attempting to run the samples on Chapter 5 of the
    following documents with partial success.
    http://technet.oracle.com/docs/products/oracle8i/doc_library/817_
    doc/java.817/a83726/oraext2.htm
    http://download-west.oracle.com/otndoc/oracle9i/901_doc/java.901/
    a90208/oraext.htm#1015820
    1. Do I need the Apache+Jserv environment to run SQLJ and JSP?
    2. What do I need to do run SQLJ on oc4j if possible?
    3. I dont know how to load(?) and/or run this .sqljsp file.
    <%@ page language="sqlj"
    import="sqlj.runtime.ref.DefaultContext,oracle.sqlj.runtime.Oracl
    e" %>
    <HTML>
    <HEAD> <TITLE> The SQLJQuery JSP </TITLE> </HEAD>
    <BODY BGCOLOR="white">
    <% String empno = request.getParameter("empno");
    if (empno != null) { %>
    <H3> Employee # <%=empno %> Details: </H3>
    <%= runQuery(empno) %>
    <HR><BR>
    <% } %>
    <B>Enter an employee number:</B>
    <FORM METHOD="get">
    <INPUT TYPE="text" NAME="empno" SIZE=10>
    <INPUT TYPE="submit" VALUE="Ask Oracle");
    </FORM>
    </BODY>
    </HTML>
    <%!
    private String runQuery(String empno) throws
    java.sql.SQLException {
    DefaultContext dctx = null;
    String ename = null; double sal = 0.0; String hireDate = null;
    StringBuffer sb = new StringBuffer();
    try {
    dctx = Oracle.getConnection("jdbc:oracle:oci8:@", "scott",
    "tiger");
    #sql [dctx] {
    select ename, sal, TO_CHAR(hiredate,'DD-MON-YYYY')
    INTO :ename, :sal, :hireDate
    FROM scott.emp WHERE UPPER(empno) = UPPER(:empno)
    sb.append("<BLOCKQUOTE><BIG><B><PRE>\n");
    sb.append("Name : " + ename + "\n");
    sb.append("Salary : " + sal + "\n");
    sb.append("Date hired : " + hireDate);
    sb.append("</PRE></B></BIG></BLOCKQUOTE>");
    } catch (java.sql.SQLException e) {
    sb.append("<P> SQL error: <PRE> " + e + " </PRE> </P>\n");
    } finally {
    if (dctx!= null) dctx.close();
    return sb.toString();
    %>
    I named above file as test2.sqljsp then I tried these procedures:
    a) $ ojspc test2.sqljsp --these created all the files
    b) $ loadjava -u -v scott/tiger _test2.class -resolve
    this generated:
    initialization complete
    loading : _test2
    creating : _test2
    resolver :
    resolving: _test2
    errors : _test2
    ORA-29521: referenced name test2$_jsp_StaticText could not
    be found
    ORA-29521: referenced name test2SJProfileKeys could not be
    found loadjava: 2 errors
    c) listed the directory and both these files are there but it
    cannot resolve or find it?
    d) I recall reading something about publishjsp command but I have
    to establish a session shell with OSE? this part is very
    confusing and am not sure what to do here.
    e) not sure if i need to publish the loaded class (create a
    procedure? so it can be known to the rest of plsql?)
    A step by step procedure is very much appreciated. fyi.. I
    have Oracle 8.1.7, + oc4j, I can run sqlj from command line
    and class files generated I can run. I can also run JSP and
    servlets on the oc4j accessing the database. It is this SQLJ
    that throws me off balance. If you include Jdeveloper steps
    ro run SQLJ thats also welcome.
    Thanks in advance for kind responses posted.

    In many Model-View-Controller web applications implemented using J2EE, servlets are as controllers to direct the flow between the model and view. While servlets can output HTML code directly, it is much better to use JSPs for the most part. JSPs contain HTML and possibly Java scriptlets. The J2EE container will typically compile JSPs into servlets. While you could use a JSP as a controller, there are drawbacks to that approach. To minimize the amount of Java code in your JSPs, you can either use the tags provided by the JSP spec or use tag libraries written by someone else or yourself. See the JSTL for one such example.
    Also see:
    http://wiki.java.net/bin/preview/Javapedia/MVC
    http://wiki.java.net/bin/view/Javapedia/JavaServerPages

  • Good Book on JSP and Servlets

    Hi,
    Can anyone recommend a good, recently published book on JSPs and Servlets?

    Things on the Internet may be up to date, but they
    aren't necessarily as usable as a book.
    For example. I am just trying to learn Ant. There's
    the Ant user manual at http://ant.apache.org/manual/
    for a start. But to find anything you have to click on
    a link, then on another link, then on another link.
    And it doesn't have an index so even if you know what
    you are looking for, you still have to start at the
    beginning and click randomly until you find it. And
    you can't easily browse through looking for
    interesting things.
    Not to mention that it doesn't give you any
    suggestions on what to do and why. It simply describes
    the various XML elements used by Ant. For example it
    may be possible to have an element which is like a
    subroutine, so you can call the same code from
    multiple targets. But if it is, I haven't found out
    how yet.
    Sometimes a book is better. In this case it would be.I agree with DrClap. Books do have a shelf life in IT, but they're definitely worth having.
    MOD

  • How to track the same session using both jsp and servlets

    Hello, guys:
    "how to use jsp and servlet to track the same session",
    it seems to me my logoff.jsp never realize the session I established in my servlets.
    Here is how I set my session in my servlets:
    "     HttpSession session = req.getSession(true);
    session.setAttribute("userid",suserid);"
    Here is how I invalidate my session in my logoff.jsp
    " <%@ page language= "java" %>
    <%@ page import="javax.servlet.http.HttpSession" %>
    <%@ page session="false"%>
    Our Session id is : <%= session.getId() %>
    <% session.removeAttribute("userid");
    session.invalidate();
    %>
    Our Session id is : <%= session.getId() %>"
    but when I try to logoff using the logoff.jsp
    I always get following error message.
    "/home/jiao/jsp_webserver/tomcat/work/Standalone/localhost/syllabus/htmls/logoff_jsp.java:50: cannot resolve symbol
    symbol : variable session
    location: class org.apache.jsp.logoff_jsp
    out.print( session.getId() );"
    T.I.A.
    [Edited by: jiveadmin on Jun 18, 2003 10:32 AM]
    [Edited by: jiveadmin on Jun 18, 2003 10:33 AM]

    So,
    <%@ page session="false"%>
    That means the jsp never instantiates the build in session object.
    <%@ page session="true"%>
    means jsp will instantiates a session object if there are no existing ones
    how about I just delete the line,
    does that mean the jsp will find the existing session object for me?
    So I can do something like
    Our Session id is : <%= session.getId() %>
    <% session.removeAttribute("userid");
    session.invalidate();
    %>
    directly.
    T.I.A.

  • Need help in JSP and Servlets

    Hi friends,
    [please forgive me if i am posting this in the wrong forum, all seems same to a fresher]
    Now, to my problem..i need a suggestion, a way or a method to implement the following!
    I am supposed to create a servlet that reads data from oracle database. Once i retrive the data (for example: 6 rows of a table having 4 attributes), i am supposed to pass this data to a JSP page where the data has to be formatted and displayed properly. If i call the same servlet from a different JSP, i should be able to access the data in that JSP and format it in a different way. How do i pass the data to JSP? what method i can use to achieve this task?
    Note: I already know about PrintWriter pw = response.getWriter(); and then printing the formated HTML page..but i want to keep the formatting to JSP part and send only the data part that i can access in JSP
    Thanks in adavance

    arun_ramachandran wrote:
    [please forgive me if i am posting this in the wrong forum, all seems same to a fresher]Then you should learn to be more observant - after all, we have JSP and Servlet fora, further down the list. :)
    I am supposed to create a servlet that reads data from oracle database. Once i retrive the data (for example: 6 rows of a table having 4 attributes), i am supposed to pass this data to a JSP page where the data has to be formatted and displayed properly. If i call the same servlet from a different JSP, i should be able to access the data in that JSP and format it in a different way. How do i pass the data to JSP? what method i can use to achieve this task? You can store the data in your session object. You can even use JavaBeans and the jsp:usebean tag.
    [http://java.sun.com/products/jsp/tags/11/syntaxref11.fm14.html]
    Note: I already know about PrintWriter pw = response.getWriter(); and then printing the formated HTML page..but i want to keep the formatting to JSP part and send only the data part that i can access in JSPA wise approach - I wish more prople woiuld be as thoughtful.

  • 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).

  • DefaultFileName does not work with apache-webligic bridge in service pack 5

    The DefaultFileName directive does not work with apache-webligic bridge
    from service pack 5. It used to work with the apache-webligic bridge
    from service pack 3. Can anybody tell me why? Thanks.
    Wei

    I also had same issues using iPhone 5. Got chance to speak with senior engineers at NTC and they have confirmed 3G equipment they are using is not yet compatible with 3G band that iPhone 5 uses. So technically speaking, iPhone 5 has a hardware that is a generation ahead and not backward compatible to 3G system NTC currently uses.
    On a bright side though, they confirmed that NTC is aware of the situation and is soon upgrading its hardware within next 1 or 2 months which will finally support 3G on iPhone 5. The other operator though already has support for this (don't want to mention their name but you know the alternative).
    As for me, I'll be waiting for the (super frustrating) NTC to upgrade their hardware.
    BTW - Apple has nothing to do with this issue.

  • Cut and Paste will not work

    I have a Toshiba Satellite/Satellite Pro C50-A series laptop I bought new in December 2013. It has Windows 8 on it. I did the upgrade to windows 8.1 almost immediatley so I cannot remember if my control c / control v, cut and paste worked in 8 or not. But it will NOT work in 8.1 for most of my programs. I desperately need it to work on my All My Movies database software from Bolide software and my Green Eclipse sticky notes. And cut and paste will NOT work AT ALL for those programs. It works sometimes for my email and my Apache Open Office word processor.
    I have contaced microsoft who's tech did something Tuesday morning to get it working. But then I booted down my computer and went to bed and when I booted it up, yep, no more cut and paste ability again! So I tried contacting microsoft this morning around 2:30am and they said it was an OEM problem and to contact Toshiba.
    I have even run a sfc /scannow twice and get the same error message:
    sfc /scannow      ran 1/22  1:30am
    results: windows resource protection found corrupt files but was unable to fix some of them. details are included in the CBS.Log windir\Logs\CBS\CBS.log
    for ex c:\windows\Logs\CBS/CBS.log
    note that logging is currently not supported in offline servicing scenarios
    The above error message I WAS ABLE to cut and paste FROM my green eclipse sticky note to this forum! But when I tried to cut and paste this message back to a NEW sticky note......NOTHING!
    I hope someone here can provide a permanent solution to fix this! It may seem minor but I do a LOT of cut/pasting!
    frustrated!!!!
    lisa

    There are dozens of possibilities, Lisa.
    Which C50-A do you have? There is a label on the bottom.
    What security applications do you have installed? Webroot is a common offender.
    Do you have Microsoft Office installed? If so, which version?
    Do you use Bluetooth?
    Did you upgrade to Windows 8.1 properly, following carefully the instructions here?
       How to Update from Windows 8 to Windows 8.1
    Find a situation that always gives you trouble, so that know when we learn something.
    Then see if that trouble occurs after a clean boot.
       1. Open the System Configuration utility (msconfig.exe). You can do that by typing msconfig at the Start screen and pressing Enter.
       2. On the Services tab, set the Hide all Microsoft services check box and then click Disable all.
       3. On the Startup tab, click Open Task Manager, right-click and disable each Startup item. Then close Task Manager.
       4. Back on the System Configuration screen, click OK, and restart the computer.
    -Jerry

Maybe you are looking for

  • Can i download to ipod using an Itunes sharing computer?

    Hellooooo ~ My original Itunes install is on a Mac 10.3.9. My Itunes sharing computer is a Windows XP. The sharing over the local network seems to be working fine. I have not yet purchased an IPOD. QUESTION: Will I be able to get my (Mac sourced) son

  • Mini display incompatible with older ADC-displays?

    I have no problem connecting my 23" aluminum bezel display in my office to my new 13" MBP, but when I wanted to hook up my older model 20" Cinema Display (plastic grey bezel) at home, the display was not recognized. Does anybody know if this is indee

  • Loop Time Increasing as Program Progress

    My VI is a big state machine, all the states are taking couple of milli seconds when I start the program but after a while same states are taking lot of time (200 msec)I need a precision of atleast 10 msec going frmo loop to loop. Could any one tell

  • [SOLVED] mplabx fails to run...

    Hi guys, First post, noob to Arch and looking for some guidance. I've installed mplabx from the AUR, but it doesn't run.... I followed the wiki step by step, downloading the tar-ball, issuing makepkg and finally pacman -U. Although the first time my

  • G5 1.8GHz PowerPC  3GB SDRAM FIREWIRE PORT PROBLEM

    The firewire port on the front of my machine is bad. I can't transfer any kind of data using it. The port on the back as well as all USB ports work fine. Would this need a complete motherboard replacement? Would it even be worth doing? Could I build