求救!简单问题!在线等!谢谢先!!!

qym117 2003-10-17 03:42:58
请问一下各位高手JSP在什么运行环境下运行啊,现在在我机器里面只安装了JDK,我还需要下载什么软件才能运行JSP啊??万分着急!谢谢!!
...全文
33 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
djws 2003-10-17
  • 打赏
  • 举报
回复
建议用tomcat,去http://apache.linuxforum.net/dist/jakarta/tomcat-4/tomcat-4.1.27.zip下载,解压后安装,一路next,简单之极,连设置都不用,网上支持比resin也多,建议
qym117 2003-10-17
  • 打赏
  • 举报
回复
好的,我按照你说的方法下载了一个名叫resin-3.0.3.zip的文件,行吗??
princezhong 2003-10-17
  • 打赏
  • 举报
回复
package work;

import javax.naming.*;
import java.util.Properties;
import javax.rmi.PortableRemoteObject;
import java.util.ArrayList;

public class DoThingsTestClient1
extends Object {
private static final String ERROR_NULL_REMOTE = "Remote interface reference is null. It must be created by calling one of the Home interface methods first.";
private static final int MAX_OUTPUT_LINE_LENGTH = 100;
private boolean logging = true;
private DoThingsHome doThingsHome = null;
private DoThings doThings = null;

//Construct the EJB test client
public DoThingsTestClient1() {
initialize();
}

public void initialize() {
long startTime = 0;
if (logging) {
log("Initializing bean access.");
startTime = System.currentTimeMillis();
}

try {
//get naming context
Context context = getInitialContext();

//look up jndi name
Object ref = context.lookup("DoThings");
//look up jndi name and cast to Home interface
doThingsHome = (DoThingsHome) PortableRemoteObject.narrow(ref,
DoThingsHome.class);
if (logging) {
long endTime = System.currentTimeMillis();
log("Succeeded initializing bean access through Home interface.");
log("Execution time: " + (endTime - startTime) + " ms.");
}
}
catch (Exception e) {
if (logging) {
log("Failed initializing bean access.");
}
e.printStackTrace();
}
}

private Context getInitialContext() throws Exception {
String url = "t3://localhost:7001";
String user = null;
String password = null;
Properties properties = null;
try {
properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
properties.put(Context.PROVIDER_URL, url);
if (user != null) {
properties.put(Context.SECURITY_PRINCIPAL, user);
properties.put(Context.SECURITY_CREDENTIALS,
password == null ? "" : password);
}

return new InitialContext(properties);
}
catch (Exception e) {
log("Unable to connect to WebLogic server at " + url);
log("Please make sure that the server is running.");
throw e;
}
}

以前的程序的一部分希望对你有帮助]
princezhong 2003-10-17
  • 打赏
  • 举报
回复
随便来一个发布服务器就行了
kevincom 2003-10-17
  • 打赏
  • 举报
回复
初学建议去www.caucho.com下载resin,不用安装,解压后就可以使用了。
wchar 2003-10-17
  • 打赏
  • 举报
回复
tomcat or 其他的jsp容器

81,090

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