Search Results

Search found 454 results on 19 pages for 'struts 1'.

Page 5/19 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How to use Struts 2 with JFreeChart?

    - by Pere
    Firstly, I went here ( http://code.google.com/p/struts2-examples/downloads/list and I downloaded Hello_World_Struts2_Mvn.zip) and I run that example. After that, I went here (http://struts.apache.org/2.x/docs/jfreechart-plugin.html), I add the dependencies for commons-lang-2.5.jar, jcommon-1.0.16.jar and jfreechart-1.0.13.jar and I modify the example downloaded from code.google.com to see how JFreeChart is working, but I receive this error: Unable to load configuration. - action - file:/C:/.../untitled_war_exploded/WEB-INF/classes/struts.xml:34:67 Caused by: Error building results for action createChart in namespace - action - file:/C:/.../out/artifacts/untitled_war_exploded/WEB-INF/classes/struts.xml:34:67 Caused by: There is no result type defined for type 'chart' mapped with name 'success'. Did you mean 'chart'? - result - file:/C:/.../out/artifacts/untitled_war_exploded/WEB-INF/classes/struts.xml:36:49 At the line 36 in struts.xml is the this code (the code from struts2 website): <action name="viewModerationChart" class="myapp.actions.ViewModerationChartAction"> <result name="success" type="chart"> <param name="width">400</param> <param name="height">300</param> </result> </action> What I'm doing wrong?

    Read the article

  • Is frameworks really necessary for this problem?

    - by The Elite Gentleman
    Hi Guys I'm creating an online music store application (in Java) for signed and unsigned artist for my client. I'm currently using Struts 1.3.10 (I was recommended Spring but Spring setup is sort of similar to Struts) for my Web application. My Database is currently a MySQL 5 (or higher) and I'm using a DAO pattern to talk to it. There are limitations to using Struts and DAO's (e.g. Multiple File upload in Struts is not implemented the same way as multiple String parameters, and for DAO's, there lacks a Publish-Subscribe feature). Is what I'm doing the best way forward or should I go straight Hibernate (or similar) and move out of Struts? What are the performance implications or technical issues that you've experienced with the same setup I have? The client doesn't care how I do it as long as it is done.

    Read the article

  • problem with struts actions and redirections

    - by Casey
    I am trying to update a simple web app that was built with struts2, jsp and standard servlets. I am trying to redirect a url to a specific action but can't seem to get it to work right. For example, the url that is correct is: http://localhost:8080/theapp/lookup/search.action Here is my web.xml: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"><web-app> <display-name>theapp</display-name> <filter> <filter-name>struts2</filter-name> <filter-class> org.apache.struts2.dispatcher.FilterDispatcher </filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> And here is my struts.xml: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <default-action-ref name="search" /> <action name="search" method="search" class="com.theapp.SearchAction" > <result>index.jsp</result> <result name="input" >index.jsp</result> <result name="error" type="redirect">site_locator_mobile/error.action</result> </action> The problem here is that if I don't specify the correct url as above, I just get the index.jsp file, but without any properties in index.jsp being processed because the information is contained in the servlet. What I would like to is if someone just entered: http://localhost:8080/theapp/lookup/ than they would be taken to: http://localhost:8080/theapp/lookup/search.action Thanks

    Read the article

  • What is the equivalent of Struts ActionMessages in Spring MVC?

    - by Umar
    Please let me know if you have any idea about it. Thanks EDIT What ActionMessages is? ActionMessages is basically a class that holds messages that you want to display on a JSP page. Messages can be added in ActionMessages in an Action(controller) class. On the JSP, the position where the messages are intended to be displayed, is marked by <html:messages/> tag. Hence, all your messages are rendered automatically on that specific position. These messages are usually feedback texts that need to appear after some user actions. For example, if the user creates a new record, a feedback message could be "Record created successfully!".

    Read the article

  • Is it possible to migrate struts/spring based application to GWT?

    - by Satish Pandey
    I am using the combination of spring, spring-security, struts and iBatis in my application. Now I am looking to migrate the struts UI to GWT. The new combination must be spring, spring-security, GWT and iBatis. I applied a layered approach to develop my application. In Controller/UI layer i am using Struts. I want to replace struts and use GWT in Controller/UI layer. Is is possible to use GWT without affecting another layers DAO/BL/SL?

    Read the article

  • TomCat starts, but does not load properly

    - by user37136
    Hey guys, I've been working on this for a day now and still don't know what's wrong. I am essentially building a second environment for our web and app server. I got apache to load up just fine, but tomcat is proving to be difficult. It appears to start and load just fine, but when it comes to loading our application, its just got stuck for 2-5 minutes and then shut down. Here is the log on the original machine where it works fine: 2010-02-12 11:52:40,506 INFO Web application servlet context is initializing... 2010-02-12 11:52:40,540 DEBUG Servlet context attribute added: select_jobType=[{1,Undefined}, {100,Completion}, {200,Plugging}, {300,R+M}, {400,Workover}, {500,Swab - tubing}, {600,Swab - fluid}] 2010-02-12 11:52:40,540 DEBUG Servlet context attribute added: select_jobTaskType=[{1,Undefined}, {100,Rod part}, {200,Tubing leak}, {300,Pump change}, {400,Stripping job}, {500,Long stroke}, {600,A/L optimization}] 2010-02-12 11:52:40,541 DEBUG Servlet context attribute added: select_wellType=[{1,Undefined}, {100,Rod pump}, {200,ESP}, {300,Injector}, {400,PC pump}, {500,Co-Rod}, {600,Flowing}, {700,Storage}] 2010-02-12 11:52:40,541 DEBUG Servlet context attribute added: select_assetType=[{1,Rig}, {100,Disabled rig}] 2010-02-12 11:52:40,542 DEBUG Servlet context attribute added: select_state=[{AL,Alabama}, {AK,Alaska}, {AZ,Arizona}, {AR,Arkansas}, {CA,California}, {CO,Colorado}, {CT,Connecticut}, {DE,Delaware}, {FL,Florida}, {GA,Georgia}, {HI,Hawaii}, {ID,Idaho}, {IL,Illinois}, {IN,Indiana}, {IA,Iowa}, {KS,Kansas}, {KY,Kentucky}, {LA,Louisiana}, {ME,Maine}, {MD,Maryland}, {MA,Massachusetts}, {MI,Michigan}, {MN,Minnesota}, {MS,Mississippi}, {MO,Missouri}, {MT,Montana}, {NE,Nebraska}, {NV,Nevada}, {NH,New Hampshire}, {NJ,New Jersey}, {NM,New Mexico}, {NY,New York}, {NC,North Carolina}, {ND,North Dakota}, {OH,Ohio}, {OK,Oklahoma}, {OR,Oregon}, {PA,Pennsylvania}, {RI,Rhode Island}, {SC,South Carolina}, {SD,South Dakota}, {TN,Tennessee}, {TX,Texas}, {UT,Utah}, {VT,Vermont}, {VA,Virginia}, {WA,Washington}, {WV,West Virginia}, {WI,Wisconsin}, {WY,Wyoming}, {ACO,Atlantic Coast Offshore}, {FOAK,Federal Offshore Alaska}, {NGOM,Northern Gulf of Mexico}, {PCO,Pacific Coastal Offshore}] 2010-02-12 11:52:40,542 INFO KeyviewContextMonitor.contextInitialized: Loaded drop-down lists:com/key/portal/web/common/lists.properties 2010-02-12 11:52:40,937 DEBUG Servlet context attribute added: org.apache.struts.action.SERVLET_MAPPING=*.do 2010-02-12 11:52:40,937 DEBUG Servlet context attribute added: org.apache.struts.action.ACTION_SERVLET=org.apache.struts.action.ActionServlet@155d578 2010-02-12 11:52:41,939 DEBUG Servlet context attribute added: org.apache.struts.action.MODULE=org.apache.struts.config.impl.ModuleConfigImpl@e08e9d 2010-02-12 11:52:41,962 DEBUG Servlet context attribute added: org.apache.struts.action.FORM_BEANS=org.apache.struts.action.ActionFormBeans@b31c3c 2010-02-12 11:52:41,967 DEBUG Servlet context attribute added: org.apache.struts.action.FORWARDS=org.apache.struts.action.ActionForwards@102c646 2010-02-12 11:52:41,973 DEBUG Servlet context attribute added: org.apache.struts.action.MAPPINGS=org.apache.struts.action.ActionMappings@127276a 2010-02-12 11:52:41,974 DEBUG Servlet context attribute added: org.apache.struts.action.MESSAGE=org.apache.struts.util.PropertyMessageResources@18cae13 2010-02-12 11:52:41,984 DEBUG Servlet context attribute added: org.apache.struts.action.PLUG_INS=[Lorg.apache.struts.action.PlugIn;@f875ae 2010-02-12 11:52:46,816 INFO Sucessfully loaded application properties com/key/core/properties/application On my second environment, it didn't execute the last line. I start tomcat with the exact same command line !/bin/ksh export JAVA_HOME=/app/java export CATALINA_HOME=/app/tomcat export CATALINA_BASE=/app/keyview/appserver CATALINA_OPTS=" -Xms128m -Xmx800m -Dapplication.props=com/key/core/properties/application -Dlog4j.configuration=com/key/core/log/log4j.xml -Djava.awt.headless=true -Dlog4j.debug" export CATALINA_OPTS ${CATALINA_HOME}/bin/startup.sh I bolded the line that I think are in error. Thanks

    Read the article

  • how access value of array list on Struts framework by properties file

    - by singh
    arraylist.add(new ListItem("Activity1", "ActivityName1")); suppose ActivityName1 value store in properties file to provide locale feature. now how can i access the value of Activity1 key that associate to ActivityName1 value on jsp ( ActivityName1 corresponds to a properties file value) by using Struts. i want to find the ActivityName1 value that store in properties file by using the Activity1 key in Struts framework.

    Read the article

  • Redirect to another action in an interceptor in struts 2

    - by user292662
    I am currently in the process of learning Struts 2 and I am currently building a simple application where unverified users are redirected to a login form. I have a login form and action functional which takes the users credentials, verifies them and stores a User object in the session however I am now trying to prevent access to pages before the login has taken place and I am trying to do this with an interceptor. My problem is that I have written an interceptor that checks whether the User object has been saved in the session but if it has not I want to redirect to the login page and can't find any way of doing this without bypassing struts and using the HttpServletResponse.sendRedirect method Configuration: <package name="mypackage" extends="struts-default" namespace="/admin"> <interceptors> <interceptor name="login" class="my.LoginInterceptor" /> </interceptors> <default-interceptor-ref name="login"/> <action name="login" class="my.LoginAction"> <result name="input">/admin/login.jsp</result> <result name="success" type="redirect">/admin</result> </action> <action name="private" class="my.PrivateAction"> <result>/admin/private.jsp</result> </action> </package> The interceptor code: @Override public String intercept(ActionInvocation inv) throws Exception { Map<String, Object> session = inv.getInvocationContext().getSession(); Object user = session.get("user"); if(user == null) { // redirect to the 'login' action here } else { return inv.invoke(); } }

    Read the article

  • Struts 2 security

    - by Dewfy
    Does Struts 2 has complete solution for simple login task? I have simple declaration in struts.xml: <package namespace="/protected" name="manager" extends="struts-default" > <interceptors> <interceptor-stack name="secure"> <interceptor-ref name="roles"> <param name="allowedRoles">registered</param> </interceptor-ref> </interceptor-stack> </interceptors> <default-action-ref name="pindex"/> <action name="pindex" > <interceptor-ref name="completeStack"/> <interceptor-ref name="secure"/> <result>protected/index.html</result> </action> </package> Accessing to this resource shows only (Forbidden 403). So what should I do on the next step to: Add login page (standart Tomcat declaration on web.xml with <login-config> not works) ? Provide security round trip. Do I need write my own servlet or exists struts2 solutions? Thanks in advance!

    Read the article

  • J2EE and alternatives

    - by Ilya K
    Hello, I am J2SE developer but I have rich web-background (php, perl/cgi and so on) and now I am starting new project. It will have web interface, spaghetti business logic, relational database as storage and connections to other services. I do it from the scratch. My colleagues told me to use spring, spring security and struts. I look briefly at J2EE spec and found that it covers almost all aspects of enterprise application. I asked my colleagues why do they need spring and struts, but looks like they use technologies simply because they are familiar with them and not familiar with classic J2EE stack. So, my question is: what is bad about J2EE? Why do I need spring if there are JNDI lookups? It will take a day or two to create fake InitialContext for unit-tests. And that is all: I stand with out of external tools like spring. Why do I need spring-security if there is a security built in Servlets spec? I can map any request to any servlet using web.xml, no struts.xml is needed. I can use servlet-filters instead of struts interceptors. There is RMI, so I do not need spring-remote. And so on.. Why should I bother my self with all that fancy stuff if there is J2EE? I really want to find situation when J2EE is not enough. Do you have any? Thanks!

    Read the article

  • if a JAR is placed on app servers's classpath how do we reference it from JSP

    - by Omnipresent
    On our application we are getting an error saying: PWC6117: File "/struts-tags" not found code in the file thats giving error is: <%@ taglib prefix="s" uri="/struts-tags" %> This file is in struts2-core.jar which is placed on the classpath of the app server (Sun 9.1). The code will work fine and not complain when the jar is actually in WEB-INF/lib of the application, compared to being on classpath of the appserver. But we can not change that. it has to be on appservers classpath. But how should we change our code so that this error goes away? I can create mapping in my web.xml so that tag uri's are change. but what should taglib-location be changed to? so that it references to app servers classpath? <taglib> <taglib-uri>/WEB-INF/struts-tags.tld</taglib-uri> <taglib-location>/WEB-INF/struts-tags.tld</taglib-location> </taglib>

    Read the article

  • Struts 2 - Accessing different properties on the ValueStack sharing the same name

    - by veggen
    Struts 2 will resolve all property names during view rendering against the top object in the ValueStack first. But how can one access a property with the same name on the object lower on the stack? Example: Let's say I have an Action class called MyAction and it has a a logDate property. In the view rendered after this action is invoked, there's this: Now imagine a User object also has a logDate property. During the iteration, Struts 2 will always push the current user object to the top of the ValueStack effectively resolving all property names against it. But, what if I wanted to access logDate from the action? What's the correct way to do this?

    Read the article

  • Case Sensitivity of Action Names in Struts 2

    - by IK
    Is there an easy way to make Struts 2 action names case insensitive? Currently I have the following action defined: <action name="printTest" class="MyClass" > <result name="error">/WEB-INF/jsp/error.jsp</result> <result name="input">/WEB-INF/jsp/test.jsp</result> <result name="success">/WEB-INF/jsp/test.jsp</result> </action> If the user types URL "/app/printtest.do" instead of "/app/printtest.do" this action is not executed. Other then mod_rewrite on the httpd level or something like that, the only option that I know about right now is simply adding the same exact action and changing the name to "printtest". Ideally it would be a simple config change to struts.xml

    Read the article

  • Struts1 and Spring wiring question

    - by Dev er dev
    Recently I had a pleasure of working again on Struts 1.1 application. It uses Spring 2.5, but not for actions. I would like to hook it up to use Spring as DI for Struts Actions also, as it would make my life a loot easier. I found out DelegatingRequestProcessor could be used for this purpose, at least according to documentation, but seems it has been deprecated as of Spring 3.0. Switching to the new version of Struts is not an option. Does anyone have better idea then starting to use deprecated stuff?

    Read the article

  • facing issue when using JDBC in TomCat 7 with Struts

    - by Chethu2288
    Am developing a web application using Struts 2 where am trying to insert some values into my local MySql database. The code for connecting and accessing database works fine in console application. but its giving "java.lang.ClassNotFoundException: com.mysql.jdbc.Driver" exception when i tried the same code in Struts. Kindly help me on this. Connection conn = null; String url = "jdbc:mysql://localhost:3306/"; String dbName = "testdatabase"; String driver = "com.mysql.jdbc.Driver"; try { Class.forName(driver).newInstance(); conn = DriverManager.getConnection(url+dbName,"root","root"); Statement statement=conn.createStatement(); System.out.println("HelloWorld.execute()"); int i= statement.executeUpdate("INSERT INTO testTable VALUES('15','Lucky')"); System.out.println("res: "+i); } catch(Exception e) { System.out.println(e); //setMessage(e.getMessage()); } Awaiting your response.

    Read the article

  • Eclipse Dynamic Web Project fails to load under WTP

    - by Cue
    When trying to run an Eclipse Dynamic Web Project under a Tomcat setup using WTP, it fails with the attached stacktrace. Checklist At the project properties, under "Java EE Module Dependencies" I have checked the "Maven Dependencies" At the wtp deploy directory, under lib indeed all dependencies are present (esp. struts-taglib-1.3.10.jar) On the other hand, if I package with maven and copy the war file under the webapps directory everything is working as normal. Specification Eclipse JEE Galileo SR2 (with WTP 3.1.1) Tomcat 6.0.26 Java(TM) SE Runtime Environment (build 1.6.0_17-b04-248-10M3025) Java HotSpot(TM) 64-Bit Server VM (build 14.3-b01-101, mixed mode) stacktrace org.apache.jasper.JasperException: Unable to read TLD "META-INF/tld/struts-html-el.tld" from JAR file "file:/Users/cue/Development/workspace/eclipse/.metadata/.plugins/org.eclipse.wst.server.core/tmp2/wtpwebapps/ticketing/WEB-INF/lib/struts-el-1.3.10.jar": org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.html.MessagesTei at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:181) at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:182) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:383) at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:446) at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1393) at org.apache.jasper.compiler.Parser.parse(Parser.java:130) at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:255) at org.apache.jasper.compiler.ParserController.parse(ParserController.java:103) at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:185) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:347) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:327) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:314) at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:637)

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >