Re: How to disallow opening a page directly from URL

2006-05-17 Thread Christian Bollmeyer

Paul Benedict schrieb:


Panak, how are the menu items going to communicate to your
application which item was selected? Obviously, by incoking
an Action; if the menu items can invoke the Action, so can a user.
There is no such thing as security in this case.


Just a thought, but probably the Action could check the
refer(r)er. If the URL is directly typed in or comes
from a Favorite, it should be null. Of course, that's
not 100% safe, as nearly everything in the request can
be tampered with before sending (using the Firefox Tamper
plugin or some proxy like WebScarab, for example). Plus,
I never actually tried, for security-wise, it should make
no difference whether the user clicks on a link, invokes
a Favorite or types everything in by hand. So, as I
said, just a thought.

-- Chris

[CLIP]


-- Paul



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: I've got a big problem:Can NOT insert flash into jsp---using struts 1.1 and Tiles

2006-05-16 Thread Christian Bollmeyer

This is kind of trivial and not related to Tiles at all.
Fact is, your Flash thing or even the image, if you like,
are not found because their URLs are incorrect. Solution
is to specify context-relative URLs like this (JSP 2.0):

img src=${pageContext.request.contextPath}/myImage.jpg

and the like. For older JSP versions, use the c:out or
c:url tags.

HTH,
-- Chris

M.Liang Liu schrieb:


My GOD!
The same thing  happened when I try to insert an image!!

Help,please.
On 5/16/06, M.Liang Liu [EMAIL PROTECTED] wrote:


Hi,guys!
   I am meeting with a problem when I tried to insert a flash to my
pages.I use Tiles plug-in and it works well.
  I put a flash in my header.jsp and the flash can display as expected as
I typed the very url of this page.But when I put this page in my
layout.jsp tiles files,nothing displayed.
  I defined the xml file as following:

 !DOCTYPE tiles-definitions PUBLIC -//Apache Software Foundation//DTD
 Tiles Configuration 1.1//EN 
 http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd;
 tiles-definitions
 definition name=.main.layout path=/tiles/layouts/Layout.jsp
 put name=title value=${title}/
 put name=menutree value=/tiles/menutree.jsp /
 put name=header value= /
 put name=body value=/
 put name=footer value=/tiles/footer.jsp /
 /definition
 definition name=.index extends=.main.layout
 put name=title value=welcome!!! type=string /
 put name=header value=/tiles/header.jsp /
 /definition
 /tiles-definitions

And I opened welcome.do mapping to .index and the pages displayed
successfully ,except the flash.

Who can help me?And it is strange,yup?

Beg your pardon for my poor English.

Thanks for reading.








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Unsupported major.minor version 49.0

2006-02-02 Thread Christian Bollmeyer

Hi,

well, the truth may be found somewhere in-between.
First of all, each java class has a version stamp,
older versions have lower numbers. The JVM is
backward compatible, so older classes also run
in a newer JVM. Version ranges are as follows:

Java 1.1 platform: 45.3-45.65535
Java 1.2 platform: 45.3-46.0
Java 1.3 platform: 45.3-47.0
Java 1.4 platform: 45.3-48.0

Java 5 class files are stamped with 49.0, and
the JVM is also backward compatible. So, a 1.3
class file will run in a 1.5 JVM, but not the
other way round. That's the reason for the
original problem. None of us would be able to
run Struts in an 1.4 or 1.5 JVM if it were
otherwise, as the binaries are 1.3 versions,
IIRC. Apart from that, Sun has been very
careful when it comes to JVM version compa-
tibility, much more than in other parts,
Serialization would be a prominent example
here. IIRC there were no changes to the
class format in 1.2 and 1.3, possibly in-
cluding 1.1 even. The changes made in 1.5
were mostly required by the extended type
system (Generics | 'type erasure'). Another
aspect of backward compatibility is the usage
of features in the Foundation Classes; this
lib has steadily grown over the years. If
a class files has dependencies on other
classes only available in a more recent
version, trying to do so will end up in
a ClassNotFound exception, but thats just
what is to be expected. An example for that
would be Tomcat 5.5: normally, it requires
Java 5, but you can install a compatibility
package that provides the missing features
and makes it run in a 1.4 setup.

HTH,
-- Chris.


starki78 schrieb:


Well I had this erroer
compiling sourcecode with
1.4 and some classes with 1.3
within one project


-- Initial Header ---


From  : news [EMAIL PROTECTED]

To  : user@struts.apache.org
Cc  : 
Date  : Wed, 01 Feb 2006 14:53:00 -0500

Subject : Re: Unsupported major.minor version 49.0



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Cookies enabled on browsers

2006-01-16 Thread Christian Bollmeyer

Craig McClanahan schrieb:

On 1/15/06, Deepa Khetan [EMAIL PROTECTED] wrote:

Hi!
My application requires, per-session cookie to be enabled on client
browser. How can i determine in my java code if it is enabled or not!
Deepa


There is only one test that is useful for this ... set a cookie on one
response, and see if that cookie comes back in on the subsequent request.
There is absolutely no way to know, from a current request, whether or not
cookies are enabled for *your* webapp.



Craig McClanahan


Hm. So I understand request.isRequestedSessionIdFromCookie() is
presumed to be useless, then? Why exactly?

-- Chris.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Oracle Personal Edition andTomcat

2005-11-29 Thread Christian Bollmeyer

The Oracle database has integrated web functionality
(implementation is version specific; some versions have
the 'pigs on the wing' OSE, others XDB) which runs on
port 8080 which is also the Tomcat default. IIRC it's
rather difficult to make Oracle change the port (IIRC
it's stored somewhere in the dictionary or s/th), so
IMHO its easier to switch it for Tomcat. You can
check if you point your browser to s/th like

http://localhost:8080

An alternative would be to start Tomcat before
Oracle, so the port can't be successfully occu-
pied by the latter. Btw, 10g XE has this issue,
too.

HTH,
-- Chris

R. Markham schrieb:
 


Hi ,

 


this is not a direct Struts question.

 


I just want to know if somebody already had experience with Oracle Personal
Edition. Last night I installed the software my tomcat application doesn't
work anymore. Does anybody knows the reason?. It seems to me that Oracle
blocked some port even if none of the programs are started.

 


Regards

 


Richard Markham





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT]what techonolgies will you use to develop a new web application

2005-11-10 Thread Christian Bollmeyer

Just to add that Sun is offering both Java Studio Enterprise 8
and Java Studio Creator for free now,

http://developers.sun.com/prodtech/javatools/free/

-- Ch.

JDeveloper 10.1.3 EA (which is also free) has excellent
JSF support, too.

Ted Husted schrieb:

On 11/9/05, Ashish Kulkarni [EMAIL PROTECTED] wrote:


i have to develop a simple web application for CRUD



Java Studio Creator is suppose to be nice for that sort of thing:

* http://developers.sun.com/prodtech/javatools/jscreator/ea/jsc2/index.html

-Ted.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:textarea with tags

2005-11-05 Thread Christian Bollmeyer

Murray Collingwood schrieb:

If you know of any sites providing formatted text inside a textarea I would be really 
interested (as would most readers) please post the link.  


It's not possible in plain HTML, but in JavaScript (to some
degree). There are a lot of such scripts on the web, many of
them commercial and not too cheap. In those rare instances
where we *have* to allow the user to enter HTML input (which
generally is not the best of ideas, as you have to filter
the entire input later due to possible CSS attacks), we
normally use this one:

http://www.dynarch.com/projects/htmlarea/

which 'enhances' a normal texarea and therefore is also
compatible with Struts. Works with IE, Mozilla and Firefox;
users of other browsers have to cope with the HTML tags.

Another popular choice would be the FCKEditor

http://www.fckeditor.net/

but IIRC that one is *completely* JavaScript-based
now and I never tried it in a web app.

Something I still have to look at is TinyMCE:

http://tinymce.moxiecode.com/

This one is used in the popular Mambo/Joomla! CMS
software and might also be worth looking at.

HTH,
-- Chris



Cheers
mc


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Question using struts-layout TagLib

2005-11-03 Thread Christian Bollmeyer

Or eXtremeTable (www.extremecomponents.org), which is
what we use in our current project.

-- Ch.

Martin Gainty schrieb:

This is Fantastic

Thanks Dennis!

Martin-
617-852-7822

- Original Message - From: [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Thursday, November 03, 2005 8:50 AM
Subject: RE: [OT] Question using struts-layout TagLib



Have you looked at DisplayTag?  http://displaytag.sourceforge.net

-Dennis




Martin Gainty [EMAIL PROTECTED]
11/03/2005 08:37 AM
Please respond to
Struts Users Mailing List user@struts.apache.org


To
Struts Users Mailing List user@struts.apache.org
cc

Subject
(Possible OT) Question using struts-layout TagLib






Greetings

I am seeking a Grid control with column headings which when clicked will
re-sort the individual items according to the clicked column
sort algorithm
I am presently looking at struts-layout Grid control and was wondering if
anyone has experience with sorting characteristics
of the individual items based on the (hopefully sortable) column which 
was

clicked
http://struts.application-servers.com/intro/collection.html

Any suggestions?

Thank You,

Martin-




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Question using struts-layout TagLib

2005-11-03 Thread Christian Bollmeyer

Michael Jouravlev schrieb:


On 11/3/05, Christian Bollmeyer [EMAIL PROTECTED] wrote:


Or eXtremeTable (www.extremecomponents.org), which is
what we use in our current project.



Home page is not shown if Javascript is turned off. Not even a message.


Yep. Wasn't so earlier, but according to the author the
project moved to a new provider recently who accepts
Spring (the former obviously did not). May go away.


In the online samples each page has unique URL, so after going three
pages forward one needs to click Back button three times to return
where he started. DisplayTag allows to provide URL where to return
after each page flip, so you can use a single location for all table
pages.


Nice :-) Don't know if eXtremeTable can do the same. Of
course, you can also specify an URL attribute (is that
what you mean?) which is a necessity with Tiles anyway.
Grid navigation itself is handled via parameters; don't
know how DisplayTag handles this from memory. Anyhow,
I've never really missed the single location thing.
Depends on the scenario, of course :-)


