项目不能发布到tomcat的问题 大家速度来拿分,只要回答就有分

win720520 2009-03-27 05:51:51
我这个项目是一个反编译后的工程,在Myeclipse 中将反编译后的Java文件编译后,不能发布到tomcat中,启动后报404 ,然后我一个一个找,最终把原始的一个config.class文件拷贝到相应的tomcat下,启动tomcat,可以到首页,首先声明原始的全部是.class文件,部署到tomcat中是可以运行的,下面我把config.class文件反编译后的文件给大家看看,因为这个文件反编译后有乱码,我改的不是很完美 希望大家来修改一下



// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: Config.java

package com.aljoin.oa.core.component;

import com.aljoin.oa.core.misc.DbcfgException;
import com.aljoin.oa.core.model.SystemAdmin;
import com.aljoin.oa.core.session.LoginPoolManager;
import com.aljoin.oa.core.version.SystemVersion;
import com.aljoin.oa.util.web.Base64;
import com.opensymphony.webwork.config.Configuration;
import com.opensymphony.xwork.interceptor.component.Disposable;
import java.io.Serializable;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Properties;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;

// Referenced classes of package com.aljoin.oa.core.component:
// AljoinContext

public class Config
implements Disposable, Serializable
{

public Config()
{
}

public static String getAttachPath()
{
String path = Configuration.getString("webwork.multipart.saveDir");
if(!path.endsWith("/") && !path.endsWith("\\"))
path = (new StringBuilder(String.valueOf(path))).append("/").toString();
return path;
}

public static String getProperty(String key)
{
return getProperty().getProperty(key);
}

public static String getProperty(String key, String defalutValue)
{
return getProperty().getProperty(key, defalutValue);
}

public static Properties getProperty()
{
return prop;
}

public static void setProperties(Properties properties)
{
prop = properties;
}

public static Properties getProperties()
{
return prop;
}

public static String getVersion()
{
String v = getProperty("Version");
if(v == null || v.equals(""))
v = STANDARD;
return v;
}

public static Boolean getNeedPass()
{
if(needPass == null)
needPass = new Boolean((String)getProperty().get("common.needpass"));
return needPass;
}

public SystemAdmin loadSystemAdmin(String username)
{
Session session = getSessionFactory().openSession();
SystemAdmin sa = (SystemAdmin)session.load(com/aljoin/oa/core/model/SystemAdmin, username);
session.close();
return sa;
}

public boolean changeSystemAdminPwd(String username, String oldPwd, String newPwd)
{
Session session;
Transaction tran;
session = getSessionFactory().openSession();
tran = session.beginTransaction();
SystemAdmin admin = (SystemAdmin)session.load(com/aljoin/oa/core/model/SystemAdmin, username);
String encryPwd = encryPassword(oldPwd);
LOG.debug(encryPwd);
LOG.debug(admin.getPassword());
if(!admin.getPassword().equals(encryPwd))
break MISSING_BLOCK_LABEL_125;
admin.setPassword(encryPassword(newPwd));
session.save(admin);
LOG.debug(admin.getPassword());
tran.commit();
session.close();
return true;
_L2:
session.close();
return false;
HibernateException ex;
ex;
if(true) goto _L2; else goto _L1
_L1:
Exception exception;
exception;
session.close();
throw exception;
}

public static String encryPassword(String pwd)
{
try
{
MessageDigest md = MessageDigest.getInstance("SHA-1");
md.update(pwd.getBytes());
byte digesta[] = md.digest();
String encry = Base64.toBase64(digesta);
return encry;
}
catch(NoSuchAlgorithmException ex)
{
return pwd;
}
}

public static String datediff(String fstTime, String scdTime)
throws DbcfgException
{
String sql = "";
String dialect = configuration.getProperty("hibernate.dialect");
if(dialect.indexOf("MySQLDialect") != -1)
sql = (new StringBuilder("TO_DAYS(")).append(scdTime).append(") - TO_DAYS(").append(fstTime).append(")").toString();
else
if(dialect.indexOf("SQLServerDialect") != -1)
sql = (new StringBuilder("datediff(day,")).append(fstTime).append(",").append(scdTime).append(")").toString();
if(sql.equals(""))
throw new DbcfgException();
else
return sql;
}

public static SessionFactory getSessionFactory()
{
return systemFactory;
}

public static org.hibernate.cfg.Configuration getConfiguration()
{
return configuration;
}

public void dispose()
{
try
{
systemFactory.close();
}
catch(Exception e)
{
LOG.error("error closing", e);
throw new RuntimeException(e.getMessage());
}
}

public static SystemVersion getSystemVersion()
{
return systemVersion;
}

public static void setSystemVersion(SystemVersion systemVersion)
{
systemVersion = systemVersion;
}

public static LoginPoolManager getLoginManager()
{
return loginManager;
}

public static void setLoginManager(LoginPoolManager loginManager)
{
loginManager = loginManager;
}

public static AljoinContext getAljoinContext()
{
return aljoinContext;
}

public static void setAljoinContext(AljoinContext aljoinContext)
{
aljoinContext = aljoinContext;
}

public static SessionFactory getSystemFactory()
{
return systemFactory;
}

public static void setSystemFactory(SessionFactory systemFactory)
{
systemFactory = systemFactory;
}

public static void setConfiguration(org.hibernate.cfg.Configuration configuration)
{
configuration = configuration;
}

private static final Log LOG = LogFactory.getLog(com/aljoin/oa/core/component/Config);
private static Properties prop;
private static Boolean needPass;
private static SessionFactory systemFactory;
private static org.hibernate.cfg.Configuration configuration;
private static SystemVersion systemVersion;
private static LoginPoolManager loginManager;
private static AljoinContext aljoinContext;
public static String STANDARD = "standard";
public static String XMDX = "xmdx";
public static String SDWT = "sdwt";
public static String GZDX = "gzdx";
public static String HBSW = "hbsw";
public static String QHDX = "qhdx";
public static String XJDX = "xjdx";
public static String NORTH = "north";
public static String HNDX = "hndx";
public static String GXDX = "gxdx";
public static String SXDX = "sxdx";
public static String AHDX = "ahdx";
public static String QDWT = "qdwt";
public static String YNDX = "yndx";
public static String SHDX = "shdx";
public static String GSDX = "gsdx";
public static String SCDX = "scdx";

}







