Author Login
Post Reply
user Digest 25 Mar 2008 20:37:25 -0000 Issue 7943
Topics (messages 184584 through 184609):
Error occurs in WebSphere - validatation.js not found in /struts/template/css_xhtml
184584 by: Yao Chen
184585 by: mgainty.hotmail.com
184586 by: Yao Chen
About Message Icons
184587 by: Chen Chunwei
184588 by: Chris Pratt
184589 by: Chen Chunwei
184590 by: Chris Pratt
184591 by: Chen Chunwei
184592 by: Chris Pratt
184593 by: Chen Chunwei
184606 by: Laurie Harper
How to eliminate an entry from an array with s2 tags
184594 by: Ezequiel Puig
184595 by: Dave Newton
Re: Multiple Select
184596 by: Antonio Petrelli
Re: Multiple Selects and optionsCollection
184597 by: Antonio Petrelli
HashMap and updates
184598 by: Kalpesh Modi
Re: Running a prepare method before the assigned action method
184599 by: meeboo
Re: Actions/DAO interaction getting messy...
184600 by: Eric D Nielsen
Javascript error using struts select tag
184601 by: Joe Yuen
Re: struts 2 jsf plugin problem
184602 by: Daniel
Re: [struts] Running a prepare method before the assigned action method
184603 by: Dale Newfield
Problem with dojo loading dynamic html source
184604 by: cree
184605 by: Dave Newton
Re: Actions not called from their expected forms
184607 by: Laurie Harper
How to implement browsing history
184608 by: Andriy Kharchuk
184609 by: Chris Pratt
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_184584.ezm (zipped)Hi,
When I deploy struts2-showcase.war to WAS 6.1 and open in browser, it
complained some .js files not found, such as dojo.js, ntify.js. And I click
"Validation -> Client using css_xhtml" there's more .js file not
found(Validation), the same error happend when I deploy my application into
WAS. In Firebug I found validation.js but a error message like "Error 404:
SRVE0190E: File not found: /struts/css_xhtml/validation.js" in the end
of it.
Is anybody got the same error?

Attachment:
user_184585.ezm (zipped)all of the .js files are in the main struts jar
did you check \WEB-INF\lib\struts2-core-2.0.11.jar?
Martin
----- Original Message -----
Wrom: HSCRTNHGSWZIDREXCAXZOWCONEUQZAAFX
To: <user@(protected)>
Sent: Monday, March 24, 2008 8:58 PM
Subject: Error occurs in WebSphere - validatation.js not found in
/struts/template/css_xhtml
> Hi,
> When I deploy struts2-showcase.war to WAS 6.1 and open in browser, it
> complained some .js files not found, such as dojo.js, ntify.js. And I
click
> "Validation -> Client using css_xhtml" there's more .js file not
> found(Validation), the same error happend when I deploy my application
into
> WAS. In Firebug I found validation.js but a error message like "Error 404:
> SRVE0190E: File not found: /struts/css_xhtml/validation.js" in the end
> of it.
> Is anybody got the same error?
>

Attachment:
user_184586.ezm (zipped)Yes, I'm already check my application and struts2-showcase...
I don't know why WAS can't found validataion.js in struts2-core.jar, because
I see validation.js in Firebug... and If I change container from WAS to
others like jetty or tomcat, it works fine...
BTW... My WAS version is 6.1.0.0, do I need some fixpack?
On 3/25/08, mgainty@(protected):
>
> all of the .js files are in the main struts jar
> did you check \WEB-INF\lib\struts2-core-2.0.11.jar?
>
> Martin
> ----- Original Message -----
> Wrom: HSCRTNHGSWZIDREXCAXZOWCONEUQZAAFX
> To: <user@(protected)>
> Sent: Monday, March 24, 2008 8:58 PM
> Subject: Error occurs in WebSphere - validatation.js not found in
> /struts/template/css_xhtml
>
>
> > Hi,
> > When I deploy struts2-showcase.war to WAS 6.1 and open in browser,
> it
> > complained some .js files not found, such as dojo.js, ntify.js. And I
> click
> > "Validation -> Client using css_xhtml" there's more .js file not
> > found(Validation), the same error happend when I deploy my application
> into
> > WAS. In Firebug I found validation.js but a error message like "Error
> 404:
> > SRVE0190E: File not found: /struts/css_xhtml/validation.js" in the end
> > of it.
> > Is anybody got the same error?
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_184587.ezm (zipped)Hi all,
Is there any tag can be used to display message icons? I mean icons like alert, error, info and etc.
Talos

