How to run Java on distant server?
Hello,
I am quiet new in Java community.
I would like to buid java servers pages and run it on a server.
I could intall Tomcat and Java on my local server.
Now I would like to do it on a distant server.
How to do?
Thanks for your attention.
Gil
proutinette wrote:
Thanks.
This is confused and confusing probably because my english is not my language, and because i am not sure how a Java application works.
For running JSP on my local server, it is was easy, and I did need to know how it really works. I installed Tomcat server and Java SDK.
To run my application, i jsut need to type http://localhost:8080/myPage.jsp.
That description is not exact.
The server is running Tomcat with your application.
Your browser (not the application) connects to the server (tomcat) and the server (tomcat) runs your application and returns the result to the browser.
If i want to run the same myPage.jsp on my distant server, i would need probably to install something on my server?
www.mywebsite.com/myPage.jsp will not work just like that of course.
You need to install a number of things. At a minimum Tomcat and your application (the thing that runs inside Tomcat.) There is likely to be other requirements as well such as java and patches and perhaps a database server (if your application uses a database.)
So what do i need exactly to install on my server to run a JSP?
In fact, i am afraid if i install Tomcat on my server, the other applications will not work.What "other" applications?
Is Tomcat already installed on the server? Is there already other applications running on that server? Then yes you must install your application into Tomcat (not the server) such that it will not stop the other applications (in Tomcat) from running.
Similar Messages
-
How to run Java program as Daemon Server in linux
How to run Java program as Daemon Server in linux
i would like to run the java program on system start up in a redhat linux system
can any one provide rc.status filehttp://wrapper.tanukisoftware.org/
-
How to run java program from website?
Hello
I'd like to know how to run java program from my web page.
I'd like to push some button in this web page so java program that would be on my server
would pop-up. Can it be done automaticaly upon running this web site? (without any buttons - I just enter website and program pops up).
CheersI rather thought about RMI. But I could try servlets. So how it would look like?.
I would make http request in browser (enter address) and program would show up in its window?. And I would not have to change anything in my program?. This program would run then on both boxes?. One remotely and one not?.
But I would have to learn some basics, I've never worked with servlets. Could you suggest some good sites about it?. With ready examples so I could tweak them to my purpose.
Message was edited by:
macmacmac -
How to run jsp in tomcat server
hi this is satish1529,
i am new to jsp technology,i have written small jsp file and html file,i don't know where to place jsp and html files in tomcat server and where i have to do setting in the server and how to run jsp file. pls give me step by step describing how to run jsp in tomcat server.
i am showing u files
this is jsp file
<html>
<body>
<center> data recieved from client <center>
<%
String s= request.getParameter("t1");
String a= request.getParameter("t2");
%>
username :<%=s%><br>
address :<%=a%>
</body>
</html>
this is html file
<html>
<body>
<form action="http://localhost:8080/form.jsp">
enter name <input type="text" name="t1"> <br>
enter address <textarea name="t2"> </textarea> <br>
<input type="submit" vaule="login">
</form>
</body>
</html>Thanx a lot for ur promt reply.
we r succful in running simple jsp in tomcat6.0.
bt one more problem occured as following when we r trying to run jsp file in tomcat.
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /main1.jsp(1,1) The value for the useBean class attribute webCounter is invalid.
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:148)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1200)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1155)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
org.apache.jasper.compiler.Generator.generate(Generator.java:3374)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:210)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs. -
How to run java servlet without using Web.xml?
How to run servlet without using Web.xml? From a book, I know that web.xml descriptor is optional, but the book doesn't tell us how to run java servelet without web.xm descriptor. So how to do that? Thanks a lot.
How to run servlet without using Web.xml?But Tomcat now uses a web.xml for its global server-wide configuration.
If you'd like to invoke a servlet with:
http://host/servlet/ServletName
you have to enable the invoker servlet.
[from an HTML]
<FORM METHOD="POST" ACTION="/servlet/HGrepSearchSJ">
[from resin.conf of Resin Web Server 2.1.12]
<!--
- The "invoker" servlet invokes servlet classes from the URL.
- /examples/basic/servlet/HelloServlet will start the HelloServlet
- class. In general, the invoker should only be used
- for development, not on a deployment server, because it might
- leave open security holes.
-->
<servlet-mapping url-pattern='/servlet/*' servlet-name='invoker'/>
[from TOMCAT5.0.19/conf/web.xml, a global server-wide web.xml file]
<!-- The "invoker" servlet, which executes anonymous servlet classes -->
<!-- that have not been defined in a web.xml file. Traditionally, this -->
<!-- servlet is mapped to URL pattern "/servlet/*", but you can map it -->
<!-- to other patterns as well. The extra path info portion of such a -->
<!-- request must be the fully qualified class name of a Java class that -->
<!-- implements Servlet (or extends HttpServlet), or the servlet name -->
<!-- of an existing servlet definition. This servlet supports the -->
<!-- following initialization parameters (default values are in square -->
<!-- brackets): -->
<!-- -->
<!-- debug Debugging detail level for messages logged -->
<!-- by this servlet. [0] -->
<servlet>
<servlet-name>invoker</servlet-name>
<servlet-class>
org.apache.catalina.servlets.InvokerServlet
</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
---comment out below----------------------------------------------------------
<!-- The mapping for the invoker servlet -->
<!--
<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>
--> -
How to run java signed applet in vista with changing IE security options
how to run java signed applet in vista with changing IE security options. If i change the IE security settings to low. it works.
without changing the security setting, how to run.j_nanaji9 wrote:
how to run java signed applet in vista with changing IE security options. If i change the IE security settings to low. it works.
without changing the security setting, how to run.Can't be done without changing the security setting. -
How to run .java file in windows ?
How to run .java file in windows without installing any program? Thx!
First, U must make sure that there is JDK on your computer
Then, set the envionment variables which the os can find your compiler and interpreter: javac java
after those, you must complie your .java file to .class file, then you can excute it by java, for example " java helloworld" -
How to run java using xcode?
i have to install "java developer " but i can't find, where i can run Java, Please give me information about "how to run java use xcode " ?
Download the SDK from Oracle, code, enjoy.
-
How to run Java Card 2.2.1 demo application?
Hi Friends..
i want to know how to run Java Card 2.2.1 demo application in Windows environment..
Sorry, perhaps this question looks like a little bit stupid.. :(
In Windows, I've set the environment variables for :
JAVA_HOME : C:\Program Files\Java\jdk1.6.0_03
JC_HOME : C:\java_card_kit-2_2_1
and then how to run demo1.scr, etc?.
Please help me regarding this,
Thanks in advance..Is there any suggestion for my question?.. :(
Thanks in advance.. -
How to run java on n900?
therez no java function on it but i think there are software or emulator to run java if there is any way to run java plzz tell me in brief...................my another questn is dat if nxt firmware will releaz wid d java embeded code dat supporting jar programmes?
proutinette wrote:
Thanks.
This is confused and confusing probably because my english is not my language, and because i am not sure how a Java application works.
For running JSP on my local server, it is was easy, and I did need to know how it really works. I installed Tomcat server and Java SDK.
To run my application, i jsut need to type http://localhost:8080/myPage.jsp.
That description is not exact.
The server is running Tomcat with your application.
Your browser (not the application) connects to the server (tomcat) and the server (tomcat) runs your application and returns the result to the browser.
If i want to run the same myPage.jsp on my distant server, i would need probably to install something on my server?
www.mywebsite.com/myPage.jsp will not work just like that of course.
You need to install a number of things. At a minimum Tomcat and your application (the thing that runs inside Tomcat.) There is likely to be other requirements as well such as java and patches and perhaps a database server (if your application uses a database.)
So what do i need exactly to install on my server to run a JSP?
In fact, i am afraid if i install Tomcat on my server, the other applications will not work.What "other" applications?
Is Tomcat already installed on the server? Is there already other applications running on that server? Then yes you must install your application into Tomcat (not the server) such that it will not stop the other applications (in Tomcat) from running. -
How to run Java Application in Weblogic 8.1
Hi,
I'm new to Weblogic 8.1. I just deployed a EJB with WebLogic 8.1 Server and I
don't know how to run my Java Application against the EJB I deployed earlier.
I tried to run "java Client_1" in a console window. It gives me the following
message:
C:\temp\WebLogic\new>java Client_1
javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.
WLInitialContextFactory. Root exception is java.lang.ClassNotFoundException:
we
blogic.jndi.WLInitialContextFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:217)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.jav
a:42)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
49)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at Client_1.getInitialContext(Client_1.java:55)
at Client_1.main(Client_1.java:14)
C:\temp\WebLogic\new>hi,
i solve this one after check bea documnetaion.
with regards
jp -
How to run java from another directory
hi,
i have a Sample.java file in F drive(f:/Sample.java). I opened command prompt in windows and went to c: drive and try to compile as
C:\>javac f:/Sample.java
above command works well. it generated Sample.class file in F:/Sample.
But, when i try to Run that file, i got the error as follow.
C:\>java f:/Sample
Exception in thread "main" java.lang.NoClassDefFoundError: f:/Sample
Caused by: java.lang.ClassNotFoundException: f:.Sample
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: f:/Sample. Program will exit.
Please guide me to run java file from another directoryThanks a lot. I appreciate your answer
But, when i try to run the java program.. below message has been displayed, showing how to use the command with options....
I didn't get the result of java program.
c:\>java f:\Sample.java
C:\>java -cp f:\Sample
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
-server to select the "server" VM
-hotspot is a synonym for the "client" VM [deprecated]
The default VM is client.
-cp <class search path of directories and zip/jar files>
-classpath <class search path of directories and zip/jar files>
A ; separated list of directories, JAR archives,
and ZIP archives to search for class files.
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version and exit
-version:<value>
require the specified version to run
-showversion print product version and continue
-jre-restrict-search | -jre-no-restrict-search
include/exclude user private JREs in the version search
-? -help print this help message
-X print help on non-standard options
-ea[:<packagename>...|:<classname>]
-enableassertions[:<packagename>...|:<classname>]
enable assertions
-da[:<packagename>...|:<classname>]
-disableassertions[:<packagename>...|:<classname>]
disable assertions
-esa | -enablesystemassertions
enable system assertions
-dsa | -disablesystemassertions
disable system assertions
-agentlib:<libname>[=<options>]
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
-agentpath:<pathname>[=<options>]
load native agent library by full pathname
-javaagent:<jarpath>[=<options>]
load Java programming language agent, see java.lang.instrument
-splash:<imagepath>
show splash screen with specified image
C:\> -
How to run java application in Unix Box
Hi,
Would anybody show me how to run my server application in unix box?
Thank you very much.
HungYour application should have a main class. Suppose it's called MyMain.class. I'll assume it's in the anonymous package. So you cd to the directory containing the class, and type java MyMainIf it's not in the default package, or is a jar file, say so.
-
How to run Servlet in weblogic server ?
Hi ,
I am new to J2ee Tech.
how to run a simple servlet program in weblogic server?
mainly i want know how to give the address in ID.
Now i am using htt:\\localhost :7001\Sample\HelloServlet
but it is not working
Please give me the steps
Thanks
Merlin RosinaHi ,
I am new to J2ee Tech.
how to run a simple servlet program in weblogic server?
mainly i want know how to give the address in ID.
Now i am using htt:
localhost :7001\Sample\HelloServlet
but it is not working
Please give me the steps -
How to Run JSP in Tomcat Server 3.3.2
Hi all,
i have just installed tomcat server 3.3.2 in my system which as windows xp home edition as a operating system and no problem i can able to start the tomcat server.But the problem is that i dont no how to run jsp in tomcat i listed some of my problems below..
How to put my jsp file in the virtual directory(default and also i want to create ) then tell me how use IE to run the JSP file.
Thanks in advance..
With Regards
VijayHi all,
i have just installed tomcat server 4.1 in my
system which as windows NT 4.0 home edition as a
operating system and no problem i can able to start
the tomcat server.But the problem is that i dont no
how to run jsp in tomcat i listed some of my problems
below..
How to put my jsp file in the virtual
directory(default and also i want to create ) then
tell me how use IE to run the JSP file.
Thanks in advance..
With Regards
Baliram
Maybe you are looking for
-
Lumia 925 restarts after taking a picture with Nok...
Hey guys, so here is my problem: after I updated to the Lumia Black Update, the phone restarts every time take a picture using the smart camera. I checked that every app is up to date, any ideas what can I do?
-
hello, what can i do? i need the programm and since weeks it always crashes. i´m working on a imac.
-
Quick question about data replication
Hi all, We have 9i database running on Sun solaris. Can we make a copy of this database on another server (backup and restore) and then apply archive logs from the databaser to its copy to keep the copy current. I know Oracle has solution like Standb
-
For some user create dACL only_default_router permit icmp any host 192.168.100.1 permit tcp any host 192.168.100.1 deny ip any any After user log in windows i found logs on switch 001867: *Mar 16 22:03:58.196: %PARSER-5-CFGLOG_LOGGEDCMD: User:console
-
So I've got two computers - a desktop with 10.4 and a laptop with 10.5. I'm on a LAN with a D-link router. So I'm SSh'ing into my desktop on the LAN, in terminal I type: ssh 192.168.15.99 I can log in and everything is fine and dandy. In the meanwhil