Strut / Turbine
It seems that the database support is pretty lesser in strut than in turbine. I'm wonder what is the better frame work to use, I want to build database driven web site in java technologie.
Re: PROPOSAL: Template Screens
Hi David, and everybody, I understand David's position, there is a proverb which said "who go slowly go surely" ;-) But, please, don't forget that I have already work for a long time on Components proposal. A lot of peoples have tried them, and give positive feedback, as well as improvement, on proposed features. Also, people hesitate to use Components in long term because they are not sure that Components will be maintained if they are not part of a large project. I think that everyone could take advantages if we join our efforts to propose a strong "Extended Templates Proposal", rather than to propose two tools providing nearly the same. Saying that, here are some ideas for Template Screens Proposal : I think that we can reuse actual Templates syntax, rather than introducing too much new tags or using scriptlet. This will simplify learning and comprehension of Templates. Following is an example of how we could define a screen inside a jsp : -- template:screenDefinition id='introductionScreen' scope='request' template='/chapterTemplate.jsp' template:put name='title' content='Templates' direct='true'/ template:put name='header' content='/header.html' / template:put name='sidebar' content='/sidebar.jsp' / template:put name='content' content='/introduction.html'/ template:put name='footer' content='/footer.html' / /template:screenDefinition --- To use it : template:insert definition='introductionScreen' / --- Or, if you want to overload one attribute : template:insert template='/anotherchapterTemplate.jsp' definition='introductionScreen' / --- Or, if you want to overload or add others attributes : template:insert definition='introductionScreen' put name='title' content='Another Title' / put name='leftSidebar' content='/leftsidebar.jsp' / /template:insert' --- Some comments : * In the "screenDefinition", you can define all or only some of the attributes. So, you can drop "template='/chapterTemplate.jsp' " * If you specify some attributes in 'insert' tag, they overload previously defined attributes, or add new one. * This syntax is implementation independent : object produced by tag handler 'template:screenDefinition' could be a Map, or a complex structure. * There is no 'role' attribute in the example, but we can use it. * Advantage of this syntax is that it is the same than 'insert'. This syntax can also be used in a xml description file, without introducing new concepts. * Another advantage, is that there is no scriplet inside JSP page. Now, we need to find a way to define 'screenDefinition' outside a JSP page (ex: in action). A Map could be a candidate. But putting 'content', 'content-type' (direct) and 'role' inside Map's value is not so easy to use. We could thing of a class ScreenDefinition, having some method reflecting the tag syntax : setTemplate( String templateName ) put( String name, Object content ); put( String name, Object content, boolean direct ); put( String name, Object content, boolean direct, String role ); ... Such class could be easiest to use in code. Once an instance is created, it is put in servlet context (request, session, ...). Then, object is used in the same way as if it is define in the JSP page : template:insert definition='screenDefinitionName' / However, it is possible to implement insert definition="aDefinition" / in order to accept a Map as well as a ScreenDefinition, if we want to keep both possibilities. Last, I thing that tag name 'template:screenDefinition' is too restrictive : we could effectively define a screen , but we can do much more with it, like defining a 'Component' ;-) . So maybe we need to propose something else for this tag name (first ideas : 'template:definition', or 'template:instance' ). Cedric David Geary wrote: I see template screens as a first step towards Cedric's Components. Template screens provide the foundation necessary for Components: Programmatically defining screens. The next step is adding support for defining screens from an XML file, whether that's struts-config.xml or a separate file. Then we can add inheritance and locale support. I want to build this iteratively, with a design that reflects Struts design patterns (such as screen definitions that are analagous to the Map bean in the Link tag)*, rather than adopting Cedric's code wholesale. I'm more than willing to have Cedric or others pitch in some code. david * The Struts map-bean-property-to-request-parameter design pattern. Cedric Dumoulin wrote: A kind of "screen configuration" (called instances) is proposed in Components project, which can be seen as an extension of Templates. Screens are defined in a configuration file. You can also have different configuration files for different Locale : appropriate screens will be loaded according to user Locale. There is
Re: Strut / Turbine
See http://www.mail-archive.com/struts-user@jakarta.apache.org/msg03206.html and http://www.mail-archive.com/general@jakarta.apache.org/msg00495.html Christophe Vigny wrote: It seems that the database support is pretty lesser in strut than in turbine. I'm wonder what is the better frame work to use, I want to build database driven web site in java technologie.
Re: POST and GET method
That's a good question. If you guys find out let me know and I will do the same. I actually have to deal with that today in a multi-part form. I am not sure, but I think the answer is by adding struts hidden form fields. I'll let you know later today. - Original Message - From: kiatkin To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 12:05 AM Subject: POST and GET method Hi, Anyone know how to setan action class to process the POST request only. So that when user try toaccess www.abc.com/action.do?action=doGET. It can redirect user toerror page.Or put in this way, how do action classreact differently for each doGet and doPost request? regards, Kiat Kin
RE: POST and GET method
Hi, Typically in the past when I have written my own controller servlets, I delegate from the doPost doGet methods to a process() method much like the Struts ActionServlet. The difference however is that the method signature for my process method includes a boolean to indicate whether or not the request originated as a GET or POST: public void process(HttpServletRequest req, HttpServletResponse res, boolean isPost) ... This way the framework doesnot hide that info from the user. Maybe a future release of struts can incorporate this simple change? JR -Original Message-From: Spencer Smith [mailto:[EMAIL PROTECTED]]Sent: Thursday, March 01, 2001 9:35 AMTo: [EMAIL PROTECTED]Subject: Re: POST and GET method That's a good question. If you guys find out let me know and I will do the same. I actually have to deal with that today in a multi-part form. I am not sure, but I think the answer is by adding struts hidden form fields. I'll let you know later today. - Original Message - From: kiatkin To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 12:05 AM Subject: POST and GET method Hi, Anyone know how to setan action class to process the POST request only. So that when user try toaccess www.abc.com/action.do?action=doGET. It can redirect user toerror page.Or put in this way, how do action classreact differently for each doGet and doPost request? regards, Kiat Kin
RE: POST and GET method
The current ActionServletpasses both doGet() and doPost()to process(request, response). if you want your entire application to handle doGet() with an error.jsp, ActionServlet is a good place to do so (assuming each webapp get its own ActionServlet). If you want to handle them per Action basis,you can find out HttpMethod with request.getMethod(),the request object is passed to Action.perform() by ActionServlet. -Original Message-From: Spencer Smith [mailto:[EMAIL PROTECTED]]Sent: Thursday, March 01, 2001 8:35 AMTo: [EMAIL PROTECTED]Subject: Re: POST and GET method That's a good question. If you guys find out let me know and I will do the same. I actually have to deal with that today in a multi-part form. I am not sure, but I think the answer is by adding struts hidden form fields. I'll let you know later today. - Original Message - From: kiatkin To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 12:05 AM Subject: POST and GET method Hi, Anyone know how to setan action class to process the POST request only. So that when user try toaccess www.abc.com/action.do?action=doGET. It can redirect user toerror page.Or put in this way, how do action classreact differently for each doGet and doPost request? regards, Kiat Kin
Re: PROPOSAL: Template Screens
Hey, guys, I have a good proposal: include Cerdic to struts developer team. Cedric Dumoulin wrote: Hi David, and everybody, I understand David's position, there is a proverb which said "who go slowly go surely" ;-) But, please, don't forget that I have already work for a long time on Components proposal. A lot of peoples have tried them, and give positive feedback, as well as improvement, on proposed features. Also, people hesitate to use Components in long term because they are not sure that Components will be maintained if they are not part of a large project. I think that everyone could take advantages if we join our efforts to propose a strong "Extended Templates Proposal", rather than to propose two tools providing nearly the same. Saying that, here are some ideas for Template Screens Proposal : I think that we can reuse actual Templates syntax, rather than introducing too much new tags or using scriptlet. This will simplify learning and comprehension of Templates. Following is an example of how we could define a screen inside a jsp : -- template:screenDefinition id='introductionScreen' scope='request' template='/chapterTemplate.jsp' template:put name='title' content='Templates' direct='true'/ template:put name='header' content='/header.html' / template:put name='sidebar' content='/sidebar.jsp' / template:put name='content' content='/introduction.html'/ template:put name='footer' content='/footer.html' / /template:screenDefinition --- To use it : template:insert definition='introductionScreen' / --- Or, if you want to overload one attribute : template:insert template='/anotherchapterTemplate.jsp' definition='introductionScreen' / --- Or, if you want to overload or add others attributes : template:insert definition='introductionScreen' put name='title' content='Another Title' / put name='leftSidebar' content='/leftsidebar.jsp' / /template:insert' --- Some comments : * In the "screenDefinition", you can define all or only some of the attributes. So, you can drop "template='/chapterTemplate.jsp' " * If you specify some attributes in 'insert' tag, they overload previously defined attributes, or add new one. * This syntax is implementation independent : object produced by tag handler 'template:screenDefinition' could be a Map, or a complex structure. * There is no 'role' attribute in the example, but we can use it. * Advantage of this syntax is that it is the same than 'insert'. This syntax can also be used in a xml description file, without introducing new concepts. * Another advantage, is that there is no scriplet inside JSP page. Now, we need to find a way to define 'screenDefinition' outside a JSP page (ex: in action). A Map could be a candidate. But putting 'content', 'content-type' (direct) and 'role' inside Map's value is not so easy to use. We could thing of a class ScreenDefinition, having some method reflecting the tag syntax : setTemplate( String templateName ) put( String name, Object content ); put( String name, Object content, boolean direct ); put( String name, Object content, boolean direct, String role ); ... Such class could be easiest to use in code. Once an instance is created, it is put in servlet context (request, session, ...). Then, object is used in the same way as if it is define in the JSP page : template:insert definition='screenDefinitionName' / However, it is possible to implement insert definition="aDefinition" / in order to accept a Map as well as a ScreenDefinition, if we want to keep both possibilities. Last, I thing that tag name 'template:screenDefinition' is too restrictive : we could effectively define a screen , but we can do much more with it, like defining a 'Component' ;-) . So maybe we need to propose something else for this tag name (first ideas : 'template:definition', or 'template:instance' ). Cedric David Geary wrote: I see template screens as a first step towards Cedric's Components. Template screens provide the foundation necessary for Components: Programmatically defining screens. The next step is adding support for defining screens from an XML file, whether that's struts-config.xml or a separate file. Then we can add inheritance and locale support. I want to build this iteratively, with a design that reflects Struts design patterns (such as screen definitions that are analagous to the Map bean in the Link tag)*, rather than adopting Cedric's code wholesale. I'm more than willing to have Cedric or others pitch in some code. david * The Struts map-bean-property-to-request-parameter design pattern. Cedric Dumoulin wrote: A kind of "screen configuration" (called instances) is proposed in Components project, which can be seen as an extension of Templates.
debug level
Hi there, how can I prevent the struts action servlet from logging so much information. Here is my problem: I have generated a struts application and now I am about to deploy it. During development it was pretty convenient to have so many debug messages. But now, even after setting the debug level to 0, the ActionServlet still prints out too much debug information: ... 2001-03-01 05:10:14 - JspEngine -- /logon.jsp 2001-03-01 05:10:14 -ServletPath: /logon.jsp 2001-03-01 05:10:14 - PathInfo: null 2001-03-01 05:10:14 - RealPath: /home/hias/tomcat/webapps/nmi-registration/logon.jsp 2001-03-01 05:10:14 - RequestURI: /nmi-registration/logon.jsp 2001-03-01 05:10:14 -QueryString: null 2001-03-01 05:10:14 - Request Params: 2001-03-01 05:10:14 -nickname = asfsafasfsa 2001-03-01 05:10:14 -password = asfsafa 2001-03-01 05:10:14 -submit = Anmelden 2001-03-01 05:10:14 - Classpath according to the Servlet Engine is: /home/hias/tomcat/webapps/nmi-registration/WEB-INF/classes:/home/hias/tomcat/webapps/nmi-registration/WEB-INF/lib/java-db-framework.jar:/home/hias/tomcat/webapps/nmi-registration/WEB-INF/lib/components.jar:/home/hias/tomcat/webapps/nmi-registration/WEB-INF/lib/struts.jar ... Can somebody help me to suppress that many debug info? Any help is very much appreciated. Thanks, --- Matthias S/MIME Cryptographic Signature
Re: debug level
The 2nd part (classpath) is coming from Tomcat (or other server) startup script. Hi there, how can I prevent the struts action servlet from logging so much information. Here is my problem: I have generated a struts application and now I am about to deploy it. During development it was pretty convenient to have so many debug messages. But now, even after setting the debug level to 0, the ActionServlet still prints out too much debug information: ... 2001-03-01 05:10:14 - JspEngine -- /logon.jsp 2001-03-01 05:10:14 -ServletPath: /logon.jsp 2001-03-01 05:10:14 - PathInfo: null 2001-03-01 05:10:14 - RealPath: /home/hias/tomcat/webapps/nmi-registration/logon.jsp 2001-03-01 05:10:14 - RequestURI: /nmi-registration/logon.jsp 2001-03-01 05:10:14 -QueryString: null 2001-03-01 05:10:14 - Request Params: 2001-03-01 05:10:14 -nickname = asfsafasfsa 2001-03-01 05:10:14 -password = asfsafa 2001-03-01 05:10:14 -submit = Anmelden --- 2001-03-01 05:10:14 - Classpath according to the Servlet Engine is: /home/hias/tomcat/webapps/nmi-registration/WEB-INF/classes:/home/hias/to mcat/webapps/nmi-registration/WEB-INF/lib/java-db-framework.jar:/home/hi as/tomcat/webapps/nmi-registration/WEB-INF/lib/components.jar:/home/hias /tomcat/webapps/nmi-registration/WEB-INF/lib/struts.jar ... Can somebody help me to suppress that many debug info? Any help is very much appreciated. Thanks, --- Matthias
Drop-down list
What is the simplest way to dynamically create a drop-down list (select) that pulls values from a database? Is there a specific tag I should use? Iterator? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
Re: Drop-down list
This is how we do it...(I think the work simple should be ommitted) Get the content at the top of the JSP page. %pageContext.setAttribute("nameSuffixTypes", getServletContext().getAttribute("nameSuffixTypes"));% Place this where you want the Drop Down List on the JSP page. html:select property="suffix" html:options collection="nameSuffixTypes" property="value" labelProperty="label" //html:select - Original Message - From: Kyle Robinson To: '[EMAIL PROTECTED]' Sent: Thursday, March 01, 2001 8:42 AM Subject: Drop-down list What is the simplest way to dynamically create a drop-down list (select) that pulls values from a database? Is there a specific tag I should use? Iterator? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
Re: struts and XSL
[EMAIL PROTECTED] wrote: There are many competing technologies to embrace the Model 2 pattern. I get the feeling that XML/XSL and Struts are mutually exclusive. Is this a valid concern ?? I'm not sure that they are mutually exclusive, but there is a choice you ned to make for the "outermost" controlling architecture for your web application. If your application is primarily content publishing, with data based primarly in XML, you owe it to yourself to consider a framework like Cocoon, which is aimed at precisely this type of environment. That doesn't prohibit you from using the Struts custom tag library (if your presentation is in JSP pages), but you probably will not need the Struts controller environment. If your application is primarily a dynamic business app, you owe it to yourself to consider the controller framework inside Struts. This doesn't prohibit you from using XML, XSLT, and XSP -- you can still use them to create portions of the content of your pages -- but you probably will not need the Cocoon site map capabilities. [EMAIL PROTECTED] Craig McClanahan
Re: Volunteer for Validation Framework
Spencer Smith wrote: I have a lot of experience using validation. I am of the opinion that if possible validation should be done client-side using javascript. Is there a way to implement this by extending Struts? If so, I would be very interested in helping. Currently, I am working on expanding Struts Custom Tag Library. I've added Pattern, IsRequired, and errorMessage to Struts-html.tld and modified the Struts source files to accomodate for this. It uses pattern because I am using Perl5 regular expressions to send the validation parameterss to the Form bean. I think it is quite reasonable to optionally generate JavaScript for client side validations of the things that make sense to validate there (in addition to the server side validation code being automatically generated/processed as well, because you can never trust a client to actually do the tests for you :-). I'll add your name to the list of volunteers for this, and you might want to join STRUTS-DEV (if you have not already) to participate in the upcoming discussions on implementing this feature. Spencer Craig - Original Message - From: David Winterfeldt [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Sunday, February 25, 2001 5:35 PM Subject: Volunteer for Validation Framework I'd like to volunteer to help on client and server side validation listed on the Struts 1.1 To Do list. I added some basic support for constants (global and on the Locale level). I also made the validations more configurable. You can define what class and method should do a type of validation. I added a depends attribute to the validation definitions so you could say that checking for an integer shouldn't be done until required validations are done. It's probably needs some work on the logic, but it seems to be working on the basics. Also a number of objects could be created and cached somewhere. I also started on some methods to do basic type checking. It's just some numeric primitives right now and a date. I added an example page to the sample webapp doing the type checking. The code and sample web app is on my site. I have a basic explanation, but I think it's lacking since I've added so much, but the examples should help. http://home.earthlink.net/~dwinterfeldt/ David __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
RE: POST and GET method
There is a method in HttpServletRequest class called getMethod() that returns either post or get or James Gu -Original Message-From: Spencer Smith [mailto:[EMAIL PROTECTED]]Sent: Thursday, March 01, 2001 6:35 AMTo: [EMAIL PROTECTED]Subject: Re: POST and GET method That's a good question. If you guys find out let me know and I will do the same. I actually have to deal with that today in a multi-part form. I am not sure, but I think the answer is by adding struts hidden form fields. I'll let you know later today. - Original Message - From: kiatkin To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 12:05 AM Subject: POST and GET method Hi, Anyone know how to setan action class to process the POST request only. So that when user try toaccess www.abc.com/action.do?action=doGET. It can redirect user toerror page.Or put in this way, how do action classreact differently for each doGet and doPost request? regards, Kiat Kin
RE: Question about iterate tag
Craig, I did try this way but it still does not work. Since supplier.value is of type SupplierBean, do I have to specify that anywhere? -- jsp:useBean id="user" scope="session" type="com.motorola.mms.msqc.beans.UserBean"/ TABLE logic:iterate id="supplier" name="user" property="suppliers" TR TDbean:write name="supplier" property="value.seq_nbr" scope="page"//TD TDbean:write name="supplier" property="value.name" scope="page"//TD TDbean:write name="supplier" property="value.countryName" scope="page"//TD /TR /logic:iterate /TABLE - but this code which I am trying to replace with tags works: jsp:useBean id="user" scope="session" type="com.motorola.mms.msqc.beans.UserBean"/ TABLE % Hashtable hashTable = (Hashtable) user.getSuppliers(); for (Enumeration e = hashTable.elements(); e.hasMoreElements(); ) { SupplierBean supplier = (SupplierBean) e.nextElement(); % TR TDFONT face = "Arial"supplier.getCode() %/FONT/TD TDFONT face = "Arial"%= supplier.getName() %/FONT/TD/FONT/TD TDFONT face = "Arial"%= supplier.getCountryName() %/FONT/TD /TR % } % /TABLE -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 11:30 PM To: [EMAIL PROTECTED] Subject: Re: Question about iterate tag Shamdasani Nimmi-ANS004 wrote: Hi, Could someone please tell me what I am doing wrong below: user is a bean in session scope in my JSP and its getSuppliers() method returns a hashtable where keys are Suppliers Ids and elements are Supplier beans. logic:iterate collection="%= user.getSuppliers() %" id="supplier" type="com.motorola.mms.msqc.beans.SupplierBean" TR TDbean:write name="supplier" property="seq_nbr" scope="page" //TD TDbean:write name="supplier" property="name" scope="page" //TD TDbean:write name="supplier" property="country_name" scope="page" //TD /TR /logic:iterate When you iterate over a Hashtable (or any other implementation of the Map interface), the object get for the "id" variable is actually an implementation of the "Map.Entry" class, not the class of the value of the bean. From this "Map.Entry" instance, however, you can easily get to the real information: bean:write name="supplier" property="value.seq_nbr" scope="page"/ This works because a MapEntry has two properties -- key and value -- so we are using the nested property syntax to effectively call getValue().getSeq_nbr(). Thanks in advance. -Nimmi Craig
Re: PROPOSAL: Template Screens
Cedric's got some good ideas here, and I agree with someone else who said he should be a committer. Craig? david Cedric Dumoulin wrote: Hi David, and everybody, I understand David's position, there is a proverb which said "who go slowly go surely" ;-) But, please, don't forget that I have already work for a long time on Components proposal. A lot of peoples have tried them, and give positive feedback, as well as improvement, on proposed features. Also, people hesitate to use Components in long term because they are not sure that Components will be maintained if they are not part of a large project. I think that everyone could take advantages if we join our efforts to propose a strong "Extended Templates Proposal", rather than to propose two tools providing nearly the same. Saying that, here are some ideas for Template Screens Proposal : I think that we can reuse actual Templates syntax, rather than introducing too much new tags or using scriptlet. This will simplify learning and comprehension of Templates. Following is an example of how we could define a screen inside a jsp : -- template:screenDefinition id='introductionScreen' scope='request' template='/chapterTemplate.jsp' template:put name='title' content='Templates' direct='true'/ template:put name='header' content='/header.html' / template:put name='sidebar' content='/sidebar.jsp' / template:put name='content' content='/introduction.html'/ template:put name='footer' content='/footer.html' / /template:screenDefinition --- To use it : template:insert definition='introductionScreen' / --- Or, if you want to overload one attribute : template:insert template='/anotherchapterTemplate.jsp' definition='introductionScreen' / --- Or, if you want to overload or add others attributes : template:insert definition='introductionScreen' put name='title' content='Another Title' / put name='leftSidebar' content='/leftsidebar.jsp' / /template:insert' --- Some comments : * In the "screenDefinition", you can define all or only some of the attributes. So, you can drop "template='/chapterTemplate.jsp' " * If you specify some attributes in 'insert' tag, they overload previously defined attributes, or add new one. * This syntax is implementation independent : object produced by tag handler 'template:screenDefinition' could be a Map, or a complex structure. * There is no 'role' attribute in the example, but we can use it. * Advantage of this syntax is that it is the same than 'insert'. This syntax can also be used in a xml description file, without introducing new concepts. * Another advantage, is that there is no scriplet inside JSP page. Now, we need to find a way to define 'screenDefinition' outside a JSP page (ex: in action). A Map could be a candidate. But putting 'content', 'content-type' (direct) and 'role' inside Map's value is not so easy to use. We could thing of a class ScreenDefinition, having some method reflecting the tag syntax : setTemplate( String templateName ) put( String name, Object content ); put( String name, Object content, boolean direct ); put( String name, Object content, boolean direct, String role ); ... Such class could be easiest to use in code. Once an instance is created, it is put in servlet context (request, session, ...). Then, object is used in the same way as if it is define in the JSP page : template:insert definition='screenDefinitionName' / However, it is possible to implement insert definition="aDefinition" / in order to accept a Map as well as a ScreenDefinition, if we want to keep both possibilities. Last, I thing that tag name 'template:screenDefinition' is too restrictive : we could effectively define a screen , but we can do much more with it, like defining a 'Component' ;-) . So maybe we need to propose something else for this tag name (first ideas : 'template:definition', or 'template:instance' ). Cedric David Geary wrote: I see template screens as a first step towards Cedric's Components. Template screens provide the foundation necessary for Components: Programmatically defining screens. The next step is adding support for defining screens from an XML file, whether that's struts-config.xml or a separate file. Then we can add inheritance and locale support. I want to build this iteratively, with a design that reflects Struts design patterns (such as screen definitions that are analagous to the Map bean in the Link tag)*, rather than adopting Cedric's code wholesale. I'm more than willing to have Cedric or others pitch in some code. david * The Struts map-bean-property-to-request-parameter design pattern. Cedric Dumoulin wrote: A kind of "screen configuration" (called instances) is proposed in Components project, which can be
RE: Drop-down list
Does this assume that you have loaded a Collection of LabelValueBeans in the application scope? Do you really need that scriplet at the top of the page? I thought html:options could reference the collection where it is in the servlet context, without copying the reference to the page context. Hal -Original Message- From: Spencer Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 11:39 AM To: [EMAIL PROTECTED] Subject: Re: Drop-down list This is how we do it...(I think the work simple should be ommitted) Get the content at the top of the JSP page. % pageContext.setAttribute("nameSuffixTypes", getServletContext().getAttribute("nameSuffixTypes")); % Place this where you want the Drop Down List on the JSP page. html:select property="suffix" html:options collection="nameSuffixTypes" property="value" labelProperty="label" / /html:select - Original Message - From: Kyle mailto:[EMAIL PROTECTED] Robinson To: '[EMAIL PROTECTED]' mailto:'[EMAIL PROTECTED]' Sent: Thursday, March 01, 2001 8:42 AM Subject: Drop-down list What is the simplest way to dynamically create a drop-down list (select) that pulls values from a database? Is there a specific tag I should use? Iterator? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
using struts on iplanet
Hello, Anyone have experience with iplanet 6.0 sp2 and struts? I am trying the struts-test.war application. I could load the jsp without problem, but it seems whenever an servlet is called upon it will report: GX Error (GX2GX) socket reuslt code missing!!! With the following in the log file: [02/Mar/2001 00:20:28:6] warning: UTIL-013: GXGUID: NameTrans lookup failed (Applogic Servlet struts-test_html-select.do) Anyone could shed some light on me? I suspect it's some sort of deployment problem but what i did was just create the .ear from the .war and deploy (using the GUI deployment tools). Did I miss anything? Thanks in advance _ Get your FREE download of MSN Explorer at http://explorer.msn.com
Re: debug level
I think I have found the answer for the 1st part of debug messages. They are coming from jasper compiler. Maya Muchnik wrote: The 2nd part (classpath) is coming from Tomcat (or other server) startup script. Hi there, how can I prevent the struts action servlet from logging so much information. Here is my problem: I have generated a struts application and now I am about to deploy it. During development it was pretty convenient to have so many debug messages. But now, even after setting the debug level to 0, the ActionServlet still prints out too much debug information: ... 2001-03-01 05:10:14 - JspEngine -- /logon.jsp 2001-03-01 05:10:14 -ServletPath: /logon.jsp 2001-03-01 05:10:14 - PathInfo: null 2001-03-01 05:10:14 - RealPath: /home/hias/tomcat/webapps/nmi-registration/logon.jsp 2001-03-01 05:10:14 - RequestURI: /nmi-registration/logon.jsp 2001-03-01 05:10:14 -QueryString: null 2001-03-01 05:10:14 - Request Params: 2001-03-01 05:10:14 -nickname = asfsafasfsa 2001-03-01 05:10:14 -password = asfsafa 2001-03-01 05:10:14 -submit = Anmelden --- 2001-03-01 05:10:14 - Classpath according to the Servlet Engine is: /home/hias/tomcat/webapps/nmi-registration/WEB-INF/classes:/home/hias/to mcat/webapps/nmi-registration/WEB-INF/lib/java-db-framework.jar:/home/hi as/tomcat/webapps/nmi-registration/WEB-INF/lib/components.jar:/home/hias /tomcat/webapps/nmi-registration/WEB-INF/lib/struts.jar ... Can somebody help me to suppress that many debug info? Any help is very much appreciated. Thanks, --- Matthias
Re: Is the struts example itself is multi-thread safe?
Thank you, Craig for clear "picture". One Q. to be sure that all OK. What about servlet.log file? Several action threads will need to have an access to it.,... Maya "Craig R. McClanahan" wrote: Maya Muchnik wrote: Hi, In "A Walking Tour of the Struts App", the author has mentioned that "There is only one object for each action (URI), so your action objects must be multi-thread safe". Is the example itself is multi-thread safe? I am asking this, because are several actions here, but not one of them use "synchronized" statement. Maybe I am missing something... Possibly. Thread-safety is a general term meaning "even if two or more users are calling methods in my class *simultaneously*, nothing will get messed up. In the case of Action classes in the example application, they are indeed thread safe. Why? Primarily because they use no instance variables -- only local variables within the perform() method. If the example used instance variables, then there would be only one copy of those variables (because Struts creates only one instance of your Action). However, local variables appear on the stack for each request thread that is happening simultaneously. Any single thread can only see its own copy of these variables, so there is no possibility for contention. One place you will see synchronization in the example app is when adding to the pseudo-database. Consider what would happen if two users logged on with the same id, and both proceeded to add a new subscription at exactly the same moment. You would have two attempts to modify the database (which, because it is a servlet context attribute, is visible to all request processing threads), so you need to synchronize here. The other place that you commonly need to synchronize is when you are modifying session attributes (read-only access is generally safe without locking). It is surprisingly easy to have multiple requests active at the same time for the same session -- for example: * In a framed presentation, the browser will often issue requests for more than one frame at the same time, all with the same session id. * Users might open multiple browser windows, which (in many circumstances) causes each window to be part of the same session. * The user can submit a long running transaction, press STOP (which the server does not know about), and then start something else. THANKS in advance. Maya Craig
Re: Why should you call JSP pages directly?
So how does one protect JSP's from direct invocation? Is there a server-independent way? (I'm using Tomcat, so that would also be good to know.) Maya Muchnik wrote: Hello, Jens again, I am totally agree with you, but to make it works somebody (a designer) must to "protect" jsp files. Several people told me how to do this. About logic JSP again it is the designer question. Of course, it is better to have JSP only for view. Sometimes, it is difficult, and required everything to be redesigned. Maya Jens Rehphler wrote: Hallo Maya, Maya Muchnik wrote: Hi, Jens, When I had asked a question about calling jsp directly, I was concerned, that a user can see a directory or see a link (as I do) and call this jsp directly from a browser query / input line. The user likes to experiment. That is all. He does not know what is a view jsp or logic jsp. That is the point: a user should never have the possibility to come in contact with a JSP. And a JSP should never contain any business logic. Jens
RE: Question about iterate tag
I did try this way but it still does not work. Since supplier.value is of type SupplierBean, do I have to specify that anywhere? I believe you want the bean to be SupplierBean rather than Supplier. Your request bean:write name="supplier" property="value.seq_nbr" scope="page"/ seems like it would get translated into out.print( String.valueOf(supplier.getValue().seq_nbr) ); or something akin to that which is Not At All what you're looking for. M -- jsp:useBean id="user" scope="session" type="com.motorola.mms.msqc.beans.UserBean"/ TABLE logic:iterate id="supplier" name="user" property="suppliers" TR TDbean:write name="supplier" property="value.seq_nbr" scope="page"//TD TDbean:write name="supplier" property="value.name" scope="page"//TD TDbean:write name="supplier" property="value.countryName" scope="page"//TD /TR /logic:iterate /TABLE - but this code which I am trying to replace with tags works: jsp:useBean id="user" scope="session" type="com.motorola.mms.msqc.beans.UserBean"/ TABLE % Hashtable hashTable = (Hashtable) user.getSuppliers(); for (Enumeration e = hashTable.elements(); e.hasMoreElements(); ) { SupplierBean supplier = (SupplierBean) e.nextElement(); % TR TDFONT face = "Arial"supplier.getCode() %/FONT/TD TDFONT face = "Arial"%= supplier.getName() %/FONT/TD/FONT/TD TDFONT face = "Arial"%= supplier.getCountryName() %/FONT/TD /TR % } % /TABLE -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 11:30 PM To: [EMAIL PROTECTED] Subject: Re: Question about iterate tag Shamdasani Nimmi-ANS004 wrote: Hi, Could someone please tell me what I am doing wrong below: user is a bean in session scope in my JSP and its getSuppliers() method returns a hashtable where keys are Suppliers Ids and elements are Supplier beans. logic:iterate collection="%= user.getSuppliers() %" id="supplier" type="com.motorola.mms.msqc.beans.SupplierBean" TR TDbean:write name="supplier" property="seq_nbr" scope="page" //TD TDbean:write name="supplier" property="name" scope="page" //TD TDbean:write name="supplier" property="country_name" scope="page" //TD /TR /logic:iterate When you iterate over a Hashtable (or any other implementation of the Map interface), the object get for the "id" variable is actually an implementation of the "Map.Entry" class, not the class of the value of the bean. From this "Map.Entry" instance, however, you can easily get to the real information: bean:write name="supplier" property="value.seq_nbr" scope="page"/ This works because a MapEntry has two properties -- key and value -- so we are using the nested property syntax to effectively call getValue().getSeq_nbr(). Thanks in advance. -Nimmi Craig
Re: Why should you call JSP pages directly?
One way, as I know, is to put all jsp, except index.jsp (or similar start up) under a protected directory. For Tomcat the secure directory is setup in web.xml (see web.xml for webapps/example, directory is example/jsp/security/protected). See also Tomcat instruction (I need refresh my memory myself). The other ways are in the email achieves: Q, and A http://www.mail-archive.com/struts-user@jakarta.apache.org/msg03611.html http://www.mail-archive.com/struts-user@jakarta.apache.org/msg03684.html (I am not sure that I know how to do this) Q and A. http://www.mail-archive.com/struts-user@jakarta.apache.org/msg03737.html John Raley wrote: So how does one protect JSP's from direct invocation? Is there a server-independent way? (I'm using Tomcat, so that would also be good to know.) Maya Muchnik wrote: Hello, Jens again, I am totally agree with you, but to make it works somebody (a designer) must to "protect" jsp files. Several people told me how to do this. About logic JSP again it is the designer question. Of course, it is better to have JSP only for view. Sometimes, it is difficult, and required everything to be redesigned. Maya Jens Rehphler wrote: Hallo Maya, Maya Muchnik wrote: Hi, Jens, When I had asked a question about calling jsp directly, I was concerned, that a user can see a directory or see a link (as I do) and call this jsp directly from a browser query / input line. The user likes to experiment. That is all. He does not know what is a view jsp or logic jsp. That is the point: a user should never have the possibility to come in contact with a JSP. And a JSP should never contain any business logic. Jens
Re: Drop-down list
When adding options to a select that are stored in a database, we have the action class look-up the necessary information, store it in a bean, place the bean in the request / session, and then use a taglib on the page that specifies the source (the bean) and the property (database column) that should be used to populate the select. This gaurentees that the data in the select list is up to date. HTH, Pete "Deadman, Hal" wrote: Does this assume that you have loaded a Collection of LabelValueBeans in the application scope? Do you really need that scriplet at the top of the page? I thought html:options could reference the collection where it is in the servlet context, without copying the reference to the page context. Hal -Original Message- From: Spencer Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 11:39 AM To: [EMAIL PROTECTED] Subject: Re: Drop-down list This is how we do it...(I think the work simple should be ommitted) Get the content at the top of the JSP page. % pageContext.setAttribute("nameSuffixTypes", getServletContext().getAttribute("nameSuffixTypes")); % Place this where you want the Drop Down List on the JSP page. html:select property="suffix" html:options collection="nameSuffixTypes" property="value" labelProperty="label" / /html:select - Original Message - From: Kyle mailto:[EMAIL PROTECTED] Robinson To: '[EMAIL PROTECTED]' mailto:'[EMAIL PROTECTED]' Sent: Thursday, March 01, 2001 8:42 AM Subject: Drop-down list What is the simplest way to dynamically create a drop-down list (select) that pulls values from a database? Is there a specific tag I should use? Iterator? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111 begin:vcard n:; x-mozilla-html:FALSE org:BRIMG SRC="http://www.irista.com/logo/irista.gif"BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain adr:;; version:2.1 end:vcard
RE: Question about iterate tag
Craig had suggested that I use: bean:write name="supplier" property="value.seq_nbr" scope="page"/ but unfortunately it is not working. -Original Message- From: Matt Ho [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 12:27 PM To: [EMAIL PROTECTED] Subject: RE: Question about iterate tag I did try this way but it still does not work. Since supplier.value is of type SupplierBean, do I have to specify that anywhere? I believe you want the bean to be SupplierBean rather than Supplier. Your request bean:write name="supplier" property="value.seq_nbr" scope="page"/ seems like it would get translated into out.print( String.valueOf(supplier.getValue().seq_nbr) ); or something akin to that which is Not At All what you're looking for. M -- jsp:useBean id="user" scope="session" type="com.motorola.mms.msqc.beans.UserBean"/ TABLE logic:iterate id="supplier" name="user" property="suppliers" TR TDbean:write name="supplier" property="value.seq_nbr" scope="page"//TD TDbean:write name="supplier" property="value.name" scope="page"//TD TDbean:write name="supplier" property="value.countryName" scope="page"//TD /TR /logic:iterate /TABLE - but this code which I am trying to replace with tags works: jsp:useBean id="user" scope="session" type="com.motorola.mms.msqc.beans.UserBean"/ TABLE % Hashtable hashTable = (Hashtable) user.getSuppliers(); for (Enumeration e = hashTable.elements(); e.hasMoreElements(); ) { SupplierBean supplier = (SupplierBean) e.nextElement(); % TR TDFONT face = "Arial"supplier.getCode() %/FONT/TD TDFONT face = "Arial"%= supplier.getName() %/FONT/TD/FONT/TD TDFONT face = "Arial"%= supplier.getCountryName() %/FONT/TD /TR % } % /TABLE -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 11:30 PM To: [EMAIL PROTECTED] Subject: Re: Question about iterate tag Shamdasani Nimmi-ANS004 wrote: Hi, Could someone please tell me what I am doing wrong below: user is a bean in session scope in my JSP and its getSuppliers() method returns a hashtable where keys are Suppliers Ids and elements are Supplier beans. logic:iterate collection="%= user.getSuppliers() %" id="supplier" type="com.motorola.mms.msqc.beans.SupplierBean" TR TDbean:write name="supplier" property="seq_nbr" scope="page" //TD TDbean:write name="supplier" property="name" scope="page" //TD TDbean:write name="supplier" property="country_name" scope="page" //TD /TR /logic:iterate When you iterate over a Hashtable (or any other implementation of the Map interface), the object get for the "id" variable is actually an implementation of the "Map.Entry" class, not the class of the value of the bean. From this "Map.Entry" instance, however, you can easily get to the real information: bean:write name="supplier" property="value.seq_nbr" scope="page"/ This works because a MapEntry has two properties -- key and value -- so we are using the nested property syntax to effectively call getValue().getSeq_nbr(). Thanks in advance. -Nimmi Craig
Re: Drop-down list
Do you guys know how to define the Multiple attribute in a select drop down list for Struts? - Original Message - From: "Peter Alfors" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 11:29 AM Subject: Re: Drop-down list When adding options to a select that are stored in a database, we have the action class look-up the necessary information, store it in a bean, place the bean in the request / session, and then use a taglib on the page that specifies the source (the bean) and the property (database column) that should be used to populate the select. This gaurentees that the data in the select list is up to date. HTH, Pete "Deadman, Hal" wrote: Does this assume that you have loaded a Collection of LabelValueBeans in the application scope? Do you really need that scriplet at the top of the page? I thought html:options could reference the collection where it is in the servlet context, without copying the reference to the page context. Hal -Original Message- From: Spencer Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 11:39 AM To: [EMAIL PROTECTED] Subject: Re: Drop-down list This is how we do it...(I think the work simple should be ommitted) Get the content at the top of the JSP page. % pageContext.setAttribute("nameSuffixTypes", getServletContext().getAttribute("nameSuffixTypes")); % Place this where you want the Drop Down List on the JSP page. html:select property="suffix" html:options collection="nameSuffixTypes" property="value" labelProperty="label" / /html:select - Original Message - From: Kyle mailto:[EMAIL PROTECTED] Robinson To: '[EMAIL PROTECTED]' mailto:'[EMAIL PROTECTED]' Sent: Thursday, March 01, 2001 8:42 AM Subject: Drop-down list What is the simplest way to dynamically create a drop-down list (select) that pulls values from a database? Is there a specific tag I should use? Iterator? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
HTTPClient vs java.net.URLConnection
Hi, Does anyone use HTTPClient? What do you think about it? I have got this link several minutes ago. As its document said, in HTTPClient you can set timeout for response, pipelining of request. Source code is available. It includes the source code for parsing the multiPartRequest. HTTPClient can find at: http://www.innovation.ch/java/HTTPClient/
Re: Drop-down list
Add the attribute to your tag like so: html:select ... multiple="true" ... and make sure the corresponding property in your form bean is an array of values. See the docs for more details: http://jakarta.apache.org/struts/struts-html.html#select Hope this helps. -- Martin Cooper Tumbleweed Communications At 11:44 AM 3/1/01 -0800, Spencer Smith wrote: Do you guys know how to define the Multiple attribute in a select drop down list for Struts? - Original Message - From: "Peter Alfors" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 11:29 AM Subject: Re: Drop-down list When adding options to a select that are stored in a database, we have the action class look-up the necessary information, store it in a bean, place the bean in the request / session, and then use a taglib on the page that specifies the source (the bean) and the property (database column) that should be used to populate the select. This gaurentees that the data in the select list is up to date. HTH, Pete "Deadman, Hal" wrote: Does this assume that you have loaded a Collection of LabelValueBeans in the application scope? Do you really need that scriplet at the top of the page? I thought html:options could reference the collection where it is in the servlet context, without copying the reference to the page context. Hal -Original Message- From: Spencer Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 11:39 AM To: [EMAIL PROTECTED] Subject: Re: Drop-down list This is how we do it...(I think the work simple should be ommitted) Get the content at the top of the JSP page. % pageContext.setAttribute("nameSuffixTypes", getServletContext().getAttribute("nameSuffixTypes")); % Place this where you want the Drop Down List on the JSP page. html:select property="suffix" html:options collection="nameSuffixTypes" property="value" labelProperty="label" / /html:select - Original Message - From: Kyle mailto:[EMAIL PROTECTED] Robinson To: '[EMAIL PROTECTED]' mailto:'[EMAIL PROTECTED]' Sent: Thursday, March 01, 2001 8:42 AM Subject: Drop-down list What is the simplest way to dynamically create a drop-down list (select) that pulls values from a database? Is there a specific tag I should use? Iterator? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
RE: Drop-down list
Suppose I have the drop down list which I wanted to create from a database and the database is updated less frequently, is there a way in which I can implement somekind of caching mechanism, with which I won't do a database query always, instead I can use the cache to populate the drop down list? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 3:02 PM To: [EMAIL PROTECTED] Subject: Re: Drop-down list Add the attribute to your tag like so: html:select ... multiple="true" ... and make sure the corresponding property in your form bean is an array of values. See the docs for more details: http://jakarta.apache.org/struts/struts-html.html#select Hope this helps. -- Martin Cooper Tumbleweed Communications At 11:44 AM 3/1/01 -0800, Spencer Smith wrote: Do you guys know how to define the Multiple attribute in a select drop down list for Struts? - Original Message - From: "Peter Alfors" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 11:29 AM Subject: Re: Drop-down list When adding options to a select that are stored in a database, we have the action class look-up the necessary information, store it in a bean, place the bean in the request / session, and then use a taglib on the page that specifies the source (the bean) and the property (database column) that should be used to populate the select. This gaurentees that the data in the select list is up to date. HTH, Pete "Deadman, Hal" wrote: Does this assume that you have loaded a Collection of LabelValueBeans in the application scope? Do you really need that scriplet at the top of the page? I thought html:options could reference the collection where it is in the servlet context, without copying the reference to the page context. Hal -Original Message- From: Spencer Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 11:39 AM To: [EMAIL PROTECTED] Subject: Re: Drop-down list This is how we do it...(I think the work simple should be ommitted) Get the content at the top of the JSP page. % pageContext.setAttribute("nameSuffixTypes", getServletContext().getAttribute("nameSuffixTypes")); % Place this where you want the Drop Down List on the JSP page. html:select property="suffix" html:options collection="nameSuffixTypes" property="value" labelProperty="label" / /html:select - Original Message - From: Kyle mailto:[EMAIL PROTECTED] Robinson To: '[EMAIL PROTECTED]' mailto:'[EMAIL PROTECTED]' Sent: Thursday, March 01, 2001 8:42 AM Subject: Drop-down list What is the simplest way to dynamically create a drop-down list (select) that pulls values from a database? Is there a specific tag I should use? Iterator? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
Bug in handling multiple values in multipart forms
Hi, I've encountered a bug in handling multipart requests. (last nightly build 20010224) If a form is sent with enctype="multipart/form-data" the multiple values (e.g. select multiple...) aren't set correctly. In the DiskMultipartRequestHandler the values are stored in a Hashtable thus only the last one of the values is set in the Form. A possible solution: old DiskMultiPartRequestHandler.java @ line 71 if (!element.isFile()) textElements.put(element.getName(), element.getValue()); allElements.put(element.getName(), element.getValue()); } --- new DiskMultiPartRequestHandler.java if (!element.isFile()) String name = element.getName(); String value = element.getValue(); Object oldValue = textElements.get(name); if (oldValue != null) { String[] oldValues = new String[1]; try { oldValues = (String[]) oldValue; } catch (ClassCastException e) { oldValues[0] = (String) oldValue; } int length = oldValues.length; String[] newValue = new String[length + 1]; for (int i = 0; i length; i++) { newValue[i] = oldValues[i]; } newValue[length] = value; textElements.put(name, newValue); allElements.put(name, newValue); } else { textElements.put(name, value); allElements.put(name, value); } } Regards, Till P.S. Any hints to http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02713.html ?
RE: Bug in handling multiple values in multipart forms
Till, Thanks, I'll include this with the other patch I'm working on to improve the speed of multipart requests. -Original Message- From: Till Nagel [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 3:12 PM To: [EMAIL PROTECTED] Subject: Bug in handling multiple values in multipart forms Hi, I've encountered a bug in handling multipart requests. (last nightly build 20010224) If a form is sent with enctype="multipart/form-data" the multiple values (e.g. select multiple...) aren't set correctly. In the DiskMultipartRequestHandler the values are stored in a Hashtable thus only the last one of the values is set in the Form. A possible solution: old DiskMultiPartRequestHandler.java @ line 71 if (!element.isFile()) textElements.put(element.getName(), element.getValue()); allElements.put(element.getName(), element.getValue()); } --- new DiskMultiPartRequestHandler.java if (!element.isFile()) String name = element.getName(); String value = element.getValue(); Object oldValue = textElements.get(name); if (oldValue != null) { String[] oldValues = new String[1]; try { oldValues = (String[]) oldValue; } catch (ClassCastException e) { oldValues[0] = (String) oldValue; } int length = oldValues.length; String[] newValue = new String[length + 1]; for (int i = 0; i length; i++) { newValue[i] = oldValues[i]; } newValue[length] = value; textElements.put(name, newValue); allElements.put(name, newValue); } else { textElements.put(name, value); allElements.put(name, value); } } Regards, Till P.S. Any hints to http://www.mail-archive.com/struts-user@jakarta.apache.org/msg02713.html ?
Re: Drop-down list
If you wanted to use a bean to store the select options, place it in the user's session. Then, check to see if it exists before refreshing it. HTH, Pete "Dorai, Harish (c)" wrote: Suppose I have the drop down list which I wanted to create from a database and the database is updated less frequently, is there a way in which I can implement somekind of caching mechanism, with which I won't do a database query always, instead I can use the cache to populate the drop down list? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 3:02 PM To: [EMAIL PROTECTED] Subject: Re: Drop-down list Add the attribute to your tag like so: html:select ... multiple="true" ... and make sure the corresponding property in your form bean is an array of values. See the docs for more details: http://jakarta.apache.org/struts/struts-html.html#select Hope this helps. -- Martin Cooper Tumbleweed Communications At 11:44 AM 3/1/01 -0800, Spencer Smith wrote: Do you guys know how to define the Multiple attribute in a select drop down list for Struts? - Original Message - From: "Peter Alfors" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 11:29 AM Subject: Re: Drop-down list When adding options to a select that are stored in a database, we have the action class look-up the necessary information, store it in a bean, place the bean in the request / session, and then use a taglib on the page that specifies the source (the bean) and the property (database column) that should be used to populate the select. This gaurentees that the data in the select list is up to date. HTH, Pete "Deadman, Hal" wrote: Does this assume that you have loaded a Collection of LabelValueBeans in the application scope? Do you really need that scriplet at the top of the page? I thought html:options could reference the collection where it is in the servlet context, without copying the reference to the page context. Hal -Original Message- From: Spencer Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 11:39 AM To: [EMAIL PROTECTED] Subject: Re: Drop-down list This is how we do it...(I think the work simple should be ommitted) Get the content at the top of the JSP page. % pageContext.setAttribute("nameSuffixTypes", getServletContext().getAttribute("nameSuffixTypes")); % Place this where you want the Drop Down List on the JSP page. html:select property="suffix" html:options collection="nameSuffixTypes" property="value" labelProperty="label" / /html:select - Original Message - From: Kyle mailto:[EMAIL PROTECTED] Robinson To: '[EMAIL PROTECTED]' mailto:'[EMAIL PROTECTED]' Sent: Thursday, March 01, 2001 8:42 AM Subject: Drop-down list What is the simplest way to dynamically create a drop-down list (select) that pulls values from a database? Is there a specific tag I should use? Iterator? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111 begin:vcard n:; x-mozilla-html:FALSE org:BRIMG SRC="http://www.irista.com/logo/irista.gif"BRBRFONT Color=#80FONT SIZE=2BBringing Vision to Your Supply Chain adr:;; version:2.1 end:vcard
Re: HTTPClient vs java.net.URLConnection
I've just recently started using HTTPClient with struts on the webserver and it seems pretty reliable. Although I haven't really pushed it much, it was easy to get up and running and I haven't found any real issues with it. (I think I had one issue but can't remember what it was...I guess it wasn't that bad.) Also, the feature set seemed to be well thought out and organized. As an example, HTTPClient made it easy to mess with cookies using the provided methods. Anyways, some of my next tasks should be to start pushing it a bit harder. We'll have to see what happens then. -Paul Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm list-help: mailto:[EMAIL PROTECTED] list-unsubscribe: mailto:[EMAIL PROTECTED] list-post: mailto:[EMAIL PROTECTED] Delivered-To: mailing list [EMAIL PROTECTED] From: Maya Muchnik [EMAIL PROTECTED] X-Accept-Language: en MIME-Version: 1.0 To: [EMAIL PROTECTED] Subject: HTTPClient vs java.net.URLConnection Content-Transfer-Encoding: 7bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Hi, Does anyone use HTTPClient? What do you think about it? I have got this link several minutes ago. As its document said, in HTTPClient you can set timeout for response, pipelining of request. Source code is available. It includes the source code for parsing the multiPartRequest. HTTPClient can find at: http://www.innovation.ch/java/HTTPClient/
Re: Passing a bean property to template:put tag
On Thu, Mar 01, 2001 at 10:37:29AM -0500, Mike Bell wrote: Hello, Is there a way to pass a bean property to a template:put content? I've tried using a bean:write... in the content parameter but it just passes it straight through (with or without direct set). I've also tried: bean:define id="xyz" name="theForm" property="theProperty"/ template:insert template='/corePageHeader.jsp' template:put name="title" content='xyz' / /template:insert The current template implementation let's you non-empty template:put (like exput and it should work: bean:define id="xyz" name="theForm" property="theProperty"/ template:insert template='/corePageHeader.jsp' template:put name="title" bean:write name="xyz" / /template:put /template:insert incze
Help with Frames
I must be missing something simple. I have a jsp page which references a set of frames. Each frame has a jsp file which contains references to struts tages. The struts tags fail and I get exceptions - such as bean does not exist, iterate tag is null The jsp pages work fine when not used as part fo the frame. It is like it is losing the session information. the main jsp page has the following contents: %@ page language="java" errorPage="error.jsp" % %@ taglib uri="/struts-bean.tld" prefix="sbean" % %@ taglib uri="/struts-form.tld" prefix="sform" % %@ taglib uri="/struts-logic.tld" prefix="slogic" % %@ taglib uri="/struts-html.tld" prefix="shtml" % %@ taglib uri="/umms.tld" prefix="umms" % umms:checkLogon/ html FRAMESET cols="20%,*" FRAME SRC="reportList.jsp" name="REPORTLIST" FRAME SRC="blankpage.jsp" name="REPORT" /FRAMESET /html - reportList.jsp has the following contents: %@ page language="java" % %@ taglib uri="/struts-bean.tld" prefix="sbean" % %@ taglib uri="/struts-form.tld" prefix="sform" % %@ taglib uri="/struts-logic.tld" prefix="slogic" % %@ taglib uri="/struts-html.tld" prefix="shtml" % %@ taglib uri="/umms.tld" prefix="umms" % html body sform:errors/ h3 align="center" Select a Report: /br ul slogic:iterate id="report" name ="reportForm" property="reportList" type ="edu.umich.umms.dreams.Report" lia href=report.do?rptCd=sbean:write name="report" property ="rptCd"/ sbean:write name="report" property ="rptDes"//a /li /slogic:iterate /ul /h3 /body /html - The above jsp fails because the iterate doStartTag returns null. What am I doing wrong? begin:vcard n:Hill;Mary tel;fax:734-936-3865 tel;work:734-763-6752 x-mozilla-html:FALSE org:University of Michigan Medical School;Information System version:2.1 email;internet:[EMAIL PROTECTED] title:Systems Project Coordinator adr;quoted-printable:;;2919 Taubman Library=0D=0A1135 E. Catherine;Ann Arbor;MI ;48109;US fn:Mary Hill end:vcard
Re: Drop-down list
Trying to use Multiple="true" attribute for html:select Help! O.k. so I declare it like so: protected String[] providerName; Then I get it: public String[] getProviderName() { return (providerName); } Then I set it: public void setProviderName(String providerName[]) { { this.providerName = providerName; } } What am I missing? - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 12:02 PM Subject: Re: Drop-down list Add the attribute to your tag like so: html:select ... multiple="true" ... and make sure the corresponding property in your form bean is an array of values. See the docs for more details: http://jakarta.apache.org/struts/struts-html.html#select Hope this helps. -- Martin Cooper Tumbleweed Communications At 11:44 AM 3/1/01 -0800, Spencer Smith wrote: Do you guys know how to define the Multiple attribute in a select drop down list for Struts? - Original Message - From: "Peter Alfors" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 11:29 AM Subject: Re: Drop-down list When adding options to a select that are stored in a database, we have the action class look-up the necessary information, store it in a bean, place the bean in the request / session, and then use a taglib on the page that specifies the source (the bean) and the property (database column) that should be used to populate the select. This gaurentees that the data in the select list is up to date. HTH, Pete "Deadman, Hal" wrote: Does this assume that you have loaded a Collection of LabelValueBeans in the application scope? Do you really need that scriplet at the top of the page? I thought html:options could reference the collection where it is in the servlet context, without copying the reference to the page context. Hal -Original Message- From: Spencer Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 11:39 AM To: [EMAIL PROTECTED] Subject: Re: Drop-down list This is how we do it...(I think the work simple should be ommitted) Get the content at the top of the JSP page. % pageContext.setAttribute("nameSuffixTypes", getServletContext().getAttribute("nameSuffixTypes")); % Place this where you want the Drop Down List on the JSP page. html:select property="suffix" html:options collection="nameSuffixTypes" property="value" labelProperty="label" / /html:select - Original Message - From: Kyle mailto:[EMAIL PROTECTED] Robinson To: '[EMAIL PROTECTED]' mailto:'[EMAIL PROTECTED]' Sent: Thursday, March 01, 2001 8:42 AM Subject: Drop-down list What is the simplest way to dynamically create a drop-down list (select) that pulls values from a database? Is there a specific tag I should use? Iterator? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
RE: Help with Frames
Mary, The problem is the initial FRAMESET sent to the browser forces the browser to initiate seperate requests to fill in the frames of the page. You might want to store and retrieve the objects in the session scope or have each frame call a *.do (reportList.do?neededParam=value) to set up the request objects needed by the tags. Hope this helps, Abraham -Original Message- From: Mary Hill [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 12:51 PM To: Struts User Subject: Help with Frames I must be missing something simple. I have a jsp page which references a set of frames. Each frame has a jsp file which contains references to struts tages. The struts tags fail and I get exceptions - such as bean does not exist, iterate tag is null The jsp pages work fine when not used as part fo the frame. It is like it is losing the session information. the main jsp page has the following contents: %@ page language="java" errorPage="error.jsp" % %@ taglib uri="/struts-bean.tld" prefix="sbean" % %@ taglib uri="/struts-form.tld" prefix="sform" % %@ taglib uri="/struts-logic.tld" prefix="slogic" % %@ taglib uri="/struts-html.tld" prefix="shtml" % %@ taglib uri="/umms.tld" prefix="umms" % umms:checkLogon/ html FRAMESET cols="20%,*" FRAME SRC="reportList.jsp" name="REPORTLIST" FRAME SRC="blankpage.jsp" name="REPORT" /FRAMESET /html -- --- reportList.jsp has the following contents: %@ page language="java" % %@ taglib uri="/struts-bean.tld" prefix="sbean" % %@ taglib uri="/struts-form.tld" prefix="sform" % %@ taglib uri="/struts-logic.tld" prefix="slogic" % %@ taglib uri="/struts-html.tld" prefix="shtml" % %@ taglib uri="/umms.tld" prefix="umms" % html body sform:errors/ h3 align="center" Select a Report: /br ul slogic:iterate id="report" name ="reportForm" property="reportList" type ="edu.umich.umms.dreams.Report" lia href=report.do?rptCd=sbean:write name="report" property ="rptCd"/ sbean:write name="report" property ="rptDes"//a /li /slogic:iterate /ul /h3 /body /html -- --- The above jsp fails because the iterate doStartTag returns null. What am I doing wrong?
RE: Drop-down list
I'd remove all the square brackets. If you want to keep them, the parameter type in setProviderName should be String[]. I don't know for sure though. -Original Message- From: Spencer Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 13:02 To: [EMAIL PROTECTED] Subject: Re: Drop-down list Trying to use Multiple="true" attribute for html:select Help! O.k. so I declare it like so: protected String[] providerName; Then I get it: public String[] getProviderName() { return (providerName); } Then I set it: public void setProviderName(String providerName[]) { { this.providerName = providerName; } } What am I missing? - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 12:02 PM Subject: Re: Drop-down list Add the attribute to your tag like so: html:select ... multiple="true" ... and make sure the corresponding property in your form bean is an array of values. See the docs for more details: http://jakarta.apache.org/struts/struts-html.html#select Hope this helps. -- Martin Cooper Tumbleweed Communications At 11:44 AM 3/1/01 -0800, Spencer Smith wrote: Do you guys know how to define the Multiple attribute in a select drop down list for Struts? - Original Message - From: "Peter Alfors" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 11:29 AM Subject: Re: Drop-down list When adding options to a select that are stored in a database, we have the action class look-up the necessary information, store it in a bean, place the bean in the request / session, and then use a taglib on the page that specifies the source (the bean) and the property (database column) that should be used to populate the select. This gaurentees that the data in the select list is up to date. HTH, Pete "Deadman, Hal" wrote: Does this assume that you have loaded a Collection of LabelValueBeans in the application scope? Do you really need that scriplet at the top of the page? I thought html:options could reference the collection where it is in the servlet context, without copying the reference to the page context. Hal -Original Message- From: Spencer Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 11:39 AM To: [EMAIL PROTECTED] Subject: Re: Drop-down list This is how we do it...(I think the work simple should be ommitted) Get the content at the top of the JSP page. % pageContext.setAttribute("nameSuffixTypes", getServletContext().getAttribute("nameSuffixTypes")); % Place this where you want the Drop Down List on the JSP page. html:select property="suffix" html:options collection="nameSuffixTypes" property="value" labelProperty="label" / /html:select - Original Message - From: Kyle mailto:[EMAIL PROTECTED] Robinson To: '[EMAIL PROTECTED]' mailto:'[EMAIL PROTECTED]' Sent: Thursday, March 01, 2001 8:42 AM Subject: Drop-down list What is the simplest way to dynamically create a drop-down list (select) that pulls values from a database? Is there a specific tag I should use? Iterator? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
:misssig message key error
can anyone help me with the following error! thanks Missing message for key index.title at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:242) at _0002findex_0002ejspindex_jsp __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Re: Drop-down list
Provide Name(s)nbsp; html:select property="providerName" multiple="true" size="2" html:options collection="cmProviderTypes" property="value" labelProperty="label" / /html:select Like this, correct? - Original Message - From: "Spencer Smith" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 1:02 PM Subject: Re: Drop-down list Trying to use Multiple="true" attribute for html:select Help! O.k. so I declare it like so: protected String[] providerName; Then I get it: public String[] getProviderName() { return (providerName); } Then I set it: public void setProviderName(String providerName[]) { { this.providerName = providerName; } } What am I missing? - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 12:02 PM Subject: Re: Drop-down list Add the attribute to your tag like so: html:select ... multiple="true" ... and make sure the corresponding property in your form bean is an array of values. See the docs for more details: http://jakarta.apache.org/struts/struts-html.html#select Hope this helps. -- Martin Cooper Tumbleweed Communications At 11:44 AM 3/1/01 -0800, Spencer Smith wrote: Do you guys know how to define the Multiple attribute in a select drop down list for Struts? - Original Message - From: "Peter Alfors" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 11:29 AM Subject: Re: Drop-down list When adding options to a select that are stored in a database, we have the action class look-up the necessary information, store it in a bean, place the bean in the request / session, and then use a taglib on the page that specifies the source (the bean) and the property (database column) that should be used to populate the select. This gaurentees that the data in the select list is up to date. HTH, Pete "Deadman, Hal" wrote: Does this assume that you have loaded a Collection of LabelValueBeans in the application scope? Do you really need that scriplet at the top of the page? I thought html:options could reference the collection where it is in the servlet context, without copying the reference to the page context. Hal -Original Message- From: Spencer Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 11:39 AM To: [EMAIL PROTECTED] Subject: Re: Drop-down list This is how we do it...(I think the work simple should be ommitted) Get the content at the top of the JSP page. % pageContext.setAttribute("nameSuffixTypes", getServletContext().getAttribute("nameSuffixTypes")); % Place this where you want the Drop Down List on the JSP page. html:select property="suffix" html:options collection="nameSuffixTypes" property="value" labelProperty="label" / /html:select - Original Message - From: Kyle mailto:[EMAIL PROTECTED] Robinson To: '[EMAIL PROTECTED]' mailto:'[EMAIL PROTECTED]' Sent: Thursday, March 01, 2001 8:42 AM Subject: Drop-down list What is the simplest way to dynamically create a drop-down list (select) that pulls values from a database? Is there a specific tag I should use? Iterator? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
Re: Drop-down list
Thanks for the help, but it didn't work :( - Original Message - From: "Kyle Robinson" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 1:14 PM Subject: RE: Drop-down list I'd remove all the square brackets. If you want to keep them, the parameter type in setProviderName should be String[]. I don't know for sure though. -Original Message- From: Spencer Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 13:02 To: [EMAIL PROTECTED] Subject: Re: Drop-down list Trying to use Multiple="true" attribute for html:select Help! O.k. so I declare it like so: protected String[] providerName; Then I get it: public String[] getProviderName() { return (providerName); } Then I set it: public void setProviderName(String providerName[]) { { this.providerName = providerName; } } What am I missing? - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 12:02 PM Subject: Re: Drop-down list Add the attribute to your tag like so: html:select ... multiple="true" ... and make sure the corresponding property in your form bean is an array of values. See the docs for more details: http://jakarta.apache.org/struts/struts-html.html#select Hope this helps. -- Martin Cooper Tumbleweed Communications At 11:44 AM 3/1/01 -0800, Spencer Smith wrote: Do you guys know how to define the Multiple attribute in a select drop down list for Struts? - Original Message - From: "Peter Alfors" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, March 01, 2001 11:29 AM Subject: Re: Drop-down list When adding options to a select that are stored in a database, we have the action class look-up the necessary information, store it in a bean, place the bean in the request / session, and then use a taglib on the page that specifies the source (the bean) and the property (database column) that should be used to populate the select. This gaurentees that the data in the select list is up to date. HTH, Pete "Deadman, Hal" wrote: Does this assume that you have loaded a Collection of LabelValueBeans in the application scope? Do you really need that scriplet at the top of the page? I thought html:options could reference the collection where it is in the servlet context, without copying the reference to the page context. Hal -Original Message- From: Spencer Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 11:39 AM To: [EMAIL PROTECTED] Subject: Re: Drop-down list This is how we do it...(I think the work simple should be ommitted) Get the content at the top of the JSP page. % pageContext.setAttribute("nameSuffixTypes", getServletContext().getAttribute("nameSuffixTypes")); % Place this where you want the Drop Down List on the JSP page. html:select property="suffix" html:options collection="nameSuffixTypes" property="value" labelProperty="label" / /html:select - Original Message - From: Kyle mailto:[EMAIL PROTECTED] Robinson To: '[EMAIL PROTECTED]' mailto:'[EMAIL PROTECTED]' Sent: Thursday, March 01, 2001 8:42 AM Subject: Drop-down list What is the simplest way to dynamically create a drop-down list (select) that pulls values from a database? Is there a specific tag I should use? Iterator? Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
JSP includes of
I am having trouble using includes and custom tags in JSPs with Struts. The application is unable to find the tag descriptor files. For example, I have an include file that contains: // header.jsp %@ page language="java" % %@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" % %@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" % %@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" % and call it in the JSP: jsp:include page="include/header.jsp"/ The .tld files can not be resolved. The include directory is one level under the JSP and I have tried different paths to the .tld files with no success. How can I get this to work if at all? Solutions are appreciated.
Re: :misssig message key error
Your index.jsp file is using ApplicationResources.properties to get index.title. Check it. soh syed wrote: can anyone help me with the following error! thanks Missing message for key index.title at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:242) at _0002findex_0002ejspindex_jsp __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
RE: JSP includes of
Try to include the needed .tld files into the "include/header.jsp" page. It worked for me. /Katarina -Original Message- From: Hardee, Tony [mailto:[EMAIL PROTECTED]] Sent: den 1 mars 2001 22:29 To: '[EMAIL PROTECTED]' Subject: JSP includes of I am having trouble using includes and custom tags in JSPs with Struts. The application is unable to find the tag descriptor files. For example, I have an include file that contains: // header.jsp %@ page language="java" % %@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" % %@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" % %@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" % and call it in the JSP: jsp:include page="include/header.jsp"/ The .tld files can not be resolved. The include directory is one level under the JSP and I have tried different paths to the .tld files with no success. How can I get this to work if at all? Solutions are appreciated.
Re: JSP includes of
Try to change jsp:include page="include/header.jsp"/ to put a full path to header.jsp file. For example: jsp:include page="/WEB-INF/include/header.jsp"/. But I am not sure. Katarina Nelson wrote: Try to include the needed .tld files into the "include/header.jsp" page. It worked for me. /Katarina -Original Message- From: Hardee, Tony [mailto:[EMAIL PROTECTED]] Sent: den 1 mars 2001 22:29 To: '[EMAIL PROTECTED]' Subject: JSP includes of I am having trouble using includes and custom tags in JSPs with Struts. The application is unable to find the tag descriptor files. For example, I have an include file that contains: // header.jsp %@ page language="java" % %@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" % %@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" % %@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" % and call it in the JSP: jsp:include page="include/header.jsp"/ The .tld files can not be resolved. The include directory is one level under the JSP and I have tried different paths to the .tld files with no success. How can I get this to work if at all? Solutions are appreciated.
RE: JSP includes of
The application finds the header file; I am also sourcing an image which appears on the page from the include. However, it is unable to resolve the tag library descriptors. Thus the include statement is fine, it is the taglib uri that is not working from the include. Thanks -Original Message- From: Maya Muchnik [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 4:46 PM To: [EMAIL PROTECTED] Subject: Re: JSP includes of Try to change jsp:include page="include/header.jsp"/ to put a full path to header.jsp file. For example: jsp:include page="/WEB-INF/include/header.jsp"/. But I am not sure. Katarina Nelson wrote: Try to include the needed .tld files into the "include/header.jsp" page. It worked for me. /Katarina -Original Message- From: Hardee, Tony [mailto:[EMAIL PROTECTED]] Sent: den 1 mars 2001 22:29 To: '[EMAIL PROTECTED]' Subject: JSP includes of I am having trouble using includes and custom tags in JSPs with Struts. The application is unable to find the tag descriptor files. For example, I have an include file that contains: // header.jsp %@ page language="java" % %@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" % %@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" % %@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" % and call it in the JSP: jsp:include page="include/header.jsp"/ The .tld files can not be resolved. The include directory is one level under the JSP and I have tried different paths to the .tld files with no success. How can I get this to work if at all? Solutions are appreciated.
RE: JSP includes of
There is exactly what I mean. Paste the needed taglib tags e.g. : %@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" % %@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" % %@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" % into your "header.jsp" page. /Katarina -Original Message- From: Hardee, Tony [mailto:[EMAIL PROTECTED]] Sent: den 1 mars 2001 23:12 To: '[EMAIL PROTECTED]' Subject: RE: JSP includes of The application finds the header file; I am also sourcing an image which appears on the page from the include. However, it is unable to resolve the tag library descriptors. Thus the include statement is fine, it is the taglib uri that is not working from the include. Thanks -Original Message- From: Maya Muchnik [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 4:46 PM To: [EMAIL PROTECTED] Subject: Re: JSP includes of Try to change jsp:include page="include/header.jsp"/ to put a full path to header.jsp file. For example: jsp:include page="/WEB-INF/include/header.jsp"/. But I am not sure. Katarina Nelson wrote: Try to include the needed .tld files into the "include/header.jsp" page. It worked for me. /Katarina -Original Message- From: Hardee, Tony [mailto:[EMAIL PROTECTED]] Sent: den 1 mars 2001 22:29 To: '[EMAIL PROTECTED]' Subject: JSP includes of I am having trouble using includes and custom tags in JSPs with Struts. The application is unable to find the tag descriptor files. For example, I have an include file that contains: // header.jsp %@ page language="java" % %@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" % %@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" % %@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" % and call it in the JSP: jsp:include page="include/header.jsp"/ The .tld files can not be resolved. The include directory is one level under the JSP and I have tried different paths to the .tld files with no success. How can I get this to work if at all? Solutions are appreciated.
Re: Question about iterate tag
Shamdasani Nimmi-ANS004 wrote: Craig, I did try this way but it still does not work. What does "does not work" mean? What error messages or stack traces are you getting? Since supplier.value is of type SupplierBean, do I have to specify that anywhere? No ... bean introspection does not care what the class is ... only whether there is a property of the matching name. Craig
Re: Drop-down list
Spencer Smith wrote: Do you guys know how to define the Multiple attribute in a select drop down list for Struts? select name="propertyname" multiple="true" In XML syntax, attributes always have to have a value. Craig
Re: Drop-down list
"Dorai, Harish (c)" wrote: Suppose I have the drop down list which I wanted to create from a database and the database is updated less frequently, is there a way in which I can implement somekind of caching mechanism, with which I won't do a database query always, instead I can use the cache to populate the drop down list? What I do in my real applications is to load in the options for each combo box at startup time, and store each as servlet context attributes. That way, everyone uses the same copy without having to go to the database every single time. If the values do change occasionally, and you don't want to shut down your app to recognize them, you could even define an Action that reloads them. Craig
Re: Is the struts example itself is multi-thread safe?
Maya Muchnik wrote: Thank you, Craig for clear "picture". One Q. to be sure that all OK. What about servlet.log file? Several action threads will need to have an access to it.,... True, but that is the servlet container's problem to worry about. If you look inside Tomcat's implementation of ServletContext.log(), for example, you will indeed see synchronization. But your application need not worry. Maya Craig
Re: Why should you call JSP pages directly?
Maya Muchnik wrote: One way, as I know, is to put all jsp, except index.jsp (or similar start up) under a protected directory. For Tomcat the secure directory is setup in web.xml (see web.xml for webapps/example, directory is example/jsp/security/protected). See also Tomcat instruction (I need refresh my memory myself). Using container-managed security in this way is indeed portable. A second portable mechanism (assuming that your container works correctly per the servlet spec) is to put your JSP pages under WEB-INF. This works because the servlet container is prohibited from allowing a client to access these JSP pages directly -- but it is entirely legal to do a RequestDispatcher.include() or RequestDispatcher.forward() call to access them, as Struts does when you forward to the appropriate page. Craig
RE: Question about iterate tag
IT IS UNBELIEVABLE! I have wasted so much time trying to get this to work and all that was missing in my JSP was this line: %@ taglib uri="/Web-inf/struts-logic.tld" prefix="logic" % The strange part is that I was not getting any error in the log files saying undefined tag or anything. I appreciate all the help I received :) -Nimmi -Original Message- From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 11:04 AM To: '[EMAIL PROTECTED]' Subject: RE: Question about iterate tag Craig, I did try this way but it still does not work. Since supplier.value is of type SupplierBean, do I have to specify that anywhere? -- jsp:useBean id="user" scope="session" type="com.motorola.mms.msqc.beans.UserBean"/ TABLE logic:iterate id="supplier" name="user" property="suppliers" TR TDbean:write name="supplier" property="value.seq_nbr" scope="page"//TD TDbean:write name="supplier" property="value.name" scope="page"//TD TDbean:write name="supplier" property="value.countryName" scope="page"//TD /TR /logic:iterate /TABLE - but this code which I am trying to replace with tags works: jsp:useBean id="user" scope="session" type="com.motorola.mms.msqc.beans.UserBean"/ TABLE % Hashtable hashTable = (Hashtable) user.getSuppliers(); for (Enumeration e = hashTable.elements(); e.hasMoreElements(); ) { SupplierBean supplier = (SupplierBean) e.nextElement(); % TR TDFONT face = "Arial"supplier.getCode() %/FONT/TD TDFONT face = "Arial"%= supplier.getName() %/FONT/TD/FONT/TD TDFONT face = "Arial"%= supplier.getCountryName() %/FONT/TD /TR % } % /TABLE -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 11:30 PM To: [EMAIL PROTECTED] Subject: Re: Question about iterate tag Shamdasani Nimmi-ANS004 wrote: Hi, Could someone please tell me what I am doing wrong below: user is a bean in session scope in my JSP and its getSuppliers() method returns a hashtable where keys are Suppliers Ids and elements are Supplier beans. logic:iterate collection="%= user.getSuppliers() %" id="supplier" type="com.motorola.mms.msqc.beans.SupplierBean" TR TDbean:write name="supplier" property="seq_nbr" scope="page" //TD TDbean:write name="supplier" property="name" scope="page" //TD TDbean:write name="supplier" property="country_name" scope="page" //TD /TR /logic:iterate When you iterate over a Hashtable (or any other implementation of the Map interface), the object get for the "id" variable is actually an implementation of the "Map.Entry" class, not the class of the value of the bean. From this "Map.Entry" instance, however, you can easily get to the real information: bean:write name="supplier" property="value.seq_nbr" scope="page"/ This works because a MapEntry has two properties -- key and value -- so we are using the nested property syntax to effectively call getValue().getSeq_nbr(). Thanks in advance. -Nimmi Craig
Re: Why should you call JSP pages directly?
This thread seems to have gone off-topic a bit. What about Jens' original question about why ALL requests don't go through ActionServlet?: Jens Rehphler wrote: I'm watching this list quite a while and wondered why so many people try to call there JSP pages directly from the browser. In my understanding of the MVC pattern all requests to your web application must be handled from the controller servlet (ActionServlet). The only JSP page which could be called directly is the start page of your application, in most cases called index.jsp. By calling the JSP directly you don't seperate the view completly from the logic. One bad example is the struts-example application. Here, the user authentication is done in every JSP page by a tag called app:checkLogon/. In my opinion the user authentication is absolutly LOGIC and not VIEW. So it should be handled in the controller (ActionServlet). snip Maybe I'm a bit to restrictive in the use of the MVC pattern, so I'm very pleased to here why it is a good idea to call your JSP directly without a call to the ActionServlet. It seems (to me) that, in Struts, only form submissions follow MVC. Or do i have it all wrong? thanks, chris
Introspection
Has anyone used the concept of introspection with the struts framework? I believe the idea of it is that you write a use bean line in your jsp and call the jsp:setProperty name="blah" property="*" and when the form is posted all the properties of object blah get set to the values in the form objects that match the names. Tell me if I'm way off-base and if this is the opposite direction from Struts or not. Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111
Re: Why should you call JSP pages directly?
Chris Bartley wrote: This thread seems to have gone off-topic a bit. What about Jens' original question about why ALL requests don't go through ActionServlet?: Ideally, that's what happens. Unfortunately, there are some practical realities that get in the way: * What about your welcome page? Usually, you want a URL like this: http://myhost/myapp to work, which will call up the index.html or index.jsp page. One approach to this is to configure the URI of your login page as the "welcome" page for the app, using the welcome-file element in web.xml. * What about bookmarks? You have to be ready for the fact that users are going to *try* this, even if you do not want them to. Alternatives have been presented to protect JSP pages from this kind of access. * If you are switching from one view to another view (with no model manipulation), I cannot see that much difficulty in linking from one JSP page directly to another, but this is not particularly common. In a servlet 2.3 environment, you will be able to enforce things like going through the controller using the Filter facility. Until then, though, we have to deal with issues like those listed above. Craig Jens Rehphler wrote: I'm watching this list quite a while and wondered why so many people try to call there JSP pages directly from the browser. In my understanding of the MVC pattern all requests to your web application must be handled from the controller servlet (ActionServlet). The only JSP page which could be called directly is the start page of your application, in most cases called index.jsp. By calling the JSP directly you don't seperate the view completly from the logic. One bad example is the struts-example application. Here, the user authentication is done in every JSP page by a tag called app:checkLogon/. In my opinion the user authentication is absolutly LOGIC and not VIEW. So it should be handled in the controller (ActionServlet). snip Maybe I'm a bit to restrictive in the use of the MVC pattern, so I'm very pleased to here why it is a good idea to call your JSP directly without a call to the ActionServlet. It seems (to me) that, in Struts, only form submissions follow MVC. Or do i have it all wrong? thanks, chris
Re: Introspection
Kyle Robinson wrote: Has anyone used the concept of introspection with the struts framework? I believe the idea of it is that you write a use bean line in your jsp and call the jsp:setProperty name="blah" property="*" and when the form is posted all the properties of object blah get set to the values in the form objects that match the names.Tell me if I'm way off-base and if this is the opposite direction from Struts or not.Kyle Robinson Systems Consultant Pangaea Systems Inc. (250) 360-0111 Struts does this kind of introspection for you automatically when you use form beans. If you want to use introspection for your own purposes, you will definitely want to check out the following classes in the Struts Javadoc: org.apache.struts.util.BeanUtils org.apache.struts.util.ConvertUtils org.apache.struts.util.PropertyUtils Craig
Re: Class reloading?
Ned Seagoon wrote: Hi guys, Just wondering about the situation that arises when an Action class is changed in a running struts environment. I was under the impression that a single instance of an action class is created and run inside multiple threads, yet if I recompile the class and re-run the action then those changes are reflected. Is this peculiar to VisualAge for Java (which I am running under) or does this happen in every environment? Actually, this applies to all classes in a project - can I just change them at will or do I need to do something more? Doesn't Tomcat use a special class loader to reload changed servlet classes? Tomcat uses a special class loader, but it is global to the entire web app rather than local to a particular class. When Tomcat recognizes that you have changed a class, it reloads the entire app (destroying the old servlets, initializing the new ones) and even saves your sessions and session attributes if they implement Serializable. This capability is a feature of Tomcat that is commonly implemented, but it's not in the servlet spec. Regards Ned Craig
Re: ifParameterExists
Shah Nabib El-Rahman wrote: Hello, The ifParameterExists tag seems not be working, has anyone else came across the same problem? shah It sounds like you are still using the Struts 0.5 tags. There isn't a tag named "ifParameterExists", although the following tags exist: ifParameterEquals, ifParameterNotEquals, ifParameterNotNull, ifParameterNull. In Struts 1.0, you would use logic:present parameter="xxx" to test for the presence of a request parameter named "xxx". Craig McClanahan
Re: HTTPClient vs java.net.URLConnection
I was using HTTPClient, but I then switched to the com.mortbay.HTTP library (it comes with one of their products or something i believe). I forget why I did so, but I think it had something to do with limitations in dealing with filenames in HTTPClient. I advise you to compare the two. eric. On Thu, Mar 01, 2001 at 02:53:09PM -0500, Maya Muchnik wrote: Hi, Does anyone use HTTPClient? What do you think about it? I have got this link several minutes ago. As its document said, in HTTPClient you can set timeout for response, pipelining of request. Source code is available. It includes the source code for parsing the multiPartRequest. HTTPClient can find at: http://www.innovation.ch/java/HTTPClient/ -- _ _ | |(_) http://ir.iit.edu/~ej | _| | | Page me via ICQ at | |___ | | http://wwp.mirabilis.com/19022931 |__/ | or by mailing [EMAIL PROTECTED] |__/ PGP signature
Re: Validating bean properties (WAS: Re: Stupd question aboutStruts and EJB.)
Help! Question: Is there a simple way to set an index for an error message so that I can vary it's placement on my JSP Page? // In Action // old code errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("caremanager.mp.error.phoneFormat")); // new code (preferredDayPhone is my field name) errors.add("preferredDayPhone", new ActionError("caremanager.mp.error.phoneFormat")); // In JSP font color="#ff"eCMS:preferredDayPhone.errors//font ??? - Original Message - From: "Craig R. McClanahan" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, February 28, 2001 8:06 PM Subject: Re: Validating bean properties (WAS: Re: Stupd question aboutStruts and EJB.) Nick Pellow wrote: I was considering an approach where coders wrote validation code in Java (we all know java!) yet the Struts framework executed it. You would extend or implement a common java class/interface defining a single method, public ValidationErrors validate(); say. That is then mapped to the form field in an xml file somewhere. Struts, however could ship all the standard validations (such as Strings to ints) together. It is something I have not given much thought to yet, but would be interested in exploring further. Beyond the thinking expressed so far on this thread, I've had two additional ideas for functionality that should be included here: * Optional generation of client-side JavaScript code to do the kinds of validations that make sense (required fields, number formats, etc.) closer to the user. * The JavaBeans spec includes the concept of a PropertyEditor, which lets you define a custom conversion between String and a bean data type. JSP 1.2 supports this when doing attribute conversions -- we should look at whether it can help us in the conversion/validation arena as well. Craig McClanahan
Re: Class reloading?
Do all version of Tomcat do this? David --- "Craig R. McClanahan" [EMAIL PROTECTED] wrote: Ned Seagoon wrote: Hi guys, Just wondering about the situation that arises when an Action class is changed in a running struts environment. I was under the impression that a single instance of an action class is created and run inside multiple threads, yet if I recompile the class and re-run the action then those changes are reflected. Is this peculiar to VisualAge for Java (which I am running under) or does this happen in every environment? Actually, this applies to all classes in a project - can I just change them at will or do I need to do something more? Doesn't Tomcat use a special class loader to reload changed servlet classes? Tomcat uses a special class loader, but it is global to the entire web app rather than local to a particular class. When Tomcat recognizes that you have changed a class, it reloads the entire app (destroying the old servlets, initializing the new ones) and even saves your sessions and session attributes if they implement Serializable. This capability is a feature of Tomcat that is commonly implemented, but it's not in the servlet spec. Regards Ned Craig __ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/
Re: Question about iterate tag
Shamdasani Nimmi-ANS004 wrote: IT IS UNBELIEVABLE! I have wasted so much time trying to get this to work and all that was missing in my JSP was this line: %@ taglib uri="/Web-inf/struts-logic.tld" prefix="logic" % The strange part is that I was not getting any error in the log files saying undefined tag or anything. nope, not that strange. if you viewed the source of your page, you should be able to see your logic tags, still sitting there, unprocessed as text. The container will only complain about undefined tags if there is a .tld defined with a prefix at the top of the page (ie the struts-logic tags). Otherwise it treats everything else as plain text. Cheers, Nick I appreciate all the help I received :) -Nimmi -Original Message- From: Shamdasani Nimmi-ANS004 [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 11:04 AM To: '[EMAIL PROTECTED]' Subject: RE: Question about iterate tag Craig, I did try this way but it still does not work. Since supplier.value is of type SupplierBean, do I have to specify that anywhere? -- jsp:useBean id="user" scope="session" type="com.motorola.mms.msqc.beans.UserBean"/ TABLE logic:iterate id="supplier" name="user" property="suppliers" TR TDbean:write name="supplier" property="value.seq_nbr" scope="page"//TD TDbean:write name="supplier" property="value.name" scope="page"//TD TDbean:write name="supplier" property="value.countryName" scope="page"//TD /TR /logic:iterate /TABLE - but this code which I am trying to replace with tags works: jsp:useBean id="user" scope="session" type="com.motorola.mms.msqc.beans.UserBean"/ TABLE % Hashtable hashTable = (Hashtable) user.getSuppliers(); for (Enumeration e = hashTable.elements(); e.hasMoreElements(); ) { SupplierBean supplier = (SupplierBean) e.nextElement(); % TR TDFONT face = "Arial"supplier.getCode() %/FONT/TD TDFONT face = "Arial"%= supplier.getName() %/FONT/TD/FONT/TD TDFONT face = "Arial"%= supplier.getCountryName() %/FONT/TD /TR % } % /TABLE -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 28, 2001 11:30 PM To: [EMAIL PROTECTED] Subject: Re: Question about iterate tag Shamdasani Nimmi-ANS004 wrote: Hi, Could someone please tell me what I am doing wrong below: user is a bean in session scope in my JSP and its getSuppliers() method returns a hashtable where keys are Suppliers Ids and elements are Supplier beans. logic:iterate collection="%= user.getSuppliers() %" id="supplier" type="com.motorola.mms.msqc.beans.SupplierBean" TR TDbean:write name="supplier" property="seq_nbr" scope="page" //TD TDbean:write name="supplier" property="name" scope="page" //TD TDbean:write name="supplier" property="country_name" scope="page" //TD /TR /logic:iterate When you iterate over a Hashtable (or any other implementation of the Map interface), the object get for the "id" variable is actually an implementation of the "Map.Entry" class, not the class of the value of the bean. From this "Map.Entry" instance, however, you can easily get to the real information: bean:write name="supplier" property="value.seq_nbr" scope="page"/ This works because a MapEntry has two properties -- key and value -- so we are using the nested property syntax to effectively call getValue().getSeq_nbr(). Thanks in advance. -Nimmi Craig
Re: ifParameterExists
thanks, logic:equals worked --- "If the misery of our poor be caused not by the laws of nature, but by our institutions, great is our sin" -- Charles Darwin --- On Thu, 1 Mar 2001, Craig R. McClanahan wrote: Shah Nabib El-Rahman wrote: Hello, The ifParameterExists tag seems not be working, has anyone else came across the same problem? shah It sounds like you are still using the Struts 0.5 tags. There isn't a tag named "ifParameterExists", although the following tags exist: ifParameterEquals, ifParameterNotEquals, ifParameterNotNull, ifParameterNull. In Struts 1.0, you would use logic:present parameter="xxx" to test for the presence of a request parameter named "xxx". Craig McClanahan
RE: using struts on iplanet
GX2GX means it could not find the servlet in LDAP or registry. Doing a servlet registration is non-trival with iPlanet. You need to use the iPlanet deployment tool. -Original Message- From: Fred Lo [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 01, 2001 9:32 AM To: [EMAIL PROTECTED] Subject: using struts on iplanet Hello, Anyone have experience with iplanet 6.0 sp2 and struts? I am trying the struts-test.war application. I could load the jsp without problem, but it seems whenever an servlet is called upon it will report: GX Error (GX2GX) socket reuslt code missing!!! With the following in the log file: [02/Mar/2001 00:20:28:6] warning: UTIL-013: GXGUID: NameTrans lookup failed (Applogic Servlet struts-test_html-select.do) Anyone could shed some light on me? I suspect it's some sort of deployment problem but what i did was just create the .ear from the .war and deploy (using the GUI deployment tools). Did I miss anything? Thanks in advance _ Get your FREE download of MSN Explorer at http://explorer.msn.com
Cannot deploy struts-blank.war onto j2eesdk1.2.1
I can't deploy struts-blank.war (struts 1.0b1)onto j2eesdk1.2.1 . Has anyone done it before? Please help me!
JUNIT and Struts
We use a JUnit extension (HttpUnit) to do all of our functional testing. We can effectively 'fake' the user submitting a form, and check for page results. We've added some code into a base test class so that we can use methods like assertPageText("xyz") or assertPageError ("struts.resources.key"). This works very well. -- dIon Gillard, Multitask Consulting Work: http://www.multitask.com.au NetRexx: http://www.multitask.com.au/NetRexx.nsf - Forwarded by dIon Gillard/Multitask Consulting/AU on 02/03/2001 03:39 PM - JUNIT and Struts Hello, We are using the XP development process(http://www.extremeprogramming.org/) as we develop our Struts web application. We need to write some tests in JUnit(http://www.junit.org) to incrementally test as we write code. Has anyone ever used JUnit with Struts? Does anyone have any advice about how to proceed in coding these tests? TIA, Julia Previous Document (Embe (Embe Next Document dded dded image image moved moved to to file: file: pic26 pic19 500.p 169.p cx) cx) Return to View (Embedded image moved to file: pic15724.pcx) pic26500.pcx pic19169.pcx pic15724.pcx
Form Bean
Hi guys, I am a newbie in the Struts framework. I have to build a page where I have to show variable number of rows with each row having variable number of columns. So obviously the number of elements( Drop down, text box, check box ) will appear in the screen will be dynamic. Now my question is how can I write the Form Bean class before hand where I don't know how many elements will be there in the screen. I need to provide fixed numberaccessors and mutators ( fixed number ) in the Form Bean. Can anybody pls help me with valuable suggesstion. Thanks in Advance Sankha
Unable to deploy Struts on WLS5.1 SP6 on Solaris
Hi, I keep getting the following errors during deployment. Fri Mar 02 15:46:26 SGT 2001:I ServletContext-tw *.jsp: param srcCompiler initialized to weblogic.jspc Fri Mar 02 15:46:26 SGT 2001:I ServletContext-tw *.jsp: param superclass initialized to null Fri Mar 02 15:46:26 SGT 2001:I ServletContext-tw *.jsp: param workingDir initialized to: /opt/Netlife/TradeWorkz1.1LT/tw/_tmp_war Fri Mar 02 15:46:26 SGT 2001:I ServletContext-tw *.jsp: param pageCheckSeconds initialized to: 1 Fri Mar 02 15:46:26 SGT 2001:I ServletContext-tw *.jsp: initialization complete Fri Mar 02 15:46:26 SGT 2001:I ServletContext-tw *.jsp: Fri Mar 02 15:46:27 SGT 2001:E ServletContext-tw Cannot find resource 'chooseLanguage.do' in document root '/opt/Netlife/TradeWorkz1.1LT/tw' This happens when I try to access the homepage of my application. I have already added the following lines to my weblogic.properties file. weblogic.httpd.documentRoot=/opt/Netlife/TradeWorkz1.1LT/tw weblogic.httpd.servlet.classpath=/opt/Netlife/TradeWorkz1.1LT/tw/WEB-INF/classes weblogic.httpd.servlet.reloadCheckSecs=1 weblogic.httpd.register.*.jsp=\ weblogic.servlet.JSPServlet weblogic.httpd.initArgs.*.jsp=\ pageCheckSeconds=1,\ compileCommand=/usr/java/bin/javac,\ workingDir=/opt/Netlife/TradeWorkz1.1LT/tw,\ verbose=true,\ keepgenerated=true weblogic.httpd.webApp.tw=/opt/Netlife/TradeWorkz1.1LT/tw The JSPs files keep getting generated into the following directory. Although I did set the workingDir as above. /opt/Netlife/TradeWorkz1.1LT/tw/_tmp_war Is this behavour correct? Also, any ideas on letting WLS recognize *.do? The same web application runs perfectly fine on NT, but we have problems running it on NT. Rgds, kianhui