Attachment:
user_184588.ezm (zipped)On Mon, Mar 24, 2008 at 10:03 PM, Chen Chunwei
<out-chenchunwei@(protected):
> Hi all,
>
> Is there any tag can be used to display message icons? I mean icons like alert, error, info and etc.
>
> Talos
<img src="images/alert.gif" />
(*Chris*)

Attachment:
user_184589.ezm (zipped)Er... I mean custom tags for free.
----- Original Message -----
From: "Chris Pratt" <thechrispratt@(protected)>
To: "Struts Users Mailing List" <user@(protected)>
Sent: Tuesday, March 25, 2008 1:26 PM
Subject: Re: About Message Icons
On Mon, Mar 24, 2008 at 10:03 PM, Chen Chunwei
<out-chenchunwei@(protected):
> Hi all,
>
> Is there any tag can be used to display message icons? I mean icons like alert, error, info and etc.
>
> Talos
<img src="images/alert.gif" />
(*Chris*)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_184590.ezm (zipped)On Mon, Mar 24, 2008 at 10:45 PM, Chen Chunwei
<out-chenchunwei@(protected):
> Er... I mean custom tags for free.
>
What should this custom tag do that the free <img> tag doesn't do?
(*Chris*)

Attachment:
user_184591.ezm (zipped)Maybe some pre-defined style of message display or something else.
I know I can do these all myself. But if there's already something can do this, why not just use it?
----- Original Message -----
From: "Chris Pratt" <thechrispratt@(protected)>
To: "Struts Users Mailing List" <user@(protected)>
Sent: Tuesday, March 25, 2008 1:43 PM
Subject: Re: About Message Icons
On Mon, Mar 24, 2008 at 10:45 PM, Chen Chunwei
<out-chenchunwei@(protected):
> Er... I mean custom tags for free.
>
What should this custom tag do that the free <img> tag doesn't do?
(*Chris*)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_184592.ezm (zipped)On Mon, Mar 24, 2008 at 10:58 PM, Chen Chunwei
<out-chenchunwei@(protected):
> Maybe some pre-defined style of message display or something else.
>
> I know I can do these all myself. But if there's already something can do this, why not just use it?
>
There are the <s:actionerror>, <s:actionmessage>, and <s:fielderror>
tags, but I don't believe they use any standard images. You might
look into the theme support built into Struts2, you may be able to
define your own theme that includes the proper images in the above
tags.
(*Chris*)

Attachment:
user_184593.ezm (zipped)Thanks Chris
----- Original Message -----
From: "Chris Pratt" <thechrispratt@(protected)>
To: "Struts Users Mailing List" <user@(protected)>
Sent: Tuesday, March 25, 2008 2:01 PM
Subject: Re: About Message Icons
On Mon, Mar 24, 2008 at 10:58 PM, Chen Chunwei
<out-chenchunwei@(protected):
> Maybe some pre-defined style of message display or something else.
>
> I know I can do these all myself. But if there's already something can do this, why not just use it?
>
There are the <s:actionerror>, <s:actionmessage>, and <s:fielderror>
tags, but I don't believe they use any standard images. You might
look into the theme support built into Struts2, you may be able to
define your own theme that includes the proper images in the above
tags.
(*Chris*)
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_184606.ezm (zipped)Chris Pratt wrote:
> On Mon, Mar 24, 2008 at 10:58 PM, Chen Chunwei
> <out-chenchunwei@(protected):
>> Maybe some pre-defined style of message display or something else.
>>
>> I know I can do these all myself. But if there's already something can do this, why not just use it?
>>
>
> There are the <s:actionerror>, <s:actionmessage>, and <s:fielderror>
> tags, but I don't believe they use any standard images. You might
> look into the theme support built into Struts2, you may be able to
> define your own theme that includes the proper images in the above
> tags.
> (*Chris*)
You could also use the cssClass/cssStyle/etc attributes with those tags
rather than customizing the templates, though customizing the templates
is probably easier if you aren't using the simple theme (and therefore
aren't using those tags to render error messages yourself).
L.

