struts

There is no Action mapped for namespace / and action name CreateTicket

佐手、 提交于 2019-12-13 04:48:02
问题 I am getting the below error, I have googled lot and got many different types of solutions but not able to resolve it. My Stacktrace SEVERE: Could not find action or result There is no Action mapped for namespace / and action name CreateTicket. - [unknown location] at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:186) at org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:41) at org.apache.struts2.dispatcher.Dispatcher

Eclipse throwing error - “file name references to ”main.html“ that does not exist in web content” 404 error for web.xml

∥☆過路亽.° 提交于 2019-12-13 04:28:50
问题 I am facing an issue in while running simple web project in Eclipse. I will first demonstrate the steps of creating my project :- 1) New Spring Template Project. 2) Select Spring MVC Project. 3) Click Finish. 4) Now I create a new file name "login.html" in "webapps" folder under "src" 5) Now I tried to add welcome-file tag in the web.xml. 6) When I do that I get the above Warning inside web.xml from Eclipse. 7) If I run the application I get 404 error This is my web.xml <?xml version="1.0"

Ajax Precondition Failed Error

浪子不回头ぞ 提交于 2019-12-13 03:59:12
问题 I am creating a page in jsp. Basically converting my html design into jsp page.Using Apache tomcat as a server. My problem is I am trying to load a result page through Ajax call on form submit.I am getting "Error: Precondtion Failed" error. Could any one resolve this error. My code as follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en"> <head> <meta http-equiv=

Struts 1.3.10 Digester.getParser() UnsupportedOperationException

丶灬走出姿态 提交于 2019-12-13 03:24:21
问题 I am attempting to start up a Struts 1.X (version 1.3.10) application using OC4J version 10.1.3.5. The application manages to initialize all the Spring beans, including the Struts Actions defined in action-servlet.xml. However, once all the beans are initialized, I get a rather ugly exception in the log. I suspected an issue in xalan (2.7.1), xercesImpl (2.9.1), or xml-apis (1.3.04), but all these are using the newest versions. The exception says that a dependency may be missing, but I am

How to use javascript to include struts html tag?

冷暖自知 提交于 2019-12-13 03:04:23
问题 I have a check box and a text box. I have used struts tags and Now i need to validate that if the check box is checked, i should gray out (disable) the text box. If it is unchecked the text box shold take phone numbers. I did lik this, i called a java script on click of check box and did a innerHtml based on wheather checkbox ix checked or not. var status_check=document.getElementById("line1Checked").checked; if(status_check==true){ document.getElementById("line1").readonly="true"; } else{

Struts 1.3 : Difference between name and attribute attributes in action tag within StrutsConfig.xml?

隐身守侯 提交于 2019-12-13 02:34:54
问题 What is the difference between name and attribute attributes in action tag within StrutsConfig.xml ? 回答1: name is the name of the form bean (an ActionForm of some sort). attribute is the name of the form bean in the session or request if it's different than the name. 来源: https://stackoverflow.com/questions/27424449/struts-1-3-difference-between-name-and-attribute-attributes-in-action-tag-with

struts2 conditional xml validation

我们两清 提交于 2019-12-13 02:17:56
问题 I have what I'd think is a common issue but an entire day of googling hasn't turned up anything useful. I have a form with a checkbox and a textfield. I'd like to do a regex validation of the textfield, but only if the checkbox is selected. Regex validation is currently working for other non-conditional fields but I can't for the life of me figure out if there is a syntax that allows for this in the action-validation.xml file. ie. I have something like below for other fields. What I need is a

Struts2 addActionError setting result to input automatically on redirect result

為{幸葍}努か 提交于 2019-12-13 01:35:09
问题 I have a struts2 action, which sets some error using addActionError something like below public String del() { if (new OrdersService().get(idorder) == null) { addActionError("Order not found"); } else { new OrdersService().remove(idorder); addActionMessage("Order deleted successfully"); } return SUCCESS; } So the above method NO MATTER WHAT always return "success" result. But in struts.xml I've used the redirect result-type to redirect to another action and that action is never executed

Where did extra space come from in html of Struts app?

瘦欲@ 提交于 2019-12-13 01:34:58
问题 I'm debugging a Struts Java app, in my defaultLayout.tag file there are 2 tables, there is no space between them, but in the result html which I saw from Firefox's source code Inspector, there are 2 lines of: <Br></Br> <Br></Br> I wonder where in the Struts app did it generate those 2 extra line of breaks. 回答1: In css add : br { display: none; } 来源: https://stackoverflow.com/questions/25632412/where-did-extra-space-come-from-in-html-of-struts-app

How to retain data on the view (JSP) if the validation fails in struts

一世执手 提交于 2019-12-13 01:25:22
问题 I am using struts 1.3 and my data on the jsp page gets reset if my validation fails. It displays the error messages coming from the ActionForm from the validate method, but resets my entire jsp. i tried using struts tags instead of html but it is not helping out. I even tried looking at this https://stackoverflow.com/a/20499877/1771406 but i dint clearly understand what exactly he is trying to say. can anyone one help me by showing some implemented code please. 回答1: the reason why my code was