how to refresh only included pages

2008-03-28 Thread roshana
Hi all, I am a newbie to java struts programming. Now I am working on a file upload module which reads a text file, process it and port it to a database. The progress of this operation is to be shown in a text area. Here I am using two Jsp files - first.jsp for allowing user to select the file t

Client Side Validation with Struts

2008-03-28 Thread Asad Habib
Hello. I am validating data on the client-side using the Javascript onsubmit event handler and this is working just fine. The problem I am having is with trying to prevent the action from being called after the alert window is closed. Is it possible to do this? If so, how? Also, for client side val

Re: Compile error in JSP after upgrading from servlet specification 2.3 to 2.4

2008-03-28 Thread Laurie Harper
Ashish Kulkarni wrote: Hi I get compile error in jsp at line There's nothing wrong with that line. What is the full error you're getting? What do the surrounding lines of your JSP look like? I jsut upgraded web.xml from 2.3 to 2.4, i added following lines in web.xml [...] Are you sure t

Re: Another select-option question

2008-03-28 Thread Tom Holmes Jr.
Laurie Harper wrote: Tom Holmes Jr. wrote: I've created numerous pages with multiple combo-dropdown boxes that captured the label and value of a select box. The formbean for these was always clear cut and simple. Now, I have a select like the following: A B C As I understand it, whe

Re: Message surviving redirect

2008-03-28 Thread chubi
Hey guys, I'm really greatful u made a great deal responding to my problem :handshake: I am using the message store interceptor, very correctly :confused:... I also mentioned that the xml tag is not showing correclty in this thread: STORE Plz. read my xml block thouroughly, there is noth

Compile error in JSP after upgrading from servlet specification 2.3 to 2.4

2008-03-28 Thread Ashish Kulkarni
Hi I get compile error in jsp at line I jsut upgraded web.xml from 2.3 to 2.4, i added following lines in web.xml http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2

Re: [OT] Read XML file from folder outside web application

2008-03-28 Thread Antonio Petrelli
2008/3/28, Ashish Kulkarni <[EMAIL PROTECTED]>: > Hi > i did File f = new File(mypath); and it works > What is the danger of doing so? Sorry, I was a bit misleading. I meant that it is better not to expose that file with an absolute path to the internet, as it can become a backdoor to your serve

Re: [OT] Read XML file from folder outside web application

2008-03-28 Thread Ashish Kulkarni
Hi i did File f = new File(mypath); and it works What is the danger of doing so? Ashish On 3/28/08, Antonio Petrelli <[EMAIL PROTECTED]> wrote: > > 2008/3/28, Ashish Kulkarni <[EMAIL PROTECTED]>: > > > I can use servletContext.getResource('/WEB-INF/myconfig.xml'); to read > > myconfig.xml file

Re: [OT] Read XML file from folder outside web application

2008-03-28 Thread Antonio Petrelli
2008/3/28, Ashish Kulkarni <[EMAIL PROTECTED]>: > I can use servletContext.getResource('/WEB-INF/myconfig.xml'); to read > myconfig.xml file which is under WEB-INF from a servlet > If i keep this file at c:/test/myconfig.xml file, can i read it from > a servlet, if so how?? You can read it wit

Re: [OT] Read XML file from folder outside web application

2008-03-28 Thread Martin Gainty
place the myconfig.xml in WEB-INF/classes then in struts.xml include that file M- - Original Message - From: "Ashish Kulkarni" <[EMAIL PROTECTED]> To: Sent: Friday, March 28, 2008 3:22 PM Subject: [OT] Read XML file from folder outside web application > Hi > I can use servletCont

[OT] Read XML file from folder outside web application

2008-03-28 Thread Ashish Kulkarni
Hi I can use servletContext.getResource('/WEB-INF/myconfig.xml'); to read myconfig.xml file which is under WEB-INF from a servlet If i keep this file at c:/test/myconfig.xml file, can i read it from a servlet, if so how?? Ashish