For an example of how a single location works, see MailReader online
demo here: http://www.superinterface.com/mailreader


Registration bravely accepts password 'a', but complains
it's too short at logon. Odd. Shouldn't it be the other
way round? At least, the user account is kind of useless
afterwards. May also go away :-)


Log In as user/pass and select Manage Subscriptions.
Subscriptions are displayed in four in a page. You can add, edit or
delete subscriptions or flip pages, and you still will stay on the
same location, see address bar in your browser. If you click Back
button, you will _immediately_ return to main menu, you do not need to
go through all subscriptions you viewed or edited.


Our general UI policy is that if the user clicks the browser 'back'
button, he should see the last page he visited, which usually is
the last result page from the datagrid. If he wants to 'bail out',
we provide a navigation menu for such cases (Tiles be thanked).
Generally, I don't like the 'back' button in web apps too much,
in particular in connection with forms. YMMV.


This particular table was created with Struts-EL tags; with DisplayTag
it would be twice smaller and much cleaner in a JSP code.


DisplayTag is fine, eXtremeTable is fine too. We chose it
because it sports quite a lot of very useful features, it
works, it's easy to use and well-designed. There's a third
component available from sf.net named ValueListHandler or
so; Matt Raible has an article about eXtremeTable (plus some
demos) on his site where IIRC it was mentioned somewhere. A
fourth one would be the datagrid component from the Apache
taglib site, but it falls back when compared to the other
options and I doubt too many people use it for production
sites.


Michael.


-- Chris.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is there an abstract meta-model of Struts ?

2005-10-30 Thread Christian Bollmeyer

Hi,

your thoughts are quite interesting, but unfortunately I don't know
about an official MOF and kind of doubt from my own experiences Struts
development can succesfully be formalized that way. For instance, many 
people still think quite differently about the 'M' part; there is no 
'official' rule what 'Model' actually means; if Actions (or even Forms!)

may be considered part of the Model an so on; I've seen quite a lot
in this direction. Struts is largely open to architectural decisions
of this kind. Struts provides a standard way for handling web input,
based on the existence of a central 'request processor' servlet that 
delegates the information flow to Action implementations that do the

actual work, determine the outcome and return it to the client somehow,
plus the ability to manage the exact details declaratively via 
struts-config.xml and web.xml. But it does not enforce a formal coding

or application design paradigm, and that's probably very wise, as Struts
is a protocol-near, 'down-to-earth' framework by nature, originally
aimed at providing a best-practice solution in a spot that had been
left dark by the J2EE specs. In effect, Struts is a different kind
of animal when compared to things like WebObjects, Tapestry or JSF
which were driven by different design goals. Perhaps Craig can shed
some more light on this.

-- Chris.

NB. Still wonder why Compuware uses AndroMDA...glad to be not
having thrown in ArcStyler :-)

Begur, Praveen schrieb:


Thanks to Vance, Christian, Laurie and others who responded to my query.

I understand the Struts cartridge and have limited exposure to it in
AndroMDA. I have seen a few apps developed and I always wonder if they are
100 % Struts compliant. 


Thought 1 - It would be nice to have a Struts compatibility verification
Tool Kit which can certify if a particular Web Application is compliant with
Struts and also grade it on some numerical basis. 
Thought 2 - I would like to see Enterprise Software mature itself on the
Technology front so that it becomes measurable. 

The whole point of the previous two thoughts is 
Goal 1: Reduce learning curve, re-learning

Goal 2: Ensure compliance with standards ( in this case it is with Struts
and related specs ) 
Goal 3: Make Enterprise Software development more easier/faster/better. 


I feel the above goal(s) can be met when the meta-model / meta-definition of
the various technical parts / aspects of Struts like the specific mechanisms
for 'M','V' and 'C' are published by the Struts body / community. Once we
have a formal definition ( structured syntax and semantics ) of Struts ( in
addition to the description of the API's, JavaDocs etc ) we can feed that
formal meta-model into any tool and generate real world applications that
are 100% compliant with Struts.

Does anyone know of a MOF Model of Struts anywhere ? I am curious to know if
the Struts body has published it somewhere.

In the case of the present day AndroMDA templates for Struts, how can one be
sure that code generated is 100 % compliant with Struts ? An apache supplied
meta-model would help ensure and check for Struts'ness' of Applications !!

What do you all feel about this ? Your valuable inputs are most welcome.

regards,
Praveen 





The contents of this e-mail are intended for the named addressee only. It
contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it. 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cross-Site Scripting attack

2005-10-28 Thread Christian Bollmeyer

Hi,

don't have any recommendations specifically for CSS attacks at hand,
but you may want to hava a look at WebGoat and WebScarab avai-
lable from here:

http://www.owasp.org/software/webgoat.html

WebGoat teaches common Java web security pitfalls and has been
quite successfuly used here for internal developer training. WebScarab
is a proxy that enables one to change nearly everything in the request
before it is being sent to the server, without having to change the
HTML each time. Quite useful and enlightening :-)

HTH,
-- Christian.

Deepa Khetan schrieb:

Hi,
 I am working for the Security of my site. Read about Cross-Site-Scripting
attacks being most common. Can anyone help me regarding what can be the best
freeware tool to test a CSS vulnerability of my site. Also, any suggestions
on how CSS attack can be avoided? We are using Struts framework.
 Any information/suggestion is most welcome.
 Deepa





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is there an abstract meta-model of Struts ?

2005-10-28 Thread Christian Bollmeyer

Hi,

I only have limited experience with MDA, and we don't use AndroMDA
at work. But as I understand from their site, there's an existing
cartridge for Struts already available:

http://www.andromda.org/andromda-bpm4struts-cartridge/index.html

I know that in Germany there are projects where the entire web
layer was generated by this one. Isn't that what you're probably
looking for?

HTH,
-- Christian

Begur, Praveen schrieb:

Hi All,

Quesiton: I understand that there exists a programmatic API, documentation
and source-code of Struts, but is there a formal meta-model of Struts ( from
an application development point of view ) ?

Purpose: I am a practioner of MDA ( Model Driven Architecture ) and use
AndroMDA to create meta-models of popular technologies like DAO, EJB, etc
and then auto-generate User applications like HR ( by modeling Employee,
Department etc) etc. 


I am interested in the meta-model of Struts so that I can feed / create such
a Model into AndroMDA and use the tool to help me auto-generate Presentation
Tier code components based on Struts.

Any help would be greatly appreciated.

regards,
Praveen




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need good tab control for JSP.

2005-10-25 Thread Christian Bollmeyer

Laurie Harper schrieb:

Nope. You can't, for it has set rtexprvalue to false :-) Minor
thing, you can change that if you grab the tld file from the jar.
For resolving the other issues, you have to alter the code. Hm.
The source distribution doesn't contain the resources, but you
can get them from the jar (META-INF and /lib directories, IIRC).
The 'wrong links' issue stems from the use of getRequestURL()
throughout which is a rather common issue. This should easily be
overridable by adding an url attribute or s/th. Same is true
for the listener (resources location) which should also be
configurable IMHO. Generally, the Java part is not overly complex,
but I'm a little bit short of time currently, and taglib develop-
ment is not exactly my main field of expertise. Perhaps someone
should contact the author :-)

Experimented some more, being able to rebuild the library from
the sources and packaging everything to a .jar file now. Wow,
with rtexprvalue set to true, I can dynamically generate the
tabTitle via EL (tabTitle=${somebean.someproperty}). Still,
I can't say something like tabTitle=fmt:message key='tab.title'/;
might be a JDeveloper 10.1.3 EA restriction with nested tags
or generally illegal, I forgot.

-- Chris.

That one, I think, can be dispelled: tab titles are set with the 
tabTitle attribute, so you can just pass in a value retrieved from your 
message resources. Admittedly it'd be nice if it was 'Struts aware' and 
supported a tabTitleKey attribute, though.


L.

Christian Bollmeyer wrote:


Ah, another important issue I forgot: the tab titles are 'fixed'
and therefore not i18n-capable, neither via resource bundles
nor fmt:message.

-- Ch.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TLD file placement

2005-10-25 Thread Christian Bollmeyer

In fact, this should not occur, for a 2.3 spec-compliant server
matches the taglib uri against web.xml and the tld file(s) inside
the jar's META-INF directory first and should therefore resolve
it locally before looking up the web. The latter would fail any-
way in most cases. As an example, just point your browser to
something popular like http://java.sun.com/jstl/core or even
http://jakarta.apache.org/struts/tags-html-1.0 and enjoy the 404s,
some of them more stylish than others :-)

-- Chris

Scott Purcell schrieb:

I was told by my administrator, that I I take out entries from the web.xml file 
and use the url from the jar file, and if the site that the url points to is 
down, that the code will break.

If this could occur, is there a workaround for this situation?

Thanks,
Scott



-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 20, 2005 8:46 AM
To: Struts Users Mailing List
Subject: Re: TLD file placement


From: [EMAIL PROTECTED]


Sorry if I'm asking a basic question but I didn't know that you can just
use the tld files in the jar. You said unless you're on Servlet 2.2...
Does that mean that after Servlet 2.2 you can just use the tld files in 
the

jar file?