Attachment:
user_184594.ezm (zipped)Hi,
in my jsp, i have an array of ids and i will like to remove one of that
ids using s2 tags:
I have tried the following, but it doesn't work :(
<s:set name="allIDs" value="#parameters.productCode"/>
<s:set name="newID" value=""/>
<s:iterator value="#allIDs" status="stat">
<s:set name="myID" value="top"/>
<s:if test='%{ idToRemove != #myID }'>
<s:set name="newID[#stat]" value="#myID"/>
</s:if>
</s:iterator>
Does anyone know how to do it ?
thanks.
Ezequiel.

Attachment:
user_184595.ezm (zipped)--- Ezequiel Puig <e.puig@(protected):
> in my jsp, i have an array of ids and i will like to remove one of that
> ids using s2 tags:
>
> I have tried the following, but it doesn't work :(
> <s:set name="allIDs" value="#parameters.productCode"/>
> <s:set name="newID" value=""/>
> <s:iterator value="#allIDs" status="stat">
> <s:set name="myID" value="top"/>
> <s:if test='%{ idToRemove != #myID }'>
> <s:set name="newID[#stat]" value="#myID"/>
> </s:if>
> </s:iterator>
>
> Does anyone know how to do it ?
Depending on the underlying collection type you might get an exception.
You're not removing anything in the above code anyway, you're replacing a
value. You're also using the "status" value like it's an index, but it's not
[1].
But why? You'd have to work hard to convince me that the JSP is the place to
do something like that.
Dave
[1]
http://struts.apache.org/2.0.11.1/struts2-core/apidocs/org/apache/struts2/views/jsp/IteratorStatus.html

Attachment:
user_184596.ezm (zipped)2008/3/22, Thangalin <Thangalin@(protected)>:
>
> <html:select property="<%= select_name %>" multiple="true" size="5"
> styleClass="filter">
Does "select_name" have the value "fiscal_year"?
Antonio

Attachment:
user_184597.ezm (zipped)2008/3/24, Tom Holmes Jr. <tom@(protected)>:
>
> The number of combo-boxes will change dynamically ... based on previous
> information.
I think that, in your case, you need to manage HttpServletRequest parameters
directly. There's nothing wrong with it :-)
Antonio

Attachment:
user_184598.ezm (zipped)Hi,
I am having a problem in updates.
I have a base class Employee.java. I have subclasses HourlyEmployee.java, ContractEmployee.java, FullTimeEmployee.java.
I display these three types of employees under 3 tabs on my JSP.
I create 3 lists for each type of employees and put these lists in a HashMap with different keys.
Map employeeMap = new HashMap();
employeeMap.put ("HE", hourlyEmployeeList);
employeeMap.put ("CE", contractEmployeeList);
employeeMap.put ("FE", fullTimeEmployeeList);
I am able to display the list of employees properly. But when I change the values and submit the form, the new values dont show up in the action.
Can anyone help please.
Thanks.
---------------------------------
Never miss a thing. Make Yahoo your homepage.

