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

Similar Messages

  • How to combine servlet and jsp

    I'm doing a project. My friend using jsp. and i using servlet..
    we are confused, how to combine servlet and jsp. or we can just use redirect??
    but it's still doesn't work properly...thanks for your helpp

    You can use RequestDispatcher interface for calling a JSP from a Servlet, or vice-versa.
    Following is the code for sending output to a JSP page from a servlet:
    javax.servlet.RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(�/Ashu.jsp�);
    request.setAttribute(�Name�,�Ashutosh�);
    dispatcher.forward(request,response);
    - Ashutosh

  • Urgent....How can i redirect to my jsp page from servlet in init() method..

    How can i redirect to my jsp page from servlet in init() method..Becoz that servlet is calling while server startsup..so im writing some piece of code in init() method..after that i want to redirect to some jsp page ...is it possible?
    using RequestDispatcher..its not possible..becoz
    RequestDispatcher rd = sc.getRequestDispatcher("goto.jsp");
    rd.foward(req,res);
    Here the request and response are null objects..
    So mi question can frame as how can i get request/response in servlet's init method()..

    Hi guys
    did any one get a solution for this issue. calling a jsp in the startup of the servlet, i mean in the startup servlet. I do have a same req like i need to call a JSP which does some data reterival and calculations and i am putting the results in the cache. so in the jsp there in no output of HTML. when i use the URLConnection i am getting a error as below.
    java.net.SocketException: Unexpected end of file from server
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:707)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:612)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:705)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:612)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
    nection.java:519)
    at com.toysrus.fns.alphablox.Startup.callJSP(Unknown Source)
    at com.toysrus.fns.alphablox.Startup.init(Unknown Source)
    at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
    so plz do let me know how to call a jsp in the start up of a servlet.
    Thanks
    Vidya

  • Ive just learned that i can use loadjava to load jsp pages into the database.

    Ive just learned that i can use loadjava to load jsp pages into the database. How is that possible. How can someone go to my lets say, index.jsp page and actually see it if its inside the database? What authenticates it? Where would you set the parameters to tell http(apache) to look inside the db for the pages?
    Any ideas?

    Thanks for the reply. If I put the file on the database, does it have to be in a particular location? I've put it on the database server, launched sql*plus (as APPS) and ran the following:
    execute dbms_java.loadjava('-v', 'ZebraGetPrinterFromXML.class');
    PL/SQL procedure successfully completed.Then when I try to run a process that uses this I get this:
    ORA-29540: class ZebraGetPrinterFromXML does not exist

  • 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());

  • 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

  • Why can't I buy and upload pages for my ipad2

    why can't I buy and upload Pages for my Ipad2? get error message not compatible with this ipad

    pages v1.5 needs iOS5. So update the IDevice to the latest OS.

  • How we can generate dynamic menu in jsp page

    Hi all,
    how we can generate dynamic menu in jsp page.
    Thanks
    Manjinder

    by reading more about them on the web or in a good book, OR BY HIRING SOMEBODY TO DO SO. ;)

  • Use two streams to manager client video/audio,Can i combine streams and record it with server AS API

    Use two streams to manager client video/audio,Can i combine streams and record it with server AS API
    I tried Stream.play()
    var s=Stream.get("combine");
    s.play("video");
    s.play("audio",null,null,false);
    s.record("append");
    it's don't work!!

    Thanks, that's what I had thought. Our domain.com zone is sourced internally and replicated to our advertisers for external users, so there's no way to change the result for internal vs external users.
    This is a rudimentary question that I should already know but I sort of inherited this after it was built: Can I have users sign in with their email address ([email protected]) but under the hood, their SIP address is [email protected]? This would let users
    sign in with an address they expect, but it would take advantage of the the local lyncdiscoverinternal record.
    Thanks,
    Matt

  • A single report can't combine portrait and landscape oriented pages

    Post Author: joelo2
    CA Forum: Crystal Reports
    Hi,
    Can a single report in Crystal report XI (version 11.5.8.826) combine portriat and landscape oriented pages like Crystal report 2008?   For example, I have one main report with several subreports in the main report.  I want one subreport be in portrait page orientation and the other subreports in landscape.  Can I do something like that in Crystal report XI version?    I even tried writing a small .net program to do this, but it doesn't seem to allow me to do that programmatically either.  Please help

    Post Author: ngra
    CA Forum: Crystal Reports
    I'd like to elevate this issue with Crystal Reports XI. There is a critical application which we developed in-house which needs both portrait and landscape orientation in each of the 30,000 plus documents we are sending out every month.If developers in Business Objects are picking this thread up - we need a patch for this limitation - quick. Right now, we are toying with the possibility of exporting the documents into a text format with markers indicating if a page is portrait or landscape. This is to be loaded into a Xerox machine (which costs hundreds of thousands of dollars), where it is mapped automatically to portrait or landscape. Note to Business Objects: This will provide us and countless others with much value. Think 80/20 rule - most bang for your development bucks and value for your customers!

  • ASP AND JSP

    I am developing a facility that has to email up to 3 individuals at 1 user's request.the data that should be emailed is extracted from a sql database. as far as i know i can't program this using jsp but i know that it is possible with asp using sendmail, can i therefore, combine an asp page with jsp pages. can a jsp page be redirected to an asp page and vice versa - will tomcat handle this, do I need IIS configured for the ASP?????
    First of all is this possible using just jsp.
    For those that don't understand my question:
    A user clicks a submit button after entering three email addresses. Records are extracted from the sql db and emailed in html format to the 3 email addresses. I don't want to do this manually - too much maintenance work....i want it programmed.
    HELP HELP HELP
    Regards
    :-)

    http://java.sun.com/products/javamail/

  • Can you open a second jsp page as popup/new window?

    Hi all gurus!
    I have a question regarding popups/new windows in an iview application. Instead of starting with a question let me instead describe what I want to do.
    We have a jsp page that presents a search and then the search result in a table where one column is "clickable". When the user clicks a cell a server round trip retreives data specific for that cell value. This is standard functionality and already fixed so here is what differes: we want a new jsp window to open like a popup, with the data retreived from the server round trip and at the same time the first page with the table shall still be there so that you just can close the popup and click the next cell which creates a new server round trip and a new jsp popup and so on.
    My solution which doesn't work yet: In application "a" I have a JavaScript for the clicked cell which opens another iview application "b" in a new window, by window.open("navurl_to_the_iview"), and that works fine.
    At the same time the value of the clicked cell is written to the data bean and the bean is put in the http session (since component session does not reach between applications).
    The second iview "b" retreives the bean from the http session and fills the jsp page with data.
    Here is now the problem: no data is displayed and this because the iview "b" retreives the bean BEFORE iview "a" has been able to put the bean/value into the http session. How do I know this for sure? Simple, if I do a refresh of iview "b" the value is displayed.
    I could do a JavaScript that recursively checks if the value in the bean is null or not but then I have to do a method that retreives the bean from the http session each time.
    This could work but I wonder if this is the most simple solution. So my question for you gents and madams is: do you know of a more simple solution?
    Best regards
    Benny Lange
    Edited by: Benny Lange on Oct 6, 2009 11:33 AM

    Hi you all.
    In this case the solution was to pass the id in the url to the second iview and let that iview use the id to retreive data from the backend system.
    But I still think the question is interesting, if it's possible to open a second jsp window after a server round trip and still have the first one open.
    All the best
    Benny

  • 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

  • To combine a multiple jsp pages in a one single page

    hi all,
    my problem statement is, i have 5 tabbed panes i,e each in a jsp page i need to put all those information into one single jsp page...while submiting the data. so how can i do about this using jsp.
    regards
    geetha

    The use of frames is highly discouraged (as is the use of scriptlets). So don't even think about it.
    You can just include a JSP page in each tab using jsp:include. You can hide/show the tabs using CSS/JS and/or a request parameter.

  • 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;
    }

