Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

integration of struts- jsf Problem related t url  RSS feed

Nishita Jain
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am integrating struts jsf application. in that
a page has this kind of url

now when i process that page it gets converted into


this may be because of the page which i process has no jsf tags.
but due to dat i cant do next processing.
Do i have any way that i can get like http://localhost:8080/TestMaster-jsf/SelectTest.faces.

in my struts.config i have
<action path="/SelectTest"

scope="session" >

<forward name="success" path="/jsp/selectTestForUser.faces" />

here i have one more question

here the page goes to selectTestForUser.faces
but originally page has extension like selectTestForUser.jsp
so i m confuse how it has managed to redirect to jsp page.

Luis Felipe Bacca Arango
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Nishita,

First at all, you have to put the code of the pages in the forum so the people can see waht are you doing.

Note that you are using your local address to try to show us your test application, but with that address only you can view the problem.

I integrated struts with jsf so if you show your problem i can help.

Nishita Jain
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello Luis,
thanks for coming forward to help me.

Now here the thing is i didnt ment to check my application with the url i gave. i just want to show you people that how my url change when i have only struts coding in particular page.
the thing is that when i use jsf tags it creates url like
else if i use struts code it creates url as
so i just want to show the url difference.
i want url as.faces but not as .do

i tried one thing that
to combine code i just put faces view code in between struts code. here is my jsp code for that

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/jsf_core.tld" prefix="f" %>
<%@ taglib uri="/WEB-INF/html_basic.tld" prefix="h" %>
<%@ taglib uri="/WEB-INF/struts-faces.tld" prefix="s" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<jsp:include page="header.jsp"/>
<s:loadMessages var="messages"/>
<s:message key="addUser.title" />
<body bgcolor="white">
<font size="6"> <s:message key="addUser.header" /></font>

<h:messages style="color: red"/>

<font color="red"><s:errors /></font>

<s:form id="testBean" action="/SelectTest" >
<html:form action="/SelectTest" method="post" >
<h3><center>Select Test</center></h3>
<table width="100%" cellpadding="3" border="1">
<td><b>Test Name</b></td>
<td><b>Test Description</b></td>
<td><b>Test Creation Date</b></td>
<logic:iterate id="listing" name="listing">
<td><bean:define id="temp" name="listing" property="testId" />
String testid = temp+"";
<bean:write name="listing" property="testName"/></td>
<td><bean:write name="listing" property="description"/></td>
<td><bean:write name="listing" property="testCreationDate"/></td>
<td><html:checkbox value="<%=testid%>" property="selectedTest" /></td>
<html:hidden property="mode" value="SELECTTEST" />
<html:submit value="Save" property="Save" />
<h:commandButton id="submit" type="SUBMIT" value="Submit"/>
<html:button value="Cancel" property="Cancel" />

this code is mess up as i put everything.
when i tried this code the page submits itself without calling any action. i know in this code 2 actions ,2 submit buttons are there . but i was just finding out the solution.
This is it.

Thanks in advance.
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!