Applet and JSP Page

Hi.
I have a class called clsDbGrid under the ./classes/pkgDB and a JSP page under de ./web directory. I need to call the class from my JSP. I wrote the follow code:
   <applet class="clsDbGrid.class" width="640" height="480">
       The browse doesn't support JAVA
   </applet>But this code doesn't work. What's wrong? I put the entire path for package and doesn't work again.
Please, I'm beginner in Java and need a help.
Thanks.
Marco.
P.S - Sorry for my terrible english. I'm from Brazil.

See if this helps:
http://java.sun.com/docs/books/tutorial/deployment/applet/html.html

Similar Messages

  • Pass Object Between Applet and JSP Page

    Hi all,
    How can I pass an Object(such as Vector, File), rather than just string to the Applet from a JSP page?
    Thank you.

    I used Base64Encoder and Base64Decoder from servlets.com utilities.
    * convert any serializable object to a String
    public synchronized static String objectToString(Serializable obj) throws Exception {
        ByteArrayOutputStream bos = new ByteArrayOutputStream(100);
        ObjectOutputStream oos = new ObjectOutputStream(bos);
        oos.writeObject(obj);
        byte[]bytes = bos.toByteArray();
        bos = new ByteArrayOutputStream(); //to save the encoded String
        Base64Encoder enc = new Base64Encoder(bos);
        enc.write(bytes);
        String encodedString = bos.toString();
        //close all
        enc.close();   
        oos.close();
        bos.close();
        return encodedString;
    * Recreates the object from the encoded String
    public synchronized static Object stringToObject(String str) throws Exception {
        ByteArrayInputStream bis = new ByteArrayInputStream(str.getBytes());
        Base64Decoder dec = new Base64Decoder(bis);
        ObjectInputStream ois = new ObjectInputStream(dec);
        Object obj = (Object)ois.readObject();
        ois.close();
        dec.close();
        bis.close();
        return obj;
    }

  • SAP connector and Jsp page

    hi Experts,
    Can anyone please send me a working example project for SAP connector and Jsp page at [email protected]
    Regards,
    Sanjyoti.

    Hi, 
    Use this example
    import com.sapportals.connector.ConnectorException;
    import com.sapportals.connector.connection.IConnection;
    import com.sapportals.connector.execution.objects.INativeQuery;
    import com.sapportals.connector.execution.objects.InvalidQueryStringException;
    import com.sapportals.connector.execution.objects.QueryExecutionException;
    import com.sapportals.connector.metadata.CapabilityNotSupportedException;
    import com.sapportals.portal.ivs.cg.ConnectionProperties;
    import com.sapportals.portal.ivs.cg.IConnectorGatewayService;
    import com.sapportals.portal.ivs.cg.IConnectorService;
    import com.sapportals.portal.prt.component.*;
    import com.sapportals.portal.prt.resource.ResourceException;
    import com.sapportals.portal.prt.runtime.PortalRuntime;
    public class TestJDBC extends AbstractPortalComponent
    public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
    throws ResourceException
    // Open a connection
    IConnectorGatewayService cgService = (IConnectorGatewayService)
    PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);
    ConnectionProperties prop = new ConnectionProperties(request.getLocale(),
    request.getUser());
    IConnection client = null;
    try {
    client = cgService.getConnection("System1", prop);
    } catch (Exception e) {
    response.write(e.toString());
    return;
    try {
    // Issue SQL Query statement
    INativeQuery query = client.newNativeQuery();
    String queryStr = "SELECT [CategoryID], [CategoryName], [Description] FROM
    [Categories]";
    //IQuery query = client.newQuery();
    //query.execute(queryStr);
    Object result = query.execute(queryStr);
    //ResultSet singleResult = ((ResultSet) result).getRow();
    //IRecordSet result = query.retrieveRecordSet();
    // Iterate returned result
    ResultSetMetaData recordMetaData = ((ResultSet)result).getMetaData();
    int colNum = recordMetaData.getColumnCount();
    //result.beforeFirst();
    while (((ResultSet)result).next()) {
    for (int i = 1; i <= colNum; i++) {
    response.write(((ResultSet)result).getString(i) + "<br>");
    // Close the connection
    client.close();
    } catch (QueryExecutionException e) {
    response.write(e.toString());
    } catch (CapabilityNotSupportedException e) {
    response.write(e.toString());
    } catch (ConnectorException e) {
    response.write(e.toString());
    } catch (InvalidQueryStringException e) {
    response.write(e.toString());
    } catch (ResourceException e) {
    response.write(e.toString());
    } catch (SQLException e){
    response.write(e.toString());
    }catch(Exception e){
    response.write(e.toString());

  • Can objects be passed between Applets and JSP?

    Can objects be passed between Applets and JSP? If so how? Thanks in advance.
    Scott

    see if this helps,
    http://forum.java.sun.com/thread.jsp?forum=54&thread=136847

  • Applet to Applet communication between two seperate threads and jsp pages

    Hi,
    have two java applets running on two separate jsp pages. I am trying to have one applet talk to the other applet. I have tried putting the applets in a static hashtable, but I found out (through trial and error) that the memory is not shared between the applets. Needless to say the appletcontext object will not work as well. I have also tried to put the applet threads into a thread group, but it seems that the second applet can't find the first applet's threads. Is there a funky way that I need to create the threads for the threadgroup? Is there a way or type of object that I can use that will share the static memory between plugins? I am using 1.6 in IE. Or am I looking at this wrong and there is an easy way to do this and I am not seeing it.
    Thanks,
    Marc

    Hi Mylene,
    I hope I have understood your problem correctly. I can try to give you a tip. The times I've had to do a pop-up, for instance to show details or a part of the data in a table, I call a javascript function with the required parameters (an ID for details or an array of rows) when the button is pressed or a link is clicked. The function then builds a URL with all the paremeters and uses it to call the standard window.open function. After that the request is handled "as usual", ie as if you didn't actually do a pop-up but simply displayed a new page. The content of the pop-up is a jsp with all the required code to build the table and/or display the data. The contents of the table or data are retrieved with the help of the parameters sent.
    I'm not sure if the portal kit provides some kind of standard functionality for this, but in the cases I've worked with J2EE solutions this has been the most common way of solving the problem.
    I hope this helps.
    kind regards,
    Dionisios

  • Applet in JSP page

    Hello! I wrote an applet and try to put in jsp page in JDeveloper:
    <jsp:plugin type="applet" code="CompositeTest.class"
    width="400" height="400">
    <jsp:fallback>
    <p>Unable to load applet</p>
    </jsp:fallback>
    </jsp:plugin>
    and I copy the class file to folder where the JSP page is located. When I start Jsp page I have a message: "Applet not found"
    What I do wrong??? PLZ Help!
    BEST REGARDS

    Hi,
    I am not sure the JSP file, which resides in the public_html directory, is part of the class path of the running application. If you open the project properties, you can see where JDeveloper looks for Java classes. Try and extend this setting to include the public_hml directory (you can also try and just add the source as a library path (see library section))
    Frank

  • Calling applet in jsp page

    i have made a line graph in applet and i want to call that applet in my jsp project's page....
    <jsp:plugin type= "applet" codebase="." code= "ibill.lineGraph.class" width="400" height="400">
    </jsp:plugin>
    but it dosnt show the applet and give error of Loading java applet is failed....
    can anyone help me please
    with regards

    In one of my project i tried to load applet using the <jsp:plugin> tag but failed. Since i had less time so i have not done the R&D instead i called the applet as
    <applet id="MyApplet" code="MyApplet.class\" archive=\"MyApplet.jar\" width=5 height=3/>and it worked fine for me. You can try this method.
    NOTE: My applet jar file was in the same directory of my JSP page
    Message was edited by:
    diptaPB

  • PAR files and jsp pages into NWDS

    Hi,
    I need to modify transactions from the MSS 50.x package, i.e. HR transactions. I need to delete some fields on the screens.
    The sysadmin was giving me a par file
    com.sap.pct.hcm.attendanceoverviewperiod.par.bak
    But when I import the par file into NWDS, the only thing I see is the portalapp.xml and a bunch of attribute files.
    No jsp page, no class files..
    When I browse into the directoria via sysadmin/support/portal runtime via WEB-INF, I do see all the necessary files. But how do I get the whole bunch of classes, jsp etc into NWDS? Download all single elements and put them manually into a NWDS project? There must be a better way
    Any help will be gracefully awarded

    I tried it, but when I follow your instruction, NWDS gives me an error in the import wizard "<dir> does not have a .project file".
    If I look in the .par file, there is no .project file at all.
    I looked in the download of the PCD, there is no .project file either, but at least the java classes and the jsp. 
    Is it removed intentionally? Probably because it is an SAP business package?

  • Java File and JSP Page

    I am to create a link verification program -- a simple java file with the database connection & some business logic and a JSP page that instantiates the my java file. It won't work. Everytime I run the jsp page, it gives me java.lang.NullPointerException. Can anyone give me some directions? The web server I am using is JRun.
    Thank you
    Below are my code:
    JSP Page:
    <%--      Verify Links
    --%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <%@ page import="java.sql.*" %>
    <%@ page import="java.net.*" %>
    <%@ page import="pro.*" %>
    <html>
    <head>
    <title>Results</title>
    </head>
    <body>
    <%
    try{
    LinkConnection newconn = new LinkConnection();
    newconn.initialize();
    newconn.query();
    newconn.close();
    }catch (ClassNotFoundException cnfe)
    out.println(cnfe);
    catch (SQLException sqle)
    out.println(sqle);
    catch (NullPointerException npe)
    out.println(npe);
    %>
    </body>
    </html>
    Java Code:
    package pro;
    import java.io.*;
    import java.sql.*;
    import java.net.*;
    public class LinkConnection {
    Connection con;
    ResultSet RS;
    Statement Stmt;
    public void initialize() throws SQLException, ClassNotFoundException
    Class.forName("oracle.jdbc.driver.OracleDriver");
    con = DriverManager.getConnection("XXXX", "XXXX", "XXXX");
    public void query() throws SQLException
    Statement Stmt=con.createStatement();
    String strSQL="Select guideline_name, guideline_url from pgt_guidelines";
    ResultSet RS=Stmt.executeQuery(strSQL);
    while (RS.next())
    String guidelinename = RS.getString("guideline_name");
    String guidelineurl = ("http://" + RS.getString("guideline_url"));
    try {
    URL url = new URL(guidelineurl);
    HttpURLConnection link=(HttpURLConnection)url.openConnection();
    System.out.println("<font color='blue'>");
    System.out.println(guidelinename);
    System.out.println("<br>");
    System.out.println(guidelineurl);
    System.out.println("</font>");
    System.out.println("<font color='red'>");
    System.out.println(link.getResponseCode());
    System.out.println("</font>");
    System.out.println("<br />");
              }catch (Exception e)
              {System.out.println("<font color='yellow'>Error Link </font>")
    public void close() throws SQLException {     
    RS.close();
    Stmt.close();
    con.close();

    i'm having the same problem, what is the solution to this
    A Servlet Exception Has Occurred
    java.lang.NullPointerException
         at test.Lesson.runSql(Lesson.java:80)
    ===== Lesson.java file =====
    package test;
    import java.sql.* ;
    import java.io.Serializable;
    public class Lesson {
         public Lesson( ) { }
    //Line 9
         public String runSql ( ) {
              String browserOutput = "";
              Connection sqlca = null;
              Statement sqlStatement = null;
              ResultSet myResultSet = null;
    //Line 16
              /* Connect to database, run SQL and produce output */
              try { 
                   /* Connection to the database */
                   Class.forName("org.gjt.mm.mysql.Driver").newInstance();
                   String theDatabase ="jdbc:mysql://localhost/employee";
                   sqlca = DriverManager.getConnection(theDatabase,"usr","pwd");
    //Line 24
                   /* Construct and execute the sql, positioning before the
                   first row in the result set */
                   sqlStatement = sqlca.createStatement();
                   myResultSet = sqlStatement.executeQuery
    //Line 29
                   ("select emp_id, " +
                        "emp_lname, " +
                        "city, " +
                        "state," +
                        "zip_code, " +
                        "emp_fname " +
                        "from employee " +
                        "where emp_id < 250 " +
                        "order by emp_lname, emp_fname");
    //Line 39
                   /* Construct the heading for the table */
                   browserOutput =
                        "<div align=left>"+
                        "<table border=0 align=left width=520>" +
                        "<caption><i><b>" +
                        "Employee Listing</b></i></caption>" ;
    //Line 46
                   /* Construct the column headings for the table */
                   browserOutput +=
                        "<th align=left>Emp_id</th>" +
                        "<th>First Name</th>" +
                        "<th>Last Name</th>" +
                        "<th>City</th>" +
                        "<th>State</th>" +
                        "<th>Zip</th>" ;
    //Line 55
                   /* Move to next row and & its contents to the html output */
                   while(myResultSet.next()) {
                        browserOutput += "<TR><TD>" +
                   myResultSet.getObject("emp_id").toString() + "</TD><TD>" +
                   myResultSet.getObject("emp_fname").toString()+"</TD><TD>" +
                   myResultSet.getObject("emp_lname").toString() + "</TD><TD>" +
                   myResultSet.getObject("city").toString() + "</TD><TD>" +
                   myResultSet.getObject("state").toString() + "</TD><TD>" +
                   myResultSet.getObject("zip_code").toString() + "</TD></TR>" ;
    //Line 66
                   }//end of while
                   sqlStatement.close();
                   sqlca.close();
              }//end of try
              catch (SQLException e) {
    //Line 72
                   browserOutput = " Error: SQLException: " + e.getMessage();
                   browserOutput= " Error: SQLState: " + e.getSQLState();
                   browserOutput= " VendorError: " + e.getErrorCode();
              }//end of SQLException
              catch (Exception e) {
                   browserOutput = " Error: JDBC Class creation: " + e.getMessage();
              }//end of Exception
    /**Line 80**/     finally {
                   try { sqlca.close(); }
                   catch(SQLException e) {
                   browserOutput = " Error: Closing connection: " + e.getMessage();
              }//end of finally
         /* Complete the html and return it to the Java Server Page */
         browserOutput += "</table>" + "</div>" ;
         return browserOutput;
         } //end of runSql
    }//end of Lesson

  • Help With Integrating Servlet and JSP Page?

    Hello There
    --i made jsp page that contain name and description fields and add button
    --and i made servlet that contain the code to insert name and description in the database
    --and i want to make that when the user hit the add button
    -->the entered name and description is sent to the servlet
    and the servlet sent them to database?
    here's what i 've done:
    the jsp code:
    <html:html locale="true">
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>
            Categories Page
           </title>
            <html:base/>
        </head>
        <body style="background-color: white">
        <form action="jpage.jsp" method="get">
            <h1>
                <center>
    categories Operations
                </center>
            </h1>
            <h3>
                 <label>Name</label>
            <input type="text" name="name" value="" size="10" />
                 <label>Description</label>
             <input type="text" name="description" value="" size="10" />
             <input type="submit" value="Add" name="button" />
           </h3>
       </form>
        </body>
    </html:html>the servlet code:
    import java.io.*;
    import java.util.Enumeration;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.net.*;
    class NewServlet1 extends HttpServlet{
         Connection conn;
         private ServletConfig config;
    public void init(ServletConfig config)
      throws ServletException{
         this.config=config;
    public void service (HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException {
       HttpSession session = req.getSession(true);
       res.setContentType("text/html");
    try{
         Class.forName("com.mysql.jdbc.Driver");
       conn = DriverManager.getConnection("jdbc:mysql://localhost/struts", "root", "");
         PreparedStatement ps;
       ps = conn.prepareStatement ("INSERT INTO categories (Name, Description) VALUES(?,?)");
          ps.setString (1, "aa");
          ps.setString (3, "bb");
          ps.executeUpdate();
          ps.close();
          conn.close();
      }catch(Exception e){ e.getMessage();}
      public void destroy(){}
    }

    The JSP Code:
    <html:html locale="true">
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>
            Categories Page
           </title>
            <html:base/>
        </head>
        <body style="background-color: white">
        <form action="actionServlet.do?action=Additem" method="*post*">
            <h1>
                <center>
    categories Operations
                </center>
            </h1>
            <h3>
                 <label>Name</label>
            <input type="text" name="name" value="" size="10" />
                 <label>Description</label>
             <input type="text" name="description" value="" size="10" />
             <input type="button" value="Submit">
           </h3>
       </form>
        </body>
    </html:html>The Servlet Code:
    import java.io.*;
    import java.util.Enumeration;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.net.*;
    public class NewServlet1 extends HttpServlet implements SingleThreadModel {
        public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException,IOException {
            doPost(request,response);
        public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException,IOException {
              String action = request.getParameter("action"); // action = "Additem"
              if (action.equals("Additem")) {
                   String name = request.getParameter("name");
                   String description = request.getParameter("description");
                         RequestDispatcher reqDisp = null;
                   try{
                  Connection conn;
                  PreparedStatement ps;
         Class.forName("com.mysql.jdbc.Driver");
       conn = DriverManager.getConnection("jdbc:mysql://localhost/struts", "root", "");
       ps = conn.prepareStatement ("INSERT INTO categories (Name, Description) VALUES(?,?)");
          ps.setString (1, name);
          ps.setString (3, description);
          ps.executeUpdate();
          ps.close();
          conn.close();
          reqDisp= request.getRequestDispatcher("./index.jsp");
          reqDisp.forward(request, response);
                   catch (Exception ex){
                        System.out.println("Error: "+ ex);
    }The web.xml code:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <servlet>
            <servlet-name>action</servlet-name>
            <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
            <init-param>
                <param-name>config</param-name>
                <param-value>/WEB-INF/struts-config.xml</param-value>
            </init-param>
            <init-param>
                <param-name>debug</param-name>
                <param-value>2</param-value>
            </init-param>
            <init-param>
                <param-name>detail</param-name>
                <param-value>2</param-value>
            </init-param>
            <load-on-startup>2</load-on-startup>
            </servlet>
        <servlet>
            <servlet-name>NewServlet1</servlet-name>
            <servlet-class>NewServlet1</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>action</servlet-name>
            <url-pattern>*.do</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>NewServlet1</servlet-name>
            <url-pattern>/NewServlet1</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>
                30
            </session-timeout>
        </session-config>
        <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
            </welcome-file-list>
            <servlet>
         <servlet-name>actionServlet</servlet-name>
         <servlet-class>com.test.servlet.NewServlet1</servlet-class>
    </servlet>
    <servlet-mapping>
         <servlet-name>actionServlet</servlet-name>
         <url-pattern>*.do</url-pattern>
    </servlet-mapping>
        </web-app>

  • Java applets and jsp

    I have an applet for example
    <applet height="50" width="500"  archive="applets.jar" codebase="applets/" code="MyApplet.class"  name="MyApplet">
                 <param name="param1" value="data1"/>
    </applet>I want the applet to manipulate the parameter param1 which is fine.
    String strData = getParameter("param1");now I want to return a result so that I can use it in the jsp page. Does anyone know how you go about this. There isn't a setParameter for example.
    Thanks,

    Some info here.:
    http://forum.java.sun.com/thread.jspa?threadID=526144&messageID=2524030
    http://forum.nextapp.com/forum/lofiversion/index.php/t2368.html

  • Message bundles accessed from JSF and JSP pages

    Hello, everybody!
    I'm developing a localized JSF application. It is working pretty well until now.
    These are my message files:
    mensagens.properties
    mensagens_en_US.propertiesThis is how they're configured in faces-config.xml:
    <application>
        <resource-bundle>
            <base-name>br.urca.www.biblioteca.web.mensagens</base-name>
            <var>msg</var>
        </resource-bundle>
    </application>And this is how I access the messages in a page:
    <h:outputText value="#{msg.titulo}" />Nothing new until now. But now there was a need for me to have a raw jsp page in
    my web application. This page is displaying ok but I also need to access the
    message bundles as I'm able to access in the normal jsp with the JSF components.
    As you should know I can't use something like the above code with an +<h:outputText>+
    to access the messages because this is a JSF component and I'll not be able to use
    JSF components with this raw jsp page.
    So, my question is: how do I access my localized messages from a raw jsp page? I
    suppose there should be a way to do this, but unfortunately I started programming
    to the web world in Java with JSF, not JSP, so I don't know how to do this with
    JSP.
    Thank you very much.
    Marcos

    BalusC wrote:
    Just include [jstl-1.2.jar|https://maven-repository.dev.java.net/repository/jstl/jars/] in your classpath and define the fmt taglib in your JSP. Nothing more is needed.
    Hello, BalusC. Thank you for your help. We're almost there. After I have included the jstl-1.2.jar you provided me I can use the fmt tag and access message bundles from my raw jsp page (even though I had to provide other message bundles instead of the ones that I use in the other jsf pages, but it's better than nothing).
    Now there just on problem to be fixed. The jsp page is not aware when I change the locale of my application. I change this locale in a jsf page.
    I have this component:
    <h:selectOneMenu value="#{pesquisaAcervo.idiomaAplicacao}"
        valueChangeListener="# {pesquisaAcervo.idiomaAplicacaoMudado}" onchange="submit();">
        <f:selectItems value="#{pesquisaAcervo.idiomasAplicacao}" />
    </h:selectOneMenu>that calls this event in my backing bean class:
    public void idiomaAplicacaoMudado(ValueChangeEvent e)
        fIdiomaAplicacao.liberarItens();
        Idioma idioma = Idioma.deString(e.getNewValue().toString());
        // This line is for JSF
        FacesContext.getCurrentInstance().getViewRoot().setLocale(idioma.localidade());
        // This line is for Tiles
        FacesContext.getCurrentInstance().getExternalContext().getSessionMap().
            put(org.apache.tiles.locale.impl.DefaultLocaleResolver.LOCALE_KEY, idioma.localidade());
    }So, do I have to include another line in the idiomaAplicacaoMudado event above in order for the jsp page load the correct resource bundle? Or what else do I have to do?
    Thank you.
    Marcos

  • Request dispatcher and jsp pages called from servlets

              Given the following webapp directory structure:
              root/
              jsp/
              ..all jsp files
              web-inf/
              classes/
              /servlets
                   ..all servlet files
              /com
              ..all other java class files
              I have the jsp directory coded as: jspdir = "/jsp/" (and have tried variations
              on this theme)
              I try to open a new jsp page with the following code in a servlet in the above
              servlet directory:
                   RequestDispatcher rd;
                   rd = getServletContext().getRequestDispatcher(jspdir + myjsp.jsp);
                   rd.forward(req, res);
              rd continues to return null.
              The jsp pages are not registered in the web.xml file for this webapp, if that
              makes any difference.
              Does anyone have any suggestions?     
              [problem.txt]
              

    I create a small sample and put these files into /jsp in my war context
              it works fine, please send me the example code you are using and the
              environment description of the deployed application
              I attached my samples, that work
              Filip
              ~
              Namaste - I bow to the divine in you
              ~
              Filip Hanik
              Software Architect
              [email protected]
              www.filip.net
              "Bill Blackmon" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Yes, I am able to access the jsp pages with the url listed.
              >
              > "Filip Hanik" <[email protected]> wrote:
              > >The weblogic servlet engine, is by default mapping anything that ends
              with
              > >*.jsp to be a JSP.
              > >so there shouldn't be a problem. You didn't answer my first question,
              > >are you able to access your JSP through the browser?
              > >http://localhost:7001/root/jsp/myjsp.jsp
              > >
              > >Filip
              > >
              > >--
              > >~
              > >Namaste - I bow to the divine in you
              > >~
              > >Filip Hanik
              > >Software Architect
              > >[email protected]
              > >www.filip.net
              > >"Bill Blackmon" <[email protected]> wrote in message
              > >news:[email protected]...
              > >>
              > >> The code you are reading in the message here was pasted in and
              > >> looks bad, so maybe that's what you are referring to? The dispatcher
              code
              > >is called
              > >> in the service() method of the servlet.
              > >> I have a suspicion that the jsp directory needs to be defined someplace
              > >-
              > >weblogic.properties
              > >> or web.xml?, though I don't see this in any of the examples that come
              > >with
              > >the product.
              > >>
              > >>
              > >>
              > >> "Simon Ng" <[email protected]> wrote:
              > >> >
              > >> >Hello Bill,
              > >> > Did you put a <BR>
              > >> >return;
              > >> ><BR>
              > >> >statement right after the dispatcher.forward() statement? Well, I am
              > >assuming
              > >> >your
              > >> >code is in the doPost() or doGet() methods.
              > >> >
              > >> >Simon
              > >> >
              > >> >
              > >> >"Filip Hanik" <[email protected]> wrote:
              > >> >>if you do http://localhost:7001/root/jsp/myjsp.jsp
              > >> >>
              > >> >>do you get a result?
              > >> >>
              > >> >>make sure you have the right character case on the filename.
              > >> >>
              > >> >>Filip
              > >> >>
              > >> >>--
              > >> >>~
              > >> >>Namaste - I bow to the divine in you
              > >> >>~
              > >> >>Filip Hanik
              > >> >>Software Architect
              > >> >>[email protected]
              > >> >>www.filip.net
              > >> >>"Bill Blackmon" <[email protected]> wrote in message
              > >> >>news:[email protected]...
              > >> >>>
              > >> >>> Given the following webapp directory structure:
              > >> >>> root/
              > >> >>> jsp/
              > >> >>> ..all jsp files
              > >> >>> web-inf/
              > >> >>> classes/
              > >> >>> /servlets
              > >> >>> ..all servlet files
              > >> >>> /com
              > >> >>> ..all other java class files
              > >> >>>
              > >> >>>
              > >> >>> I have the jsp directory coded as: jspdir = "/jsp/" (and have tried
              > >> >>variations
              > >> >>> on this theme)
              > >> >>> I try to open a new jsp page with the following code in a servlet
              > >in
              > >> >the
              > >> >>above
              > >> >>> servlet directory:
              > >> >>> RequestDispatcher rd;
              > >> >>> rd = getServletContext().getRequestDispatcher(jspdir + myjsp.jsp);
              > >> >>> rd.forward(req, res);
              > >> >>>
              > >> >>> rd continues to return null.
              > >> >>>
              > >> >>> The jsp pages are not registered in the web.xml file for this
              webapp,
              > >> >>if
              > >> >>that
              > >> >>> makes any difference.
              > >> >>>
              > >> >>> Does anyone have any suggestions?
              > >> >>>
              > >> >>
              > >> >>
              > >> >
              > >>
              > >
              > >
              >
              [filipInclude.jsp]
              [filipForward.jsp]
              [filip.jsp]
              

  • Can I combine ASP and JSP pages?

    Hi all,
    Maybe a dumb question...
    but Can I have ASP pages in my JSP application?
    My problem is as follows:
    In the JSP pages of my application, I have some links to ASP application:
    http://domain/app.asp
    Now IIS is running on another port. But I do not want to go through all my JSP and change the above link to:
    http://domain:port/app.asp
    Instead any request to http://domain/app.asp should be automatically forwarded to http://domain:port/app.asp
    How can this be done? I am using Tomcat as my JSP container.
    m_asu

    Actually that is not what I am looking for. I dont want to 'buy' any product. I dont want to deploy ASP application with the JSP application. I just want to redirect the client to another website through an ASP page.
    Only catch is that this ASP page needs to sit in my JSP container (Apache Tomcat). Is this possible?
    m_asu

  • Connecting databeses with WML and JSP pages..!

    I need information about how to connect databases with wap technologies using wml and jsp , I am waiting your resources, codes and helps.. And I would like to remind you , I am beginner about this topic , Only things that I know are Jsp and WML , I have no experience about wap and how to combine wml and jsp , So please be helper while you send your messages , If all your messages contains much detailed and supported complete sources and files , it will more helpfull for me ..
    Thanks in Advance.
    P.S : 1- ) if you want to contact direclty , mail address : [email protected]
    2-) Don't post me complex references' URL , I have already made search on google,yahoo and etc

    Additionally , I would like to learn what I have to need for this project .. Now , I already have winwap wap emulator and Websphere Studio.. Do I need special wap server or something else to test my applications..
    Please , hurry up .. I really need your helps..
    Ergin

Maybe you are looking for