0
는 나뿐만 아니라 생성자로 구성이 서블릿을 가지고 있지만 내가 웹 로직 서버에서 내 응용 프로그램을 실행하려고 할 때 나에게 "SocialMediaSessionHandler"는 기본 생성자를 가지고 있지 않는 오류가 있습니다. 즉, 응용 프로그램은 다른 플랫폼에서 잘 실행하지만 서버의 나에게 오류를 제공 그 사이에서 전환 할 때 "SocialMediaSessionHandler"서블릿을 인스턴스화하는 동안 오류가 발생했습니다.서블릿에는 기본 생성자가 없습니다.
public class SocialMediaSessionHandler extends HttpServlet {
private static final long serialVersionUID = 1L;
HttpSession session = null;
private static final CDLoggerInterface log = CDLogger
.getLogger(SocialMediaSessionHandler.class);
Resource resource = new ClassPathResource("/fp.properties");
private boolean debugEnabled;
String serverUrl = "";
IWebServiceManager webServiceManager;
Utility util = null;
/**
* @see HttpServlet#HttpServlet()
*/
public SocialMediaSessionHandler() {
util = new Utility();
// TODO Auto-generated constructor stub
try {
ApplicationContext context = LoadSpringManageService
.LoadApplicationContext();
webServiceManager = (IWebServiceManager) context
.getBean("webserviceManager");
Properties props = PropertiesLoaderUtils.loadProperties(resource);
if (props.getProperty("debug.enable") != null
&& props.getProperty("debug.enable") != "")
debugEnabled = Boolean.parseBoolean(props
.getProperty("debug.enable"));
if (props.getProperty("server.url") != null
&& props.getProperty("server.url") != "")
serverUrl = props.getProperty("server.url");
} catch (MalformedURLException e) {
log.error("MalformedURLException occured.....", e);
} catch (Exception e) {
log.error("Problem in loading CD Logger properties file", e);
}
}
당신은 어떤 생성자를 작성해서는 안됩니다. 기본 기능을 원한다면 서블릿에서 inIt() 메소드를 오버라이드하십시오. 코드에 따라 SocialMediaSessionHandler()를 init()으로 변경할 수 있습니다. 작동하지 않는지 알려주세요. :) – Ajit