Yes.  http://wiki.wsmoak.net/cgi-bin/wiki.pl?WebXmlNoTaglib



If so, do I need to do anything special to tell Struts to look there or is
it enough to just take out the tld mappings from the web.xml file?



Nothing special.  Use the correct URI, remove the tld files from under 
WEB-INF, remove taglib from web.xml, and it Just Works.  One less thing to 
maintain. :)





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need good tab control for JSP.

2005-10-24 Thread Christian Bollmeyer

Ah, another important issue I forgot: the tab titles are 'fixed'
and therefore not i18n-capable, neither via resource bundles
nor fmt:message.

-- Ch.

Laurie Harper schrieb:

Christian Bollmeyer wrote:


This component is quite good, but requires JSP 2.0 (SimpleTag) and
has issues with Tiles (switch off JavaScript and see for yourself).



Damn, I was thinking this looked pretty promising 'til I read that... 
Can you expand at all? I only use Tiles fairly lightly so maybe it's 
something I could route around?


L.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need good tab control for JSP.

2005-10-24 Thread Christian Bollmeyer


Laurie Harper wrote:


Christian Bollmeyer wrote:


Hi,


This component is quite good, but requires JSP 2.0 (SimpleTag) and
has issues with Tiles (switch off JavaScript and see for yourself).



Damn, I was thinking this looked pretty promising 'til I read that... 
Can you expand at all? I only use Tiles fairly lightly so maybe it's 
something I could route around?


If you switch off JavaScript, the component is said to still work
via 'traditional' links. Unfortunately, at least with Tiles (didn't
test without), this ends up in a 404 error, as the component
seems to look for the physical JSP 'master' file instead of the
Tiles definition. Just re-checked if this behaviour also happens
in Tomcat 5.5 and not only in OC4J (the one that ships with
JDeveloper 10.1.3 EA), and it does. Other issues are that
a page that has the tab tags in it cannot be recompiled
in OC4J, but this may be an Oracle problem (it says some-
thing about a java.lang.NoSuchMethodError on top of a
lengthy stack trace).

Indeed, it looks quite promising, in particular as it's really
easy to use an looks sexy, but as things stand, it's just
not ready for production use yet (the author says so, too).


L.


-- Chris.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Need good tab control for JSP.

2005-10-23 Thread Christian Bollmeyer

Zsolt schrieb:

Hi,


Hi,


I need a good tab control for JSP. I have tried struts-layout and
http://209.61.157.8:8080/taglibs/?orgDitchnetTabPaneId=overview.


This component is quite good, but requires JSP 2.0 (SimpleTag) and
has issues with Tiles (switch off JavaScript and see for yourself).
Furthermore, its config tag stubbornly creates its resources in
a directory named org.ditchnet right underneath context root, and
you can't change that without touching the code. Its main advanta-
ge is the expert usage of JavaScript and DHTML you won't find
in other components that soon. So there's still room to improve,
but the author obviously has a lot of other projects going on and
therefore might not find the time to bring this component from
current version 0.81 to final anytime soon (enough). My guess.
It just hangs there for at least two months now.


Struts-layout doesn't seem to work. Ditchnet seems to be very good however
we cannot switch tomcat-5.5 into servlet mode 2.3.


The main obstacle with Struts-layout IMHO is not so much that
the tags may not work, but that they don't come clear about
their licensing policy for commercial projects on their site
once and for all. No, I won't call or send a mail, but buy
something else in the meantime. Evaluation itself usually
costs much more than license fees. Therefore, I just won't
evaluate something I may have to drop later for license or
other reasons.


Can you provide me some alternatives?


If you had asked for Tree or DataGrids components, there
would be a real abundance of choices nowadays. But the
relatively simple TabSheet component still seems to be
kind of an orphan to TagLib developers. Still, there are
some options. IMHO the best may be *Struts-Menu* which has
already been mentioned. There is another component in an
(abandonware) suite named ninebits-taglib, IIRC, available
from SF and released under the GPL (not LGPL or Apache, so
an instant goodbye for commercial projects here). There's
another tag available that seems to have been free once,
but costs around USD 25 now, if you search the net long
enough; I forgot both its name and the URL. Then, there's
the ColdTag suite, of course, which also sports a relati-
vely simple Tab tag, but costs money for commercial use,
as all Coldsuite tags do. If Struts-Menu won't suffice
(its good) and as the taglib land seems to be more of an
endless plain with very few water spots if your needs
are more advanced, this could be one of the few ocasions
where one may also look for commercial implementations.
My personal favorite in this direction is the common-controls
suite (check Google). Pricing seems to be moderate, and even
if I hate the term 'runtime license', you also get some
quite good standard controls (Tree, TabSheet, Datagrid
an so on) which may spare you a lot of work otherwise.


Zsolt


HTH,

-- Chris

NB. There must have been reasons why x:tabbedPane is
one of the standard controls in Apache MyFaces.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Forcing JSP reloading, avoiding IE caching of it

2005-10-22 Thread Christian Bollmeyer

Hi,

you may want to check out these first:

http://support.microsoft.com/kb/234067/EN-US/
http://support.microsoft.com/kb/222064/EN-US/

Then, IE understands extended HTTP/1.1 Cache-Control headers
that the nocache directive doesn't issue. For testing, add
the following line to the top of your JSP:

%
response.addHeader(Cache-Control, post-check=0, pre-check=0);
%

HTH,
-- Chris.

C.F. Scheidecker Antunes schrieb:

Hello all,

I have a struts app that works great on Firefox, however when I use IE I 
have problems with it.
I guess that IE caches the JSP page. So when the action sends the data 
to the JSP I always have the same

thing.

So I read about it and found that if you add on the struts-config.xml 
controller nocache=true/ it would

solve the issue. Well it does not solve it in its entirely.

I would like to ask if I could have something on the JSP or the HTML 
part of it to force reloading by IE.

Any suggestions?

Thanks,

C.F.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: What's wrong with DTOs?

2005-10-18 Thread Christian Bollmeyer

[EMAIL PROTECTED] schrieb:

+1. The first thing I always preach new developers
on my team is that they should think the entire web
tier away and replace it (mentally) with a Swing or
whatever client, without changing anything in the
subsequent layers, and the application still has to
work as usual. From an architectural view, the
entire OO thing is about loose coupling, separation
of concerns and minimizing dependencies. Now
MVC - a pattern emerging from its first Xerox in-
carnation some 25 years ago, originally invented
for SmallTalk-based rich clients and targeted at
helping to coordinate keyboard input, 'business logic'
(as understood back then, mysteriously named 'Model')
and monitor output in a responsibility-oriented way,
has since been adapted to different technologies
including the web. Still, it's strictly about getting
input and showing things from the Model. Now,
unlike in the old days, applications are usually
architecturally somewhat more complex now-
adays and split into different layers (naming varies).
Usually, there's at least one layer for the 'business
logic' (a.k.a the application) and a subsequent one
for resource access. Both of them are relative long-
lived compared to the client (web) tier which can
change every few years, from Struts to JSF or
whatever, whereas the business logic itself tends
to stay relatively static (usually the database itself
is the part with the longest lifespan, database models
easily reaching the age of 30 or more). There-
fore, IMHO it's a good idea to keep heed of
a strict separation of architectural layers
throughout the entire application, providing
interfaces like BusinessDelegate or Facade
to be used by different client implementa-
tions in a consistent way even in case of
a complete technology change in the client
tier. This may possibly require more work
to keep thing as abstract as possible, but
I'm quite confident it'll pay some day. And
that's where DTOs (or ValueObjects, which
originally were designed to address granu-
larity issues when dealing with EJB and the
like) or domain classes come in. I, for once,
don't want to see *any* web-related stuff in
my backing layers; no document/view con-
siderations here. Better leave that ground
to  the few remaining MFC adepts who still
think C++ is the one true solution to every-
thing. MVC, then, was born as a 'client' pattern
and stays one. YMMV, as always :-)

-- Chris.


-Original Message-
From: Dave Newton
I'm still not clear on how the entirety of MVC is the V



It's not.  MVC is a View Tier pattern, though.  Within the pattern it
separates the Model, an abstraction of the business logic, the View,
which displays a representation of the Model, and the Controller, which
translates user input into requests to the Model.  The point is to bring
clarity to the Presentation Layer.  See
http://idiacomputing.com/moin/LayeredArchitecture#head-386ccace28b9d5122
1f9ed6fe4dc1c59581ef0b5

Many people learning MVC for the first time mistake this presentation
layer pattern for an architecture of an entire application.

 - George

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Re: JDeveloper 10.1.3 Early Access

2005-09-21 Thread Christian Bollmeyer

Hi,

I think what you mean is a feature named 'Local History'
that has been around in Eclipse for quite some time.
The new release has a much improved built-in CVS
client (10.1.2 still used the CVS binaries which is
optional now) and supports other SCMs (ClearCase,
Perforce, Dimensions at the time) through Extensions
(hopefully, a VSS plugin will be available sometime
soon, as we use that). Only played a little with
the much-improved code editor (which also has
a highly configurable code formatter that actually
works, so time to say goodbye to error-prone
Jalopy :-), the new refactoring options which
are equivalent to Eclipse now, much faster than
in 10.1.2 plus *they actually work* (the old
'rename class' feature usually detected only
half of the references and was limited to Java
files) and imported a larger Struts/Tiles/Spring-
based web project; works like a charm :-)

-- Chris


- Original Message - 
From: Néstor Boscán [EMAIL PROTECTED]

To: 'Struts Users Mailing List' user@struts.apache.org
Sent: Tuesday, September 20, 2005 9:22 PM
Subject: RE: [OT] Re: JDeveloper 10.1.3 Early Access


Hi Dave

