Can we run servlets as standalone GUIs??

Hi,
I need clarification regarding running server side programs as standalone GUI (say java swings) on the local user machines??
ofcourse, we can run servlets on the browser window. but i am not if it's possible to run as swing GUI. please let me know
thanks
sri.

Think of it this way, the communication between browser and Servlet is simply HTTP. The browser does not 'run' or 'invoke' your Servlet. Rather it initiates an HTTP request that the Servlet will inspect and take some action (via form parameters, URL parameters, the URL itself, etc.) Then an HTTP response is returned.
Your Swing client can emulate a browser, and unless you write code to detect so otherwise, your Servlet will not be able to distinguish the standalone client from the browser. As long as you submit valid HTTP requests that the Servlet can process, both clients are equally valid.
- Saish

Similar Messages

  • How Can I Run Servlet in tomcat

    Hi My Friends
    Please can any one tell me how can I Run Servlet in tomcat using my own Virtual Directory � my ask about , what is the structure it must be make it in the hierarchy of the sub folder of Virtual Directory , and in watch folder it must be put the servlet files and there is any change it must be make it in any file of the tomcat files and so on
    Please give my full details about this thing
    And thanks

    What version of Tomcat are u using?

  • Can I run Servlets in the Sun App Server?

    I am trying to run a servlet. I am not sure if I can run the same using the Sun app server. any help to clarify the following queries would be appreciated.
    1. Should I have to specify a path in the environmental variables?
    2. Is there a web site that tells me the same with respect to running the servlet on a Sun app server.
    Thanks in advance.
    --Srikanta                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    I'm not sure what you want in regards to question, but I can assure you that you can run servlets in S1AS7. My recommendation is to just package your servlet into a web archive (war) and deploy it. You can deploy it via the commandline (asadmin) or the web based administrative client (likely http://localhost:4848). For more information on this I suggest reading:
    http://docs.sun.com/source/816-7150-10/index.html
    You must likely want to read the section on assembling and deploying web applications.
    Matt Bauer

  • Tomcat 4.0 can't run Servlets at my folder

    Hello
    I try to run my servlet with timcat 4.0 at my directory:
    webapps/ild/webINF/classes/ild/claims/MyServlet
    at local web.xml:
    <servlet>
    <servlet-name>ClaimsServlet</servlet-name>
    <servlet-class>ild.claims.ClaimsServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ClaimsServlet</servlet-name>
    <url-pattern>/ild/claims/claims</url-pattern>
    </servlet-mapping>
    * under Forte4J4 with tomcat 4 its running ok
    at conf/server.xml:
    <Context path="/ild" docBase="ild" debug="0" reloadable="true">
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_examples_log." suffix=".txt" timestamp="true"/>
    </Context>
    and I try to run it and I got:
    (claims/clams)is not availabe
    at the examples folder I can run servlets
    what hav I don wrong?

    check it once more if your ClaimsServlet.class is in ../webapps/ild/webINF/classes/ild/claims/ folder or not? one molre important note: it is not webINF like you have written it is WEB-INF,though it is not case sensitive i guess but note the '-' in between.name your folder properly. Then change the url-pattern to something simple like /claim instead of /ild/claims/claims like you have used (just a suggestion) and then point your browser to http://localhost:<port>/ild/claim and let us know what happens
    regards
    padmanava

  • Can't run java program with GUI

    My computer can run java program properly.
    However, for those program with GUI (using swing),
    my computer is unable to display the GUI.
    What's wrong with it? Is there any PATH I need to set before running GUI program?
    Thanks
    icedgold

    Cut, copy, paste then compile and run this;-import java.awt.*;
    import javax.swing.*;
    public class MyJFrame extends JFrame {
      public MyJFrame() {
          super("My first JFrame");
          Container c  = getContentPane();
          JPanel panel = new JPanel();
          panel.setBackground(Color.white);//  (new Color(255, 255, 255));
          JLabel jl = new JLabel("Yes it works");
          panel.add(jl);     
          c.add(panel);
      public static void main(String[] args) {
        MyJFrame frame = new MyJFrame();
        frame.setSize(180,120);
        frame.setLocation(200, 300);
        frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
        frame.setVisible(true);
    }

  • How can i run servlet in netbeans

    i am new to jsp & servlet. i am using netbeans 6.5 and tocat. i can not understand wehere to save the jsp & servlet
    files.please help me.

    Create a new Project
    > Enter ur project Name
    > By selecting finish u can create a new project only with Servlets & JSP
         > If you want to include Enterprise framework select on you requirement.
    Create a new file
         >Choose the type of file as Servlet
         >then input your servlet name
         >Here you can change Servlet Name and URL-Pattern for your servlet
         >Default is considered as ur servlet file name
    Do stuff in servlet
         >Compile and Run
    Hope these steps are helpful for you

  • How can i running servlet in tomcat 4.1

    sir,
    i want to know ,what are the settings?i have to do before running a servlet
    i installed tomcat4.1 in C:\Program Files\Apache Group\Tomcat 4.1.
    but i reffered a lot of tutorial ,i couldnt understand that.
    and also i set jsdk path;

    u need to set the path and classpath in command prompt.
    Create a directory on c drive say "c:\job_todler" and enter ----->
    set the path =c:\jdk1.3\bin;%path%
    set classpath = c:\Apache Group\Tomcat\Common\lib\servlet.jar
    Now come to,
    c:\Apache Group\Tomcat\bin>set JAVA_HOME=C:\JDK1.3
    c:\Apache Group\Tomcat\bin>set CATALINA_HOME=C:\ApacheGroup\Tomcat
    c:\Apache Group\Tomcat\bin>startup
    bye

  • Tomcat can't run servlet /servlet tag help me please!

    do I config the web.xml file?

    Take a look at:
    http://java.sun.com/dtd/web-app_2_3.dtd
    It is the definition of what can be (and in what order) in a web.xml file for servlet specification 2.3 (ie: Tomcat 4.1).

  • Can't run servlet...

    I tried to run example, like SimpleServlet but got following errors
              What does it mean?
              Fri Mar 10 14:40:23 PST 2000:<I> <ListenThread> Adding address:
              BEIJING/209.157.
              35.35 to licensed client list
              Fri Mar 10 14:40:24 PST 2000:<I> <NTSocketMuxer> Allocating: '2' NT
              reader threa
              ds
              Fri Mar 10 14:40:24 PST 2000:<E> <ServletContext-General> Error loading
              servlet:
              examples.servlets.SimpleServlet
              java.lang.IllegalAccessError: try to access class
              weblogic/utils/classloaders/Fi
              leSource from class weblogic/servlet/internal/WarClassFinder
              at
              weblogic.servlet.internal.WarClassFinder.getSource(WarClassFinder.jav
              a, Compiled Code)
              at
              weblogic.servlet.internal.WarClassFinder.getClassSource(WarClassFinde
              r.java:110)
              at
              weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
              ClassLoader.java:287)
              at
              weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
              cClassLoader.java, Compiled Code)
              at
              weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader$Slave.
              loadClass(RecursiveReloadOnModifyClassLoader.java:234)
              at
              weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
              Loader.java, Compiled Code)
              at
              weblogic.utils.classloaders.RecursiveReloadOnModifyClassLoader.findLo
              calClass(RecursiveReloadOnModifyClassLoader.java:109)
              at
              weblogic.utils.classloaders.GenericClassLoader.reallyLoadClass(Generi
              cClassLoader.java, Compiled Code)
              at
              weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
              Loader.java, Compiled Code)
              at
              weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClass
              Loader.java, Compiled Code)
              at
              weblogic.servlet.internal.ServletContextImpl.loadClass(ServletContext
              Impl.java:1551)
              at
              weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
              mpl.java, Compiled Code)
              at
              weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
              java:130)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:93)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java:737)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java:681)
              at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
              ContextManager.java:210)
              at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
              a:354)
              at
              weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:255)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,
              Compiled Code)
              Fri Mar 10 14:40:24 PST 2000:<E> <ServletContext-General> Servlet failed
              with Se
              rvletException
              javax.servlet.ServletException: Servlet class:
              examples.servlets.SimpleServlet c
              ould not be handled by the ClassLoader
              at
              weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
              mpl.java, Compiled Code)
              at
              weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
              java:130)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:93)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java:737)
              at
              weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java:681)
              at
              weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
              ContextManager.java:210)
              at
              weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
              a:354)
              at
              weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:255)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,
              Compiled Code)
              

    As a beginner, I would advice you to run your servlet on Tomcat.
    Running a servlet on IIS needs a round about solution.

  • How to run servlet with tomcat

    I have a probrom that how can I run servlet with tomcat?
    I have new a folder classes in webapps\root\WEB-INF\,and put the .class
    programme in it ,but http://localhost:8080/servlet/HelloWorldExample
    can't run ,it give me a error than http:404 not found.
    could you tell me how i can solve the problem.
    Thank u very much.

    Hi,
    Make sure the class is in classpath or in WEB-INF/classes folder and make an entry for servlet tag in web.xml in WEB-INF folder.
    Regards

  • How to run servlets in IIS Server

    Hi Techies,
    I had read in one book , in IIS server we can run servlets n jsp.
    Can u guys tell how can we run servlets n jsp in IIS server. Does we need to include some 3rd party software in IIS
    regards,
    KRish

    Well if you were to use apache you would use the
    mod_jk_apache2
    However, im really not sure if that is around for win32 systems. However, as i said above im not 100% on windows systems.
    If you really want to test portability set aside a 5gb partition and install linux which most standard distros already have apache2/tomcat installed.(Fedora)
    Also i have to agree this seems less and less java based and more and more system based.
    If you plan on taking the route mentioned above start a post at places like linuxquestions.org since they have more tech junkies then you could imagine.

  • Set Path for running servlets

    Hi,
    Just started learning JSP.
    Am trying to run the helloworld.java
    from command prompt has c:\Tomcat 4.1\webapps\examples/WEB-INF/classes/HelloWorld.java.It says pacakage javax.servlet.http doesnot exist.Why is this?am i doing some thing wrong?
    I tried to run it from Tomcat as well.
    http://localhost:8080/examples/WEB-INF/classes/HelloWorld.java
    It says The requested resource (/examples/servlets/helloworld) is not available.
    Any help appreciated
    Thanx
    Shenoy

    You can not run servlets from the command line. You need to run them from the browser. The url should look like:
    http://localhost:8080/examples/servlet/HelloWorld.java
    Look at the tomcat examples at
    http://localhost:8080/index.jsp

  • Servlet can't run,Could not find the Main class,but how ?

    well i have made a simple servlet,but when i run it i get the following error.
    C:\jdev903_pre\jdk\bin\javaw.exe -ojvm -classpath C:\jdev903_pre\j2ee\home\oc4j.jar -Doracle.j2ee.dont.use.memory.archive=true com.evermind.server.OC4JServer -config C:\jdev903_pre\jdev\system9.0.3.988\oc4j-config\server.xml
    [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    [waiting for the server to complete its initialization...]
    java.lang.NoClassDefFoundError: com.evermind.server.OC4JServer
    Exception in thread main
    Process exited with exit code 1.
    kind regards
    Thanks for the very fast response,but how ?
    Can you run your servlet on OC4J standalone directly, to narrow down the problem..
    thanks,
    -Prasad

    A quick way to test would be
    - Assuming you have OC4J standalone installed
    - copy your servlet (HelloWorld.java) file into \default-web-app\WEB-INF\classes
    - compile it
    - run it using the url http://localhost:8888/servlet/HelloWorld
    -Prasad

  • Servlet can't run,Could not find the Main class

    well i have made a simple servlet,but when i run it i get the following error.
    C:\jdev903_pre\jdk\bin\javaw.exe -ojvm -classpath C:\jdev903_pre\j2ee\home\oc4j.jar -Doracle.j2ee.dont.use.memory.archive=true com.evermind.server.OC4JServer -config C:\jdev903_pre\jdev\system9.0.3.988\oc4j-config\server.xml
    [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
    [waiting for the server to complete its initialization...]
    java.lang.NoClassDefFoundError: com.evermind.server.OC4JServer
    Exception in thread main
    Process exited with exit code 1.
    kind regards

    Jean,
    Can you run your servlet on OC4J standalone directly, to narrow down the problem..
    thanks,
    -Prasad

  • How I can run servlets in Apache 1.3.2.7

    hi i am using JSP as Interface..and Servlets as controller...
    also Using Apache Httpd server,verion is 1.3.2.7
    plz tell me how i can use apache to run my servlets.
    Rahul.

    To run servlets in Apache you need the mod_jk module. But as the previous post, it is better to use Tomcat and putting both, Apache and Tomcat, working together. Tomcat will serve all the java related things, and the Apache, the html, php, etc.

Maybe you are looking for

  • SQL report link to another report

    Hello, I am using Apex 4 and trying to link an sql report with another report. If I were able to use an interactive report I could easily link that to another page, but that would require me to have a primary key. The problem is that I need to link a

  • How to take Screen shot in ABAP ?

    Dear all , I have come across the situtaion as follows : a) Will want to open the file from the desktop b) Take the screen shot of that open file c) Close the file d) Then want to attach that screen shot in the PDF e) In the similar way i will do for

  • Closed lid

    is there any way to keep my music playing while the lid of the ibook is closed? in other words does the laptop have to go to sleep when closed, or is that a setting that i can change?

  • Intermittent Problem with Business Event.

    Hi, I have a problem with a BES Event. My suspicions are that the event is intermittently nor firing. It's custom code subscribed to '*.apps.ar.hz.PersonProfileExtAttr.Update' (an EBS Person Profile Extensible Attribute Update). In the first lines of

  • File Browser Problem????

    Does anyone know how to get my File Browser to come on. I got it once and it was locked up. Please advise. Thanks!