Maybe you are looking for

  • Sorting photos by date/time taken, when date/time created is not an option?

    I'm so sorry if this has been answered elsewhere, but I can't find it on Google or in the forums... I need to sort wedding photos from multiple photographers by date taken so I can sort through the wedding as a full event. Sorting by the date/time th

  • MS SQL 2005 x64 Linked Server to Oracle 10g 32bit

    I need to connect to a 10.2.0.4 Oracle DB from a SQL Server 2005 x64 on W2003. The Instant Client installed is 10.2.0.1 with ODP 10.2.0.3, which is used to connect to another Oracle DB. I get de error ORA-12154 while doing the linked server query. Do

  • How to pass from CRC Kermit to CRC Xmodem

    Hi, I am trying to créate a CRC Xmodem calculator. I write a number, and the program is supposed to generate the CRC Xmodem 4 character code of that number. So far, I managed to calculate the CRC Kermit and the CRC-16, but I am not able to find how t

  • Best option for mass G/L Account document (FB50) simulation & creation

    Guyz, i'm looking for best option to go for uploading journals after successful simulation througha program.... i..e, before creating G/L Accounts, i want to simulate and go ahead with real creation.... do we have any bapi for simulation ? Edited by:

  • How to use flash on camera?

    Trying to figure out if there is a flash button for my iPad camera?? Where??