public boolean changeSystemAdminPwd(String username, String oldPwd, String newPwd)


有个 跳转问题 大家帮帮忙 这个是用的 JAD反编译的 我也用了jd-gui,可是这个方法中的代码反编译不过来 出//Error//

...全文
543 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
win720520 2009-04-03
  • 打赏
  • 举报
回复
正好平均分配!!!!!!!!!!!!!!!
jinchun1234 2009-03-30
  • 打赏
  • 举报
回复
学习!
money8899 2009-03-28
  • 打赏
  • 举报
回复
我是来接分的
win720520 2009-03-28
  • 打赏
  • 举报
回复







UPUP
酒浪子 2009-03-28
  • 打赏
  • 举报
回复
学习!
win720520 2009-03-28
  • 打赏
  • 举报
回复
我这个就是用jad反编译过来的, 出现了好多标签, 不论我怎么改 都不行,这个文件关系我的页面啊,反编译出来的就是404, 不知道有没有人用过mocha这个反编译? 我下了个,可是用不来, 有人用过的 教教
win720520 2009-03-28
  • 打赏
  • 举报
回复
那个出错的地方,应该是对密码的加密的,LZ仔细看
lin_eric 2009-03-27
  • 打赏
  • 举报
回复
mark
jourqel 2009-03-27
  • 打赏
  • 举报
回复
原来有用过一个反编译的软件~不过忘了叫什么名了~
支持一下~楼主辛苦了~
missedname 2009-03-27
  • 打赏
  • 举报
回复
路过,不懂,友情帮顶
Defonds 2009-03-27
  • 打赏
  • 举报
回复
我的资源里也有个jad反编译器,有需要的可以去看看
Defonds 2009-03-27
  • 打赏
  • 举报
回复
java项目反编译,mark下关注
ben0759 2009-03-27
  • 打赏
  • 举报
回复
呵呵,帮不了你了,我一般都是从底向上地反向工程。。
z22487491 2009-03-27
  • 打赏
  • 举报
回复
up

81,110

社区成员

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

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