s2: Including Freemarker templates from JSP

2008-03-28 Thread hernan gonzalez
I have some freemarker templates (general purpose, i.e. not specifically for struts2) that generate html fragments, which I would like to include in some jsp pages (in a struts2 environment). Which are my alternatives? At first I tought of making a general jsp where includeFreemark

Re: Calling Action on form load

2008-03-28 Thread aum strut
Jane your solutions is working fine... was doing a small mistake from my end.. thanks for helping me out.. -aum On 3/28/08, aum strut <[EMAIL PROTECTED]> wrote: > > Hi Jane, > > what i m doing in my action class i am putting the list in the session > like this > > Map> session = ActionContext.*

Re: Calling Action on form load

2008-03-28 Thread aum strut
Hi Jane, what i m doing in my action class i am putting the list in the session like this Map> session = ActionContext.*getContext* ().getSession(); session.put("value",itemCode); and in my jsp page i m trying to retrieving the values like this: but when ever i m hitting the submitt button it

dojo is not defined error message in firefox console.

2008-03-28 Thread sharath karnati
Hi All, I'm getting below error message for this acrion(http://localhost:7001/hibernate/events/Dojo.action). dojo is not defined dojo.require("dijit.form.Button"); Please find my progrm: TooltipDialog demo // Dojo configuration djConfig = {

Re: Retaining request attributes after redirect

2008-03-28 Thread Dave Newton
--- ancatdubher <[EMAIL PROTECTED]> wrote: > I am building a simple registration module. The user accesses > /signup.action > to view signup.jsp. This JSP allows him to enter username, password, phone > and address. When submitted, the /createUser.action is invoked. Validation > of form data also h

Re: Retaining request attributes after redirect

2008-03-28 Thread stanlick
Have you looked at the chain result type? On Fri, Mar 28, 2008 at 8:25 AM, ancatdubher <[EMAIL PROTECTED]> wrote: > > Hi, > > I am building a simple registration module. The user accesses > /signup.action > to view signup.jsp. This JSP all

Retaining request attributes after redirect

2008-03-28 Thread ancatdubher
Hi, I am building a simple registration module. The user accesses /signup.action to view signup.jsp. This JSP allows him to enter username, password, phone and address. When submitted, the /createUser.action is invoked. Validation of form data also happens here. When form data is invalid, I do a

Struts 2 vs. Stripes

2008-03-28 Thread Asleson, Ryan
Hello, My company is considering replacements for Struts 1.x. The finalists are Struts 2 and Stripes. Not trying to start a flame war here, but can anybody comment on the relative strengths and weaknesses of Struts 2 vs. Stripes? Thank you!! This e-mail message is being sent solely for

Action Problem ....

2008-03-28 Thread Narayana S
Hi, i am having one link in a page. when i click on the link, i am going to the other page with some request level attribute. in the second page i have one update button, when i press that button, after performing some action and should return back to the 1st page along with same reques

Re: S2/Sitemesh: How to set the title in a freemarker template?

2008-03-28 Thread me
May be. I haven't done anything with struts 2 and sitemesh until now. Mostly I had worked with struts 1 but I had to upgrade now (So I'm still a beginner. :) ) [EMAIL PROTECTED] schrieb: Dude, do you sleep? On Fri, Mar 28, 2008 at 5:09 AM, me <[EMAIL PROTECTED]> wrote: -

Re: S2/Sitemesh: How to set the title in a freemarker template?

2008-03-28 Thread stanlick
Dude, do you sleep? On Fri, Mar 28, 2008 at 5:09 AM, me <[EMAIL PROTECTED]> wrote: > Great! It works perfectly! > > Thank you very much!!! > > Marc > > [EMAIL PROTECTED] schrieb: > > Try stack.findString('title') instead of ${title} > > > > On Fri, Mar 28, 2008 at 4:57 AM, me <[EMAIL PROTECTED]>

