struts

How to work with referenced projects in eclipse

冷暖自知 提交于 2020-01-11 08:51:49
问题 Ok maybe everybody knows how to do this, but I've never try it beacause I've never needed it so, how do you work with multiple referenced projects in eclipse? I have a couple of Struts 1 web applications that must use another struts 1 "library" project and right now I'm doing the communication between them using url requests, wich is really annoying (at least how I have implemented it). I would like to be able to use the classes of the "library" project directly in my other struts

Is Struts 2 available as an OSGi bundle?

两盒软妹~` 提交于 2020-01-11 03:29:08
问题 I have a server application that consists of multiple OSGi bundles, some mine, some third-party. One of the bundles provides a web frontend using Struts. The necessary Struts libraries live inside the web front-end bundle. Now I want to add a second bundle that provides another web front-end, with different dependencies and a very different use case. I want to use Struts for that bundle, too, but I don't want to put the same libraries into two bundles. With OSGi, it should be no problem to

Confusion in Struts MVC architecture

旧街凉风 提交于 2020-01-10 05:52:26
问题 I am studying the Struts2 in Action and come to know that Controller in Struts2 is FilterDispatcher and Model is Action. But previously I knew that Action and FilterDispatcher both are Controller and Struts does not provide support to model layer. Which one of the above is wrong? 回答1: I would say that FilterDispatcher is a FrontController and Action is both Model and Controller in one class. 回答2: Actually Struts2 actions are controller delegates. And Struts2 provides a value stack on the view

How to pass a parameter in URL on a form submit in Struts2

落花浮王杯 提交于 2020-01-09 11:46:08
问题 I am doing a project in Struts2 where I need of setting a parameter in URL like user parameter in below link. I want this parameter to be passed when I click a form submit button and not any links separately. I know how to do this with <s:url> but that way I need to create a link instead of form submit. Can someone please help me with a code sample how to do this? I know there's a way to do it with HTML or Struts1 but how to do it with Struts2? If there is a way to do this in struts.xml ,

Struts2 - Action class configuration

半城伤御伤魂 提交于 2020-01-07 07:59:08
问题 I have one JSP page which has two forms with submit buttons. How to configure different action class those two forms? For example: form1 submit button configuration to classA and form2 submit button configuration to classB . Is it possible? 回答1: As easy as: <s:form> ... <s:submit action="Action1" /> </s:form> <s:form> ... <s:submit action="Action2" /> </s:form> You can even use different <s:submit> buttons for the same <s:form> <s:form> ... <s:submit action="Action1" /> <s:submit action=

Handle UTF-8 DataString ( Velocity/Struts )

穿精又带淫゛_ 提交于 2020-01-06 16:39:19
问题 Hey guys, lately, I use the combination of Struts and Velocity frameworks to create some website, the problem is that when I tried to input UTF-8 Japanese character, say, a field name, which I putted in the value of "索", then I click submit ( using ), the data would be passed to an AddForm, which I have the String name field to handle the name field. Problem is that, the received string is some strange letter than the expected string "索", I set all the workspace to UTF-8, in velocity.property

Struts 2 problem to run the program

爱⌒轻易说出口 提交于 2020-01-05 09:25:37
问题 I am new in Struts 2. I want to create a simple Hello program using struts2 and when I try to run the program, i am getting the following message in the console: Aug 30, 2013 11:33:35 AM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)

Struts 2 problem to run the program

喜夏-厌秋 提交于 2020-01-05 09:24:53
问题 I am new in Struts 2. I want to create a simple Hello program using struts2 and when I try to run the program, i am getting the following message in the console: Aug 30, 2013 11:33:35 AM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)

JSP Redirection and passing value

谁说我不能喝 提交于 2020-01-02 08:56:08
问题 I have a JSP in which i am redirecting to another jsp like ,i dont have any other data in that jsp,i want to pass a value from this jsp(index.jsp) to the redirected jsp(login.jsp),how will i do this? Here "logonInput" is defined in struts-config.xml index.JSP is like <%@ page language="java" contentType="text/html;charset=UTF-8"%> <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %> <% String sessionExpired=(String)request.getAttribute("SessionExpired"); %> <logic:redirect

Can you do a struts2 action redirect using POST instead of GET?

末鹿安然 提交于 2020-01-02 03:44:05
问题 <action name="actionA" class="com.company.Someaction"> <result name="success" type="redirect-action"> <param name="actionName">OtherActionparam> <param name="paramA">${someParams}</param> <param name="paramB">${someParams}</param> <param name="aBoatLoadOfOtherParams">${aBoatLoadOfOtherParams}</param> </result> </action> In the above action map, I am redirecting from SomeAction to OtherAction. I am having issues, because unfortunately I need to pass a large amount of data between the two