Haven't got the time to see how it works. I have worked we JDeveloper 9.0.3
and 10.1.2 with CVS. In this new release after I installed it it stored
every version of my source files, I don't really know how this mechanism
will work with CVS.

Regards,

Néstor Boscán

-Mensaje original-
De: Dave Newton [mailto:[EMAIL PROTECTED]
Enviado el: Tuesday, September 20, 2005 2:37 PM
Para: Struts Users Mailing List
Asunto: [OT] Re: JDeveloper 10.1.3 Early Access

Néstor Boscán wrote:


2.- Source Control without the use of CVS.



How does it implement SCM? If you use JDeveloper for SCM does that preclude
other IDE usage?

Dave



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



JDeveloper 10.1.3 Early Access

2005-09-20 Thread Christian Bollmeyer

Hi,

just wanted to drop some note that finally
Oracle put the EA version of the upcoming
JDeveloper 10g release on OTN. Only had
little time for evaluation so far, but as far
as I can tell by now, the thing really rocks.

http://www.oracle.com/technology/software/products/jdev/index.html

-- Chris

It even supports JGoodies FormLayout (Swing) ?!!



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: new Struts tools for layout other than Tiles

2005-09-16 Thread Christian Bollmeyer

?? What's wrong with Tiles? It's a part of Struts since
then and still under active development.

http://svn.apache.org/viewcvs.cgi/struts/tiles/

-- Ch.

- Original Message - 
From: ??? [EMAIL PROTECTED]

To: Struts Users Mailing List user@struts.apache.org
Sent: Friday, September 16, 2005 4:38 PM
Subject: new Struts tools for layout other than Tiles


on the web page Tiles developer,
http://www.lifl.fr/~dumoulin/tiles/

It stopped development after 2002.

Any new tools of OpenSource which keeps on going?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DAOs in service methods

2005-09-01 Thread Christian Bollmeyer

Hi,

my suggestion would be to have a closer look at the
Spring framework. IoC / dependency injection is
really cool once you get a grasp of it. Instead of
having the service look up a DAO instance, you
simply inject the fitting implementation class into
the service via Spring. The service itself only knows
the DAO interface and has a setter property for it.
Note that this way you also have to deal with
shared instances (like with iBATIS DAO)  and
therefore have to keep heed of thread issues, but
luckily Spring also provides template implementations
for most common database access solutions (JDBC,
iBATIS, Hibernate, JDO, Toplink (by Oracle) which
are said (I still have to check that out) to be
inherently thread-safe. Btw. can anybody here
confirm this? Currently, we are probably too
cautious in this direction (using iBATIS).

-- Chris.

- Original Message - 
From: Paul Benedict [EMAIL PROTECTED]

To: user@struts.apache.org
Sent: Thursday, September 01, 2005 6:19 AM
Subject: DAOs in service methods



Hey guys.

I have alot of service objects called from Struts, and
each have a good deal of service methods. Service
methods mainly do business logic and talk to DAO
objects.

Question:
I've taken the approach of service methods having the
responsibility of instantiating DAO objects locally
and using them. Is this correct? Or should I
instantiate all the DAO objects that could ever be
needed in my service constructor, and use them as
instance variables?

Or is there a better design?

Thanks!




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DAOs in service methods

2005-09-01 Thread Christian Bollmeyer
On Thursday 01 September 2005 19:26, Larry Meadors wrote:
 iBATIS is 100% thread-safe.

 Larry


 PS: can you point me to a good example of a Spring-based DAO
 implementation?

Hm...IMHO one good example would be the JPetstore sample
app that comes with the Spring distribution, for instance.
Good in particular, as its not overly complex, plus you can
compare it to the 'traditional' iBATIS JPetStore app. The
architecture has slightly changed (the former 'service'
functionality now rather completely wandered underneath
'domain.logic', in the Facade implementation, which
is IMHO ok in this case, as it's mostly delegating everything
anyway). This is one of the samples I profited the most from
when evaluating Spring. Another good starting point would be
Matt Raible's AppFuse, which is basically for Hibernate and
a little bit more complex. Those two are kind of my 'reference
samples' when it comes to Spring :-) Note that in both cases,
the DAOs are very lean and don't contain any messy
synchronization code.

But IMHO the really cool thing about IoC (not to mention the
AOP functionality) is that you finally can achieve really
loose coupling throughout your entire app, and its simple.
In fact, we could replace virtually anything in our current
app by a different implementation, declaratively (apart
from providing the new implementation class, implemen-
ting the same interface). Another benefit is that Spring
is non-intrusive by design and you can happily stick to
the technology stack you already know it works. For
instance, we still use Struts/Tiles instead of Spring MVC
or JSF. Clearly worth a look, but be warned: if you've
used it once, you won't ever want to go back :-)

-- Chris.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Re: Fired???? was...Re: Struts Books Recommendations [OT]

2005-07-06 Thread Christian Bollmeyer
On Wednesday 06 July 2005 19:48, Rick Reumann wrote:

Hi,

 Daniel Perry wrote the following on 7/6/2005 12:49 PM:
  Hah, it's the business use of web/email they fire you for. Go read
  your terms of employment, and the reference to IT acceptible use
  policy that you inadvertantly agreed to.

 (the below has nothing to do with Mark)..

 For the record, I'm not against an employer firing an employee for
 'whatever' reason they deem fit. If they don't like the way you wear
 your hair, I think they should have the right to fire you if they
 want. (The public also has a right to know about it based on the use
 of the press etc).

Now though I'm clearly not in the position to get fired anytime soon,
I still think as long as I'm doing my job right and don't blame the 
company I work for, what I do in my leisure time is not my
employer's business. Including my haircut, age, religious beliefs
or whatever. What I sell are my skills, work performance and
last but not least a significant part of my lifetime, but neither
my soul nor my private life. In Germany, it's not quite that easy
to get rid of someone who, lets say,  just got older because of
working for you. And I think this is just. Stealing silver spoons,
including deliberately breaking company rules in terms of
e-mail usage and the like is another issue.

 Personally, if I owned a company and someone was using the company
 email domain name to post on sites such as swingers or
 transvestitepride, I think I should have right to terminate his or
 her's employment. What I have a problem with is ...

 1) The inconsistency in what is protected. For example everyone today
 talks about tolerance. But what does this mean? What it ends up
 meaning is There are no moral absolutes so the only valid belief
 system protected is one that doesn't espouse moral judgments. But
 what about being tolerant to the idea that someone might feel
 otherwise?  Why is state sanctioned secularism the only valid
 religion (and yes secularism is a belief system - a religion). It's
 sort of funny that those whom often claim to be the most 'tolerant'
 are often the most vicious when it comes to attacking someone that
 disagrees with their view of tolerance. There are many views I
 could state that would get me labeled as being 'intolerant,' yet,
 somehow it's supposedly not offensive to state All views on X,Y,orZ
 are equally acceptable. To me, and many others, that later position
 can be considered extremely offensive. Why is only one view (secular
 humanism) considered 'non offensive' but other religious views are
 some how bigoted and intolerant. It's pure hypocrisy.

In Germany, in a major part thanks to the US  (I mean it!), religious 
freedom, for instance,  is granted to everyone in our Constitutional
Law (Art. 4 GG). Getting fired just because of one's religious views
is impossible by law. So I, who believes in Jesus Christ as my personal
saviour and follows the Bible as his above-all-worldly-wisdom guide
can happily work together with Hindus and common atheists, in-
cluding my boss. I can even tell them if they're on the road to
eternal doom, the same as they may tell me I'm ridiciously wrong,
and still keep my job. And in fact, the Bible is quite intolerant when
confronted with modern secularism, but what's my choice? As
for general opinions and secular beliefs, we have Art. 5 GG
which grants freedom of speech. So there's no need for
hypocrisy here at all. On the other hand, I definitely never
would use a company e-mail address for anything other
than business communication, and whoever deliberately
chooses to do otherwise may just have to face the fruits
of his dauntness. Or his dumbness, if you will.

 2) Someone taking the time on the list to 'complain' to someone's
 employer. Sure you have the right to do so, but I think it's lame.

Quality never goes out of style, but good manners may. Possibly
a matter of education and attitude. I won't judge.

-- Christian.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Action forwards to a URL outside application

2005-03-01 Thread Christian Bollmeyer
On Monday 28 February 2005 18:47, Shey Rab Pawo wrote:
 I don't know what a bd is but just make your action forward whatever
 you want to forward to.

Now, this may not be too helpful, regardless of whether 'BD'
means Business Delegate or is a typo for 'DB'. In fact, I
would prefer the first alternative, as that would indicate
Patterns usage and proper architecture. Anyhow: one
crucial thing that should come instantly to mind is that
- with Struts or without - forwards (Servlet API) are limited
to the same JVM, often, the same Application context, as
they are handled internally by the server. In any other
case, one has to use a redirect (issuing a HTTP code
that points the browser to the actual target). Then,
there's none of the three scopes available for passing
parameters, so you have to transmit them by ordinary
HTTP means, in this case, as GET parameters appended
to the URL; properly encoded (response.encodeRedirectURL(),
was it?). There is no real problem if you *just* redirect (static),
as there is a redirect attribute to forward in  struts-config.xml.
But this is a 'static' mapping. If you want to transfer dynamic 
parameters to your external application, AFAIK you have to
build the target URL (parameter string appended) yourself,
and I still wonder what may be the best approach in this
case. Options are: 1.) coding the redirect manually
2.) overriding the Struts mapping with the parameter-
enriched target URL at runtime or 3.) taking the basic
URL from the mapping, appending the parameter
thing and then proceed as in 2.) To be honest,
I'm not sure what is best practice in this case, and
in real life, I often just fall back to 1.). Things would
be a lot easier if there were kind of an addParameter()
method somewhere (preferably in the Servlet API,
not in Struts), but there just isn't.