Re: S2/Sitemesh: How to set the title in a freemarker template?

2008-03-28 Thread me
Great! It works perfectly! Thank you very much!!! Marc [EMAIL PROTECTED] schrieb: Try stack.findString('title') instead of ${title} On Fri, Mar 28, 2008 at 4:57 AM, me <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] schrieb: No problem bro Let's see what you added to your template to

Re: S2/Sitemesh: How to set the title in a freemarker template?

2008-03-28 Thread stanlick
Try stack.findString('title') instead of ${title} On Fri, Mar 28, 2008 at 4:57 AM, me <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] schrieb: > > No problem bro > > > > Let's see what you added to your template to fetch the title from action > Okay, these are my files: > > template.ftl: > -

Re: S2/Sitemesh: How to set the title in a freemarker template?

2008-03-28 Thread me
[EMAIL PROTECTED] schrieb: No problem bro Let's see what you added to your template to fetch the title from action Okay, these are my files: template.ftl: -- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> test - ${

Re: S2/Sitemesh: How to set the title in a freemarker template?

2008-03-28 Thread stanlick
No problem bro Let's see what you added to your template to fetch the title from action On Fri, Mar 28, 2008 at 4:18 AM, me <[EMAIL PROTECTED]> wrote: > Sorry but I think I miss something. I've got a action which extends > ActionSupport. This Action has got an execute() method > and an title pro

Re: S2/Sitemesh: How to set the title in a freemarker template?

2008-03-28 Thread me
Sorry but I think I miss something. I've got a action which extends ActionSupport. This Action has got an execute() method and an title property with the getters and setters. The action is properly read and executed. But the property wasn't. Is there anything I have to take care of? Sorry for m

Re: S2/Sitemesh: How to set the title in a freemarker template?

2008-03-28 Thread stanlick
The FreeMarker template can access the property in your action to get the "action variable" title. On Fri, Mar 28, 2008 at 3:24 AM, me <[EMAIL PROTECTED]> wrote: > Hi, > > hmmm... do you mean that I should create a template for each site which > has another title? > I think that would be too much

Re: Message surviving redirect

2008-03-28 Thread stanlick
Sorry about that! My config specified the interceptor as: STORE Also, I think you can specify store/retrieve as a request parameter as an alternative to the XML On Fri, Mar 28, 2008 at 12:30 AM, Laurie Harper <[EMAIL PROTECTED]> wrote: > He *is* using the store interceptor :-), though appa

Re: S2/Sitemesh: How to set the title in a freemarker template?

2008-03-28 Thread me
Hi, hmmm... do you mean that I should create a template for each site which has another title? I think that would be too much. I've got several pages which should get a title based on information located in a database. I thought that there will be a property in the action i have to set or ca

Re: S2/Sitemesh: How to set the title in a freemarker template?

2008-03-28 Thread stanlick
Hey Marc -- copy that FreeMarker template into your /template folder and modify it with your desired changes. Struts 2 will grab yours for rendering. On Fri, Mar 28, 2008 at 2:14 AM, me <[EMAIL PROTECTED]> wrote: > Hi, > > I'm running struts2 with sitemesh. There is a freemarker template > def

Re: Please answer this struts basic qtn

2008-03-28 Thread Al Sutton
Here is clear cut answer; "READ THE TUTORIALS". We're not going to do you homework for you, and we're certainly not going to help you pass an interview which is designed to look for peoplewho have worked on struts much. Al. - Original Message - From: "pannar" <[EMAIL PROTECTED]> To

S2/Sitemesh: How to set the title in a freemarker template?

2008-03-28 Thread me
Hi, I'm running struts2 with sitemesh. There is a freemarker template defined in the decorators and this template has both variables $title and $body. The body is filled autmatically which is okay. But I want to set the title from the action I've called because I wanted to have the content and