How to use ugm:getGroupNamesForUser tag in jsp
when I use the tag in jsp ,run in server,the console write"weblogic.servlet cannot be resolved or is not a field <p><ugm:getGroupNamesForUser username="weblogic" id="weblogic"/>"
I don't how to use it,please tell me,thank you!
I'm not sure why you are getting the console message, but here is how you might use the tag. This will simply print out the list of immediate groups (not parent groups) to which user "weblogic" is a member.
<%@ taglib uri="http://www.bea.com/servers/p13n/tags/userGroupManagement" prefix="ugm" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<ugm:getGroupNamesForUser username="weblogic" id="groupNames"/>
<c:forEach items="${groupNames}" var="groupName">
bq. <c:out value="${groupName}"/>
</c:forEach>
Similar Messages
-
How to use standard JSTL tags in JSP report ?
I've tried to insert <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> on the top of the report
but report developer fails to save and run this report
so how do i use JSTL in web-reports ?I've tried to insert <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> on the top of the report
but report developer fails to save and run this report
so how do i use JSTL in web-reports ? -
How to use the Wire-Tag in Cairngorm 3 Observer Library?
Dear Observer-Lib coders,
Maybe I am posting my issue into the wrong forum, see this thread:
http://forums.adobe.com/thread/756046
I'd like to know how to use the Wire-Tag mentioned in the Observer-Lib docu, see:
http://sourceforge.net/adobe/cairngorm/wiki/HowToUseCairngormObserver/
Please let me know if there is anybody who knows how to use
this Wire-tag. A small code example would be great, too!
Thank you,
masuOk ... I solved it!
see this thread: http://forums.adobe.com/thread/756046 -
How to use the HTML tags in the reports.
hi.
can any one tell me how to use the HTML tags in the reports.
i m using the forms 10 g rel 2 and reports 10 g rel 2 and application server 10g rel 2.Set the Contains HTML Tags property of an object to Yes, then the tags in the object's text (if any) will be used to format the object.
-
How to use debug my jdevloper devloped jsp applications using tomcat 4.0?
hello,
how to use debug my jdevloper devloped jsp applications using tomcat 4.0?
how to run with using tomcat path with browser?
can any one help?
thanks
pullareddyHi Pullareddy,
Charles' answer will work for Servlets in Tomcat, but debugging JSPs is a bit more complicated than debugging Servlets.
Here's what you need to do:
(I don't have Tomcat, so I don't know the details of Tomcat configuration files and I can't guarentee that Tomcat provides the flexibility so that you can configure it for debugging JSPs. Each application server is configured a bit differently. Hopefully you can adjust the following instructions to Tomcat.)
1. You need to replace Tomcat's JSP engine with OJSP and you need to setup debugging parameters for OJSP.
This is not specifically in the JDev documentation, but you may be able to apply the information found in the topic "Remote Debugging in OC4J".
Here are some tips:
A. You'll probably need to specify the following jars in some Tomcat config file: ojsp.jar, ojsputil.jar, xmlparserv2.jar, ojc.jar, and jdev-rt.jar.
B. The OJSP class name is oracle.jsp.runtimev2.JspServlet.
C. The debug parameters are:
debug_mode = true
developer_mode = true
encode_to_java = true
emit_debuginfo = true
jspjavacompiler = oracle.jdevimpl.jsp.JspOjcCompiler
2. You need to make Tomcat start the Java command with debugging options. (This is what Charles was talking about. One of the debug options is -XXdebug). This is in the JDev documentation in the topic "Starting a Java Process in Debug Mode". Please read that documentation help topic.
3. You need to delete any old .java or .class files which were created in the past for your JSP. If you leave old .java or .class files around, then the debugger may not be able to stop at breakpoints in your JSPs. So, be sure to clean up old files.
4. Set your project settings for remote debugging. This is on the Debugger - Remote panel in the Project Settings dialog box. You probably want either Attach to OJVM or Attach to JPDA. Which radio button you choose depends on what command line options you specified in step 2.
-Liz -
How to use h:selectOneRadio tag inside h:dataTable tag
Hi All,
Can any one tell me how to use <h:selectOneRadio> tag inside <h:dataTable> tag and how to get selected radio button value in bean ?JSF<h:selectOneMenu value="#{myBean.selectedItem}">
<f:selectItems value="#{myBean.selectItems}" />
</h:selectOneMenu>MyBeanprivate String selectedItem;
public String getSelectedItem() {
return selectedItem;
public void setSelectedItem(String selectedItem) {
this.selectedItem = selectedItem;
public List getSelectItems() {
List selectItems = new ArrayList();
selectItems.add(new SelectItem("key1", "value1"));
selectItems.add(new SelectItem("key2", "value2"));
selectItems.add(new SelectItem("key3", "value3"));
return selectItems;
}String selectedItem should contain the key (key1, key2 or key3) when selected. The values (value1, value2 and value3) are the options as shown in the list. -
How to use JAVA APPLET VIEWER in JSP?
i want to use applet viewer in my jsp, but i've no idea how to do this. Now, i'd like to finish the two jobs below with applet viewer:
1. Open a CR Report with applet viewer in a jsp
2. Programmlly pass parameters into the report
thx allI'm not sure why you are getting the console message, but here is how you might use the tag. This will simply print out the list of immediate groups (not parent groups) to which user "weblogic" is a member.
<%@ taglib uri="http://www.bea.com/servers/p13n/tags/userGroupManagement" prefix="ugm" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<ugm:getGroupNamesForUser username="weblogic" id="groupNames"/>
<c:forEach items="${groupNames}" var="groupName">
bq. <c:out value="${groupName}"/>
</c:forEach> -
How to use logic:present tag in struts el tag
Hi
I am trying to use struts el tags in the jsp page.I am struggling with the following exception: Cannot find bean: "result" in any scope.I couldn't understand why this error is coming even i had the property "result" in my ActionForm.
ActionForm:
package com.finocus.cam.struts.bean;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import com.finocus.cam.common.ValidateFormat;
public class DetailsForm extends org.apache.struts.action.ActionForm {
private final static String LOG_TAG = DetailsForm.class.getName() + ".";
private static final long serialVersionUID = 1L;
// VARIABLES DECLARATION
private String name = null;
private String searchField = null;
private String searchCriteria = null;
private String phonenumber = "";
private String email = "";
private List results = null;
private String adminUserName = "";
private String adminUserEmail = "";
public DetailsForm() {
// GETTER AND SETTER METHODS
public String getName() {
return name;
public void setName(String name) {
this.name = name;
public String getSearchCriteria() {
return searchCriteria;
public void setSearchCriteria(String searchCriteria) {
this.searchCriteria = searchCriteria;
public String getSearchField() {
return searchField;
public void setSearchField(String searchField) {
this.searchField = searchField;
public String getEmail() {
return email;
public void setEmail(String email) {
this.email = email;
public List getResults() {
return results;
public void setResults(List results) {
this.results = results;
public String getPhonenumber() {
return phonenumber;
public void setPhonenumber(String phonenumber) {
this.phonenumber = phonenumber;
public String getAdminUserEmail() {
return adminUserEmail;
public void setAdminUserEmail(String adminUserEmail) {
this.adminUserEmail = adminUserEmail;
public String getAdminUserName() {
return adminUserName;
public void setAdminUserName(String adminUserName) {
this.adminUserName = adminUserName;
// DUMPING THE VALUES IN THE CONSOLE
public void dumpValues() {
StringBuffer sb = new StringBuffer();
sb.append("Name'");
sb.append(name);
sb.append("SearchField");
sb.append(searchField);
sb.append("searchCriteria");
sb.append(searchCriteria);
sb.append("'");
sb.append(" ");
System.out.println(sb.toString());
// RESET() METHOD IS USED FOR STORE FORM'S CURRENT VARIABLES DECLARATION
public void reset(ActionMapping actionMapping, HttpServletRequest request) {
System.out.println("reset() method is called");
this.email = null;
this.searchCriteria = null;
this.searchField = null;
this.results = null;
// VALIDATE() METHOD IS USED TO VALIDATE THE FORM DATA
public ActionErrors validate(ActionMapping actionMapping,
HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
System.out.println("Validate()is called");
// Determine if name has been entered.
if (getName() == null || getName().length() == 0
|| getName().equals(" ")) {
errors.add("accountText", new ActionError("searchText.error"));
} else if ((getSearchField().equals("name") == true)
&& (ValidateFormat.isValidText(getName()) == false)) {
errors.add("validAccountName", new ActionError("validName.error"));
if (getSearchField() == null || getSearchField().length() == 0) {
errors.add("accountSearchField", new ActionError(
"searchField.error"));
} else if ((getSearchField().equals("email") == true)
&& (ValidateFormat.isValidEmail(getName()) == false)) {
errors
.add("validAccountEmail", new ActionError(
"validEmail.error"));
} else if ((getSearchField().equals("phonenumber") == true)
&& (ValidateFormat.isValidPhoneNoFormat(getName()) == false)) {
errors.add("validPhoneFormat", new ActionError(
"validPhoneFormat.error"));
if ((getSearchField().equals("searchallfields"))
&& ((ValidateFormat.isValidText(getName()) == false)
&& (ValidateFormat.isValidEmail(getName()) == false) && (ValidateFormat
.isValidPhoneNoFormat(getName()) == false))) {
errors.add("validNameEmail",
new ActionError("validNameEmail.error"));
return errors;
Action class:
package com.finocus.cam.struts.action;
import java.util.ArrayList;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.finocus.cam.db.CAMDbAccess;
import com.finocus.cam.struts.bean.DetailsForm;
public class DetailsAction extends org.apache.struts.action.Action implements
com.finocus.cam.common.CAMConstants {
private final static String LOG_TAG = DetailsAction.class.getName() + ".";
// Global Forwards
public static final String GLOBAL_FORWARD_search = "login";
// Local Forwards
public static final String SUCCESS_search = "success";
private boolean dumpRequestParams = true;
public DetailsAction() {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
System.out.println("SearchAccount execute() is called");
HttpSession session = request.getSession(true);
ArrayList results = null;
DetailsForm search = (DetailsForm) form;
String name = search.getName();
String searchField = search.getSearchField();
String searchCriteria = search.getSearchCriteria();
// Dumping the values of input patameters
if (dumpRequestParams == true) {
request.setAttribute("SearchCriteria", searchCriteria);
request.setAttribute("SearchField", searchField);
request.setAttribute("Text", name);
search.dumpValues();
// Perform search based on what criteria and search Field was entered.
CAMDbAccess dbAccess = CAMDbAccess.getInstance();
if (null != searchCriteria && searchField != null) {
System.out.println("Search Criteria =" + searchCriteria
+ "Selected Option =" + searchField);
if (searchCriteria.equals(Search_Account) && searchField != null) {
results = dbAccess.searchByAccountInfo(name, searchCriteria,
searchField);
System.out.println(" Search criteria :Exact Match was selected.<BR>");
// Place search results in SearchForm for access by JSP.
search.setResults(results);
// Forward control to this Action's input page.
return mapping.findForward(SUCCESS_search);
My jsp page:
<%@ taglib uri="/WEB-INF/tld/struts-bean" prefix="bean" %>
<%@ taglib prefix="logic" uri="http://struts.apache.org/tags-logic-el" %>
<%@ taglib uri="/WEB-INF/tld/struts-html" prefix="html" %>
<html:html>
<head>
<title>Search Page</title>
</head>
<body colorants="LightGreen">
<table width="100%" bgcolor="LightGreen">
<tr>
<td align="left"><font color="brown"><h3><b>Search Info</b></h3></font><hr></td>
</tr>
<tr>
<td align="left"><h4><font color="brown"><b>Search Text:</b></font><%=request.getAttribute("Text")%></h4></td>
</tr><tr>
<td align="left"><h4><font color="brown"><b>Search Field:</b></font><%=request.getAttribute("SearchField")%></h4></td>
</tr><tr>
<td align="left"><h4><font color="brown"><b>Search Criteria:</b></font><%=request.getAttribute("SearchCriteria")%></h4></td>
</tr><tr>
<html:form action="/results.do">
<td><center><html:submit value="AllSearchOptions " /></center></td>
</html:form>
</tr>
<tr>
<td align="left"><font color="brown"><hr><h2><b>Search Results</b></h2></font></td>
</tr>
<tr>
<td>
<table border="1" cellspacing="1" cellpadding="3" width="70%"
bgcolor="white">
<logic:present name="searchbyaccount" property="results">
Results exists
<c:if test="${size==0 }">
<center><font color="red"><b>No Results Found</b></font></center>
</c:if>
<br>
<c:if test="${size>0}">
Size is greater than ZERO
<table border="1" cellspacing="1" cellpadding="3" width="70%"
bgcolor="white">
<tr>
<th>Customerid</th>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
<th>phone Number</th>
<th>Details</th>
</tr>
<c:forEach var="result" items="${results}">
<c:out value="${result}"/>
<tr>
<td><bean:write name="result" property="customerid"></bean:write></td>
<td><bean:write name="result"
property="accountAdminFirstName"></bean:write></td>
<td><bean:write name="result"
property="accountAdminLastName" /></td>
<td><bean:write name="result" property="accountability" /></td>
<td><bean:write name="result" property="accountAdminPhone" /></td>
<td><html:form action="/accountDetails.do">
<html:submit value="Details" />
</html:form></td>
</tr>
</c:forEach>
</table>
</c:if>
</logic:present>
</table>
</td>
</tr>
</table>
</body>
</html:html> Please refer me where i done a mistake.Thanks in Advancehi all,
I am doing programs in sturts. My program
My program purpose is to retrieve data from the
database.My database is MySql. I know that we can
write connection code in Action Class, it is ok for
some less prog's if i want to use the sane connection
code in more Action Classes it is vasting time and
so.I don't think it's a good idea to put database code in Action classes. (That's one of the biggest drawbacks of Struts - it's completely tied to Actions, HTTP, and the Web.) Better to move that code into plain old Java objects and let the Actions call them.
You'll be able to test them without the container or Struts, and you'll be able to reuse those objects in other, non-Web contexts.
So i want to use <data-sources> tag that is available
in struts-config.xml. I know that thre is tag withThis is the wrong place to configure a connection pool, too. Struts should have nothing to do with it. What if you change Web frameworks to WebWork or Spring? The connection pool should be configured in the container that hosts your app, not Struts.
this name, but the problem is i don't know how to use
this tag. If any budy know how to use this please
tell me the syntax or any example.
plese... reply soon..Don't do it. Think about doing it in your container, not Struts.
% -
Help!! how to use ms office chart in jsp
I want to use ms office chart in jsp for getting real time statistical chart.
but I don't know how to satart.
give me an example please,(including the code is better)
thanksDo you need MS Office? Try Cewolf, a tag library for JFreeChart:
http://cewolf.sourceforge.net/
Regards,
Dave Gilbert
JFreeChart Project Leader -
How to use struts Logic tags in weblogic8.1
hi
i have used jakarta struts in JDeveloper there i used logic tags
but the same i have to use in weblogic8.1 ,how should i use it
i am new to weblogic platform
it is very urgent
pleaseHi harish,
Procedure for using a Struts Tag Libraries in weblogic 8.1 :
•Copy the tag lib jar files under WEB-INF/lib ( if tag handler supplied as
classes without package a jar file then we need to copy the classes
under WEB_INF/classes.
• Copy the tld files files under WEB-INF or create a directory under
WEB-INF and copy tld files under this directory.
• We need to give the information about the tag libraries in web.xml by
adding the following lines to it as,
<taglib>
<taglib-uri>bean</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>html</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>logic</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
To use tags in jsp file we need to add taglib directive as ,
<%@ taglib uri="logic" prefix=“logic"%>
<%@ taglib uri="html" prefix=“html"%>
<%@ taglib uri="bean" prefix=“bean"%>
Every tag can support zero or more number of attributes and a tag may or
may not support body content
Every Tag Library Uniquely identified by uri defined in web.xml.
we can use the tags in jsp according to the tags and attributes which are defined in *.tld files.
if we look at .tld files we can find several tags and its attributes.
note :any jar files that are related to struts framework ,place under the lib directory of the webapplication.
----- Anilkumar kari -
How to use logic:interate tag in this case? thanks a lot.
a javabean:
a{
int a;
ArrayList bList (to store some strings);
request.setAttribute("a",a);
then how can I use <logic:iterate> tag to loop to use <bean:write> tag to write out the strings contained by bList?use getparams and get that attribute(arraylist)
define a bean in jsp with property as this attribute for which u should have a getter method in context
the following is to iterate through arralist of arraylist
<logic:iterate id="accList" name="<%=subAppContextName%>" ="accountsHoldedList">
<tr>
<logic:iterate id="accList2" name="accList">
<td> <bean:write name="accList2"/> </td>
</logic:iterate>
<td>
<jfp:link styleClass="appNavNext" warn="false" bundle="<%=bundleName%>" key="GiveNotice" paramId="selectedAccount" paramName="accList2" href="javascript:submitMyForm();"></jfp:link>
</td>
</tr>
</logic:iterate>
accountsHoldedList is the one which is set in Context and i am iterating to display it.
bye -
How to use JNDI lookup from a JSP
Hello,
I know I should not be doing this (writing the lookup code in a JSP) but have to do it for some reasons.
I am using this code in my JSP:
try
Context ctx = new InitialContext();
dataSource = (DataSource)ctx.lookup("jdbc/mybillingora");
conn = dataSource.getConnection();
statement = conn.createStatement();
catch(Exception excep)
Is this code enough for a JNDI look up?? When I use this code, I get an exception:
"javax.naming.NameNotFound exception:jdbc/mybillingora"
Do I need to do something else??
Why do we use :
Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"<some_context_factory>");
env.put(Context.PROVIDER_URL, PROVIDER_URL);
env.put(Context.SECURITY_PRINCIPAL, JNDI_USER);
env.put(Context.SECURITY_CREDENTIALS, JNDI_PWD);
InitialContext = new InitialDirContext(env);
where JNDI_USER is the userid If ACL is configured at the JNDI server
where JNDI_PWD is the password If ACL is configured at the JNDI server
Context.INITIAL_CONTEXT_FACTORY is the initial Context factory and depends on ur JNDI service provider.
PROVIDER_URL is the url of the JNDI server containing protocol/ip/port
do i need to use this??
would appreciate your help on this....
ThanksIf Tomcat is your servlet/JSP engine, they have a nice bit about how to do it:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
MOD -
I have translated HTML to PDF. It is working properly if I use only DC Metadata.
But if I write other tag in XMP and load this file in PDF, I cannot see right information.
I want to use my own tag such as "co-author" and "related paper".
I define this kinds of tags as namespace and XML Schema.
Then I want to use this tag in PDF. But I don't know how to do after this.
How can I do? How can I use my own tag(element or attribute) in XMP?
Actually I don't have much experience to deal with XMP.
please help.Will you clarify where you are looking for your custom information.
It should display in Acrobat.
Acrobat 7 File menu > Document Properties... > Additional Metadata... > Advanced > {list of namespaces}
Your tags should appear under the namespace you used. -
How to use getContent() method in custom JSP Provider to display a HTML Pag
Hi,
If anybody knows how to use getContent() method to use in custom jsp providers (developed by ourselves) so that it can be used to retrieve a jsp page (a simple html page) ..
I want the code in the provider java file to for the getContent method...
Pls. get back to me asap....if any body has implemented a custom jsp provider...as it's urgent...
I have alreday placed the JSP file in the directory structure /etc/opt/SUNWps/desktop/default/channel_dir..But still the jsp is not being displayed..
Pls get me the getContent() method code to retrive the JSP file..
satyabrataHi,
You don't have to do anything in the custom JSPProvider's getContent method except the call { return super.getContent(request,response); } . If all you want is just to show your jsp, then create a channel from the default JSPProvider, and edit the property contentPage of that channel from samplecontent.jsp to your jsp name, save the changes and login again. You should see your JSP.
Sanjeev. -
How to use data-sources tag in struts-config.xml
hi all,
I am doing programs in sturts. My program purpose is to retrieve data from the database.My database is MySql. I know that we can write connection code in Action Class, it is ok for some less prog's if i want to use the sane connection code in more Action Classes it is vasting time and so.
So i want to use <data-sources> tag that is available in struts-config.xml. I know that thre is tag with this name, but the problem is i don't know how to use this tag. If any budy know how to use this please tell me the syntax or any example.
plese... reply soon..hi all,
I am doing programs in sturts. My program
My program purpose is to retrieve data from the
database.My database is MySql. I know that we can
write connection code in Action Class, it is ok for
some less prog's if i want to use the sane connection
code in more Action Classes it is vasting time and
so.I don't think it's a good idea to put database code in Action classes. (That's one of the biggest drawbacks of Struts - it's completely tied to Actions, HTTP, and the Web.) Better to move that code into plain old Java objects and let the Actions call them.
You'll be able to test them without the container or Struts, and you'll be able to reuse those objects in other, non-Web contexts.
So i want to use <data-sources> tag that is available
in struts-config.xml. I know that thre is tag withThis is the wrong place to configure a connection pool, too. Struts should have nothing to do with it. What if you change Web frameworks to WebWork or Spring? The connection pool should be configured in the container that hosts your app, not Struts.
this name, but the problem is i don't know how to use
this tag. If any budy know how to use this please
tell me the syntax or any example.
plese... reply soon..Don't do it. Think about doing it in your container, not Struts.
%
Maybe you are looking for
-
As a former programmer, I am dismayed that such a poor version would be released! It reminds me of dealing with Windows 98!
-
Hi, The Zen Touch doesn't use a file-tree-browsing system, so one need proper id3 tags to make the player usable. I have a lot of music with no id3 tags (ripped from CDs, most of which I do not have), whhere it stays just Track for the name and album
-
What do I click on to download a document or email?
I am suppose to be downloading software from Dak.com. do not know what to click on to download. The word download does not appear anywhere. I am not computer savvy, trying to learn how to use.
-
How do you execute this program on a DVD in a PowerShell statement
How do you execute this program on a DVD in a PowerShell statement? E:\path /program1
-
One library over multiple accounts-how to
Hello I was wondering how you can set up an iTunes library so that it can be accessed by any account on your computer. Would using the shared folder to store the library allow such access? Also, would iTunes automatically find it, or would you have t