struts integrate with hibernate and spring

2014-10-19 Thread phoenix
I want to integrate struts2 with hibernate4 and spring4,but i don't know if  i need to use spring to manager struts action, is spring manager struts action better than struts manage action itself? Which method is better?  I am puzzled with how to integrate struts2 with hibernate4 and spring4, An

Struts2+json question

2010-08-05 Thread red phoenix
I use struts2.1.8 and extjs3.2, I make a login page, if login failed,it will alert a message and it will still stay this login page; if it login success,it will go to another new page,such as main.jsp page My login page is follows: var win=new Ext.Window({ el:'hello-win', items: logi

Struts 2 + Spring 2 + JPA + AJAX question

2010-07-12 Thread red phoenix
I want to use Struts 2 + Spring 2 + JPA + AJAX,I find it as following url: http://struts.apache.org/2.1.8/docs/struts-2-spring-2-jpa-ajax.html When I try to download this code,like follows: Get the code

How to get s:select id and name under struts2 action?

2010-03-22 Thread red phoenix
I have a jsp,it contains a s:select,like follows: When this jsp submit,it will submit to a struts2 action,I want to know how to get all id and name of s:select and how to get selected id and name of s:select ? How to do it? An example is better. Thanks!

legend don't work under of struts2

2010-03-13 Thread red phoenix
I want to use legend tag under struts2,I set legend css like follows: form{ padding:10px; margin:0 auto; } form#form legend { border:1px solid #e8e7e1; background:#fff url(../img/form_red.gif) repeat-x center left; color:#a43708; } following code can run well: Add user information Th

struts2 show question

2009-04-20 Thread red phoenix
I have a table named mytable,it has two cols,col1 and col2,the data are col1 col2 --- John 24 Kate 18 hibernate xml file is follows: Then I user struts2 to get the data by following statement: List testList=this.getHibernateTemplate().find(" from myta

How to set 'pager.offset' in struts2 action?

2009-03-09 Thread red phoenix
I use struts2 and Pager Taglib2.0, in jsp file,it has a parameter,like follows: when I run above code,it raise warning message: Warn: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'pager.offset' on 'class test.ArticleAction: Error setting expression 'pager.offset' w

pager question in struts2+Pager Taglib2

2009-02-02 Thread red phoenix
I use struts2.0.14 and Pager Taglib2.0, I want to use Pager Taglib2.0 in struts2 In action file public String search() throws Exception{ System.out.println("call search"); request.setAttribute("index","center"); request.setAttribute("pageUrl","/test/search.action"); return SU

How to decorate button

2008-12-30 Thread red phoenix
My Struts is 2.0.14,I use ,like follows: Then there is a upload button,but this button is not pretty.I have two question: 1) How to decorate this button,such as a image button? 2) when I click this button,how to check this upload file name first,if this file name is DOC,it can submit,otherwise i

Re: org.apache.struts2.dispatcher.StrutsRequestWrapper cannot be cast to org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper

2008-12-16 Thread red phoenix
>How to look if I use the default stack? My configure file is follows: /demo/upload.jsp Is it "fileUpload" interceptor? phoenix On Tue, Dec 16, 2008 at 11:55 PM, Dave Newton wrote: > --- On Tue, 12/16/08, red phoenix wrote: > > It says: En

Re: org.apache.struts2.dispatcher.StrutsRequestWrapper cannot be cast to org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper

2008-12-16 Thread red phoenix
lient and server are not the same machine. How to do it? An example is better. phoenix On Tue, Dec 16, 2008 at 11:32 PM, Dave Newton wrote: > Use the *preferred* method, the interceptor. > > I haven't looked in to what caused the breaking change. > > Dave > > --- On Tue,

Re: org.apache.struts2.dispatcher.StrutsRequestWrapper cannot be cast to org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper

2008-12-16 Thread red phoenix
still puzzled with why raise above error. I don't find the different between my code and http://struts.apache.org/2.0.14/docs/how-do-we-upload-files.html. Where wrong with my code? On Tue, Dec 16, 2008 at 11:13 PM, Dave Newton wrote: > --- On Tue, 12/16/08, red

org.apache.struts2.dispatcher.StrutsRequestWrapper cannot be cast to org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper

2008-12-16 Thread red phoenix
I use struts2.0.14,I want to use upload function,my jsp file is follows: ... struts action is follows: public String uploadFile() throws Exception{ MultiPartRequestWrapper multipartRequest=((MultiPartRequestWrapper)ServletActionContext.getRequest()); ... return SUCCESS; } when I s

Unexpected Exception caught setting 'uploadFileContentType'

2008-12-14 Thread red phoenix
I want to upload a file in struts2,my jsp file is follows: my action is follows: import java.io.File; private File uploadFile; public File getUploadFile(){ return uploadFile; } public void setUploadFile(File uploadFile){ this.uploadFile=uploadFile; } public String upload() throws

getOutputStream() has already been called for this response

2008-12-10 Thread red phoenix
I use struts2.0.11,I want to show a picture by struts action,like follows: public String showphoto() throws Exception{ response=ServletActionContext.getResponse(); response.setContentType("image/png"); ... InputStream in = picture.getBinaryStream(); OutputStream out = response.g

how to use pager tag in struts2?

2008-08-19 Thread red phoenix
I want to use Pager Tag Library2.0 in struts2,I set maxPageItems under struts2.0 action,like follows: request.setAttribute("maxPageItems","10"); return SUCCESS; then I use maxPageItems in JSP page,like follows: .. When I run above code,it raise error: 22: <%@ include file="/pages/commo

struts2 question

2008-03-02 Thread red phoenix
st key '%{myList}' could not be resolved as a collection/array/map/enumeration/iterator type. Example: people or people.{name} - [unknown location] I have searched google for several days,but I don't find how to solve it. I am puzzled with it! I want to know how to correct my code? Any idea will be appreciated! Best regards Phoenix

struts2 s:if and displaytag question

2008-02-19 Thread red phoenix
I use Struts2 and displaytag, In testList,there is a abc attribute,it contains data like "english","france",when abc="english",I want to show En,else show Eu,my code is follows: En Eu when I execute code,I find it only shows english or france,I don't know why

Warn: No configuration found for the specified action under struts2.0.11

2007-11-20 Thread red phoenix
I have some configure,and it runs well under struts2.0.9,but it raise warning under struts2.0.11,my files are follows: /*struts.xml*/ http://struts.apache.org/dtds/struts-2.0.dtd";> /*test.xml*/ http://struts.apache.org/dtds/struts-2.0.dtd";> /t1.jsp /t2.jsp

Error: ParametersInterceptor - [setParameters]

2007-09-26 Thread red phoenix
I use struts2.0.9 and displaytag,xwork-2.0.4.jar,when I click next page of displaytag,it will raise flowing warning: Warn: ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'd-1332698-p' on 'class Test.TestAction: Error setting expression 'd-1332698-p' with value '[Ljava

Warn: Parameters: Invalid chunk ignored

2007-09-23 Thread red phoenix
I use Tomcat6.0.14 and struts2,I have a jsp page,and there is a button in it,when I click this button,it will call Javascript,and redirect another page,my code is follows: ... functioin test(){ document.forms[0].action="a.do"; document.forms[0].submit(); } ... Test ... When I

How to get directory information in struts2 action?

2007-08-19 Thread red phoenix
I want to know how to get directory information in struts2 action,when I run following action: http://localhost:8080/struts2-blank-2.0.9/example/HelloWorld.action I want to get the path value http://localhost:8080/struts2-blank-2.0.9 in HelloWorld.action,such as: public String execute() throws

Re: How to make initialize with struts2 action?

2007-08-15 Thread red phoenix
e's the documentation for the Spring-plugin: > http://struts.apache.org/2.x/docs/spring-plugin.html > > Nils-H > > On 8/16/07, red phoenix <[EMAIL PROTECTED]> wrote: > > I know your meaning,but the question I want to Initialize in struts > > action,not in common

Re: How to make initialize with struts2 action?

2007-08-15 Thread red phoenix
gt; e.t.c. I am not exactly sure if this is what you are after though > Why do you want to do this ? > > Leon > > red phoenix wrote: > > If I use no-argument constructor,how can i do to initialize some > > information? > > Thanks > > > > > > O

Re: How to make initialize with struts2 action?

2007-08-15 Thread red phoenix
If I use no-argument constructor,how can i do to initialize some information? Thanks On 8/16/07, Rec Floyd <[EMAIL PROTECTED]> wrote: > > Hey,red.In my opinion, to use struts, you have to supply a no-argument > constructor.That is the point. > > ---

How to make initialize with struts2 action?

2007-08-15 Thread red phoenix
th it! Anybody could tell me how to do it? An example is better. Thanks, phoenix

Re: how to include struts by using

2007-07-11 Thread red phoenix
p://localhost:8080/struts2-blank-2.0.8/example/HelloWorld.action"/> I only want to use relative path,not absolute path,I don't know why raise above error,and how to correct it ? Thanks On 7/12/07, Michael Jouravlev <[EMAIL PROTECTED]> wrote: On 7/11/07, red

how to include struts by using

2007-07-11 Thread red phoenix
I want to use but when I run this jsp file,http://localhost:8080/a.jsp,it raise error,it shows it can't find a1.do and a2.do,but when I write follows in IE, http://localhost:8080/a1.do, it can show right result. I am puzzled with it.I wan to know if I don't use

How to set attribute of

2007-05-12 Thread red phoenix
I read document from struts2 and I know has label,name,cssStyle,cssClass,so I use as follows: I want to set label "Your First Name" as red color and font size is 6,but when I execute above code,I found label "Your First Name" is still black color and not red color and its size is not 6,why? Ho

Re: Struts2 character code question

2007-05-08 Thread red phoenix
or email and destroy the original message without making a copy. Thank you. - Original Message - From: "red phoenix" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Tuesday, May 08, 2007 8:47 PM Subject: Re: Struts2 character code question &g

Re: Struts2 character code question

2007-05-08 Thread red phoenix
D MESSAGE- Hash: SHA1 Red, red phoenix wrote: > If I input English name in the field Name in JSP,when I submit,the > test.do will receive right English name,but when I input Chinese name > in the field Name in JSP, test.do will receive not right name,it will > show [EMAIL PROTECTED]

Struts2 character code question

2007-05-08 Thread red phoenix
I have set my all files with UTF-8 format,so I set URIEncoding parameter in server.xml in tomcat6.0.10,like follows: Then I write a JSP file like follows: <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib prefix="s" uri="/struts-tags" %> In test.do action,I get the

Ajax can't receive Chinese code from action of struts2

2007-04-28 Thread red phoenix
when ajax receive information which include Chinese code from action of Struts2,ajax will show chinese code into confusion code,but if ajax receive information which include Chinese code from jsp, ajax will show correct Chinese code.I don't know why raise this error! How to correct it? My code i

How to realize ajax in struts2

2007-04-23 Thread red phoenix
I want to use ajax within Struts to realize following function,there is a textfield an a submit button which use register a username in a JSP page,then you can put you name into textfield and click register button,then will call ajax to search name is exist,if exist,there will be a message behind

Could not load 'dojo.widget.html.Tooltip':last tried '__package__.js'

2007-04-23 Thread red phoenix
I want to use ajax in struts2,but when run my code like http://localhost:8080/test/index.html,it raise following Javascript error: Line:95 Char:1 Error:Could not load 'dojo.widget.html.Tooltip':last tried '__package__.js' Code:0 URL:http://localhost:8080/test/test/Test.action

Re: How to set filter in Struts2?

2007-04-19 Thread red phoenix
Would you give me a simple code for it? On 4/20/07, Drew Kutcharian <[EMAIL PROTECTED]> wrote: Can you use different filters/filter mappings for different URL patterns? Drew Kutcharian Venarc Inc. www.venarc.com - Original Message From: red phoenix <[EMAIL PROTECTED]>

How to set filter in Struts2?

2007-04-19 Thread red phoenix
I want to set a filter,then I set different character code by this filter,such when a request from a1.action,I will set this character code is UTF-8,a request from a2.action,I will set this character code is ISO88591,and so on.I don't know how to realize above function in filter? Anybody could tel

why Struts2 can't receive Jsp variable value by using Ajax1.2?

2007-02-09 Thread red phoenix
I have a text area and a text link in a jsp page,when I click this text link,I will call struts2 action by using ajax,like follows: /*-jsp page-*/ var http = getHttpObject(); function getHttpObject(){ var xmlhttp = false; if(window.XMLHttpRequest){ xmlhttp = new XMLHttpRequest(); if(xm

How to use

2007-01-24 Thread red phoenix
I don't know how to use it.Anybody can tell how to use it? I want to make a dynamic tree,and I can add,modify and delete any node of the dynamic tree,how to realize it? Is there a source code for me? Thanks in advance! Best regards, phoenix

java.io.WriteAbortedException

2006-12-25 Thread red phoenix
When I start tomcat6 and struts2,sometimes when I start tomcat,it will raise following error,but sometimes when I start tomcat6,it don't raise any error! I am puzzled with it for a very long time!!! Anyone could tell the reason and how to solve it? Error information is following: Exception loading

Re: where to download struts2.0 examples files?

2006-12-19 Thread red phoenix
...\apps ? /S -Original Message- From: red phoenix [mailto:[EMAIL PROTECTED] Sent: 19. joulukuuta 2006 9:49 To: Struts Users Mailing List Subject: where to download struts2.0 examples files? In struts doc,I often see "org.apache.struts2.example.*",I want to know where I can

bean method don't make function in Struts2

2006-12-19 Thread red phoenix
I use struts2 ,like follows: ---SimpleCounter--- package test; public class SimpleCounter{ String foo; public void setFoo(String foo){ System.out.println("set foo="+foo); this.foo=foo; } public String getFoo(){ System.out.println("get foo="+foo); return foo; } } ---test.jsp--- <%@ taglib ur

where to download struts2.0 examples files?

2006-12-18 Thread red phoenix
In struts doc,I often see "org.apache.struts2.example.*",I want to know where I can download the example fiels?

in struts2

2006-12-18 Thread red phoenix
I want to change my code from struts1 to struts2,I use displaytag and to show following code,it can run well, will show 1,2, <%@ taglib uri="/struts-tags" prefix="s" %> > I know struts2 will use and use to replace ,so I modify code like follows: <%@ taglib uri="/struts-tags" prefix="s"

in Struts2

2006-12-18 Thread red phoenix
I put a String into a session,and I use to determine the session if it is exist,if exist,show OK,if not exist,it shows error,but when I run it,it shows error,I don't know why don't show OK? How to correct to show OK? my code is follows: <%@ page contentType="text/html; charset=UTF-8" %> <%@ tagli

in struts2

2006-12-17 Thread red phoenix
I want to realize in Struts2,when session attribute is exist,it show "login",if it is not exist,it shows "not login",like follows: login not login I don't know how to use in struts2,because I don't find in struts2,anyone could tell me how to do it and give me some examples? Thanks.

struts.i18n.encoding

2006-12-14 Thread red phoenix
I want to set other country language character set,I know I should set web.xml with struts.i18n.encoding=... but I don't know the value which struts.i18n.encoding permited,anyone could give me a character list of struts.i18n.encoding? Thanks

struts2.0 action question

2006-12-13 Thread red phoenix
I am puzzled with struts2.0 action file,my files are follows: configure file is follows /chat/read.jsp /chat/write.jsp action file is follows: public String execute() throws Exception { String flag=request.getParameter("flag"); if("1".equals(flag)) return SUCCESS; else if("2".equ

struts2 web.xml question

2006-12-13 Thread red phoenix
I have a filter configure question about struts2,i want to filter character code in web.xml file,I know how to configure it in struts 1.3, C:\tomcat\webapps\exercise\WEB-INF\web.xml ... Set Character Encoding filters.SetCharacterEncodingFilter encoding gb2312 Set Charac

struts2.0 question

2006-12-11 Thread red phoenix
I have a question about Struts 2.0 Action,I find Action will extends ActionSupport,like follows: public class GetUpdatedHangmanAction extends ActionSupport implements SessionAware { private static final long serialVersionUID = 5506025785406043027L; . I am puzzled with variable serialVersionU

how to learn Struts 2

2006-12-04 Thread red phoenix
I am a newer of Struts 2,I find my application of Struts1 are can't run under Struts 2.I want to know Struts 2,but I don't know how to learn Struts2,would you give me some advice or material to learn? Thanks

org.apache.commons.validator not exist

2006-11-29 Thread red phoenix
I compile my Java file,but it raise error:org.apache.commons.validator not found,I guess I must lost a jar file,but I don't know which jar I lost,anyone could tell me which jar I need? Thanks.

How to realize print function

2006-11-01 Thread red phoenix
I want to realize print function in Struts,when click a button in jsp page,it will print part of screen information in Printer. I know javascript: window.print() can realize print function,but it don't fit me,because window.print() will print all screen information.I know another method,it will wr

Struts Encode question

2006-10-05 Thread red phoenix
I want to get a value from a JSP in Action,like follows: /*jsp*/ <%@ page contentType="text/html;charset=gb2312" %> And I input a Chinese Word in ex area,then I get the ex value from a Action,like follows: /*Action*/ public ActionForward execute(ActionMapping mapping,ActionForm form,HttpSer

compile getDataSource error in Action

2006-09-28 Thread red phoenix
I use JDK1.6 and Struts1.3.5,I use Javac to compile a Action file,like follows: javac xxxAction.java but when I compile it,it raise follows error: xxxAction.java:31: Can't find symbol symbol: method getDataSource(javax.servlet.http.HttpServletRequest, java.lang.String) location: class xxxAction

Struts validation question

2006-07-04 Thread red phoenix
I want to use struts validation,when field is invalidate,my program can raise information,like follows: Username is required. Password is required. Phone Number is required. I know it's server-side validation,I want to use client-side validation,so I put some code in my JSP files: When I run t

[Default Bundle] Missing Field

2006-06-29 Thread red phoenix
I use JDK1.6,tomcat5.0.28,Struts1.2.9,I run Bundles Example Form of struts-examples.war,when I click Save button,I find the Field Address say "[Other Bundle]Missing Field: Address(Other Bundle) " Why raise above error? How to

Null Exception in ActionForm

2006-05-19 Thread red phoenix
I have two jsp file,such a.jsp and b.jsp,one Action file and one Form file,I want to from a.jsp to call Action file,and I set value of Form in Action file,and return to b.jsp,and show value in b.jsp,so I can modify this value in b.jsp my struts-config.xml is follows: /*b.jsp*/ ...

Download question

2006-04-05 Thread red phoenix
I want to realize download function in struts,and I will put some file url in JSP file,when click one of the file url,this file will be download.Dostruts or some taglib support download function? Thanks in advance

Is there a struts Taglib document?

2006-04-04 Thread red phoenix
Is there a struts taglib document about ,,,the chm file form is better. If you have it,please give it to me. Thanks!

action not work

2006-04-03 Thread red phoenix
I have a submit button in A.jsp,and I want to submit to B.do from A.jsp,but when I click this submit button,it should submit to B.do and show some information on screen,but in fact it doesn't work,when I use http://localhost:8080/B.do, it can work.I don't know why it don't work from A.jsp to B.do?

Re: Servlet action is not available

2006-04-03 Thread red phoenix
"+""); while(rs.next()){ out.print(rs.getString(1)+""); } rs.close(); stmt.close(); conn.close(); }catch(Exception e){ out.print(e); } %> javax.naming.NameNotFoundException: Name jdbc is not bound in this Context Why? Any idea will be appreciated

Servlet action is not available

2006-04-03 Thread red phoenix
My Struts is 1.2.9,and tomcat is 5.5.15,and JDK is 1.5,I want to use Struts Datasource,my database is Microsoft Access 2000,and I have configured ODBC datasource in windows,when I run it, it raise follows error: type Status report message Servlet action is not available description The requested re

Re: How to configure Struts connection pool

2006-04-01 Thread red phoenix
t . Even if you want to keep the "key" > attribute, then try using this, > DataSource db= getDataSource(request,key); > > This should work for you. Let me know if you still face any issues. > > Thanks, > Tarun. > > > On 4/1/06, red phoenix <[EMAIL PRO

Error while configure struts Datasource

2006-04-01 Thread red phoenix
I want to configure data source,I use Tomcat5.5.15 and struts-1.2.9,my database is Microsoft Access2000,my configure is follows: . When I start Tomcat,it raise following error: New org.apache.commons.dbcp.BasicDataSource Begin event threw excepti

Why struts can't use Tomcat5 connection pool?

2006-04-01 Thread red phoenix
in this Context I am puzzled with it! I don't know why this JSP file can run well under Tomcat and don't run under Struts? Anybody knows how to solve it? Any idea will be appreciated! Best regards, phoenix

How to configure Struts connection pool

2006-04-01 Thread red phoenix
I use struts-1.2.9,and want to configure a connection pool,so I configure struts-config.xml file Then I use this configure in a jsp file,like follows: <[EMAIL PROTECTED] import="java.sql.*"%> <[EMAIL PROTECTED] import="javax.sql.DataSource"%> <[EMAIL PROTECTED] impor

Re: migrate question from Struts 1.0.2 to Struts1.2.8

2006-02-28 Thread red phoenix
where error is my code? On 2/28/06, Laurie Harper <[EMAIL PROTECTED]> wrote: > > First things first: did you go through all the migration steps listed on > the wiki for 1.0 -> 1.2, 1.1 -> 1.2.4, 1.2.4 -> 1.2.7 and 1.2.7 -> 1.2.8? > > L. > > red phoenix wrote

migrate question from Struts 1.0.2 to Struts1.2.8

2006-02-27 Thread red phoenix
I have a simple Struts program,it can run well in Struts1.0.2,then I migrate it to Struts1.2.8,this time I find index.jsp page shows well,but when I submit this page,it should redirect to show.jsp page and show something in it,but in fact it redirect an empty page,it show nothing,even no error in T

Re: Cannot find ActionMappings or ActionFormBeans collection

2006-02-27 Thread red phoenix
gt; config > /WEB-INF/struts-config.xml > > > debug > 2 > > > detail > 2 > > > validate > true > > 2 > > > > Can you remove the paragraph that remarked red fonts above and use > try aga

Cannot find message resources under key org.apache.struts.action.MESSAGE

2006-02-27 Thread red phoenix
ervice(HttpServlet.java:709) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) I have configure the application.properties,why raise above error? Thanks in advance! Best Regards, phoenix

Re: Cannot find ActionMappings or ActionFormBeans collection

2006-02-27 Thread red phoenix
I use But it still raise same error. On 2/27/06, Denis Ling <[EMAIL PROTECTED]> wrote: > > > > ... > > > > You should remove the suffix of "log.do". In other words you can use > "log" > instead of "log.do" . >

Cannot find ActionMappings or ActionFormBeans collection

2006-02-26 Thread red phoenix
I use Struts struts-1.2.8,when I execute my JSP file,it raise following error: javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection org.apache.jasper.runtime.PageContextImpl.doHandlePageException( PageContextImpl.java:858) org.apache.jasper.runtime.PageContextIm

Re: question

2006-02-23 Thread red phoenix
ls. In your application resources: > > empty.footer= > empty.header= > > ... then on the errors tag: > > > > ...or you could use the messages tag instead: > > name="msg"/> > > See: > http://www.niallp.pwp.blueyonder.co.uk/HelpTagsErrorsAndMessages

Re: question

2006-02-23 Thread red phoenix
dn't be any problem with the "property" attribute. If > you're > using a pre 1.0 version of struts I highly recommend you upgrade. > > Niall > > - Original Message - > From: "red phoenix" <[EMAIL PROTECTED]> > Sent: Friday, February 24, 200

Re: question

2006-02-23 Thread red phoenix
nd don't work. I am puzzled with it. On 2/23/06, Dave Newton <[EMAIL PROTECTED]> wrote: > > red phoenix wrote: > > I modify my code,like follows,this time it don't show any error,but when > the > > content of text abc is '123',it's length isn't

Re: question

2006-02-23 Thread red phoenix
en > renamed struts-html.tld instead; for ref: > http://struts.apache.org/struts-action/userGuide/release-notes-1.0-b3.ht > ml > > If you still want to use struts-form.tld then there is no "property" > attribute as far as I remember; It should be "name" in

question

2006-02-22 Thread red phoenix
I have a JSP file,and I use in this page,but it raise error,my code is follows: <%@ taglib uri="/WEB-INF/struts-form.tld" prefix="html" %> and my Form is follows: .. public ActionErrors validate(ActionMapping mapping,HttpServletRequest request) { ActionErrors errors = new ActionError

Re: why my page can't redirect under Struts with Javascript?

2006-02-20 Thread red phoenix
t;[EMAIL PROTECTED]> wrote: > > red phoenix wrote: > > I tried follows: > > function goURL(tmp){ > > document.forms[0].action=eval("/Log/log.do?action=First"); > > document.forms[0].submit(); > > } > > > > and > > fun

Re: why my page can't redirect under Struts with Javascript?

2006-02-20 Thread red phoenix
I tried follows: function goURL(tmp){ document.forms[0].action=eval("/Log/log.do?action=First"); document.forms[0].submit(); } and function goURL(tmp){ document.forms[0].action=eval("/log.do?action=First"); document.forms[0].submit(); } My page also can't redirect! And I try function g

Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread red phoenix
quot;/Log/log.do?action=3" But the page still can't redirect! Why can't redirect? On 2/20/06, raja sekar <[EMAIL PROTECTED]> wrote: > > try this > > function goURL(tmp){ > var url = "<%=response.encodeURL("/Log/log.do")%>"; > docu

Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread red phoenix
his > > function goURL(tmp){ > var url = <%=response.encodeURL("/Log/log.do")%>; > document.forms[0].action=url + "?action=" + tmp; > document.forms[0].submit(); > } > > and try... > > On 2/20/06, red phoenix <[EMAIL PROTECTED]> wrote: >

Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread red phoenix
alues > "First", "Second" or "Third" > > Try it again with following manner. > > > First > Second > Third > > > I hope it will work. > > > On 2/20/06, red phoenix <[EMAIL PROTECTED]> wrote: > > >

Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread red phoenix
action=First">First Page works for you, you are > passing a "First" to the action in this case. > > > Saul > > - Original Message - > From: "red phoenix" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" > Sent: Sunday, Feb

Re: why my page can't redirect under Struts with Javascript?

2006-02-19 Thread red phoenix
r the following: > > document.forms[0].action="/log.do?action="+eval(tmp); > > You'll need to prefix "/log.do" with your web context. Or you can use: > in place of /log.do above. > > hope it helps. > Saul > > > - Original Message - >

why my page can't redirect under Struts with Javascript?

2006-02-19 Thread red phoenix
I use Javascript in Struts,like follows: function goURL(tmp){ alert(tmp); document.forms[0].action="/log.do?action="+eval(tmp); document.forms[0].submit(); } First Page First Second Third when click "First Page",I can redirect my page to log.do page,but when I change the value of select,an