struts

Apache Tomcat error : The requested resource is not available

三世轮回 提交于 2019-12-24 10:56:09
问题 I am following this tutorial to build my first Struts2 example. My project name (and war file also) is HelloWorld and whenever I try to access http://localhost:8080/HelloWorld/index.jsp I get The requested resource is not available. I have my war file in tomcat webapps directory and tomcat is running fine. Where am I going wrong? 回答1: That tutorial is OLD. It still uses org.apache.struts2.dispatcher.FilterDispatcher , that is a deprecated filter since Struts 2.1.8. You need to use the new

Equivalent of TagUtils.getInstance().lookup() Struts1 in Struts 2

南楼画角 提交于 2019-12-24 06:04:07
问题 I have this function in Struts 1: /* * (non-Javadoc) * * @see org.apache.struts.taglib.bean.WriteTag#doStartTag() */ public int doStartTag() throws JspException { Carac carac = (Carac) TagUtils.getInstance().lookup(pageContext, name, property, scope); // Code here return SKIP_BODY; } and I am trying to create the same tag in Struts 2 but don't know what's the purpose of this: TagUtils.getInstance().lookup() 回答1: I found a solution to get my object from the view to the tag in struts 2 : my tag

Passing a Java object from one Struts action to another

时光怂恿深爱的人放手 提交于 2019-12-24 05:32:24
问题 In one of my Struts action I've got the following code in a method: ... List<Object> retrievedListOfObjects = c.getListOfObjects(); return mapping.findForward("view"); } fw_view leads to a new Struts action with another Struts form. Let's say this form has got among others the following field List<Object> listOfObjects; I now want to pass the retrievedListOfObjects from within the first Struts action to the form of the following Struts action. Is this possible without storing it in the

passing on object data between actions

给你一囗甜甜゛ 提交于 2019-12-24 05:06:15
问题 I started out with a problem concerning a list/dropdown list on one of my jsps but now I realized my main problem is concerning the data input between actions/pages. Old question I am trying to navigate from one page displaying one specific object to a nother page displaying an attachedObject (to the first one) and then navigate back to the first object page. The last step is the one I have problems with. The whole workflow is: first page: display a list of objects, select one and then go to

Spring security + Struts 1.2 integration

喜夏-厌秋 提交于 2019-12-24 01:05:58
问题 I have a application in which I used struts1.2 and ejb2.1 now I want to add spring security using LDAP server in it. How to integrate Spring Security with struts1.2? 回答1: Integration shouldn't be different than any other web app. You need the spring-security dependencies either the jars or the maven dependencies. I'll post the maven dependencies, if you don't use maven you can look the jars up from here: mvn browser <properties> <spring.version>3.0.1.RELEASE</spring.version> </properties>

Use HTML5 input with Struts?

陌路散爱 提交于 2019-12-24 00:47:20
问题 Is it possible to convert my <html:text... in HTML5 format (type=email, number, etc...) Is it possible with Struts tags ? 回答1: You'd need to take the existing tag library and convert then to output the new tags. If you do, you could file it as a patch I don't know of any efforts under way to do this for Struts 1, which is likely to be EOLed soon anyway. 来源: https://stackoverflow.com/questions/7497326/use-html5-input-with-struts

Tomcat. This parser does not support specification null version null

烂漫一生 提交于 2019-12-23 21:08:31
问题 I try to run a web application on oracle linux, tomcat 7 and jdk1.7 and I get an exception on first page load after tomcat restart. The exception occurs only at first application pageload. Application is developed on jdk1.6 and on a server is installed jdk1.4-compact and jdk1.7 but I entered jdk1.7 path to JAVA_HOME and JRE_HOME in tomcat/bin/setclasspath.sh file. Any ideas why I am getting this exception? Jan 03, 2012 5:11:28 PM org.apache.catalina.startup.Catalina start INFO: Server startup

What is action used in Struts 2 in terms of MVC pattern?

邮差的信 提交于 2019-12-23 15:49:17
问题 In Struts2, a controller dispatches a Request to an Action and the Action passes it to back-end logic, which could be regarded as a very big "model", to process the request and JSP represents Views. How to define the Action in Struts2 ? Definitely it's not View... is it the Controller or Model? 回答1: Struts actions are controllers in the sense of the MVC pattern. I think the discussion of the value stack and ActionContext , as well as getter methods in action classes confuses the issue. In

Vehicle Tracking System[java/Java EE]

大兔子大兔子 提交于 2019-12-23 05:27:33
问题 I am interested in building a vehicle tracking system using GPRS. However, I have some questions for anyone who has done this before: Is GPRS the best technology to use? Any problems people are aware of? I am planning on using Java/Java EE - is there any better technologies? If someone has built this before - do you have some examples of what to see for system requirements? What are some good web resources you've found working on this? Is there a step-by-step guide anywhere to getting started

How to “logic:iterate” just one object?

徘徊边缘 提交于 2019-12-23 03:53:26
问题 So, I have this code: logic:iterate name="nameForm" property="name" id="nameId" indexId="index" bean:write name="nameId" property="field1"/ bean:write name="nameId" property="field2"/ This works great because I'm receiving a "table of objects" so I can do the iterate without issues. Now, on another page I need to do the same but the issue is I am not receiving a "table of objects" but an object itself. I tried it nonetheless and - as expected - got the error: Cannot create iterator for this