JSP/Servlet code for searching for Domain availability

Hi Guys
I am giving a service on my homesite which will search for the domain availability. Users will enter the domain name and the code should check whether the domain is already taken or it is available for registration
Please help me out.

Nah, I don't have one myself. WHOIS can work but only for .org, .net and .com (and a few others here and there.) In that case, all you'd have to do is run the command, and look for the text which says it isn't registered..
trejkaz@carroll:~> whois gnifodgjidfo.com
[whois.crsnic.net]
Whois Server Version 1.3
Domain names in the .com, .net, and .org domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.
No match for "GNIFODGJIDFO.COM".
Last update of whois database: Sun, 25 Nov 2001 16:58:31 EST <<<The Registry database contains ONLY .COM, .NET, .ORG, .EDU domains and
Registrars.

Similar Messages

  • Servlet code for this appn

    Write a servlet or JSP based appn?
    2) Accept Name, address,Credit card number,# of disney world tickets(adult),# of Disney world tickets (child)?
    2) On clicking the submit button the servlets gives the price of these tickets from web:xml file and cal total bill.It displays the bill with total amount ,name,and address of user
    this bill page also has a button "buy tickets" and "cancel ticket"
    if uses presses the "buy tickets" button,the details of transaction n
    ame,cc no,Atickets ,purchased , child , child ticktickets purchased and total cost are written to textfile
    3)at end of tra
    nsaction show initial page with last purchasers
    name
    and amount .do not show the credit card number
    name
    address
    cc no
    a tickets
    c tickets

    Write a servlet or JSP based appn?One or the other? I would think the best application would be a combination of the two.
    2) Accept Name, address,Credit card number,# of
    disney world tickets(adult),# of Disney world tickets
    (child)?Yes, you should probably accept those parameters. They are rather necessary for an only sales transaction...
    >
    >
    2) On clicking the submit button the servlets gives
    the price of these tickets from web:xml file and cal
    total bill.It displays the bill with total amount
    ,name,and address of user
    this bill page also has a button "buy tickets" and
    "cancel ticket"Hey, is this a trick question? There are two number 2s. Is it either or? If so, I would choose the first option rather than the second, because I don't know what the web:xml file is, and it seems like it requires several different pages.
    >
    if uses presses the "buy tickets" button,the details
    of transaction n
    ame,cc no,Atickets ,purchased , child , child
    ticktickets purchased and total cost are written to
    textfile
    3)at end of tra
    nsaction show initial page with last purchasers
    name
    and amount .do not show the credit card number
    name
    address
    cc no
    a tickets
    c ticketsHmmm.... I couldn't find a question in number 3. Could you please restate it.

  • Host for jsp servlet

    Hi all, I did an web application using jsp servlet.
    For broadcasting which is suitable linux cpanel or windows flesk?
    Thanks

    BumpIf nobody cared about this the first time, why do you
    think it needs to be bumped?1. My original post was on Friday, probably not the best time to get a response. So I bumped it up Sunday night to try for a response Monday morning.
    2. Fred visits the forums on Friday, but doesn't have a comment. Bob on the other hand doesn't visit the forum on Friday, but he does on Monday, and he has some advice.
    3. Do you give up the first time?

  • Eclipse plugin for Javadoc available?

    I'm using javadoc.exe from cmd line windows and saw a few plugins for eclipse. which ones are recommended?
    also, any good generic ant script code for this available?
    BTW: using JDK 5 and Eclipse 3.4 with JBDS 2.0
    Edited by: asookazian on Mar 17, 2009 10:04 AM
    Edited by: asookazian on Mar 17, 2009 10:04 AM

    asookazian wrote:
    I'm using javadoc.exe from cmd line windows and saw a few plugins for eclipse. which ones are recommended?Eclipse comes with built-in javadoc (File->Export->Javadoc), no need to use a non-standard plugin.
    asookazian wrote:
    also, any good generic ant script code for this available?ANT comes with a javadoc task and its documentation includes several usage examples. It doesn't get anymore generic than this.

  • ERROR [org.jboss.web.localhost.Engine] StandardWrapperValve[jsp]: Servlet.s

    My Code:
    <%@ page import="com.tcs.utilities.ExceptionHandler" %>
    <%@ page import="com.tcs.core.UserProfile" %>
    <%@ page import="com.tcs.core.HelpDeskUserProfile" %>
    <%@ page import="com.tcs.exception.InvalidSessionException" %>
    <%@ page import="com.tcs.constants.HelpDeskConstants" %>
    <%@ page import="com.tcs.utilities.LogHandler" %>
    <%@ page import="com.tcs.jsp.SessionDataContainer" %>
    <%@ page import="com.tcs.jsp.ContentModel" %>
    <%@ page import="com.tcs.jsp.helpdesk.HelpDeskSearchResultCM" %>
    <%@ page import="com.tcs.jsp.helpdesk.HelpDeskSearchResultCmd" %>
    <%@ page import="com.tcs.constants.CoreConstants" %>
    <%@ page import="com.tcs.constants.ExceptionTokens" %>
    <%@ page errorPage="s_error.jsp" %>
    <%@ include file="session_validation.jsp" %>
    <%
    System.out.println("recieved flag");
        LogHandler log = LogHandler.init();
    %>
    <%
    System.out.println("recieved flag");
          UserProfile profile = (UserProfile)session.getValue(HelpDeskConstants.SESSION_PROFILE);
              if(null == profile)
                   throw new InvalidSessionException();
         if(session.isNew())
              throw new InvalidSessionException();
    try{System.out.println("going for search");
        HttpSession sesshome = request.getSession(false);
        if(null == sesshome.getValue(HelpDeskConstants.SESSION_PROFILE) ) {
            throw new Exception ();
    System.out.println("going for search within");
        HelpDeskUserProfile objPrfl = (HelpDeskUserProfile) sesshome.getValue(HelpDeskConstants.SESSION_ADMIN);
        if (!objPrfl.isAdminFlag())
            throw new Exception();
    System.out.println("going for search1");
        HelpDeskSearchResultCM cm = new HelpDeskSearchResultCM();
        HelpDeskSearchResultCmd cmd = new HelpDeskSearchResultCmd();
    System.out.println("going for search2");
        cm = (HelpDeskSearchResultCM) cmd.execute( request, response );
         System.out.println("going for search2.5");
        SessionDataContainer.put(session.getId(),cm);
         System.out.println("going for search3");
         String pag="s_helpDeskSearchResult.jsp?hidComingFrom="+"SearchMenus";
    %>
          <jsp:forward page="<%=pag%>"/>
    <!--jsp:forward page="s_helpDeskSearchResult.jsp" /> 
    <jsp:param name="hidComingFrom" value="SearchMenus" />
    </jsp:forward -->
    <%  
    } catch(Exception e) {
       /*log.error(e,"p_helpDeskSearchResult.jsp",CoreConstants.HELPDESK);
        ExceptionHandler.handleJSPException(e, ExceptionTokens.HD_GET_DATA_ERROR,
                                        "p_helpDeskSearchResult.jsp");*/
                                                 System.out.println("Exception is " + e.getMessage());
    %>
    I get the following error when i run this code.
    ERROR [org.jboss.web.localhost.Engine] StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: /p_helpDeskSearchResult.jsp(68,5) jsp.error.badaction
         at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
         at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428)
         at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126)
         at org.apache.jasper.compiler.Parser.parseAction(Parser.java:671)
         at org.apache.jasper.compiler.Parser.parseElements(Parser.java:803)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:122)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199)
         at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:536)

    Hi,
    This forum is related to sun java studio creator . Could you please post this to appropriate forum
    Regards
    CreatorTeam

  • Does any one know what is wrong with this servlet code

    package com.bt.ros;
    import java.util.*;
    import java.io.*;
    import java.net.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import javax.sql.*;
    import javax.naming.InitialContext;
    import javax.naming.Context;
    import javax.naming.NamingException;
    * This class is a servlet that searches for a Finder Aid.
    * @author
    public class FinderAidsSearchS extends HttpServlet {
       * This is the static initializer,
       * executed the first time this class is referred to.
       * It makes sure the JDBC pool driver is loaded.
       * This method examines an HTTP request and searches for the
       * specified Finder Aid record in the database. It then redirects
       * the response to the <tt>Results.jsp</tt> JSP page.
      public void service(HttpServletRequest req, HttpServletResponse res)
           throws IOException
        HttpSession session = req.getSession(true);
    //res.setContentType("text/html");
    //PrintWriter out = res.getWriter( );
    //out.println("<HTML>");
    //out.println("<HEAD>");
    //out.println("<TITLE>");
    //out.println("A Servlet Example");
        String year   = req.getParameter("Year");
        String year_range      = req.getParameter("Year_Range");
        String county          = req.getParameter("County");
        Connection conn = null;
        try {
    //example code from tomcatmanual
    Context initContext = new InitialContext();
    Context envContext  = (Context)initContext.lookup("java:/comp/env");
    DataSource ds = (DataSource)envContext.lookup("jdbc/rosDS");
    //Connection
    conn = ds.getConnection();
              Statement stmt = conn.createStatement();
          String select = "select * from abridgment where " +
                          "(a_county = '" + county +
                          "' AND a_year_date = " + year +
    out.println("<DEBUG> <select> the select staement is : " + select);
          stmt.execute(select);
          ResultSet resultSet = stmt.getResultSet();
         Results abridgeresults = new Results();
         abridgeresults.setName("NaeemColl");
         Abridgment varabridgment = null;
          int nRows = 0;
          while(resultSet.next()){
            nRows++;
               varabridgment = new Abridgment();
           varabridgment.seta_county(county);
          varabridgment.seta_year_date(Integer.parseInt(year));
            varabridgment.seta_sub_year_volume(resultSet.getInt("a_sub_year_volume"));
           // out.println("varabridgment - attributes are:");
              //out.println("varabridgment - attributes are:" +varabridgment.geta_sub_year_volume());
              //out.println("varabridgment - attributes are:"+resultSet.getInt("a_sub_year_volume"));
              varabridgment.seta_page_id(resultSet.getString("a_page_id"));
            varabridgment.seta_month_date(resultSet.getInt("a_month_date"));
            varabridgment.seta_day_date(resultSet.getInt("a_day_date"));
            varabridgment.seta_year_sequence(resultSet.getLong("a_year_sequence"));
            varabridgment.seta_day_sequence(resultSet.getLong("a_day_sequence"));
            varabridgment.seta_year_volume(resultSet.getInt("a_year_volume"));
            varabridgment.seta_volume_id(resultSet.getString("a_volume_id"));
            varabridgment.seta_summary(resultSet.getString("a_summary"));
            varabridgment.seta_batch_id(resultSet.getLong("a_batch_id"));
            varabridgment.seta_image_id(resultSet.getLong("a_image_id"));
              abridgeresults.addAbridgment(varabridgment);
              //trying to use vector construct
          req.setAttribute("results",abridgeresults);
          //session.setAttribute("results", abridgeresults);
          stmt.close();
          conn.close();
    //out.println("</BODY>");
    //out.println("</HTML>");
    //      String sURL = res.encodeRedirectURL("/rossearch/results.jsp");
            try{
    //TEMPCOMM        res.sendRedirect(sURL);
    req.getRequestDispatcher("/rossearch/results.jsp").forward(req, res);
    //TEMPCODE
    //out.println("</BODY>");
    //out.println("</HTML>");
          catch(Exception e){
            System.err.println("Exception: FinderAidsSearchS.service: " + e);
        catch (Exception e) {
          System.err.println("Exception: FinderAidsSearchS.service: " + e);
    }i really need some assistance at the following areas of code :
    where the database results are set to attributes of one bean varabridgment (Type Abridgement) - the declaration and use of this bean.
    and where this bean is then added to another bean abridgeresults (Type Results) as a List collection.
    i get a null pointer exception when i try to retrieve the List from abridgeresults object of Type Results Bean.
    i would really appreciate some assistance in this - i really need to go to sleep now - but cant until i solve this issue. - thanks all in advance.

    below is exception outputed to tomcat log file.
    it is thrown at the following line of code in the jsp that tries to get the List object :
    currently jsp code to retrieve List: <% List myAbridgments = (List) request.getAttribute("results");
    for (int i = 0; i < myAbridgments.size(); i++) {
    abridgment = (Abridgment) myAbridgments.get(i);
    %>
    line that gives problem is
    (results_jsp.java:95)
    //myAbridgments - is variable where i store the List object in jsp scriptlet
    for (int i = 0; i < myAbridgments.size(); i++) {
    Also, i dont understand why the servlet keeps on forwarding to the results.jsp when i even comment out the line of code to forward request oobject to results.jsp - i recompile copy it over original and restart tomcat - but still i get the null pointer exception in results_jsp - but i'm no longer forwarding anything to this jsp. --- i want to do some out.printline statemets in servelt to see some of the data from the query - but i cant as it just forwrads the request to results.jsp - how can i output the data to look at debug - i dont have a log4j logger setup and dont have IDE to be able to place break points - so wanted to just output stuff to browser to have a look at what was going on - but can't as just forwards request on ?
    Exception ....
    2005-11-07 02:45:20 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:536)
    ----- Root Cause -----
    java.lang.NullPointerException
         at org.apache.jsp.results_jsp._jspService(results_jsp.java:95)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
         at java.lang.Thread.run(Thread.java:536)

  • Passing data from jsp/servlet to a Tuxedo Service thru VIEW

    Hi..
    We are using Tuxedo10g R3 on AIX 5.3..
    We have a Tuxedo Service running which takes values from the VIEW and converts that to upper case.. From the jsp page v r passing values to the VIEW fields which will be accepted by the service..
    For testing v checked the service with a tuxedo client and it is working fine..
    We have defined a jolt repository file for this service and finished bulkloading and coded the servlet also.. After passing the datas from the jsp, the Tuxedo service is called and it is ended.. but in the service only blank values are passed or the datas are not passed to VIEW fields.. It is not showing any error..
    The repository file for this service:
    service=NSIMPSRV
    export=true
    inbuf=VIEW
    inview=sample
    outbuf=STRING
    param=FIRSTSTR
    type=string
    access=in
    param=SECONDSTR
    type=string
    access=in
    param=THIRDSTR
    type=string
    access=in
    param=S-FIRST
    type=string
    access=out
    param=S-SECOND
    type=string
    access=out
    param=S-THIRD
    type=string
    access=out
    and the servlet code for this service:
    Result result1;
    ServletSessionPool servletsession = (ServletSessionPool) joltsession.getSessionPool("demojoltpool");
    ServletDataSet joltdataset = new ServletDataSet();
    joltdataset.setValue("FIRSTSTR","Testing");
    joltdataset.setValue("SECONDSTR","Tuxedo");
    joltdataset.setValue("THIRDSTR","Views");
    result1 = servletsession.call("NSIMPSRV", joltdataset, null);
    System.out.println("FIRSTSTR:"+result1.getValue("S-FIRST",""));
    System.out.println("SECONDSTR:"+result1.getValue("S-SECOND",""));
    System.out.println("THIRDSTR:"+result1.getValue("S-THIRD",""));
    we are not sure why the datas have not been passed.. do anyone have any idea regarding this??
    Thanks..

    Hi Wayne,
    This is my view definition:
    VIEW sample
    # type cname fbna count flag size null
    string firststr - 1 - 10 -
    string secondstr - 1 - 10 -
    string thirdstr - 1 - 10 -
    ENDJolt repository file:
    service=NSIMPSRV
    export=true
    inbuf=VIEW
    inview=sample
    outbuf=VIEW
    outview=sample
    param=FIRSTSTR
    type=string
    access=inout
    param=SECONDSTR
    type=string
    access=inout
    param=THIRDSTR
    type=string
    access=inoutThe Servlet code is:
    package Servlet;
    import java.io.IOException;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import bea.jolt.pool.servlet.weblogic.PoolManagerStartUp;
    import bea.jolt.pool.servlet.*;
    import bea.jolt.pool.ApplicationException;
    import bea.jolt.pool.SessionPoolException;
    import bea.jolt.pool.ServiceException;
    import bea.jolt.pool.SessionPoolManager;
    import bea.jolt.pool.*;
    * Servlet implementation class ZC00582Servlet
    public class VIEWServlet extends HttpServlet {
         private ServletSessionPoolManager joltsession = (ServletSessionPoolManager) SessionPoolManager.poolmgr;
    public VIEWServlet() {
    super();
    // TODO Auto-generated constructor stub
         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              // TODO Auto-generated method stub
         response.setContentType("text/html");
         ServletResult result;
         Result result1;     
         String String1 = request.getParameter("FIRSTSTR");
         String String2 = request.getParameter("SECONDSTR");
         String String3 = request.getParameter("THIRDSTR");
         System.out.println("THE VALUES BEFORE CONVERSION");
         System.out.println("FIRSTSTR:"+String1);
         System.out.println("SECONDSTR:"+String2);
         System.out.println("THIRDSTR:"+String3);
         System.out.println("1..");     
         //ServletResult message;
         ServletSessionPool servletsession = (ServletSessionPool) joltsession.getSessionPool("demojoltpool");
         System.out.println("2..");
         ServletDataSet joltdataset = new ServletDataSet();
         //joltdataset.importRequest(request);
         System.out.println("3..");
         //joltdataset.setValue("firststr","Hi");
         joltdataset.setValue("firststr",String1);
         System.out.println("4..");
         //joltdataset.setValue("secondstr","hello");
         joltdataset.setValue("secondstr",String2);
         System.out.println("5..");
         //joltdataset.setValue("thridstr","fine");
         joltdataset.setValue("thirdstr",String3);
         System.out.println("6..");
         //result = (ServletResult) servletsession.call("NSIMPSRV", joltdataset, null);
         result1 = servletsession.call("NSIMPSRV", joltdataset, null);
         result = (ServletResult) result1;
         System.out.println("THE VALUES AFTER CONVERSION");
         System.out.println("FIRSTSTR:"+result.getStringValue("firststr",""));
         System.out.println("SECONDSTR:"+result.getStringValue("secondstr",""));
         System.out.println("THIRDSTR:"+result.getStringValue("thirdstr",""));     
         protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              // TODO Auto-generated method stub
    and my server program :
    IDENTIFICATION DIVISION.
    PROGRAM-ID. NSIMPSRV.
    AUTHOR. TUXEDO DEVELOPMENT.
    ENVIRONMENT DIVISION.
    CONFIGURATION SECTION.
    DATA DIVISION.
    WORKING-STORAGE SECTION.
    * Tuxedo definitions
    01 TPSVCRET-REC.
    COPY TPSVCRET.
    01 TPTYPE-REC.
    COPY TPTYPE.
    01 TPSTATUS-REC.
    COPY TPSTATUS.
    01 TPSVCDEF-REC.
    COPY TPSVCDEF.
    * Log message definitions
    01 LOGMSG.
    05 FILLER PIC X(10) VALUE
    "NSIMPSRV :".
    05 LOGMSG-TEXT PIC X(50).
    01 LOGMSG-LEN PIC S9(9) COMP-5.
    * User defined data records
    01 STRING-DATA.
    COPY SAMPLE.
    LINKAGE SECTION.
    PROCEDURE DIVISION.
    START-FUNDUPSR.
    MOVE LENGTH OF LOGMSG TO LOGMSG-LEN.
    MOVE "Started" TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    * Get the data that was sent by the client
    MOVE LENGTH OF STRING-DATA TO LEN.
    CALL "TPSVCSTART" USING TPSVCDEF-REC
    TPTYPE-REC
    STRING-DATA
    TPSTATUS-REC.
    IF NOT TPOK
    MOVE "TPSVCSTART Failed" TO LOGMSG-TEXT
    PERFORM DO-USERLOG
    PERFORM EXIT-PROGRAM
    END-IF.
    IF TPTRUNCATE
    MOVE "Data was truncated" TO LOGMSG-TEXT
    PERFORM DO-USERLOG
    PERFORM EXIT-PROGRAM
    END-IF.
    MOVE FIRSTSTR TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    MOVE SECONDSTR TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    MOVE THIRDSTR TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    INSPECT FIRSTSTR CONVERTING
    "abcdefghijklmnopqrstuvwxyz" TO
    "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
    INSPECT SECONDSTR CONVERTING
    "abcdefghijklmnopqrstuvwxyz" TO
    "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
    INSPECT THIRDSTR CONVERTING
    "abcdefghijklmnopqrstuvwxyz" TO
    "ABCDEFGHIJKLMNOPQRSTUVWXYZ".
    MOVE "Success" TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    MOVE STRING-DATA TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    SET TPSUCCESS TO TRUE.
    COPY TPRETURN REPLACING
    DATA-REC BY STRING-DATA.
    * Write out a log err messages
    DO-USERLOG.
    CALL "USERLOG" USING LOGMSG
    LOGMSG-LEN
    TPSTATUS-REC.
    * EXIT PROGRAM
    EXIT-PROGRAM.
    MOVE "Failed" TO LOGMSG-TEXT.
    PERFORM DO-USERLOG.
    SET TPFAIL TO TRUE.
    COPY TPRETURN REPLACING
    DATA-REC BY STRING-DATA.
    Thanks & Regards,
    Janani.

  • Simple servlet code

    Forum wellwishers giv some simple easy to understand Servlet Codes for JServlet beginners an especially me with the code explanation.
    Tks
    MichelFdO M

    Start reading part II of the Java EE tutorial: http://java.sun.com/javaee/5/docs/tutorial/doc/bnadp.html
    Servlets are covered in chapter 4 and on.

  • Sample controler. servlet code wanted

    Dear All
    Can some one please mail me a sample controler.jsp / Servlet code preferable a professional one with session tracking.
    [email protected]
    Thanks in Advance

    Try Struts from jakarta.apache.org
    It blows out any other controller from the planet
    HTH
    Trajano Roberto

  • Different Classloader for JSP, Servlets?

    Hi!
              Does the WL5-JSP-servlet use an other classloader then the other
              servlets??
              I've previous posted an article with the subject "JSP - Servlet - Static
              Code in Classes".
              I will try to describe my problem better:
              At server startup I pass information to my startup servlet, for example
              the user and pw for our connection pool. The startup servlet instanciates
              the class Global which creates a db-pool with the user and pw getting
              from
              the startup-servlet.
              startup-servlet {
              public void init(ServletConfig config)
              Global.init("user","pw");
              The class Global looks like this:
              class Global {
              static {
              // register jdbc driver
              // store file informations
              static public init(string, string) {
              // init the connection pool with user and pw
              static public getConnection() {
              // returns connection from pool
              All our other servlets then just use the methode Global.getConnection()
              and other methods from the class Global.
              All servlets works perfect and can access the db-pool.
              When a jsp-file is called which also uses the methode
              Global.getConnection(), a new Instance of the class Global will be made.
              In order to init all values again, I would have to call the
              Global.init(user, pw) methode again.
              So my question is: Why does the jsp file causes a new instance of the
              class Global?
              Does the WL5-JSP-servlet use an other classloader then the other
              servlets??
              

    I am seeing the problem is sp3. I can't use sp4 becuase form based
              authentication, FBA, was broken. I can only hope that FBA will be
              re-fixed in sp5.
              Kumar Allamraju wrote:
              >
              > If you are seeing this problem in SP4, yes this is a regression in SP4 &
              > SP5. We are already aware of this
              > problem. SP5 will be out in a week or so. But this fix won't be available
              > in SP5. Follow-up with
              > support.
              >
              > --
              > Kumar
              >
              > "Bryon G. Rigg" wrote:
              >
              > > I have an application which has a servlet that controls page navigation
              > > via an xml file. The servlet class is located beneath the
              > > WEB-INF/classes as is the xml file. When I have weblogic pointing to
              > > the app directory, my servlet finds the xml file, using the
              > > Class.getResourceAsStream() method, without a hitch. But when I
              > > package everything up into a war file, and point weblogic at the war
              > > file instead, the servlet can not locate the xml file.
              > >
              > > What gives? Is there some kind of brain-dead classloader being used
              > > for war files versus a normal classloader used for directories? Any
              > > workarounds? And when will sp5 be released? I have been hearing a
              > > week or two for weeks.
              [bryon.vcf]
              

  • Weblogic 6.0 (SP2) generates incorrect java code for JSP with response.sendRedirect()

              Hi,
              Here are the steps to reproduce the problem with the examplesWebApp application
              bundled with wlserver6.0(sp2):
              Product: Weblogic server 6.0 (sp2)
              Browser: IE 5.0
              1. Add index.jsp as the welcome file in WEB-INF/web.xml
              2. Create index.jsp as below:
              <%
              response.sendRedirect("index.html");
              return;
              %>
              <html>
              <head>
              <title>Index JSP file</title>
              </head>
              <body>
              <font color="red">This is index.jsp file </font>
              </body>
              </html>
              3. Create index.html as below:
              <html>
              <head>
              <title>Index HTML file</title>
              </head>
              <body>
              <font color="red">This is index.html file </font>
              </body>
              </html>
              4. Run the examples server and make sure examplesWebApp is deployed on the examples
              server using the console
              5. Access the URL http://localhost:7001/examplesWebApp
              The page will display a compilation error as below:
              C:\bea\wlserver6.0\config\examples\applications\examplesWebApp\WEB-INF\_tmp_war_examplesServer_examplesServer_examplesWebApp\jsp_servlet\_index.java:89:
              unreachable statement
              out.print("\r\n<html>\r\n<head>\r\n<title>Simple html</title>\r\n</head>\r\n<body>\r\n<font
              color=\"red\">This is index.jsp page</font>\r\n</body>\r\n</html>\r\n");
              ^
              and a look at the generated java code for index.jsp (_index.java) will reveal
              the erroneous code snippet below in the jsp service method:
              try { // error page try block
              //[ /index.jsp; Line: 1]
              response.sendRedirect("index.html"); //[ /index.jsp; Line: 2]
              return; //[ /index.jsp; Line: 3]
              out.print("\r\n<html>\r\n<head>\r\n<title>Simple html</title>\r\n</head>\r\n<body>\r\n<font
              color=\"red\">This is index.jsp page</font>\r\n</body>\r\n</html>\r\n");
              } catch (Exception __ee) {
              while (out != null && out != _originalOut) out = pageContext.popBody();
              pageContext.handlePageException(__ee);
              The above web application works fine in Tomcat 3.2.X environment. The Weblogic
              server 6.0 servlet engine should not generate the "out.println()" corresponding
              to the html section of index.jsp. The moment it sees the "return", it should stop
              processing further.
              Can someone from Weblogic support team please verify this and let me know when
              this bug will be fixed?
              One interesting thing I noticed was when we last tried weblogic 6.0 at its beta
              stage, it worked fine after we put in a special patch jar file called "redirectfix.jar"
              we received from weblogic team but somehow it got re-introduced by the time it
              was released!!
              We are planning to migrate our product from tomcat 3.2.x to weblogic 6.0. Our
              product has a lot of pages with such conditional {response.sendRdirect("page.jsp");return;}
              blocks. We would really appreciate a faster response form weblogic team.
              Thanks in advance.
              sam...
              Sam Palanisamy
              Senior Software Engineer
              Manage.com
              2345 N. First Street First Floor
              San Jose CA 95131
              

    Why should it stop when it sees a return? Is that in the spec?
              Peace,
              Cameron Purdy
              Tangosol Inc.
              << Tangosol Server: How Weblogic applications are customized >>
              << Download now from http://www.tangosol.com/download.jsp >>
              "Sam Palanisamy" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Hi,
              >
              > Here are the steps to reproduce the problem with the examplesWebApp
              application
              > bundled with wlserver6.0(sp2):
              >
              > Product: Weblogic server 6.0 (sp2)
              > Browser: IE 5.0
              >
              > 1. Add index.jsp as the welcome file in WEB-INF/web.xml
              >
              > 2. Create index.jsp as below:
              > <%
              > response.sendRedirect("index.html");
              > return;
              > %>
              > <html>
              > <head>
              > <title>Index JSP file</title>
              > </head>
              > <body>
              > <font color="red">This is index.jsp file </font>
              > </body>
              > </html>
              >
              > 3. Create index.html as below:
              > <html>
              > <head>
              > <title>Index HTML file</title>
              > </head>
              > <body>
              > <font color="red">This is index.html file </font>
              > </body>
              > </html>
              >
              > 4. Run the examples server and make sure examplesWebApp is deployed on the
              examples
              > server using the console
              >
              > 5. Access the URL http://localhost:7001/examplesWebApp
              >
              > The page will display a compilation error as below:
              >
              C:\bea\wlserver6.0\config\examples\applications\examplesWebApp\WEB-INF\_tmp_
              war_examplesServer_examplesServer_examplesWebApp\jsp_servlet\_index.java:89:
              > unreachable statement
              > out.print("\r\n<html>\r\n<head>\r\n<title>Simple
              html</title>\r\n</head>\r\n<body>\r\n<font
              > color=\"red\">This is index.jsp page</font>\r\n</body>\r\n</html>\r\n");
              > ^
              >
              > and a look at the generated java code for index.jsp (_index.java) will
              reveal
              > the erroneous code snippet below in the jsp service method:
              >
              > try { // error page try block
              >
              > //[ /index.jsp; Line: 1]
              > response.sendRedirect("index.html"); //[ /index.jsp; Line: 2]
              > return; //[ /index.jsp; Line: 3]
              > out.print("\r\n<html>\r\n<head>\r\n<title>Simple
              html</title>\r\n</head>\r\n<body>\r\n<font
              > color=\"red\">This is index.jsp page</font>\r\n</body>\r\n</html>\r\n");
              > } catch (Exception __ee) {
              > while (out != null && out != _originalOut) out =
              pageContext.popBody();
              > pageContext.handlePageException(__ee);
              > }
              >
              > The above web application works fine in Tomcat 3.2.X environment. The
              Weblogic
              > server 6.0 servlet engine should not generate the "out.println()"
              corresponding
              > to the html section of index.jsp. The moment it sees the "return", it
              should stop
              > processing further.
              >
              > Can someone from Weblogic support team please verify this and let me know
              when
              > this bug will be fixed?
              >
              > One interesting thing I noticed was when we last tried weblogic 6.0 at its
              beta
              > stage, it worked fine after we put in a special patch jar file called
              "redirectfix.jar"
              > we received from weblogic team but somehow it got re-introduced by the
              time it
              > was released!!
              >
              > We are planning to migrate our product from tomcat 3.2.x to weblogic 6.0.
              Our
              > product has a lot of pages with such conditional
              {response.sendRdirect("page.jsp");return;}
              > blocks. We would really appreciate a faster response form weblogic team.
              >
              > Thanks in advance.
              > sam...
              > Sam Palanisamy
              > Senior Software Engineer
              > Manage.com
              > 2345 N. First Street First Floor
              > San Jose CA 95131
              >
              >
              

  • How to get creator codes for search?

    How do you figure out/use the creator codes for seaching a file? In the good old OS days (i.e Mac OS) you dragged a file of the kind you were looking for into the search box after selecting "Creator is __". It doesn't work with OS X.
    I'm trying to find a Word document that I know was created in a 3 month window. Using Search for those dates and file type "document" has so far turned up over 8000 files, won't stop, and looks like it's returning almost exclusively files with long numbers ending in .cache, for example 123456789-0123456789.cache
    ARgh!

    Marlinespike
    Sorry, I didn't realise that Find wouldn't get extensions that weren't visible!
    How did you find "MSWD" was the code?I don't remember, I've known this for years! There are shareware databases available with lists of hundreds of codes. There are also shareware applications that will tell you the creator code and file type – but if you have the Developer Tools installed, you have a free application to do this, but it must be invoked from the command line:
    GetFileInfo BS030218.doc
    file: "/Users/michaelc/Documents/Correspondence/BS030218.doc"
    type: "W8BN"
    creator: "MSWD"
    attributes: avbstclinmedz
    created: 02/18/2003 19:27:31
    modified: 02/18/2003 19:27:31The full path to the application is /Developer/Tools/GetFileInfo, but you shouldn't need to type all that since installing the tools modifies your $PATH to include "/Developer/Tools/". So all you need do is type GetFileInfo, then a space, and then drag your file into the Terminal window and press return.

  • This is my Jsp code for image upload in database:

    This is my Jsp code for image upload in database:
    -----------Upload.jsp----------------
    <html>
    <head>
    </head>
    <body bgproperties="fixed" bgcolor="#CCFFFF">
    <form method="POST" action="UploadPicture.jsp" enctype="multiform/form-data">
    <%! int update=0; %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.text.*" %>
    <%@ page import="java.sql.Date" %>
    <%@ page import="java.io.*"%>
    <%@ page language = "java" %>
    <%
    try
    String ct="3";
    String path;
    File image=new File(request.getParameter("upload"));
    path=request.getParameter("upload");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:itPlusElectronics","","");
    PreparedStatement pstmt=con.prepareStatement("insert into graphics values(?,?,?)");
    pstmt.setString(2,path);
    pstmt.setString(3,ct);
    InputStream is=new FileInputStream(path);
    pstmt.setBinaryStream(1, is, (int)(image.length()));
    int s=pstmt.executeUpdate();
    if(s>0)
    out.println("Uploaded");
    else
    %>
    unsucessfull
    <%}
    is.close();
    pstmt.close();
    catch(Exception e)
    }%>
    </p>
    <p><br>
    <img src="UploadedPicture.jsp">image</img>
    <p></p>
    </form>
    </body>
    </html>
    My database name is itPlusElectronics and the table name is "graphics".
    I have seen as a result of the above code that the image is stored in database as "Long binary data". and database table is look like as follows-------
    picture path id
    Long binary data D:\AMRIT\1-1-Picture.jpg 3
    To retrive and display i use this JSP code as--
    ------------------------UploadedPicture.jsp------------------------------
    <html>
    <head>
    </head>
    <body bgproperties="fixed" bgcolor="#CCFFFF">
    <%! int update=0; %>
    <%@ page import="java.util.*" %>
    <%@ page import="java.sql.*" %>
    <%@ page import="java.text.*" %>
    <%@ page import="java.io.*"%>
    <%@ page language = "java" %>
    <%@page import="javax.servlet.ServletOutputStream"%>
    <%
    try
    String path;
    path=request.getParameter("upload1");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:itPlusElectronics","","");
    PreparedStatement pst = con.prepareStatement("SELECT * FROM graphics WHERE id ='3'");
    // pst.setString(3, id);
    ResultSet rs = pst.executeQuery();
    path=rs.getString("path");
    if(rs.next()) {
    byte[] bytearray = new byte[4096];
    int size=0;
    InputStream sImage;
    sImage = rs.getBinaryStream(1);
    response.reset();
    response.setContentType("image/jpeg");
    response.addHeader("Content-Disposition","filename=path");
    while((size=sImage.read(bytearray))!= -1 )
    response.getOutputStream().write(bytearray,0,size) ;
    response.flushBuffer();
    sImage.close();
    rs.close();
    catch(Exception e)
    %>
    </body>
    </html>
    Now after browsing a jpg image file from client side and pressing submit button ;
    I am unable display the image in the Upload.jsp file.Though I use
    <img src="UploadedPicture.jsp">image</img> HTML code in Upload.jsp
    file .
    Now I am unable to find out the mistakes which is needed for displaying the picture in the Upload.jsp page..
    If any one can help with the proper jsp code to retrive and display the image ,please please help me !!!!!!!!!!!!!!!!!!!!!!!!!!

    dketcham wrote:
    cotton.m wrote:
    >
    2) I'm looking at how you called stuff, and you're trying to call the jsp file as an image? That jsp isn't the source of the image, just a page linking to an image. I think if you really want to do things that way you're going to need to just include that jsp within the jsp you're calling it from (or you can do it the easy way, and if you have the information to get the path of the image you want, you could simply call the image from the first jsp you posted)This is incorrect.
    There are two JSPs. The second when called will (if it worked) return the source of an image as stored in the database.even when called with <img src=xx.jsp>??
    Yes.
    If any of what I say next seems obvious or otherwise negative I apologize, just trying to explain and I don't know what you know vs what you don't.
    The link in the src is just a URL not a filetype. So just because it ends with JSP does not mean it has to return HTML. The content type is determined by the browser using the Content-Type header returned by the server in the HTTP response. In this case the header is set to be a jpeg so that's what the browser will attempt to interpret the content part of the response as.
    So in fact one is not limited to just HTML or images but whatever content type you would like to return (that the browser can understand anyway). This could be HTML or it could be an image of some type or it could be a PDF or it could be an Excel spreadsheet. All you have to do in the JSP is set the header appropriately and then send content that is actually in that format.
    This does not just apply to JSP by the way but all other web programming languages. You can do similar things to produce the same results in PHP, Perl, ASP etc.
    The only JSP/Servlet complication is whether or not doing this in a JSP is a "good" idea but I am not an expert enough at that to make a definitive statement. Mostly though JDBC in a JSP is a no-no.

  • Why isn't there yet an available p2p embeded code for voip and video conference in Firefox??

    why isn't there yet an available p2p embeded code for voip and video conference in Firefox??

    So, the upload time will vary on internet connection. If there is an issue with how fast it is uploaded you can check if prefetching is turned on, but this does not really affect uploading [https://developer.mozilla.org/en-US/docs/Controlling_DNS_prefetching Controlling DNS prefetching]
    If you search for solutions, you will see a bunch of tweaks as well that may be helpful to your specific computer. [[Upgrade your graphics drivers to use hardware acceleration and WebGL]] to make sure you are all up to date as well.

  • What is the best editor to use for JSP/Servlet?

    Hello,
    What is the best editor to use for JSP/Servlet database development.
    I'm looking at Dreamweaver,Java Studio Creator.
    I want some thing fairly easy to use that has database helper wizards like dreamweaver.
    Thanks for the help.
    Frank

    Is it better to have a servlet do the database work and call it from JSP?No, it's better to have persistence objects do the database work. Servlets handle HTTP requests, and JSPs are HTML factories that should be pure view.
    But there are lots of ways to do things. You just have to understand the tradeoffs when you decide.
    I do not want to hammer out code, I want to learn the
    best way to do things from experienced developers. Sorry, sounded like you just wanted to churn stuff.
    "best way" can be subjective. In one app, "best" might be "delivered fastest". For another, "best" might be "most secure" or "most easily modified" or "best performing" or whatever. You won't get a "best" answer, only different choices. And they aren't always so easy to explain or execute.
    I'd recommend that you start by reading about layered applications (3-tier architectures) and MVC separation. Once you've Googled enough about that, look into a framework like Struts or Spring or WebWork. That'll help you figure out where to put each responsibility in your app.
    I can use dreamweaver to create web apps, but I hate
    the arrays used to define fields. It also seems not
    to take advantage of connection pooling.Don't know what you're talking about here, Frank. What do fields have to do with connection pooling?
    %

Maybe you are looking for

  • IDVD 6 / Slideshow Question

    I created a slideshow in iPhoto; then "shared" it to iDVD; then burned a copy onto a DVD. Now when I go back in directly to iDVD and select "Open an Existing Project" to select that project it's not available. Actually the filename is there (under "m

  • Can the Adapter Charger on MuVo2 FM be used for Visio

    As the title above can the Adapter Charger on?Creative MuVo2 FM be used for Creative?Vision M since both needs dc of 5V ? cause i have? charger for Creative muVo2 Fm but not ceati've Vision M. Thanks

  • On ffox4 where is padlock icon that denotes secure website

    in firefox 3 the padlock icon in lower right hand corner of screen indicated an https web page. in firefox 4 this icon is missing-at least in my installation. is there a way to get this back in ff4?

  • Path to download TUBS transports requests from service market place

    Hi All, I have to donwlad the following tubs transports request from service market place and apply in our system. Can sombody tell me the patch from where to download these transports as I am not able to search it. L4HK212672 Cumulative T5UTA, T5UTB

  • Photoshop Elements 10 uploading/deleting images error

    Hello, I attempted to upload new pictures to my Organizer from files and folders.  I selected the images I wanted to upload, and Elements began uploading them, but when it got to 95%, it said there was an error.  Afterwards, I tried to delete a pictu