HTH,
-- Chris.

 On Mon, 28 Feb 2005 19:37:06 +0200, Jim Theodoridis [EMAIL PROTECTED] 
wrote:
  Hello
 
  I have an action that takes informations from a BD
  How can I sent that information as parameters to a URL diferent
  than my application?
  etc:
 
  http://www.tera.gr?user=assaasdpassword=21321
 
  ---
 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For
  additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Hibernate and Struts Usage Pattern question/survey

2005-03-01 Thread Christian Bollmeyer
On Tuesday 01 March 2005 22:07, Joe Hertz wrote:
 Curious as to which concept Struts/Hibernate implementers like more
 for implementation:

 #1- Ted Husted's example of Struts and Hibernate. Stick the Hibernate
 Session object into the httpServletRequest. Every action has a fresh
 Hibernate Session raring to go if it needs it. Then again it has it
 even if it doesn't but the Hibernate folks swear that this is
 basically no work for the application. As if the guts of the Session
 object don't really exist until it's first method call.

 #2- Hibernate's Struts plugin concept: Getting Hibernate Sessions
 explicitly in action methods, but stashing them in a ThreadLocal to
 not get any you don't need. If you try to get it again in the same
 thread, you get the one you already had.

 I guess the implies solution here is Rely on the thread destroy()
 method to kill the Session when it aint needed no more

 #3- something else

 Since Hibernate also suggests an approach similar to #1 via a Servlet
 filter anyway, I opt to do it via a Request Processor subclass.

 I'm curious how other people go about it. Anyone ever encounter a
 reason they had to switch?

 -Joe

Just before I go to bed after a long work day: what the heck has
Hibernate or any other Resource Tier means to do with the
presentation layer (Struts)? Hibernate is just for Persistence,
with the details usually isolated from the web tier by (usually
several) additional layers (DAO, Services, Business Delegate
and so on). Hibernate lives in the backend, business logic
comes somewhere on top of that, and the web tier (and Struts
is part of and limited to that) is for presentation purposes
only. If you start to care about Hibernate Sessions in the web
part, you should possibly rethink your architecture.

-- Chris.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Display a form without using .do

