This topic has been archived. It cannot be replied.
-
工作学习 / 专业技术讨论 / 请教两个Java, Struts的问题--- 急!是申请工作的email题目, 请大虾帮忙。Question 1:
Create a Servlet that does the following (please provide us the code):
- takes a parameter 'money', which represents a dollar amount > 0.00
- calculates 5% of 'money' (safely), and outputs this as a dollar amount
(eg. two decimals)
- outputs message 'error' if there is a problem
Question 2:
What does Struts typically use to map out the relationship between code
components (eg. Controllers, JSPs, etc)
-skylei(sky);
2006-6-8
{431}
(#3018345@0)
-
Ha Ha, I dont know.
-candyandtea(candy);
2006-6-8
(#3018625@0)
-
这么基本的问题你要是不会,就先别去面试了,好好学习吧。如果你写过任何一个servlet或struts,就应该能做出来。
-maplew2008(call me at 911);
2006-6-8
(#3018690@0)
-
楼上的先生/小姐,他(我先生)技术是不好,所以才发帖子希望能得到大家的帮助。即使您不愿意提供信息,也不用冷嘲热讽,对吗? 离家别井到这里已经够困难的了,为什么我们不能和谐相处呢?
-candyandtea(candy);
2006-6-8
(#3018758@0)
-
好吧,我告诉你怎么做,你却是需要好好学习,然后再找工作。我的话难听,但也是帮你String money=request.getParameter("money");
try{
float f = Float.floatValue( money);
f = f * 0.05F;
money = f...//自己找个函数,把小数点后留两位
ServletOutputStream out = res.getOutputStream();
out.write( money.getbyte() );
}catch( Exception e ){
//do sth for exception
}
第二题:
ActionServlet control and diapatch the components by the mapping in file of Struts-config.xml
再劝你一句,你现在的技术,找工作很难。好好练技术,有问题可PM我。
-maplew2008(call me at 911);
2006-6-8
{462}
(#3018803@0)
-
他现在也在不断的自己进修,谢谢您的建议。冒犯之处,请原谅。
-candyandtea(candy);
2006-6-8
(#3018838@0)
-
没事,希望以后能帮你。都从这个时期过来的,我们中国人多聪明呀,相信你们会很快赶上的,只要坚持不懈。
-maplew2008(call me at 911);
2006-6-8
(#3018978@0)