Attachment:
user_184599.ezm (zipped)
Still no solution to this problem. How come parameters in actions with
wildcards (for example myapp/modelObject/*) aren't parsed in the prepare
method? They work fine when I parse them in my assigned action method :(
meeboo wrote:
>
> Hey again
>
> I'm posting via nabble, and it seems to strip out my wildcards, basically
> my action looks like this now
>
> <action name="update/modelObject/*"
> class="net.schemer.web.ObjectModelActions">
> <interceptor-ref name="paramsPrepareParamsStack"/>
> < param name= " id " > { 1 }
> <result>/models/objectModel/update.jsp</result>
> </action>
>
> Hopefully this is viewable.
>
>
> newton.dave wrote:
>>
>> --- meeboo <deepstar@(protected):
>>> won't work with a wildcard parameter mapping Dave
>>>
>>> <action name="update/modelObject/*"
>>> class="net.myapp.web.ModelObjectActions"
>>> method="update">
>>
>> Your first post didn't have a wildcard mapping.
>>
>>> The parameter simply isn't parsed in the prepare method unless it's in
>>> the
>>> form of update/modelObject.action?id=22
>>
>> Do you mean parsed by the parameter interceptor?
>>
>>> this is what I'm currently doing
>>> update/modelObject/22.action
>>>
>>> The parameter is parsed in the update method, but not in the prepare
>>> method
>>
>> Are you using the standard action mapper? Any plugins?
>>
>> The mapping you posted in your follow-up message did not come through
>> properly; please make sure you're sending plain-text messages. This is
>> what I
>> saw:
>>
>>> <action name="update/user/*"
>>> class="net.myapp.web.UserActions">
>>> <interceptor-ref name="paramsPrepareParamsStack"/>
>>> {1}
>>> <result>/models/user/update.jsp</result>
>>> </action>
>>
>> I don't really know what you're trying to do or how you're going about
>> trying
>> to do it.
>>
>> Dave
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>>
>
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_184600.ezm (zipped)I'm starting to get some rather stinky code in one of my projects and wanted to
ask for some advice. (
Its a Struts2/Spring2/JPA(Hibernate) based project. I'm using a slightly
modified version of the Generic DAO pattern shown in the Java persistence with
Hibernate book and/or the IBM ThoughtWorks very similar example. (Modified to
allow Spring Based Injection of the JPA EntityManger, while falling back to a
native Hibernate session inside the DAOs to allow a few more optimizations).
So its basically
Business Objects (POJOs) <---1:1---> DAOs
which is a relatively normal pattern I beleive.
Now I'm working on an Action that creates an object that contains lots of
references to other objects. A bug tracker would be a reasonable facsimile of
my domain object -- when creating a bug, you select a severity, a project, a
module, a found in version, possibly you're assigning it to someone, etc. Most
of these options come from a drop-down on the view page, however they are all
backed by their own domain object -- ie its not just id/string display name
lookup-table backing the drop down.
So the form submits a whole suite of IDs or String natural keys and I need to
build an Defect/Bug and then persist it. In building the Defect I need to
convert all the keys to domain objects. This is where things begin to fall
apart. To covert the keys to domain object seems to require injecting all the
subordinate object DAOs into the Action, its not a big deal but its starting to
feel like the subordinate DAOs are taking over the action. Furthermore, its
slightly annoying from a performance stand-point that I need to retrieve all
the objects from the DB, just to set a foreign key -- I will never be updating
the details on the subordinate object from the master only changing which one
I'm linked to. [As a side issue: this is a place where the Get (returning a
proxy/lazy load thunk with only the ID set without hitting the DB) versus Load
could be useful, but I've never seen any of the generic DAO approaches expose
that level of control in their API -- does anyone know why?]
Here's an example (not from live code, please ignore any minor typos)
representing the current state of application and test code. Afterwards I'll
list a few of the approaches I've considered for cleaning it up:
AddBug.java
code:
public class AddBug extends ActionSupport {
private BugDAO bugService;
private UserDAO userService;
private ProjectDAO projectService;
private ModuleDAO moduleService;
private VersionDAO versionService;
private String submitterUsername;
private String assigneeUsername;
private Long projectID;
private Long moduleID;
private List<Long> affectedVersionIDs;
public String execute() {
Bug bug = new Bug();
// The following lines are what feel unclean to me
bug.setSubmitter(userService.findByUsername(getSubmitterUsername()));
bug.setAssignee(userService.findByUsername(getAssigneeUsername()));
bug.setProject(projectService.find(getProjectID()));
bug.setModule(moduleService.find(getModuleID()));
for( Long versionID : getAffectedVersionIDs()) {
bug.addAffectedVersion(versionService.find(versionID));
}
bugDAO.persist(bug);
return SUCCESS;
}
// This block of setters also seems to be wrong... Only the first one
// should really be required by this action I think....
public void setBugService(final BugDAO bs) {bugService=bs;}
public void setUserService(final UserDAO us) {userService=us;}
public void setProjectService(final ProjectDAO ps) {projectService=ps;}
public void setModuleService(final ModuleDAO ms) {moduleService=ms;}
public void setVersionService(final VersionDAO vs) {versionService=vs;}
public void setSubmitterUsername(final String username)
{submitterUsername=username;}
public void setAssigneeUsername(final String username)
{assigneeUsername=username;}
public void setProjectID(final Long id) {projectID=id;}
public void setModuleID(final Long id) {moduleID=id;}
public void setAffectedVersionIDs(final List<Long> ids)
{affectedVersionIDs=ids;}
public String getSubmitterUsername() {return submitterUsername;}
public String getAssigneeUsername() {return assigneeUsername;}
public Long getProjectID() {return projectID;}
public Long getModuleID() {return moduleID;}
public List<Long> getAffectedVersionIDs() {return affectedVersionIDs;}
}
TestAddBug.java
(Sorry this is purely from memory so I know I'm missing some of my
infrastructure)
code:
....
public void testAddBug() {
String submitterUsername="TestUser";
String assigneeUsername="TestVictim";
User submitter=new User(submitterUsername);
User assignee=new User(assigneeUsername);
UserDAO userService = createMock(UserDAO.class);
expect(userService.findByUsername(submitterUsername)).andReturn(submitter);
expect(userService.findByUsername(assigneeUsername)).andReturn(assignee);
Long projectID =1L;
Project project = new Project(projectID,"Some Projectname");
ProjectDAO projectService = createMock(ProjectDAO.class);
expect(projectService.find(projectID)).andReturn(project);
Long moduleID=1L;
Module module = new Module(moduleID,"Some ModuleName");
ModuleDAO moduleService = createMock(ModuleDAO.class);
expect(moduleService.find(moduleID)).andReturn(module);
Long versionOneID=1L;
Long versionTwoID=2L;
Version versionOne = new Version(versionOneID,"A Version");
Version versionTwo = new Version(vertionTwoID,"Another Version");
List<Long> versionIDs = new ArrayList<Long>();
List<Version> versions = new ArrayList<Version>();
versionIDs.add(versionOneID);
versionIDs.add(versionTwoID);
versions.add(versionOne);
versions.add(versionTwo);
VersionDAO = versionService = createMock(VersionDAO.class);
expect(versionService.buildVersionlist(versionIDs)).andReturn(versions);
Bug bug = new Bug();
BugDAO bugService = createMock(BugDAO.class);
expect(bugService.persist(bug));
replay(userSerive);
replay(projectService);
replay(moduleService);
replay(versionService);
replay(bugService);
AddBug action = new AddBugAction();
action.setBugService(bugService);
action.setProjectService(projectService);
action.setModuleService(moduleService);
action.setVersionService(versionService);
action.setUserService(userService);
// In reality this would probably be pulled from the session map, but...
action.setSubmitterUsername(submitterUsername);
action.setAssigneeUsername(assigneeUsername);
action.setProjectID(projectID);
action.setModuleID(moduleID);
action.setAffectedVersionIDs(versionIDs);
assertEquals("success",action.execute());
verify(bugService);
verify(userService);
verify(projectService);
verify(moduleService);
verify(versionService);
}
...
OK. Now that you've seen the mess... I've thought of two ways to clean it up:
1) Introduce a business tier between the domain objects and the DAOs. Expose a
buildBug call in this layer that takes in the keys and handles the promotion to
subordinate domain objects. This business tier would need to have all the DAO
injected into it. Actions would still have their most relevant DAO(s) injects,
plus the business tier relevant objects. Testing the business tier would still
require the mess of mocks, but at least the action only needs to mock the
single call on the business tier. However I don't think this approach would
play too well with migrating to a Model-Driven strategy in the future as the
domain objects can't accept the bare keys. I'm also having a hard time figuring
out what type of methods would end up in this layer -- it seems like mostly it
will be these kinds of initial builders... Most of other use cases are either
correctly cascaded/handled by Hibernate (updates/deletes) and the DAOs or they
belong on the POJOs (real business logic)... Leading to a very anemic layer,
which doesn't seem worth the added complexity...
2) Setup a series of type converters to promote the keys to objects on the
incoming HTTP request end of things. The type converters would need access to
the DAOs. Testing them should be rather simple as each singular one is simple.
Testing the action no longer requires mocking the subordinate objects and I can
just use POJOs there. I believe this approach would work with the Model-Driven
idea, but it feels a little odd to me to mark up the domain object with
HTTP-specific details.... then again the domain object is already annotated
with Hibernate/JPA annotations so its not like its really 'pure'.. I've seen
some talk on the mailing list of this approach, but it seems to have some
"black holes" regarding converting back to string for redsplay at times.
Comments, alternate approaches?

Attachment:
user_184601.ezm (zipped)
I am trying to use the <html:select> tag in my jsp page but am getting the following javascript error,
Microsoft JScript runtime error: Object expected.
In my jsp page I have:
<table align="left" class="tableGold">
<tr>
<th align="left" bgcolor="#EEE8AA"><font size="-1" color="#ff0000">*</font><bean:message key="table.head.category"/></th>
</tr>
<tr>
<td align="center" valign="middle" >
<div>
<div style="{float: left;}" >
<html:select styleId="category" property="devicecategoryid" onchange="selectDevOrStent()">
<html:option value=""><bean:message key="select.list.device.category"/></html:option>
<html:options collection="DeviceCategory" property="id" labelProperty="description"/>
</html:select>
</div>
<div id="otherdev" style="{float: left; display: none; font-family: Arial, Helvetica, sans-serif; font-size: xx-small; vertical-align: middle; padding-left: 50px; line-height: 1.2em}">
<html:text property="other" size="35" maxlength="60" onfocus="clearOther()" value = "Enter Device Description" />
</div>
</div>
</td>
</tr>
</table>
Here is the javascript funtion that is called when a onchange event is detected:
function selectDevOrStent(){
alert("In SelectDevOrStent");
var category = id("category").options[id("category").selectedIndex].value;
var categoryText = id("category").options[id("category").selectedIndex].text;
//alert("categoryText = " + categoryText);
if(categoryText == 'Stents'){
//alert("Stent selected");
id("stent").style.display = "block";
id("dev").style.display = "none";
id("otherdev").style.display = "none";
getSelectList("category", "StentManufacturerSelect.do", stentmanufcallback);
}else if(categoryText == 'Joint Replacement'){
//alert("Joint Replacement selected");
document.DeviceInputForm.devicetypeid.disabled='true';
document.DeviceInputForm.manufacturer.disabled='true';
document.DeviceInputForm.modelnumber.disabled='true';
getSelectList("category", "DeviceLocationSelect.do?devicecategoryid=" + escape(id("category").value), locationcallback);
id("dev").style.display = "block";
id("stent").style.display = "none";
id("otherdev").style.display = "none";
}else if(categoryText == 'Other'){
//alert("Other selected");
id("otherdev").style.display = "block";
id("stent").style.display = "none";
id("dev").style.display = "none";
}else{
//alert("Stent not selected");
id("stent").style.display = "none";
id("dev").style.display = "block";
id("otherdev").style.display = "none";
getSelectList("category", "DeviceTypeSelect.do?devicecategoryid=" + escape(id("category").value), devicecallback);
}
}
Everything is fine, I can see the select box and all the options are there but when I trigger a onchange event I get the error. Can anyone see what I am doing wrong?
Thanks.

Attachment:
user_184602.ezm (zipped)I have done that. Every time i get this error. I have no idea why this is
thrown, and i don't know what he wants. Is there no librabry loaded for
parsing the jsf page? I have no idea.
On Mon, Mar 24, 2008 at 4:03 PM, Randy Burgess <RBurgess@(protected):
> I would take everything out of your JSF page and then start adding things
> in
> one by one until you find what is causing the missing the property editor
> error.
>
> Regards,
> Randy Burgess
> Sr. Web Applications Developer
> Nuvox Communications
>
>
>
> > From: Daniel <pdaniel2005@(protected)>
> > Reply-To: Struts Users Mailing List <user@(protected)>
> > Date: Sat, 22 Mar 2008 22:53:09 +0200
> > To: Struts Users Mailing List <user@(protected)>
> > Subject: Re: struts 2 jsf plugin problem
> >
> > At first i have tried to make the portlet only with JSF. Unfortunately
> > Weblogic has some problems , many problems, it's the first time when i
> use
> > weblogic and it's not worthing it's money. After i failed making the
> portlet
> > with pure JSF i said to make a try with struts 2 and jsf plugin. Using
> this
> > method i have reached far than using pure JSF. I will try more to see if
> > there is any hope with this solution.
> >
> > On Fri, Mar 21, 2008 at 5:55 PM, Nils-Helge Garli Hegvik <
> nilsga@(protected)>
> > wrote:
> >
> >> Sorry, no clue. As I said, I have no idea if this combination will
> >> work at all. Maybe someone with JSF experience can point out what's
> >> wrong. At least it looks like the portlet dispatcher has been able to
> >> execute the action, but it's failing with the JSF result.
> >>
> >> You might want to consider creating your portlet with either JSF or
> >> Struts 2 instead of combining them both.
> >>
> >> Nils-H
> >>
> >> On Fri, Mar 21, 2008 at 1:55 PM, Daniel <pdaniel2005@(protected):
> >>> I've done what you have said, unfortunately without results. I still
> >>> receive index.jsp:16:26: No property editor found for the bean "
> >>>
javax.el.ValueExpression".
> >>>
> >>> Any other ideas?
> >>>
> >>>
> >>> On Thu, Mar 20, 2008 at 12:43 PM, Nils-Helge Garli Hegvik <
> >> nilsga@(protected)>
> >>> wrote:
> >>>
> >>>
> >>>
> >>>> First of all, I'm not even sure if it's possible to use the portlet
> >>>> and the jsf plugin at the same time. I have not tried, but there
> >> might
> >>>> be issues with it if they try to do conflicting things in the
> >>>> interceptors and the results.
> >>>>
> >>>>> struts.xml
> >>>>>
> >>>>> <package name="default" extends="portlet-jsf-default"
> >>>> namespace="/view">
> >>>>>
> >>>>> <action name="index" class="com.mycompany.HelloAction">
> >>>>> <interceptor-ref name="basicStack"/>
> >>>>> <interceptor-ref name="jsfStack"/>
> >>>>> <result name="success" type="jsf"/>
> >>>>> <result>/WEB-INF/jsp/view/index.jsp</result>
> >>>>> </action>
> >>>>> </package>
> >>>>>
> >>>>
> >>>> A couple of things here. You're extending portlet-jsf-default, which
> >>>> still has the jsfStack as the default interceptor ref. Since you have
> >>>> defined a "jsf" package that extends "portlet-jsf-default", you
> >> should
> >>>> probably extend the "jsf" package instead. However, it's probably
> >> just
> >>>> as easy configuring the correct interceptor stack and default
> >>>> interceptor ref right there in the "portlet-jsf-default" package. In
> >>>> addition, you're overriding the default interceptor stack in your
> >>>> action definition, so it's not really using the portletDefaultStack,
> >>>> even if you had configured your default interceptor stack correctly.
> >>>> Unless you need to use different interceptors in your action, there's
> >>>> no need configuring those interceptor-refs there.
> >>>>
> >>>> You could also try swapping the order of the portletDefaultStack and
> >>>> the jsfStack and see if that makes a difference.
> >>>>
> >>>> Nils-H
> >>>>
> >>>
> >>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >>>> For additional commands, e-mail: user-help@(protected)
> >>>>
> >>>>
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> For additional commands, e-mail: user-help@(protected)
> >>
> >>
>
>
>
> This email and any attachments ("Message") may contain legally privileged
> and/or confidential information. If you are not the addressee, or if this
> Message has been addressed to you in error, you are not authorized to read,
> copy, or distribute it, and we ask that you please delete it (including all
> copies) and notify the sender by return email. Delivery of this Message to
> any person other than the intended recipient(s) shall not be deemed a waiver
> of confidentiality and/or a privilege.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_184603.ezm (zipped)meeboo wrote:
> Still no solution to this problem. How come parameters in actions with
> wildcards (for example myapp/modelObject/*) aren't parsed in the prepare
> method? They work fine when I parse them in my assigned action method :(
If you're using 2.1, there are now a number of ways in which parameters
can be set on your action, each with separate interceptors:
params
actionMappingParams
staticParams
You might need to update your interceptor stack.
-Dale

Attachment:
user_184604.ezm (zipped)
My problem arises when I write out html to a jsp in a way like
out.println("<s:a href...");. Well the <s:a html is built on server side
with theme="ajax" and targets set to a panel div.
The line is similar to <s:a theme="ajax" targets="somePanelDiv"
href="...">Link</s:a>
When dojo renders this source I get an error of:
DEBUG: DEPRECATED: dojo.widget.Manager.getImplementationName Could not
locate widget implementation for "a" in "s.widget" registered to namespace
"s". Developers must specify correct namespaces for all non-Dojo widgets --
will be removed in version: 0.5
DEBUG: dojo.widget.Parse: error:Error: Could not locate widget
implementation for "a" in "s.widget" registered to namespace "s"
This is returned for each link. Now I can confirm that all links that I am
streaming onto the jsp do work, but they work only when statically embedded,
this error is thrown when using out.println.
I looked around to if or how to specify the namespace in this instance, but
one, I couldnt locate any sound sources, and two I am confused on why this
is not a problem when the source is statically placed inside the jsp.
If anyone can lend some inisight on this problem I am having, or a direction
to point me in I would appretiate it.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_184605.ezm (zipped)--- cree <vint@(protected):
> My problem arises when I write out html to a jsp in a way like
> out.println("<s:a href...");. Well the <s:a html is built on server side
> with theme="ajax" and targets set to a panel div.
That's not how things work.
JSPs are compiled (by the container) into a servlet; you don't have a JSP,
you have an output stream, so there's no compilation process, hence no custom
tags will be executed.
Dave

Attachment:
user_184607.ezm (zipped)wwwclaes wrote:
> Hi, we have an S2 application with a lot of actions that are supposed to be
> called from html forms. Since a few weeks ago something or someone has
> started calling these actions directly, hence the required input values are
> missing (which generate a lot of error mails to us administrators).
>
> What might be causing this? Of course, we may have gotten some new, very
> stubborn, users but due to the sudden frequency and pattern of the calls my
> first bet would be some kind of automatic crawler. Some of the actions
> require authentication, so it is not Google & Co. Could some kind of "web
> page prefetching" cause this? Or any other ideas?
>
> Anyway, I guess one solution would be to mark all expected input values as
> required using S2 validation. However, it would be a bit cumbersome and
> repetitive. To keep the application clean, I don't think it would be bad to
> keep its current design with relying on form input values to be there (if
> it's a combo box for instance, of course not for user entered text fields).
> Can you think of some simpler means to stop these errors from occurring and
> still keep it simple and Struts-wise?
If inputs are required they absolutely should be marked as such in the
validation rules. Leaving out such checks leaves you wide open to data
integrity issues at the very least.
As far as figuring out where these 'bogus' requests originate, look at
the referer logs or add some network-level monitoring.
Fixing you validation so error messages go to the users rather than the
administrators is probably the sane solution, though :-)
L.

Attachment:
user_184608.ezm (zipped)Hi guys,
Is there standard or preferable way to enable user to go back when he/she
browses website?
As of now I can think only of caching something like
http://acegisecurity.org/acegi-security/xref/org/acegisecurity/ui/savedrequest/SavedRequest.htmlor
request.getRequestURL()+request.getQueryString() (in case of GET request) in
user session.
Thanks,
Andriy

Attachment:
user_184609.ezm (zipped)On Tue, Mar 25, 2008 at 1:23 PM, Andriy Kharchuk
<andriy.kharchuk@(protected):
> Hi guys,
>
> Is there standard or preferable way to enable user to go back when he/she
> browses website?
> As of now I can think only of caching something like
> http://acegisecurity.org/acegi-security/xref/org/acegisecurity/ui/savedrequest/SavedRequest.htmlor
> request.getRequestURL()+request.getQueryString() (in case of GET request) in
> user session.
>
> Thanks,
> Andriy
>
You might want to look for a breadcrumb solution. That is a very
common way to provide users a path backwards through your site.
(*Chris*)