2005-02-20 Thread Christian Bollmeyer
On Friday 18 February 2005 19:00, Erik Weber wrote:
 Learn to use (Servlet) path mapping (/something/*) instead of
 extension mapping (*.something).

Hm. Extension mapping is typically safe, while path-prefix
mapping may be *not*. The details are laid out in
Bergsten's 'Java Server Pages' 2nd Edition, p. 262ff.
(O'Reilly, 2002), dealing with the processPath() 
implementation of Struts 1.0.2. Well, though this
might have been changed in the meantime (can
anybody here confirm?), we at least strictly stick
to extension mapping (not always *.do :-) just
for security reasons.

 Erik

-- Chris.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Display a form without using .do

2005-02-20 Thread Christian Bollmeyer
On Sunday 20 February 2005 16:52, Erik Weber wrote:
 Could you elaborate please? Is this a Servlet model security problem,
 one specific to Struts, or one that is only exposed by neglect in
 some other area (which is what I suspect)? This is news to me. I've
 used path mapping all my Java life. I've also posted numerous
 path-mapping strategies on this list (as have others) and never have
 encountered any warnings like this.

Well, after checking, it's actually p. *3*62ff.  There Hans says: The
extension rule, using the expression *.do, is the one that's
recommended for for mapping requests that should be processed
by Struts (after explaining the different kinds of rules (exact match,
longest path prefix, extension). On p. 363, he says, after giving
some example: It turns out, however, that even with a separate
mapping for protected resources, it's easy to bypass the the
access control for a Struts action when you use the path prefix
mapping. I'll show you why in a moment. To avoid security issues,
I recommend you stick to the extension-mapping model. Of
course he shows, as always, from p. 364 on. It all starts with
a simplified version of Struts 1.0.2 code:

protected String processPath(HttpServletRequest request) {
  String path = null; 
  path = request.getPathInfo();
  if ((path != null)  (path.length()  0)) {
return (path);
  }
  path = request.getServletPath();
  int slash = path.lastIndexOf(/);
  int period = path.lastIndexOf(.);
  if ((period = 0)  (period  slash))
path = path.substring(0, period);
  return (path); 
}

Then he goes on: The processPath() method first calls
getPathInfo() on the request object to get the part of the
path that remains after removing the part the container
uses to identify the servlet. For instance, with a path-
prefix mapping such as /ch18/protected/do/* for
the Struts servlet in the deployment descriptor and
a URI such as /ora/ch18/protected/do/StoreMsg, the
getPathInfo() method returns /storeMsg. If it returns
null, it means that an extension mapping is used for the
Struts servlet or that the URI is invalid. If so, the the
getServletPath() method is called to get the complete
context-relative path for the request. With a mapping such
as *.do and a URI such as /ora/ch18/protected/StoreMsg.do,
it returns /ch18/protected/StoreMsg.do. The processPath()
method strips off the extension part and returns the rest
of the path, i.e. /ch18/protected/StoreMsg.

Hence, when you use the path-prefix mapping, only the part
of the URI that comes after the part that identifies the Struts
servlet is returned an subsequently finds a matching action,
while with an extension mapping, the whole context-relative
path is returned and identifies the action. This is what causes
the security problem I mentioned earlier. With the access-
control filter mapped to /ch18/protected/*, and the Struts
servlet mapped to /ch18/do/* and /ch18/protected/do/*,
an adventurous user can access a protected action with a
URI like /ch18/do/storeMsg instead of
 /ch18/protected/do/storeMsg, completely bypassing the
access-control filter. This means the only secure way to
to provide access control for Struts actions when you
use path-prefix mapping is to do the access control
within the actions instead of with a filter. It's easier to
just stick to extension mapping, as I recommended
earlier.

So much for now. Filters aside, I think it's more of
a general configuration trap, and probably things
have been changed sind 1.0.2 anyway. Still, we
at least prefer everything we want to channel
through the Struts servlet have a *.do (or what-
ever unique) ending, regardless of path issues,
as not losing track of mapping details is an ongoing
challenge with larger apps in general, and the
last thing I'd like to care about are additional
security considerations of any kind :-)

HTH,
-- Chris. 

 Thanks,
 Erik

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: newbie question

2005-02-05 Thread Christian Bollmeyer
On Friday 04 February 2005 22:53, Soaring Eagle wrote:

Check the syntax of your struts-config.xml. The one you
posted is heavily mixed up. In fact it's not even well-formed
XML, with odd nestings, closing tags without a start tag,
illegal attributes and the like. I'd recommend to drop the
current version and rebuild it from scratch, using a
working version (like the one from the examples) as
a template. Keep special heed of proper nesting, the
cardinality of elements (0..1 form-beans or
action-mappings sections, for example), correct
attributes and the fact that order is important when it
comes to XML (top-down).

HTH,
-- Chris.

If it were a classloader problem, the server would
tell one by issuing ClassNotFoundException messages
and the like. It has no reason to lie, so missing jar
files are obviously not the cause here.  

 Hello,

 I am trying to write my first Struts application. I keep getting

 SEVERE: Parsing error processing resource path
 /WEB-INF/struts-config.xml Feb 4, 2005 4:45:23 PM EST Error
 HTTP BEA-101216 Servlet: action failed to preload on startup
 in Web application: . javax.servlet.UnavailableException: Parsing
 error processing resource path /WEB-INF/struts-config.xml

[CLIP!]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [ANN] Free JSP Editor for Eclipse (Call jor Jack Dakota!) [FRIDAY]

2005-02-04 Thread Christian Bollmeyer
On Friday 04 February 2005 21:42, Leon Rosenberg wrote:

Well, actually my IDE (Oracle JDev 10g) supports multiple
kinds of projects within one WorkSpace, the web tier being
just one of them. Taglibs may be another issue, business and
backend tiers, too. All those are strictly seperate things. But
for the web part, I just like things being laid out in the project
structure exactly like they'll end up in the war file. What's the
exact benefit of handling things otherwise? Is there really 
no difference between things underneath WEB-INF and other
resources, 'yet another possible environment'? That may be
true, but still, I want to control what lands here and what
there in the build. In fact, before the build, anytime. Not only
on Fridays. Just a matter of taste, I guess, but still.

-- Chris

And yes, I know Ant. 'They came from the Desert'.
Remember that old Amiga game? 

 This is actually the moment i expect Jack Dakota to jump out of the
 bushes

 :-)

 What do you do, if you habe more than one build target?
 How you separate the libs for the stand-alone application or scriplet
 from those
 you need only for taglibs?
 Tell me your jsps aren't packaged as the rest of the code...
 You are probably 'implementing' constant interfaces?

 Forgive me, it's Friday...


 But to be serious again:
 snip
 I like the idea of having all the files related to a project in
 the same parent folder.
 /snip

 I think WEB-INF doesn't belong to the project, since it's neither a
 source nor a configuration file/requirement. It's just part of
 specification of one of possible environments. And by the way,
 hitting ant button in eclipse or a key-shortcut is as fast as hitting
 ctrl-s :-)

 Regards
 Leon

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tiles or Frames or Both

2004-12-07 Thread Christian Bollmeyer
On Tuesday 07 December 2004 17:15, Luiz Esmiralha wrote:
 On Mon, 06 Dec 2004 16:55:43 -0500, Frank W. Zammetti

Hi, 

 When you are starting out you really can't make the decision all by
 yourself, can you? The only reason you presented for using frames is
 increasing performance. If your application doesn't have the huge
 performance requirements that frames can help with, why bother using
 them at all?

Well, I generally hate frames too and rather extensively use Tiles.
Still, there are situations where frames are better suited (IFRAMES,
even), as they can improve user experience. Think of a search
mask, embedded in a Tiles-generated View. The visual design
guys stubbornly require to present the search results being
presented as a 'scroll box', fixed size, scrolling contents, pagers
or anything in this direction are a no-go. Two approaches are
possible: the DIV tag solution where the whole page is
generated again (DIV can be told to scroll if needed), or the
IFRAME alternative which is much more difficult to handle, as
you have to deal with two pages in a single (Tiles-based) View
which you have to keep in sync. For comparison, I implemented
both, and both solutions finally worked as desired. But: while
the single-page DIV tag thing briefly, but still noticably, flashed
upon each requery, with the IFRAME solution, everything except
the 'result window' kept steady, just as in a normal GUI app. So
finally the IFRAME solution won. From a developers's view, I
always would prefer a 'single page' solution, but then, it's
the user who decides if he likes the page or not. I must admit
the IFRAME thing gives a much better user experience, so I
would be reluctant to totally condemn frames. Furthermore,
FRAMES | IFRAMES are the only way to transparently embed
contents from your server into another server's pages
(think of portals written in PHP or the like), which may well
be a point when it comes to monetary things (JSTL provides
a tag suited for such situations, but in my experience, very
few portals actually run on Java, and even fewer of them
are JSTL-capable).

 Cheers,
 Luiz

Cheers,
-- Chris 

NB. But the new JDeveloper 10g Preview is totally cool.
Everybody should at least have a look at it. Go, Oracle
JDev team!

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to render html embedded in a text-area?

2004-08-03 Thread Christian Bollmeyer
On Tuesday 03 August 2004 17:34, John McGrath wrote:

Something possibly even cooler (as long as the client is
IE 5.5+; otherwise, it won't show up) I recently stumbled
over is

http://www.interactivetools.com/products/htmlarea/

which turns a textarea into a configurable WYSIWYG
HTML editor. Easy to use and 'BSD licensed', IIRC.

-- Chris.

 javascript'll preserve line feeds. functions below. to replace
 newlines with br/ tags when submitting, do this:

 html:form action=*.do onSubmit=newlinesToHtml( this );

 then to convert the other way, say when editing the same content, put
 this or something like it at the bottom of the page:

 script language=JavaScript
 !--
 htmlToNewlines( document.forms[0] );
 //--
 /script



 function htmlToNewlines( theForm ) {
   for( var i=0; itheForm.length; i++ ) {
 if( theForm.elements[i].type == textarea ) {
   theForm.elements[i-1].value =
 theForm.elements[i-1].value.replace(/br \//g,'\n');
 }
   }
 }

 function newlinesToHtml( theForm ) {
   for( var i=0; itheForm.length; i++ ) {
 if( theForm.elements[i].type == textarea ) {
   theForm.elements[i-1].value =
 theForm.elements[i-1].value.replace(/\n/g, 'br/');
 }
   }
 }




 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Monday, August 02, 2004 9:24 PM
 To: Struts Users Mailing List
 Subject: Re: How to render html embedded in a text-area?







 Looks like I went a bit over the top with the embedded html proposal.

 It seems the users would be content if whatever they'd keyed into a
 text-area looked the same when subsequently re-displayed as text in a
 document.

 ie just preserve the line-feeds, no need for bolding etc.

 Any ideas?

 If you want someone to see the visualized text as they are typing,
 you're going to need something like a rich text component that
  does that sort of thing in JavaScript.  The standard HTML
  textarea element
 
 that Struts uses doesn't help you, even if the HTML elements are
 literally embedded.
 
 If you are taking content and then literally embedding it in your
  page with something like bean:write, you can turn off the
  filtering by saying filter=false in the attributes of this tag. 
  Be aware, however, that in doing so *you* are taking responsibility
  for avoiding cross site scripting attacks from potentially
  malicious users that try to embed JavaScript markup.  Most likely,
  you'll need to scan the text and only allow HTML elements that are
  reasonably harmless (like b).
 
 
 Craig
 
  Hi All,
 
  I have a struts app that lets users input into text-areas.
  Whatever the user entered will later be displayed as text. To give
  users some control over presentation, I'd like to allow them to
  enter html directly into a text-area. Struts appears to convert
  all html to harmless displayable text, so that hr appears quite
  literally as 'hr' rather than as a horizontal line.
 
  How can I allow users to input effective html?  And is there any
  way I

 can

  ring-fence what they enter, so that any html errors they make
  don't

 bring

  the whole page down?

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSF vs Struts

2004-07-18 Thread Christian Bollmeyer
On Sunday 18 July 2004 19:08, Craig McClanahan wrote:

+1. But one thing I always wondered about, and as you
brought the term into play here: 

 I suspect Bryan might be confusing particular tools (i.e. Sun Java
 Studio Creator, deliberately aimed at corporate developers) with the
 underlying technology of JSF (which is already being supported across
 a wide variety of traditional Java-developer-oriented tools).

What exactly is officially to be considered a 'corporate developer'? 
Honestly, for I don't know. The common VB guy who neither cares
nor even knows much apart from 'point-and-click and it's done,
obviously'?

-- Chris. 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Newbie-Q regarding tiles

2004-06-05 Thread Christian Bollmeyer
On Friday 04 June 2004 18:42, vpsangeetha wrote:

You can't directly access Tiles definitions from
your JSPs, but have to wrap them into Struts
actions (in struts-config.xml) like this:

action path=/login forward=loginPage/

Then call login.do, and it will work.

HTH, 
-- Chris.

 Hi,

 I have a very basic question wrt tiles. I have a tiles-def.xml
 defined in the /WEB-INF/ directory with 1 of the definitions being

 definition name=LoginPage extends=baseDef
 put name=body value=/login.jsp/
 /definition

 I want the first page of my application to use this definition. So in
 my web.xml, I define the welcome file and all this file has is

 logic:forward name=login /

 In the struts-config.xml, I have

 global-forwards
   forward name=login path=LoginPage /
 /global-forwards

 But I get the error
 HTTP ERROR: 404 /alarmagent/LoginPage Not Found

 Any idea why this is happening? And does anyone know a way around it?

 Thanks  sorry if the q is very trivial.
 Sangeetha.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] JSF Tutorial

2004-06-01 Thread Christian Bollmeyer
On Tuesday 01 June 2004 23:07, snpe wrote:
 You try http://horstmann.com/corejsf/

One of my favorite Java authors. Just to drop
a note Sun has released JSF RI 1.1 just recently,
so it might be time for an update again :-)

http://java.sun.com/j2ee/javaserverfaces/download.html

-- Chris

 regards

 On Tuesday 01 June 2004 12:47 pm, Michael McGrady wrote:
  Anyone have a good manual, tutorial, etc. on JavaServer Faces they
  would recommend?  I saw the O'Reilly book, but it was a bit pricey,
  I thought.  I paged through the book a bit, though, and became
  convinced that this is a direction to take.  Thanks.  Michael
 
 
 
  ---
 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For
  additional commands, e-mail: [EMAIL PROTECTED]

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:form

2004-04-18 Thread Christian Bollmeyer
On Sunday 18 April 2004 16:30, as as wrote:

Hi,

Thanks for the reply. I am submitting both the forsm...

Probably, but where?

so does only one submitted form end up in the request?

Yes.

Here is my code briefly:
 
 html:form action=principalEdit name=principalForm
 type=com.PrincipalForm    table border=1 width=100%
  tr bgcolor=#EAEAE5
     th align=right
       ID #:
     /th
     td align=left
     html-el:hidden property=ID /
     bean:write name=principal property=ID /
     /td
  /tr
   /table
 /html:form

This form seems to be more or less ok. Don't know
why you chose html-el over html here, but
well.

 html:form action=teachersDisplay name=teachersForm
 type=com.TeachersForm   logic:iterate id=teacher type=Teacher
 name=teachers property=teacher table
 tr

Now check this part:

 td align=center
             bean:write name=td align=center
             bean:write name=driver property=last /
    /td property=last /
    /td

Looks pretty mangled to me; wonder if this compiles
at all. IIRC you mentioned complaints about missing
getters. This part most certainly is the culprit.

 /tr
 /logic:iterate
 /table
 /html:form
 /body
 /html

You can have multiple forms in a page, but only one
of them can be submitted at a time. Therefore, one
usually provides an html:submit with each form
declaration. You can achieve the same with JavaScript,
which you probably do here, but if you say something

document.forms[0].submit();
document.forms[1].submit();

the second line won't be executed anymore, for the
browser has already started a new request.

HTH,
-- Chris. 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Oracle JDev 10g Final (9.0.5.1 build 1605) is out!

2004-04-17 Thread Christian Bollmeyer
On Saturday 17 April 2004 14:13, Erik Price wrote:
 On Apr 14, 2004, at 4:24 AM, Christian Bollmeyer wrote:
  Finally!
 
  http://otn.oracle.com/software/products/jdev/index.html (249MB)
 
  -- Chris

 No MacOSX version?

  :(

Hi Erik,

though MacOS X is not an officially supported platform, it should
still run fine if you have a 1.4.2 JSDK installed. This OTN thread

http://forums.oracle.com/forums/thread.jsp?forum=134thread=221840message=614003

should get you started. From what I can see, people ran
into some minor problems, but that was the preview
version which also had some problems with Linux which
are gone now. I would give it a try. Basically, JDev 10g is
an 'xcopy' install; everything comes in a huge .zip archive
and only has to be extracted to some directory. Then find
the /jdev/bin subdir and check jdev.conf. Uncomment the
line starting with SetJavaHome (in my version, it's line 94)
and change it to pointing at your JAVA_HOME. That should
be it. After all, I'm running the Windows version this way
at home under SuSE 9.0, for I didn't want to download twice,
and I strongly suspect all those different versions just contain
the same files in the end. So I ended up with a surplus
Windows JSDK (in the /jdk subdir) which can be safely
deleted under Linux, but otherwise it runs just perfectly.

HTH,
-- Chris

NB. If you look closer at the /jdev/bin directory, there
even is a mysterious file named jdev-Darwin.conf.
Sounds kind of Apple-related to me :-) 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSTL + isUserInRole

2004-04-17 Thread Christian Bollmeyer
On Friday 16 April 2004 21:58, Paulo Alvim wrote:
 Hi!

 Is it possible to test isUserInRole using JSTL 1.0 (like the struts
 logic present role tag)?

 Thanks in Advance...

 Alvim.

Hi,

AFAIK that's not possible in plain JSTL, so your options
are either to use scriptlets or stick to the logic tags.
An alternative approach would be the ora:ifUserInRole
tag that accompanies Hans Bergsten's excellent JSP book
(O'Reilly). If you don't have it, you can still download
the sources from www.thejspbook.com. Respecting
Hans' copyright, I won't post the code here; all I can
tell is that it's not longer than 42 lines (including
comments).

HTH,
-- Chris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:form

2004-04-17 Thread Christian Bollmeyer
On Saturday 17 April 2004 05:13, as as wrote:
 Hi

 Has anyone implemented two html:form in a same jsp..

 I wish to do this to implement two tables.each table displaying
 values in a row, of a bean...

 so there are two beans...

 for some reason, it gives me error saying it cnat find getter for my
 second bean...though I did add getters and setters for all attributes
 in my struts form class.

 thanks in advance for the help,

 Sam

Hi,

could well be I'm not fully understanding the exact problem again,
but generally, two htlm:forms in a single JSP page are no
problem. The one you submit ends up in the request, and
html:form gets renderered to just a normal HTML form
tag in the end. On to the beans. I'm not sure what kind of
bean you mean here. If it's the form bean (and it's the same
table), try referring to it in your second html:form via
the token you used for the first one. If we're talking about
two different beans here, you have to make sure both of
them are actually there and bear different token names.
In this case, you have to manually create the 'second'
instance and put it in request or whatever scope so that
it can be found.

HTH,
-- Chris.
   

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: still about jsp:include

2004-04-16 Thread Christian Bollmeyer
On Friday 16 April 2004 12:08, Mu Mike wrote:

Hi,

probably I don't fully grok what's your exact
problem. What I get is that you have an iframe
plus a jsp page that's intended to be displayed
there. Forgetting about the iframe for the
moment, let's have a closer look at my.jsp.
I see a form that calls something, but also
an input tag outside the form declaration.
Then, there's JavaScript code that submits
the form. This, even if it works, is improvable
style. input tags should be embedded in
forms, and a button that does a submit
should be specified a such (type=submit).
Doing so would not only relieve you from
being dependant on JavaScript (which always
should be considered as something 'on top'
and not available in a web application, for
the user can easily turn it off), but achieve
the same behavior in a HTML specs compliant
manner. Fix this first. Then, considering the
action declaration, you may successfully update
myjsp.jsp this way, but the iframe on top
may not get aware of the change. You have
to update the whole page and have the iframe
load the fresh content implicitly. Don't know
where the 'session already commited' error
stems from, but this seems to be another
problem and neither related to Struts or
the Servlet API in general. I hate iframes,
but have done them in and out. As I already
started citing www.anwalt4you.com here,
I'll stick to it, and it just happens the SearchEngine
module uses an iframe for displaying seach
results. It definitely works (but also uses
JavaScript :-(, you can look at the HTML 
sources how I did it in the end, for I forgot).
Anyway. All in all, I doubt your problem is
related to JSP includes in any way. If you're in
doubt, we heavily used Tiles, and that is just
a (brilliant) enhancement of the
RequestDispatcher.include() mechanism
which is the basis for the jsp:include
tag as well. But fix the other problems
first.

HTH,
-- Chris.


 I mentioned this problem here days ago, and I asked the difference
 between redirect and forward here yesterday, but I m still at a loss
 to know why I got the exception

 see: my.jsp is my jsp file , it exists in another jsp file which
 refers myjsp.jsp by an
 iframe ,that is iframe src=myjsp.jsp/

 my.jsp

 form name=myform action =/myapp/myaction.do target=_self 
 ...
 /form

 input type=button value=submit onclick=submit()/

 jsp:include page=myhtml.html/


 script
 function submit()
 {
   myform.submit();

 }



 this is my action mapping

 action path=/myapp/myaction
 type=com.mypackage.myaction
 name=myform
 scope=session
 forward name=success path=/myjsp.jsp/
 /action


 the action myaction does nothing than to modify the content of
 myhtml.html so when I forwarded back to myjsp.jsp, it shows different
 content.

 I clicked the button on my jsp page, it throws response already
 committed exception, why?
 and it indeed doest now always throw the exception, but it throws
 actually sometime.


 I really want to know why, can anyone help?

 _
 ÏíÓÃÊÀ½çÉÏ×î´óµÄµç×ÓÓʼþϵͳ¡ª MSN Hotmail¡£  http://www.hotmail.com


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Complex validation

2004-04-15 Thread Christian Bollmeyer
On Thursday 15 April 2004 15:36, Diego wrote:

I admit having but limited experience with Validator,
and DynaActionForm, and the reason for that is
not that it's bad in itself, but I found that complex,
in particular application specific 'dependant' validation
can be performed much easier by using traditional
ActionForms and the validate() method. That said,
I usually validate twice, once in the Presentation
tier and another time in the Business Logic, and
I almost never use or even rely on JavaScript, but
do strict server-side validation for that's a secure
area (while JavaScript can be easily turned off).
IMHO it's preferable to have the user spend an
additional roundtrip in case of inconsistent data
and issue some consolidated warnings in red
than pre-checking on the client tier via JavaScript
which ends up in a nameless message box. So
for me, the Validator generally is a good thing
(and crucial when using DynaActionForms), but
upon finding out it also has definite lackings
when doing complex validation, I dropped the
entire DynaActionForm approach and went
back to traditional ActionForms. For I found
that I finally was spending more time on
Validator XML definitions than it takes to
generate the entire ActionForm class itself
(Oracle JDev and NetBeans have a really
useful Beans editor here) and just code
the necessary validation code by hand.
The advantage is that I can see what's
happening directly in the Debugger instead
of endlessly interpreting log files and
adapting boring XML definitions. But
it's a matter of taste, after all, as always.

HTH,
-- Chris.
 

 Hi everyone. I need to perform conditional validation in one of my
 forms. I have a drop-down list and a text field. The validation
 applied to the text field should be dependent on the value selected
 on the drop-down list. Is this possible, using the Struts validator?
 I've taken a look at the validwhen validator but I don't see how
 could this be done. I want a solution that allows me to use
 Javascript validation.

 Thanks in advance.

 
 This message was sent using IMP, the Internet Messaging Program.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Oracle JDev 10g Final (9.0.5.1 build 1605) is out!

2004-04-14 Thread Christian Bollmeyer
On Wednesday 14 April 2004 10:24, Christian Bollmeyer wrote:
 Finally!

 http://otn.oracle.com/software/products/jdev/index.html (249MB)

 -- Chris

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

And they did a great job indeed. Well, I'm not paid for promoting
Oracle software, but but this is rather close to the IDE I always
wanted. All those litte features that make life so much easier
actually seem to work now (upon briefly testing under Windows
and Linux (home)). Choosing IDEs always is a matter of taste,
and I like the Eclipse, IntelliJ and NetBeans approaches as well,
but well, after all, this definitely might become be me and my
teammates' workhorse for quite some time.

So, Duncan Mills and his entire team should open a bottle
of Champage now, sit back, relax and watch things happen.
From a technical view, 10g beats JBuilder X (among other
'full-featured IDEs') in almost any aspect. The 'productivity
by choice' slogan seems to be quite fitting. Alas. Great job,
guys!

Cheers,
-- Chris.

NB. Still wonder why the release of JDev 10g Production
is *still* not on the OTN home page.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: struts and tiles seem not to like each other

2004-04-10 Thread Christian Bollmeyer
On Saturday 10 April 2004 18:36, Marc Tinnemeyer wrote:

Hi, 

didn't check if your overall configuration is correct, but
the first thing I'd suggest is moving the global-forward
part to a normal ForwardAction like this

action path=/login forward=tiles.login/

and refer to that in your index.jsp:

jsp:forward page=/login.do /

This should work. I never researched why Struts global
forwards don't behave like normal forwards, but one thing
I can say is that they work well when specified inside another
action declaration, but not when being directly invoked.
AFAIK the html:link tag can cope with global forwards,
but well, we use the JSTL throughout nowadays.

HTH,
-- Chris.  

 Hi,

 After diving into the world of struts I decided also to include tiles
 in my app. But there seems to be something that keeps me from doing
 this. Here are the steps I have taken so far:

 checked struts-config.xml for tiles-stuff (as I copied that file from
 struts-blank everything was already there):

 controller
 processorClass=org.apache.struts.tiles.TilesRequestProcessor /

 plug-in className=org.apache.struts.tiles.TilesPlugin
  set-property property=definitions-config
 value=/WEB-INF/tiles-defs.xml /
  set-property property=definitions-debug value=6 /
  set-property property=definitions-parser-details value=6 /
  set-property property=moduleAware value=true /
  set-property property=definitions-parser-validate value=true /
 /plug-in

 From what the docs say that part seems ok (at least to me).

 Step 2 (tile-defs.xml):

 tiles-definitions
 definition name=tiles.login
 path=/pages/layouts/default_layout.jsp put name=header
 value=/pages/header.html /
 put name=content value=/pages/Login.jsp /
 /definition
 /tiles-definitions

 all the files mentioned here are where they belong.

 Step 3 (global-forward):

 As I want my startpage (index.jsp) to forward to a tiles-page I
 created a global-forward in struts-config.xml:

 forward name=login2 path=tiles.login / also tried
 forward name=login2 path=/tiles.login /

 and added a logic:redirect forward=login2 / to my index.jsp.

 So far so good. When I try to access the app. (via index.jsp) I
 receive the following message:
 type Status report
 message /portal/tiles.login
 description The requested resource (/portal/tiles.login) is not
 available.

 btw. portal is the context.

 To me this seems as if struts does not know the tiles definition (or
 at least does not handle it correctly).

 The application runs in a Tomcat 5.0.19 container (struts 1.1), and
 no further error-messages are sent to the logs.


 Maybe somebody knows how to get out of this trouble.

 Thanks in advance.

 Kind regards,
 Marc Tinnemeyer

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Jar order in classpath

2004-04-10 Thread Christian Bollmeyer
On Saturday 10 April 2004 19:24, J.R. Heisey wrote:

Hi,

1. Considering the CLASSPATH issue: 'first come, first
serve'. I would suspect you may have multiple, different
versions of commons.logging in your CLASSPATH.
How that's set up exactly in your environment(s)
(Tomcat uses a separate one), I can't tell from here.

2. IMHO threading issues are not in play here, as
unimplemented interfaces would show up at
compilation stage. Therefore, the version used
by the NetBeans environment obviously implements
the Log interface, while the one used by the
integrated Tomcat does not. Just guessing, 
though. The usual starting point would be
checking /WEB-INF/lib.

HTH,
-- Chris.

 What is the proper order for the jars in the class path.
 Sometimes I get the error
 org.apache.commons.logging.impl.Jdk14Logger.class
 does not implement Log class.
 Sometimes I do not get the error. I can just restart Tomcat and
 the exception goes way. Is there some unsychronized threading
 issue in the startup code?

 I'm running the Tomcat 4.0.6 under NetBeans 3.5.1 with Struts 1.1.
 Any issues there?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Hiding the .do part in the site address

2004-04-09 Thread Christian Bollmeyer
On Friday 09 April 2004 21:33, Erez Efrati wrote:

Already tried s/th like jsp:forward page=/main.do /
in your index.jsp? :-)

HTH,

-- Chris.

 Hi,

 Like all Struts application I have the index.jsp redirecting the user
 client to my home.do struts action.

 Is it possible to get rid of the home.do in the address bar so at
 least in the site home page the site address will show a clean
 address of www.mysite.com http://www.mysite.com/  ?

 Thanks in advance,

 Erez

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: can iframe include files in web-info folder

2004-04-09 Thread Christian Bollmeyer
On Friday 09 April 2004 16:19, dream_and_yang wrote:

No, you can't include such files directly, as the container
forbids direct access to anything underneath WEB-INF.
But of course, you can always wrap test.jsp in a
ForwardAction and set your iframe tag to load
that instead: iframe src=/test.do

HTH,
-- Chris

 1.in my jsp page information.jsp I do this:
  iframe width=100% height=400 frameborder=1 scrolling=Auto
 src=/web-inf/test.jsp but when the Tomcat 5.0 just tell me that
 such page is not available. 2.Then i try another way.
   i created another page called import page,in this page:
   c:import url=${HTMLUrl}/
   %jsp:include page=information.jsp %
   Here HTMLUrl comes from my Struts Action,and refer the URL in want
 to import in the iframe.
   This time,I do get it worked and have HTMLUrl page in the
 iframe,The problem is when the HTMLUrl has changed,The page in the
 iframe didn't changed at the same time.
I use c:out value=${HTMLUrl}/,i can see this also changed.

   Hoping someone to help me,Thank you very much!


 dream_and_yang
 [EMAIL PROTECTED]
 2004-04-09

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: html:text for Date property

2004-04-09 Thread Christian Bollmeyer
On Friday 09 April 2004 21:19, Paul Barry wrote:

Generally, it's a good idea to have only String and boolean
properties in an ActionForm and convert the information
gathered for further processing lateron. For complex
validations (like Dates), I usually check in validate() if
the value entered can be successfully converted via
SimpleDateFormat and do the actual conversion when
populating the VO bean. But you can have 2 properties
in the form as well. 

HTH,
-- Chris.

BTW, as such conversions are needed quite often,
it's a good idea to write a small utility function that
does the conversion check and put it in either
your BaseActionForm or some general utility class.

 Yeah, I guess I could do that.  I think need 2 properties.  I would
 create a dateAsString property, have the form get and set that, and
 then have the getters and setters set and convert the actual Date. 
 This way I can call getDate to get a Date and getDateAsString to get
 it as a formatted String.

 Are their other ways to handle this, so I don't need 2 properties?

 Slattery, Tim - BLS wrote:
 ActionForm has a object that has a Date property that I want to
  set.
 
 So I have
 
 html:text property=object.date
 
 If I populate the that property in the Action like this:
 
 MyObject obj = new MyObject();
 obj.setDate(new Date());
 form.setObject(obj);
 
 The html:text tag does a toString() on the object.date property. 
  How can I get it to display in the MM/DD/ format instead?
 Likewise, how
 do I make it so the user can enter a date in the format of
  MM/DD/ and have it correctly set the Date property?
 
  I'd have the getter format the Date as a string (use
  SimpleDateFormat.format(), you can specify any of a wide variety of
  formats). Likewise, the setter should accept a string and use
  SimpleDateFormat.parse() to turn it into a Date. If parse() returns
  null then the String could not be turned into a Date, and you need
  to display an error message.
 
 
  ---
 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For
  additional commands, e-mail: [EMAIL PROTECTED]

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Hiding the .do part in the site address

2004-04-09 Thread Christian Bollmeyer
On Friday 09 April 2004 21:56, Wendy Smoak wrote:
  From: Christian Bollmeyer [mailto:[EMAIL PROTECTED]
  Already tried s/th like jsp:forward page=/main.do /
  in your index.jsp? :-)

 But then the URL will still have 'index.jsp' in it, at least if
 Tomcat is involved.  IIRC, Tomcat redirects to the welcome page, so
 there's going to be something on the URL after the domain name.

 I think this is more a function of what HTTP server and Servlet
 Container you're using than something to do with Struts.

Nope :-) This is the complete index.jsp file from
www.christianbollmeyer.de:

%@ page contentType=text/html; charset=ISO-8859-1 session=false %
jsp:forward page=/main.do / 

which runs on Resin. But I used the same approach
e.g. for www.anwalt4you.com which runs on Tomcat
(5, but we didn't use Servlet 2.4 features which
IIRC enable one to use a welcome file that doesn't
physically exist, such as a Struts .do action, just to
note). The mechanism itself is independent from
container implementations: as a forward doesn't
change the browser URL, you can just enter
www.christianbollmeyer.de and it sticks to that, 
though main.do and Tiles do the actual job. If you
invoke the above URL by explicitly specifying
index.jsp (or main.do), the same is true, of course,
but after all, that's just how it should work.

-- Chris.

Just to make sure: of course, I added index.jsp
to the welcome-file list (web.xml). The only
reason why I have it at all is the circumstance
that the welcome file has to be a physical one.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Hiding the .do part in the site address

2004-04-09 Thread Christian Bollmeyer
On Friday 09 April 2004 22:42, Craig McClanahan wrote:
 Wendy Smoak wrote:
 From: Christian Bollmeyer [mailto:[EMAIL PROTECTED]
 Already tried s/th like jsp:forward page=/main.do /
 in your index.jsp? :-)
 
 But then the URL will still have 'index.jsp' in it, at least if
  Tomcat is involved.  IIRC, Tomcat redirects to the welcome page, so
  there's going to be something on the URL after the domain name.
 
 I think this is more a function of what HTTP server and Servlet
 Container you're using than something to do with Struts.

 Whether the container does a forward or a redirect is container
 dependent ... IIRC Tomcat 5 went back to using a forward for this.

 Craig

Thanks - learned something new :-) Well, so Resin, Oracle iAS,
Orion and Tomcat 5 do a forward, while Tomcat 4.1.27 seems to do
a redirect indeed. Strangely enough, Hans Bergsten's LWS 3
(which is built on the TC 4.1.27 core) does not. But it's too late 
tonight for further investigation :-)

-- Chris.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Struts with Tomcat and Apache

2004-04-09 Thread Christian Bollmeyer
On Friday 09 April 2004 21:55, Ralf Schneider wrote:

Hi,

I've experimented with the same setup some time
ago and found this helpful:

http://cymulacrum.net/writings/tomcat5/c831.html

HTH,
-- Chris.

NB. Luckily, there are binary versions of mod_jk2
available now, so you can skip the first part 
(http://www.apache.de/dist/jakarta/tomcat-connectors/jk2/binaries/)

 Hi,

 I'm new to Struts and I'm trying to install Struts 1.1 with Tomcat
 5.0.16 and Apache 2.0.48. The documentation only talks about Tomcat
 3.x.

 My first try was to follow these instructions for Tomcat 3.2.1. I
 copied the war files included with the binary distribution into the
 webapps directory of my Tomcat installation. Then I restarted Tomcat,
 but the file tomcat-apache.conf is not generate as described in the
 docs.

 So, I assume the installation works a bit different with these newer
 versions, but how? I that described anywhere? And if yes, where?

 Any hint would be apreciated,
 Ralf.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]