最新回答 / 慕村6019880
我使用第一種方法:action的類由struts2自身創(chuàng)建也會出這個錯誤,也沒解決。但是使用第二種方法交由spring創(chuàng)建就行的。需要修改兩個地方,struts.xml 的class 修改為?productAction,并在applicationContext.xml 中添加<!-- 配置Action類? 因?yàn)槭悄J(rèn)是單例,所以要加上scope-->? ? <bean id="productAction" class="com.ssh.action.ProductAction" sco...
最新回答 / qq_滿天星_19
class中應(yīng)該是 cn.muke.ssh.action.ProductAction題外話:我的跳轉(zhuǎn)addProduct.jsp頁面也報錯500,空指針異常???
最新回答 / 慕田峪5126163
<head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Insert title here</title></head><body><h1>保存商品的頁面</h1><s:form action="product_save" ?method="post" ?namespace="/" ? the...
最新回答 / 慕函數(shù)9753014
沒有導(dǎo)入jdbc包
最新回答 / next2017
你看著視頻里筆記,自己敲一遍啊
最新回答 / FeiLis
你訪問的路徑對嗎?如果你的jsp頁面是在WebRoot目錄下,其路徑如下:http://localhost:8080/ssh/addProduct.jsp ? 其中:ssh是項(xiàng)目名稱,addProduct.jsp是在WebRoot目錄下的jsp頁面
最新回答 / 慕勒3251033
application.xml<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://...
2017-10-22
最新回答 / qq_向日葵_37
單例肯定是同一個對象 多例肯定就不是,你說的hashcode值都一樣是指用什么創(chuàng)建對象的時候?還是不管struts。spring都一樣,我測試的hashcode值雖然一樣在多例的時候,但肯定不是一個對象;
最新回答 / puikiri
額- - 手動檔自己敲還能增加記憶親