Web Apps FAQ

Hello,
I am working on knowledge base entries for developing Web Applications with Sun ONE Studio. I would be interested in whether any of the following are helpful.
Also, are there other entries you think should be added? Other comments? Corrections?
Thanks
Web Apps FAQ
Creating a Web Application
Q: Where do I put my JSP files in my web module.
A: JSP files can go into the web module's document base directory or any
of its subdirectories except for the subdirectories under WEB-INF. For example,
the following is correct:
correctWebModStructure
+ login.jsp
++ JSP_files
+++ shop.jsp
+ WEB-INF
++ Classes
++ lib
++ web.xml
The following is incorrect:
incorrectWebModStructure
+ WEB-INF
++ login.jsp     
++ JSP_files
+++ shop.jsp     
++ Classes
++ lib
++ web.xml
Note that with the incorrect structure, the JSP files will compile but
they will not run on a server.
Q: Where should I put my servlet source and binary files when I create
and execute a web module from the IDE?
A: Your compiled classes must go in the appropriate package directory
under <web mod document root>/WEB-INF/Classes. The easiest place to
put the source code is in the same directory as the compiled class. To
put your source code in a different directory, see "Can I put my source code in
a different directory from WEB-INF/classes?"
Note that when a class is imported by another class or by a JSP file, the
class MUST be in a named namespace (package).
Q: Where do I put my libraries (JAR files) in a web module?
A: You can put the libraries in one of several places:
o If the JAR file will be used only by the module, put it in the
WEB-INF/lib directory.
o If the JAR file will be shared by multiple web modules look at the server's
documentation to find out how to make the library available across web
modules.
- If you are using the Sun One Application server, you can either copy
the JAR into the <instance_dir>/lib directory (such as
     <AppServerInstallDir>\domains\domain1\server1\lib) or edit the
     classpath-suffix attribute of the java-config element in the
     server.xml file. For details about server.xml, see the Sun ONE Application
     Server Administrator�s Configuration File Reference. You must
     restart the server.
- If you are using the internal Tomcat server, put the JAR file into one of
the following directories:
<ide-install-dir>/jwsdp/lib/
<ide-install-dir>/jwsdp/common/classes
<ide-install-dir>/jwsdp/common/lib/
<ide-install-dir>jwsdp/shared/classes
<ide-install-dir>/jwsdp/shared/lib/
Note that for compilation, a JAR file must either be mounted as as an
          archive file or the JAR file must be put into <ide-install-dir>\lib\ext.
When you add a JAR file to WEB-INF/lib directory tree, the IDE mounts
          the JAR file for you automatically.
Q: Can I put my source code in a different directory from WEB-INF/classes?
A: Yes. For example, say you have a directory structure as follows:
myWebApp
+ WEB-INF
++ Classes
+++ myPkg
+ src
++ myPkg
1. In the Filesystems tab, mount myWebApp and separately mount src.
The Explorer should look like this:
<path>/myWebApp
<path>/myWebApp: /WEB-INF/classes <-IDE automatically mounts this
<path>/src
2. Open Tools > Options > Building > External Compilation and select this Target:
<path>/myWebApp: /WEB-INF/classes
(By default, this setting is project wide, if you click the >> column, you
can set it at the user or default level.)
3. Whenever you create a Java file under /WEB-INF/classes, the IDE automatically
adds a servlet entry and a mapping in the web.xml. Because you are putting
your source elsewhere, you will have to enter these entries manually, or do
the following.
1. Right-click the web.xml node, and choose Properties.
2. In the Deployment panel of the web.xml properties window,
click the ellipses (...) in the Servlets value field to display
the Servlets Property editor.
In Servlets Property editor, click Add to display the Add Servlet dialog box.
In the Add Servlet dialog box, type, or browse for, the servlet class name.
Type in the name by which you want to identify the servlet.
3. Click the Edit button for Mappings and add the mapping for the servlet.
4. Click OK to close the Add Servlet dialog box, then click OK to close
the Servlets property editor.
Note: If you don't add the web.xml entries, you might get an error like the
following:
"The requested object does not exist on this server.
The link you followed is either outdated, inaccurate,
or the server has been instructed not to let you have it.
Please inform the site administrator of the referring page."
Q: Why do I get invalid package name when I try to add a package to my
web module.
You have two options for creating packages in a web module.
1. Create a package in a subdirectory of WEB-INF/classes.
2. Create a package in a directory that is not in the WEB-INF tree and
put the compiled class in the WEB-INF tree. For example, if you have the
following directory structure, set the compilation target to WEB-INF/classes.
myWebMod
+ src
++ pkg1
+ WEB-INF
++ classes
+++ pkg1
++ lib
In either case, the WEB-INF/classes directory must be mounted. The IDE
does this automatically when you create a web module or turn a directory
into a web module.
To set the compilation target, choose Tools > Options > Building >
External Compilation and select the target. In this example, you would
select:
<path>/myWebMod: /WEB-INF/classes
Do not use a directory structure like this:
myWebMod
+ WEB-INF
++ src << wrong
++ classes
You can alternatively keep your source code in the appropriate package
directory under WEB-INF/classes.
Editing JSP Files
Q: JSP code completion does not work now that I use the Jakarta recommended
directory structure and use Ant to build and deploy my web applications? Can
I fix this?
To make code completion work, you must mount the following libraries and
directories in the Filesystems tab of the Explorer window. Mounting a parent
directory does not work.
* <working-directory>/src
* <working-directory>/build
* Every .jar file that is copied by the build script to
          <working-directory>/build/WEB-INF/lib. (The IDE automatically mounts
               all the jar files in WEB-INF/lib when you mount working-directory/build.)
* Any other libraries that are used by the web application, such as
          libraries that have been deployed to the server.
Deploying a Web Application
Q: Can I change the URL that is used to execute a JSP page? For example,
instead of http://localhost/welcome.jsp, can I have the URL be
http://localhost/shopping/welcome.jsp?
A: Yes, right-click on the WEB-INF and choose Properties from the contextual
menu. In the Properties window, type /<name>. For example, type
/shopping
Note that youu can use servlet mappings in the web.xml file to control the
mappings of URLs to servlets.
Q: Is there a way to copy the compiled code to the server for testing
without having to create a WAR file?
A: Yes, this is the default action when you right-click the WEB-INF
node and choose Deploy from the contextual menu.
With Internal and External Tomcat installations, the deploy action causes
the IDE to change the server's configuration file to add a context entry,
which points to the document root of your working version of the web
application. For example
/myApp -> C:\My Working Directory\myApp
When you deploy to the Sun ONE application server using the IDE's Deploy
action, the IDE copies the web application's directory structure to
the server's <instance>/applications/j2ee-modules directory.
Q: How do I create a WAR file and deploy the WAR file onto different servers.
A: To create a WAR file, right click the WEB-INF node and choose Export WAR
file. See the online help for details about adding and filtering out
components.
Look at the server's documentation to find out how to deploy the WAR file
to the server. Here is an example of deploying a WAR file to the Sun ONE
Application Server 7:
asadmin deploy user myusername password mypassword \
-host localhost port 4848 type web contextroot /myApp instance server1 \
c:\apps\myapp.war
Note that when you deploy to a server that is registered with the IDE,
you do not need to create a WAR file. Instead, you can right-click on the
WEB-INF node and choose Deploy.
Compiling a Web Application
Q: Why do I get compiler errors when I compile from the IDE even though
I don't get errors when I compile from the command line?
As the IDE's classpath is derived from the mounted filesystems, the problem
is most likely caused by not mounting the necessary filesystems. For the
following web app, you must mount in the Explorer AWebApp, WEB-INF/classes
(this directory is mounted automatically when you create a web app or
turn a directory into a web app), and every JAR file in the WEB-INF/lib
directory (which is also done automatically). Note that all classes and
JAR files that the application needs must be in AWebApp/WEB-INF or
AWebApp/lib or the server's location for shared libraries and classes.
Otherwise, the module may compile but it won't run in the server.
AllMyWebApps
+ AWebApp
++ WEB-INF
+++ classes
+++ lib
++++ a.jar
++++ b.jar
Q: Why do I get a "cannot resolve symbol" compiler error message for my JSP.
A: Check the import statements in your JSP file. The import statement must
specify the fully qualified class name (package name plus class), and the
class must be in a namespace. The namespace restriction is because the Javac
bytecode compiler in J2SE 1.4.0 is more strict than in previous
versions in enforcing compliance with the Java Language Specification,
and thus rejects import statements that import a type from an unnamed namespace.
Valid import statement:
<%@page import="org.alpha.beta.MyBean" %>
Also, make sure your compiled classes are in a subfolder of
<web-module>/WEB-INF/classes, such as, for the above bean,
<web-module>/WEB-INF/classes/org/alpha/beta/MyBean.class.
Note that you will also get this error if you have created a link under
WEB-INF/classes to a package in another directory. Your package must
physically exist in the WEB-INF/classes directory.          
Q: Why do I get " '.' expected" when my JSP is compiled.
The Javac bytecode compiler in J2SE 1.4.0 is more strict than in previous
versions in enforcing compliance with the Java Language Specification, and
thus rejects import statements that import a type from an unnamed namespace.
For example, if you have an import statement like the following, the compiler
expects the imported class to be in a package. Therefore, the compiler
assumes that MyBean is a package and expects the package name to be followed
by a period (.) and either a subpackage or a class. To resolve the problem,
put the bean in a package.
INVALID IMPORT STATEMENT:
<%@page import="MyBean" %>
VALID IMPORT STATEMENT
<%@page import="MyPackage.MyBean" %>
Q: Why do I get a package does not exist error message when the package exists?
A: The problem might be that you have not mounted the web module at the
correct point. You must mount the directory that is directly above the WEB-INF
directory. For example, if you have the following directory structure
you must mount the webApp1 filesystem. When you specifically mount
webApp1, the IDE recognizes the filesystem as a web module. The IDE
automatically mounts WEB-INF/classes, so that it is in the IDE's classpath,
and provides the execute and deploy actions when you right-click on the
WEB-INF node:
allMyWebApps
+ webApp1
++ WEB-INF
+++ Classes
++++ myPkg
You can also get this error message when you do not put your Classes directory
under WEB-INF. For example, if you put the Classes directory in web-info, you
will get this error message.
You will get this error if you have created a link under WEB-INF/classes
to a package in another directory. Your package must physically exist in
the WEB-INF/classes directory.                    
Running Web Applications
Q: Why do I get the 404 error message "The requested resource is not available"?
Why do I get the error message "The requested object does not exist on
this server"?
A: If you get either of these errors on a servlet, check the servlet's entry
in the web.xml. The entry should be similar to the following:
<servlet>
<servlet-name>myServlet</servlet-name>
<servlet-class>org.alpha.beta.MyServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>myServlet</servlet-name>
<url-pattern>/MyServlet</url-pattern>
</servlet-mapping>
The name can be any name as long as it is the same in both mappings.
The class must be the fully qualified class name. The pattern
must be a pattern that matches the URI that invokes the servlet. In
this case, the pattern matches the URI http://localhost:8081/MyServlet.
Q: Why do I get a Generated Servlet error "Class not found."
A: This error can occur if the class is not in a package. To resolve the
problem, put the class in a package.
If the class is in a package and you still get this message,
check the import statements in your JSP file. The import statement must
specify the fully qualified class name (package name plus class).
For example:
<%@page "org.alpha.beta.CustomerBean" %>
Q: Why do I get the error message "Unable to load class" when my JSP calls
a class from a library?
This message usually appears because the library's JAR file is not in the
WEB-INF/lib directory. The server expects all of the web app's JAR files
to either be in the WEB-INF/lib directory or in the server's
shared library directory.
For more information, search for the "File Location in a Web Module" topic
in the online help.
Q: Why do I get an error message during JSP compilation that a tld file is not
found when the file is there?
A: The problem might be that you have not put the tld file in the correct
place. It should go in the WEB-INF directory.
This problem also happens if have not mounted the web module at the
correct point.
You must mount the directory that is directly above the WEB-INF directory. For
example, if you have the following directory structure you must mount the
myWebApp1 filesystem. When you specifically mount webApp1, the IDE recognizes
the filesystem as a web module. The IDE automatically mounts WEB-INF/classes,
which in turn adds the path to the IDE's classpath and provides the execute
and deploy actions when you right-click on the WEB-INF node:
allMyWebApps
+ webApp1
++ WEB-INF
+++ Classes
++++ myPkg
Another cause of the problem could be that the uri in your taglib statement
is incorrect. For example, this statement is wrong:
                    <%@ taglib uri="struts-html.tld" prefix="html" %> <- Incorrect
Instead, it should be:
                    <%@ taglib uri="WEB-INF/struts-html.tld" prefix="html" %> <- Correct
Q: Why do I get a java.lang.ClassNotFoundException when I run my JSP file?
Everything compiles successfully and the source editor does JSP code completion
for the class. However, when I execute, the runtime system can't find the new
classes.
A: There are several causes of this error. Here are some things to check.
1. If the class is in a library, make sure the JAR file is in the
WEB-INF/lib directory or the server's directory for shared libraries.
Otherwise, make sure the class is in a package under the WEB-INF/Classes
directory.
When compiling, the IDE builds the classpath from the mounted filesystems.
However, when you use the deploy action, the IDE only deploys the classes,
libraries, and files that are stored in the mounted web module.
2. Make sure all usebean statements use a fully qualified name for
the class name.
WRONG:
<jsp:useBean id="myBean" class="MyBean" scope="request" />
CORRECT:
<jsp:useBean id="myBean" class="org.alpha.beta.MyBean" scope="request" />
Q. Why am I getting a 500 Internal Server Error? My application compiled but
when I try to run it, I get an Internal Server Error.
A: There are several reasons for internal server errors. The "root cause" or
the "Exception" information can help to narrow in on the problem. Here are
some common causes:
a) One common reason is that the compiled classes are not in the right directory
or a required library (JAR file) is not in the WEB-INF/lib directory.
When you compile, the IDE uses the classpath to find the resources. However,
when you deploy an application, the application must strictly follow the
web module directory structure:
<document root directory>
+ JSP, HTML and other public files
+ WEB-INF
++ web.xml
++ <tld files>
++ classes
+++ <pkg 1>
+++ <pkg 2>
++ lib
+++ <.jar>
For more information, search for the "File Location in a Web Module" topic
in the online help.
b) If you are connecting to a database, make sure the driver is put in the
server's shared library directory or common library directory.
c) An error occurs when the server compiles the JSP into a servlet. For example,
the import or usebean statement is not using the fully qualified class
name for the bean. The following statements show an incorrect and a correct
import statement.
import="MyBean" << wrong
import="com.myCompany.MyBean" << correct
In this case, the "Exception" or "Root Cause" might be "Class <bean name> not
found in import."
Note that a bean must always be in a package. A bean cannot be put into the
WEB-INF/classes directory. Instead, it must be in a WEB-INF/classes
subdirectory.
Accessing Databases from Web Applications
Q: I put my database driver in WEB-INF/lib but I still can't access the
database. What do I do?
A: If your application performs queries or run statements through JDBC, then
putting the driver in WEB-INF is sufficient. However, if you are connecting to
the database through the server, you need to put the driver in the
server's shared library directory or the server's common library directory.
You must also set up a connection pool in the server.xml file. See the
documentation for your server on the specifics, as the details vary for
each server.

Hello,
I am working on knowledge base entries for developing Web Applications with Sun ONE Studio. I would be interested in whether any of the following are helpful.
Also, are there other entries you think should be added? Other comments? Corrections?
Thanks
Web Apps FAQ
Creating a Web Application
Q: Where do I put my JSP files in my web module.
A: JSP files can go into the web module's document base directory or any
of its subdirectories except for the subdirectories under WEB-INF. For example,
the following is correct:
correctWebModStructure
+ login.jsp
++ JSP_files
+++ shop.jsp
+ WEB-INF
++ Classes
++ lib
++ web.xml
The following is incorrect:
incorrectWebModStructure
+ WEB-INF
++ login.jsp     
++ JSP_files
+++ shop.jsp     
++ Classes
++ lib
++ web.xml
Note that with the incorrect structure, the JSP files will compile but
they will not run on a server.
Q: Where should I put my servlet source and binary files when I create
and execute a web module from the IDE?
A: Your compiled classes must go in the appropriate package directory
under <web mod document root>/WEB-INF/Classes. The easiest place to
put the source code is in the same directory as the compiled class. To
put your source code in a different directory, see "Can I put my source code in
a different directory from WEB-INF/classes?"
Note that when a class is imported by another class or by a JSP file, the
class MUST be in a named namespace (package).
Q: Where do I put my libraries (JAR files) in a web module?
A: You can put the libraries in one of several places:
o If the JAR file will be used only by the module, put it in the
WEB-INF/lib directory.
o If the JAR file will be shared by multiple web modules look at the server's
documentation to find out how to make the library available across web
modules.
- If you are using the Sun One Application server, you can either copy
the JAR into the <instance_dir>/lib directory (such as
     <AppServerInstallDir>\domains\domain1\server1\lib) or edit the
     classpath-suffix attribute of the java-config element in the
     server.xml file. For details about server.xml, see the Sun ONE Application
     Server Administrator�s Configuration File Reference. You must
     restart the server.
- If you are using the internal Tomcat server, put the JAR file into one of
the following directories:
<ide-install-dir>/jwsdp/lib/
<ide-install-dir>/jwsdp/common/classes
<ide-install-dir>/jwsdp/common/lib/
<ide-install-dir>jwsdp/shared/classes
<ide-install-dir>/jwsdp/shared/lib/
Note that for compilation, a JAR file must either be mounted as as an
          archive file or the JAR file must be put into <ide-install-dir>\lib\ext.
When you add a JAR file to WEB-INF/lib directory tree, the IDE mounts
          the JAR file for you automatically.
Q: Can I put my source code in a different directory from WEB-INF/classes?
A: Yes. For example, say you have a directory structure as follows:
myWebApp
+ WEB-INF
++ Classes
+++ myPkg
+ src
++ myPkg
1. In the Filesystems tab, mount myWebApp and separately mount src.
The Explorer should look like this:
<path>/myWebApp
<path>/myWebApp: /WEB-INF/classes <-IDE automatically mounts this
<path>/src
2. Open Tools > Options > Building > External Compilation and select this Target:
<path>/myWebApp: /WEB-INF/classes
(By default, this setting is project wide, if you click the >> column, you
can set it at the user or default level.)
3. Whenever you create a Java file under /WEB-INF/classes, the IDE automatically
adds a servlet entry and a mapping in the web.xml. Because you are putting
your source elsewhere, you will have to enter these entries manually, or do
the following.
1. Right-click the web.xml node, and choose Properties.
2. In the Deployment panel of the web.xml properties window,
click the ellipses (...) in the Servlets value field to display
the Servlets Property editor.
In Servlets Property editor, click Add to display the Add Servlet dialog box.
In the Add Servlet dialog box, type, or browse for, the servlet class name.
Type in the name by which you want to identify the servlet.
3. Click the Edit button for Mappings and add the mapping for the servlet.
4. Click OK to close the Add Servlet dialog box, then click OK to close
the Servlets property editor.
Note: If you don't add the web.xml entries, you might get an error like the
following:
"The requested object does not exist on this server.
The link you followed is either outdated, inaccurate,
or the server has been instructed not to let you have it.
Please inform the site administrator of the referring page."
Q: Why do I get invalid package name when I try to add a package to my
web module.
You have two options for creating packages in a web module.
1. Create a package in a subdirectory of WEB-INF/classes.
2. Create a package in a directory that is not in the WEB-INF tree and
put the compiled class in the WEB-INF tree. For example, if you have the
following directory structure, set the compilation target to WEB-INF/classes.
myWebMod
+ src
++ pkg1
+ WEB-INF
++ classes
+++ pkg1
++ lib
In either case, the WEB-INF/classes directory must be mounted. The IDE
does this automatically when you create a web module or turn a directory
into a web module.
To set the compilation target, choose Tools > Options > Building >
External Compilation and select the target. In this example, you would
select:
<path>/myWebMod: /WEB-INF/classes
Do not use a directory structure like this:
myWebMod
+ WEB-INF
++ src << wrong
++ classes
You can alternatively keep your source code in the appropriate package
directory under WEB-INF/classes.
Editing JSP Files
Q: JSP code completion does not work now that I use the Jakarta recommended
directory structure and use Ant to build and deploy my web applications? Can
I fix this?
To make code completion work, you must mount the following libraries and
directories in the Filesystems tab of the Explorer window. Mounting a parent
directory does not work.
* <working-directory>/src
* <working-directory>/build
* Every .jar file that is copied by the build script to
          <working-directory>/build/WEB-INF/lib. (The IDE automatically mounts
               all the jar files in WEB-INF/lib when you mount working-directory/build.)
* Any other libraries that are used by the web application, such as
          libraries that have been deployed to the server.
Deploying a Web Application
Q: Can I change the URL that is used to execute a JSP page? For example,
instead of http://localhost/welcome.jsp, can I have the URL be
http://localhost/shopping/welcome.jsp?
A: Yes, right-click on the WEB-INF and choose Properties from the contextual
menu. In the Properties window, type /<name>. For example, type
/shopping
Note that youu can use servlet mappings in the web.xml file to control the
mappings of URLs to servlets.
Q: Is there a way to copy the compiled code to the server for testing
without having to create a WAR file?
A: Yes, this is the default action when you right-click the WEB-INF
node and choose Deploy from the contextual menu.
With Internal and External Tomcat installations, the deploy action causes
the IDE to change the server's configuration file to add a context entry,
which points to the document root of your working version of the web
application. For example
/myApp -> C:\My Working Directory\myApp
When you deploy to the Sun ONE application server using the IDE's Deploy
action, the IDE copies the web application's directory structure to
the server's <instance>/applications/j2ee-modules directory.
Q: How do I create a WAR file and deploy the WAR file onto different servers.
A: To create a WAR file, right click the WEB-INF node and choose Export WAR
file. See the online help for details about adding and filtering out
components.
Look at the server's documentation to find out how to deploy the WAR file
to the server. Here is an example of deploying a WAR file to the Sun ONE
Application Server 7:
asadmin deploy user myusername password mypassword \
-host localhost port 4848 type web contextroot /myApp instance server1 \
c:\apps\myapp.war
Note that when you deploy to a server that is registered with the IDE,
you do not need to create a WAR file. Instead, you can right-click on the
WEB-INF node and choose Deploy.
Compiling a Web Application
Q: Why do I get compiler errors when I compile from the IDE even though
I don't get errors when I compile from the command line?
As the IDE's classpath is derived from the mounted filesystems, the problem
is most likely caused by not mounting the necessary filesystems. For the
following web app, you must mount in the Explorer AWebApp, WEB-INF/classes
(this directory is mounted automatically when you create a web app or
turn a directory into a web app), and every JAR file in the WEB-INF/lib
directory (which is also done automatically). Note that all classes and
JAR files that the application needs must be in AWebApp/WEB-INF or
AWebApp/lib or the server's location for shared libraries and classes.
Otherwise, the module may compile but it won't run in the server.
AllMyWebApps
+ AWebApp
++ WEB-INF
+++ classes
+++ lib
++++ a.jar
++++ b.jar
Q: Why do I get a "cannot resolve symbol" compiler error message for my JSP.
A: Check the import statements in your JSP file. The import statement must
specify the fully qualified class name (package name plus class), and the
class must be in a namespace. The namespace restriction is because the Javac
bytecode compiler in J2SE 1.4.0 is more strict than in previous
versions in enforcing compliance with the Java Language Specification,
and thus rejects import statements that import a type from an unnamed namespace.
Valid import statement:
<%@page import="org.alpha.beta.MyBean" %>
Also, make sure your compiled classes are in a subfolder of
<web-module>/WEB-INF/classes, such as, for the above bean,
<web-module>/WEB-INF/classes/org/alpha/beta/MyBean.class.
Note that you will also get this error if you have created a link under
WEB-INF/classes to a package in another directory. Your package must
physically exist in the WEB-INF/classes directory.          
Q: Why do I get " '.' expected" when my JSP is compiled.
The Javac bytecode compiler in J2SE 1.4.0 is more strict than in previous
versions in enforcing compliance with the Java Language Specification, and
thus rejects import statements that import a type from an unnamed namespace.
For example, if you have an import statement like the following, the compiler
expects the imported class to be in a package. Therefore, the compiler
assumes that MyBean is a package and expects the package name to be followed
by a period (.) and either a subpackage or a class. To resolve the problem,
put the bean in a package.
INVALID IMPORT STATEMENT:
<%@page import="MyBean" %>
VALID IMPORT STATEMENT
<%@page import="MyPackage.MyBean" %>
Q: Why do I get a package does not exist error message when the package exists?
A: The problem might be that you have not mounted the web module at the
correct point. You must mount the directory that is directly above the WEB-INF
directory. For example, if you have the following directory structure
you must mount the webApp1 filesystem. When you specifically mount
webApp1, the IDE recognizes the filesystem as a web module. The IDE
automatically mounts WEB-INF/classes, so that it is in the IDE's classpath,
and provides the execute and deploy actions when you right-click on the
WEB-INF node:
allMyWebApps
+ webApp1
++ WEB-INF
+++ Classes
++++ myPkg
You can also get this error message when you do not put your Classes directory
under WEB-INF. For example, if you put the Classes directory in web-info, you
will get this error message.
You will get this error if you have created a link under WEB-INF/classes
to a package in another directory. Your package must physically exist in
the WEB-INF/classes directory.                    
Running Web Applications
Q: Why do I get the 404 error message "The requested resource is not available"?
Why do I get the error message "The requested object does not exist on
this server"?
A: If you get either of these errors on a servlet, check the servlet's entry
in the web.xml. The entry should be similar to the following:
<servlet>
<servlet-name>myServlet</servlet-name>
<servlet-class>org.alpha.beta.MyServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>myServlet</servlet-name>
<url-pattern>/MyServlet</url-pattern>
</servlet-mapping>
The name can be any name as long as it is the same in both mappings.
The class must be the fully qualified class name. The pattern
must be a pattern that matches the URI that invokes the servlet. In
this case, the pattern matches the URI http://localhost:8081/MyServlet.
Q: Why do I get a Generated Servlet error "Class not found."
A: This error can occur if the class is not in a package. To resolve the
problem, put the class in a package.
If the class is in a package and you still get this message,
check the import statements in your JSP file. The import statement must
specify the fully qualified class name (package name plus class).
For example:
<%@page "org.alpha.beta.CustomerBean" %>
Q: Why do I get the error message "Unable to load class" when my JSP calls
a class from a library?
This message usually appears because the library's JAR file is not in the
WEB-INF/lib directory. The server expects all of the web app's JAR files
to either be in the WEB-INF/lib directory or in the server's
shared library directory.
For more information, search for the "File Location in a Web Module" topic
in the online help.
Q: Why do I get an error message during JSP compilation that a tld file is not
found when the file is there?
A: The problem might be that you have not put the tld file in the correct
place. It should go in the WEB-INF directory.
This problem also happens if have not mounted the web module at the
correct point.
You must mount the directory that is directly above the WEB-INF directory. For
example, if you have the following directory structure you must mount the
myWebApp1 filesystem. When you specifically mount webApp1, the IDE recognizes
the filesystem as a web module. The IDE automatically mounts WEB-INF/classes,
which in turn adds the path to the IDE's classpath and provides the execute
and deploy actions when you right-click on the WEB-INF node:
allMyWebApps
+ webApp1
++ WEB-INF
+++ Classes
++++ myPkg
Another cause of the problem could be that the uri in your taglib statement
is incorrect. For example, this statement is wrong:
                    <%@ taglib uri="struts-html.tld" prefix="html" %> <- Incorrect
Instead, it should be:
                    <%@ taglib uri="WEB-INF/struts-html.tld" prefix="html" %> <- Correct
Q: Why do I get a java.lang.ClassNotFoundException when I run my JSP file?
Everything compiles successfully and the source editor does JSP code completion
for the class. However, when I execute, the runtime system can't find the new
classes.
A: There are several causes of this error. Here are some things to check.
1. If the class is in a library, make sure the JAR file is in the
WEB-INF/lib directory or the server's directory for shared libraries.
Otherwise, make sure the class is in a package under the WEB-INF/Classes
directory.
When compiling, the IDE builds the classpath from the mounted filesystems.
However, when you use the deploy action, the IDE only deploys the classes,
libraries, and files that are stored in the mounted web module.
2. Make sure all usebean statements use a fully qualified name for
the class name.
WRONG:
<jsp:useBean id="myBean" class="MyBean" scope="request" />
CORRECT:
<jsp:useBean id="myBean" class="org.alpha.beta.MyBean" scope="request" />
Q. Why am I getting a 500 Internal Server Error? My application compiled but
when I try to run it, I get an Internal Server Error.
A: There are several reasons for internal server errors. The "root cause" or
the "Exception" information can help to narrow in on the problem. Here are
some common causes:
a) One common reason is that the compiled classes are not in the right directory
or a required library (JAR file) is not in the WEB-INF/lib directory.
When you compile, the IDE uses the classpath to find the resources. However,
when you deploy an application, the application must strictly follow the
web module directory structure:
<document root directory>
+ JSP, HTML and other public files
+ WEB-INF
++ web.xml
++ <tld files>
++ classes
+++ <pkg 1>
+++ <pkg 2>
++ lib
+++ <.jar>
For more information, search for the "File Location in a Web Module" topic
in the online help.
b) If you are connecting to a database, make sure the driver is put in the
server's shared library directory or common library directory.
c) An error occurs when the server compiles the JSP into a servlet. For example,
the import or usebean statement is not using the fully qualified class
name for the bean. The following statements show an incorrect and a correct
import statement.
import="MyBean" << wrong
import="com.myCompany.MyBean" << correct
In this case, the "Exception" or "Root Cause" might be "Class <bean name> not
found in import."
Note that a bean must always be in a package. A bean cannot be put into the
WEB-INF/classes directory. Instead, it must be in a WEB-INF/classes
subdirectory.
Accessing Databases from Web Applications
Q: I put my database driver in WEB-INF/lib but I still can't access the
database. What do I do?
A: If your application performs queries or run statements through JDBC, then
putting the driver in WEB-INF is sufficient. However, if you are connecting to
the database through the server, you need to put the driver in the
server's shared library directory or the server's common library directory.
You must also set up a connection pool in the server.xml file. See the
documentation for your server on the specifics, as the details vary for
each server.

Similar Messages

  • How to exclude Web App from search results

    Hi
    Search results link to a unstyled Web App instead to the actual page it resides in.
    Please do this:
    1. go to: http://kinship.businesscatalyst.com/
    2. search for "Michael" on the top global search
    3. on the search results page click on the name (link).
    4. you will see Michael's web app item not the actuall page it resides in (http://kinship.businesscatalyst.com/About/the-team)
    How to avoid getting web app results in search?
    Thanks
    Micha

    Hi Micha
    Just add “&OT=35 “ at the end of the action in your search form:
    Ex:
    <form name=”xxxx” method=”post” action=”/Default.aspx?SiteSearchID=3566&amp;ID=/results&OT=35”>
    <div class=”search-box”><input type=”text” class= ............../>
    <input type=”submit” class=”cat_button” value=”search” />
    </div>
    </form>
    Here are the rest of the content types IDs, should you come across similar situations in the future:
    Web Pages = 1
    Literature = 6
    Announcements = 7
    FAQs = 9
    Forums = 43
    Blogs = 55
    Web Apps = 35
    Catalogs = 26
    Bookings = 48
    You can exclude multiple areas from a search, simply list them with commas: &OT=35,1,6

  • Office web Apps server Lync 2013

    Hi All,
      I have logged onto my Volume licensing site and could not search Office Web Apps servers for download?? I wonder how do i download it?

    Hi channavera,
    Office Web Apps Server was removed from the Microsoft Download Center.  Now it only was available for
    download under Volume Licensing agreements.  For more information please read the FAQ below or visit the site Volume Licensing
    Service Center.
    FAQ
    Why is Web Apps Server being removed from the Microsoft Download Center?
    VLSC is best suited as the location from which to serve all customers according to their agreements with Microsoft.
    What about existing installations?  Do I need to re-license them?
    No.  Web Apps Server installations and/or downloads that occur before 11/24/14 will continue to be licensed for free viewing.
    Will there be an evaluation version for Developers and IT Pros?
    Evaluation availability will continue on MSDN for subscribers.  Additionally, Volume License agreements allow for product evaluation.
    From
    http://blogs.technet.com/b/office_sustained_engineering/archive/2014/10/22/web-apps-server-removal-from-download-center.aspx
    Best regards,
    Eric

  • Why can't I display content from more than one domain in my web app?  Is there a workaround?

    I'm trying to display 2 datasources in different views of my web app, an rss from twitter, and an rss from wordpress,  but for some reason dashcode doesn't allow this.  Is there code that can fix this?  A source paramater change code (shown below) is provided in dashcode, but I don't know how to implement this, or if it will even solve the problem.  Can anyone help?
    // Retrieves data source. Sets a query parameter "category" to "Apple"
    var dataSource = dashcode.getDataSource("detailRequest");
    dataSource.setValueForKeyPath("Apple", "parameters.category");

    If you have the Creative Cloud and the Photoshop subscriptions in the same ID, then that's the issue:
    http://www.adobe.com/products/creativecloud/faq.html
    Can I buy more than one membership to an individual offering of Creative Cloud? 
    No, Adobe has moved to identity-based licensing with a technology that will not support multiple same-product licenses, so you can buy only one membership per Adobe ID. If you need two Creative Cloud memberships, you will need to purchase each with a unique Adobe ID. You can also purchase a Creative Cloud for teams membership, which allows you to purchase and manage multiple seats under one account.
    Just talk with Adobe customer's support and they will help you sort it out.
    Cheers,

  • Calling EJB 3.1 deployed in Glassfish 3.1 from  a web app in Tomcat7

    I have a EJB 3.1 bean deployed in Glassfish 3.1.1 server. I want to call this bean from a remote web client deployed in Tomcat 7. The EJB class and its remote interface is as follows ...
    Remote Interface -
    @Remote
    public interface MyEJBRemote
    public String sayHello();
    EJB Bean -
    @Stateless
    public class MyEJB implements MyEJBRemote
    public String sayHello()
    return "Hello EJB Client. Hope everything worked just fine.";
    In the remote client I have the following code
    Properties props = new Properties();
    props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
    props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
    props.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
    props.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");
    props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
    InitialContext ic = new InitialContext(props);
    MyEJBRemote myEJBREmote = (MyEJBRemote)ic.lookup("java:global/MyEJB-1/MyEJB!com.dw.ejb.MyEJBRemote");
    Now the problem is with the last line of code. In Eclise this line of code is marked as error as the MyEJBRemote class is not there in the client project (the web app going to be deployed in tomcat 7). So where do I get the client jar generated from the deployed EJB to include in the client project ? Is there any way to generate this jar file.
    I tried using the glassfish command
    asadmin deploy generatermistubs retrieve . MyEJB.jar
    But glassfish didn't not generate any MyEJB-client.jar file. I tried a lot of times but without any success. I read up many forums. In one of them, it was mentioned that from EJB 3.1 glassfish does not generate the client stubs.
    So does that mean that one cannot use remote clients from EJB 3.1 in Glasssfish anymore ? Because the client project will never compile without the MyEJB-client.jar .

    You don't have to generate anything, you need the business interface class in your client application (MyEJBRemote in this case). One way to do that is to put the business interfaces in a separate jar and link that jar in both your client and server projects. The glassfish 3 FAQ documents the need to include the business interface class in your client application:
    http://glassfish.java.net/javaee5/ejb/EJB_FAQ.html#StandaloneRemoteEJB
    Another option is to turn the EJB into a JAX-WS webservice, which can be as easy as only adding a few annotations to it. That way you don't need any additional dependencies at all; the only thing you need to do is generate the stub classes using the wsimport tool (also part of the JDK) for your client application. I'm not a huge fan of SOAP, but for internal use I find it less cumbersome and more portable than remote EJBs.
    I can't offer any more advice on the topic as I don't use Glassfish. For better help, I do advise you to ask in the Glassfish forum where you'll find more people that have been in the same boat you are.
    http://www.java.net/forums/glassfish/glassfish

  • Unofficial Web Start FAQ Update

    Hi,
    I've added new entries to the Unofficial Web Start FAQ Update/Errata page residing at the Lopica Web Start Paradise site online @ http://lopica.sourceforge.net/update.html
    New entries include:
    * Where can I find the Web Start source code?
    * How can I start my Web Start app as a Windows Service?
    * How can I debug apps under Web Start?
    - Gerald

    You can debug JWS apps using standard ouput. In that case you need to
    display the Java console. OR you can use log files.Thanks for your comments. The FAQ Update entry adds new tips and tricks on how to attach a debugger to your app kicked off using Web Start. You might wonna check out the "original" entry in the FAQ first.
    - Gerald

  • Unofficial Web Start FAQ Update/Errata

    Hi,
    to speed up the Web Start FAQ update cycle I've created a new page titled "Unofficial Web Start FAQ Update/Errata" that holds upcoming FAQ entries and FAQ errata and more.
    You can find it @ http://lopica.sourceforge.net/update.html
    For more info about the Unoffical Web Start FAQ check out the Lopica Web Start Paradise site @ http://lopica.sourceforge.net
    - Gerald

    Hi,
    I've added some new entries to the update/errata page:
    * How can I use Jakarta commons-logging together with Web Start?
    * How can I associate file types with my Web Start app?
    * How can I pass parameters on to the Java runtime (JVM)?
    - Gerald

  • Liquid sorting web app list items

    FIltering is great in Liquid, but sorting the data by custom fields is something which our clients are really asking for.
    Trying to say to a client, you can only sort alphabetically etc. is really making BC seem really unfriendly. Please, please, please can this be added or someone show me how this can be achieved without writing hundreds of lines of JavaScript for something which is so rudimentary in other languages / programming systems.

    Hope I understand the question correctly.
    Are you trying to allow the customer to set the sort order? And/or allow the customer to categories web app items into groups? Or simply, sort the data by a particular custom field, such a category?
    Here's a simply solution I've got working: FAQs grouped into categories. I took this one step further and allowed my customers to even edit their categories, but you can hard code this per site if you like.
    1) Collect the web app data into collections, so we can sort by custom fields.
    {module_webapps render="collection" id="FAQs - Questions" filter="all" hideEmptyMessage="false" sortType="ALPHABETICAL" collection="faqsQuestions" template=""}
    {module_webapps render="collection" id="FAQs - Categories" filter="all" hideEmptyMessage="false" sortType="ALPHABETICAL" collection="faqsCategories" template=""}
    2) If you want to list all the categories or your custom fields (which are editable by the client in my case):
    {% if faqsCategories.items -%}
            <ul class="faq-categories">
    {% for category in faqsCategories.items  -%}
                <li><a href="#{{category.name | replace: ' ','-'}}">{{category.name}}</a></li>
    {% endfor -%}
            </ul>
    {% endif -%}
    3) Now display your web app data sorted by custom field type:
    {% if faqsCategories.items -%}
    {% for category in faqsCategories.items  -%}
                <h2>{{category.name}}</h2>
                <ul id="{{category.name | replace: ' ','-'}}" class="accordion">
    {% for question in faqsQuestions.items  -%}
    {% if question.Category_id == category.itemID -%}
                    <li>
                        <a href="#panel{{question.itemID}}">{{question.name}}</a>
                        <div id="panel{{question.itemID}}" class="content">
    {{question.description}}
                        </div>
                    </li>
    {% endif -%}
    {% endfor -%}
                </ul>
    {% endfor -%}
    {% endif -%}
    The above demonstrates how you can sort web app data by a custom field type.
    IMO I don't think this is something BC should be expected to produce (but I could be persuaded )
    Hope this helps and I hope I did not go on a tangent.
    Cheers,
    Stepehn

  • Using Office Web Apps Server with SharePoint Foundation 2013

    I want to know whether I can configure Office Web Apps server to edit Excel documents on a SharePoint Foundation 2013 site.
    I came across a TechNet article that states that "When used together with SharePoint Server 2013, Office Web Apps Server provides updated versions of Word Web App, Excel Web App, PowerPoint Web App, and OneNote Web App".
    However, later in the same article, it states "If your organization licenses Office 2013 through a Volume Licensing program, you can enable Office Web Apps editing for SharePoint 2013 on-premises" (without mentioning Foundation or Server).

    Hi Lemesnil,
    The Office Web App server should support the Edit licenses for SharePoin Foundation 2013, Office Web App is free to
    download, you can also try installing and configuring in a test environment, see more from the below article applied to SharePoint Foundation 2013.
    http://support.microsoft.com/kb/2886404/en-us
    http://blogs.technet.com/b/speschka/archive/2012/12/31/enabling-licensing-and-editing-for-office-web-apps-in-sharepoint-2013.aspx
    Anohter useful article aobut how to license Office Web App server, you can take a look.
    http://blogs.technet.com/b/volume-licensing/archive/2013/05/22/how-to-license-office-web-apps-server.aspx
    Thanks
    Daniel Yang
    TechNet Community Support

  • Web app security not working

    Hi,
    I am using WebLogic 8.1 platform. I am trying to create a very basic secure web
    app.
    I created an App and created a web project. In it, I deleted the controller, etc
    and just have index. jsp. All the index.jsp does is: <%= request.getRemoteUser()
    %>
    In web.xml I have
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Success</web-resource-name>
    <url-pattern>*.jsp</url-pattern>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    </web-resource-collection>
    <auth-constraint>
    <role-name>*</role-name>
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>default</realm-name>
    </login-config>
    <security-role>
    <role-name>*</role-name>
    </security-role>
    In weblogic.xml I have
    <security-role-assignment>
    <role-name>dealers</role-name>
    <principal-name>dealer1</principal-name>
    </security-role-assignment>
    When I run the app, it just renders the JSP and does not challenge me to login.
    Can you please help what is that I am doing wrong here?
    Thanks,
    John

    "john hryn" <[email protected]> wrote in message
    news:3fce2551$[email protected]..
    >
    Hi,
    I am using WebLogic 8.1 platform. I am trying to create a very basicsecure web
    app.
    I created an App and created a web project. In it, I deleted thecontroller, etc
    and just have index. jsp. All the index.jsp does is: <%=request.getRemoteUser()
    %>
    In web.xml I have
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Success</web-resource-name>
    <url-pattern>*.jsp</url-pattern>
    <http-method>GET</http-method>
    <http-method>POST</http-method>
    </web-resource-collection>
    <auth-constraint>
    <role-name>*</role-name>I think you should have dealers instead of *
    </auth-constraint>
    </security-constraint>
    <login-config>
    <auth-method>BASIC</auth-method>
    <realm-name>default</realm-name>
    </login-config>
    <security-role>
    <role-name>*</role-name>And here too.
    </security-role>
    In weblogic.xml I have
    <security-role-assignment>
    <role-name>dealers</role-name>
    <principal-name>dealer1</principal-name>
    </security-role-assignment>

  • Office Web Apps is not working

       Hi,
         We have tried to deploy Office Web Apps Server but, after a number of tests, we haven't been able to view PowerPoint presentations. We tested "everything" but it didn't work.
         Finally, to simplify and focus the problem, we just deployed Office Web Apps Server "on its own", that is: just Internal URL, HTTP, Open From URL Enabled and sharing docs from a shared folder in the same server. So we have:
         \\wacserver\share\<Docs> (Excel, Word and PowerPoint)
         http://wacserver
         They work both "/hosting/discovery" and "/op/generate.aspx".
         If we try to view Excel doc, it works. If we try to view Word or PowerPoint, id doesn't work.
         For PowerPoint, it appears the PowerPoint Web Apps frame (FILE, START SLIDE SHOW, SLIDE - OF -, NOTES...) and, in the center, an animation 
    "PowerPoint Web App .....". After a couple of minutes, it stops with "Either you've lost network connectivity or our server is to busy to handle your request".
         What we have seen from different sources:
    FIDDLER
    ======
         /op/view.aspx?... Response 200
         /p/PowerPointFrame.aspx?... Response 200
         /p/imagehandler.ashx?... Response 202
         13 petitions to /p/ppt/view.svc/jsonAnonymous/GetPresentation Response 200
    PROCESS MONITOR
    ==============
         There were some folders and registry keys Network Service was trying to access with ACCESS DENIED response. We gave it permissions and they disappeared.
         SYSTEM is trying to access some registry keys (SpellingWcfprovider.exe => HKU\S-1-5-18, ImagingService.exe => HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options, and 2 or 3 more). It gets an ACCESS DENIED
    but SYSTEM, we have checked, has "Full control" permissions in those keys or folders.
         These errors appear by Office Web Server running itself, although we are not making a PowrPoint file request.
    ULS
    ===
         Several times, it tries to find the PowerPoint presentation in the caché, doesn't find it, manage to get it but, when trying to put it in the cache, it receives a disk space error:
    Determined file name [PowerPoint.pptx] from [\\wacserver\share\PowerPoint.pptx]
    AFileFetcher: Starting Unc download at [\\wacserver\share\PowerPoint.pptx]
    Begining UNC Download for [\\wacserver\share\PowerPoint.pptx]
    Reading next block of bytes for [\\wacserver\share\PowerPoint.pptx]
    End reading block of bytes for [\\wacserver\share\PowerPoint.pptx]
    Reading next block of bytes for [\\wacserver\share\PowerPoint.pptx]
    End reading block of bytes for [\\wacserver\share\PowerPoint.pptx]
    AFileFetcher: Done downloading file. [\\wacserver\share\PowerPoint.pptx]
    Downloaded file from final URL [\\wacserver\share\PowerPoint.pptx] with SHA256 [Y/whX0EzCZJQdHym/OPrMdrNVg0h8SwrC0TehaKIQdU=]
    AFileFetcher: Will cache web file info to memory cache. [\\wacserver\share\PowerPoint.pptx]
    Starting WriteStreamToDiskCache
    Creating channel to DiskCache: http://wacserver:809/diskcache/DiskCache.svc
    MachineTransfer [SourceMachine:wacserver, SourceMachineVersion:15.0.4543.1000, TargetMachine:wacserver, TargetMachineVersion:15.0.4551.1011, Method:DiskCacheService.PutCacheData]
    PutCacheData: [167F6AC792AE9B53BEA7CD135A35C18F0710CF5916C49DD5804C9E29CF9149CA55D1C8D1AD526B45B91801E1502B2BCD, d1c8d155-52ad-456b-b918-01e1502b2bcd, 50758, wacserver]
    PutCacheData: Writing to C:\ProgramData\Microsoft\OfficeWebApps\Working\d\1CA\167F6AC792AE9B53BEA7CD135A35C18F0710CF5916C49DD5804C9E29CF9149CA55D1C8D1AD526B45B91801E1502B2BCD
    Not enough disk space to write.  Sleeping once.
    Not enough disk space to write.  Giving up.
    PutCacheData Response: [False]
         The cache folder has enough disk size and PowerPoint.pptx file is just 30 KB.
         It repeats this flow 3 times (as for the first HTTP requests).
         During the 2 minutes test (until it fails) there are 14 traces like:
    Failed to create process object for pid 7780 with exception System.ArgumentException: Process with an Id of 7780 is not running.     at System.Diagnostics.Process.GetProcessById(Int32 processId)     at Microsoft.Office.Web.Common.RequestPipe.ProcessManager.TryGetProcessObject(Int32
    pid).
         We have tried a number of things but none has worked. The farm has just one server and it says ist's unhealthy. We have Windows Server 2008 R2 SP1. We have read some ways to fix the health, like HTTP Activation feature, but it only works
    for Windows Server 2012 as fas as we know.
         Has anybody experienced something like this or have a posible solution? Office Web Apps Server should be so easy to deploy but we have spent a lot of time with this.
         Thank you very much. Your help will be very appreciated.
         Kind regards.

    Hi John,
    According to your description, my understanding is that you cannot view the PowerPoint files in Office Web Apps in SharePoint.
    Was there any error when you view the PowerPoint files in Office Web Apps?
    You can troubleshoot the error following the link below:
    http://technet.microsoft.com/en-us/library/ff431687.aspx#tshoot
    I also recommend to re-configure SharePoint to use the Office Web Apps Server to see if the issue still occurs.
    http://technet.microsoft.com/en-us/library/ff431687.aspx#ConfigureMain
    Best regards.
    Thanks
    Victoria Xia
    TechNet Community Support

  • How can I use more than one Data Provider in my web Apps

    I am trying to use two different data provider in my web apps to run two different queries from the same table ,the data provider A is working correctly but when I attempt to run data provider B ,It display an error page ,here is the error message : Exception Details :javax.servlet.ServletEx ception
    java.lang.RuntimeException: java.sql.SQLException : Cannot connect .Both dataSourceName and url properties are null.

    Hi,
    You can use more than one data provider in your application. However if you have defined a dataprovider for a particular table already, and wish to bind a component, select the component and use its context menu to Bind to Data...

  • Possible to have two login configs in same web app?

    Sorry for not having tried this first, my server and webapp are in a state
    of flux at this moment, but I wanted to see what the consensus is out there,
    not just whether I can or cannot make something work quickly.
    If I have two types of things that might be called in my Web App (WAR) in
    different ways (eg, browser accessing via HTTP by users that want to login
    via pretty forms, and SOAP clients that may access functionality through the
    same servlets (but with alternate Servlet Path Info after the servlet name
    in the URL)), is there ANY way I can have multiple login configs, each tied
    to a different security constraint within that web app?
    In other words, with a servlet of /frazzleblitz and security constraints
    like:
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Foo</web-resource-name>
    <url-pattern>/frazzleblitz/doFooBar</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>FoobarBrowserUsers</role-name>
    </auth-constraint>
    </security-constraint>
    and the SOAP constraint (for all users of incoming SOAP requests):
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Foo</web-resource-name>
    <url-pattern>/frazzleblitz/doFooBar</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>FoobarBrowserUsers</role-name>
    </auth-constraint>
    </security-constraint>
    where my frazzleblitz controller knows whether the incoming request is
    browser vs SOAP based by the path info after the servlet name
    Can I associate the first security constraint with a FORM based login
    config, and the second security constraint with a BASIC AUTH login config
    since I could in theory require SOAP clients to send in credentials in a
    HTTP BasicAuth header, but I can't expect a SOAP client to be HTTP
    Redirected to a login form and then to enter the right credentials into a
    user type form and then be redirected back to an app...
    Seems to me the J2EE Security spec is really lacking in the area of
    programmatic authentication (allowing my SOAP code to get credentials out of
    the request envelope and call an API to login myself). Yeah, WebLogic has
    the ServletAuthentication weak() API, but these apps need to be J2EE
    compliant and work across J2EE servers... Anybody know of any improvements
    coming in the J2EE security space to address such functionality needs?
    Thanks in advance
    Mike

    Sorry, hit send accidentally before finishing the second security
    constraint - I've fixed it up below to reflect what I meant...
    "Mike" <[email protected]> wrote in message
    news:[email protected]...
    Sorry for not having tried this first, my server and webapp are in a state
    of flux at this moment, but I wanted to see what the consensus is outthere,
    not just whether I can or cannot make something work quickly.
    If I have two types of things that might be called in my Web App (WAR) in
    different ways (eg, browser accessing via HTTP by users that want to login
    via pretty forms, and SOAP clients that may access functionality throughthe
    same servlets (but with alternate Servlet Path Info after the servlet name
    in the URL)), is there ANY way I can have multiple login configs, eachtied
    to a different security constraint within that web app?
    In other words, with a servlet of /frazzleblitz and security constraints
    like:
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Foo</web-resource-name>
    <url-pattern>/frazzleblitz/doFooBar</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>FoobarBrowserUsers</role-name>
    </auth-constraint>
    </security-constraint>
    and the SOAP constraint (for all users of incoming SOAP requests):
    <security-constraint>
    <web-resource-collection>
    <web-resource-name>Bar</web-resource-name>
    <url-pattern>/frazzleblitz/doSOAPRequest</url-pattern>
    </web-resource-collection>
    <auth-constraint>
    <role-name>SOAPUsers</role-name>
    </auth-constraint>
    </security-constraint>
    where my frazzleblitz controller knows whether the incoming request is
    browser vs SOAP based by the path info after the servlet name
    Can I associate the first security constraint with a FORM based login
    config, and the second security constraint with a BASIC AUTH login config
    since I could in theory require SOAP clients to send in credentials in a
    HTTP BasicAuth header, but I can't expect a SOAP client to be HTTP
    Redirected to a login form and then to enter the right credentials into a
    user type form and then be redirected back to an app...
    Seems to me the J2EE Security spec is really lacking in the area of
    programmatic authentication (allowing my SOAP code to get credentials outof
    the request envelope and call an API to login myself). Yeah, WebLogic has
    the ServletAuthentication weak() API, but these apps need to be J2EE
    compliant and work across J2EE servers... Anybody know of anyimprovements
    coming in the J2EE security space to address such functionality needs?
    Thanks in advance
    Mike

  • Error while creating farm for Office web apps

    Hello.
    I have error while creating office web apps fars.
    when I enter this code to powershell : New-OfficeWebAppsFarm -InternalURL "http://servername" -AllowHttp -EditingEnabled
    It says this:
    New-OfficeWebAppsFarm : The term 'New-OfficeWebAppsFarm' is not recognized as the name of a cmdlet, function, script
    file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
    and try again.
    At line:1 char:1
    + New-OfficeWebAppsFarm -InternalURL "http://office" -AllowHttp -EditingEnabled
    + ~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (New-OfficeWebAppsFarm:String) [], CommandNotFoundException
        + FullyQualifiedErrorId : CommandNotFoundException
    so what's the problem?

    That is an error I would expect with the account running the cmdlet not having local administrator rights to the server.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Getting error while creating a new web app saying "The password supplied with the username domainname\username was not correct. Verify that it was entered correctly and try again"

    Hi ,
    I am trying to create a new web app using Central Administration in Sharepoint 2010 and getting an error "The password supplied with the username  was not correct. Verify that it was entered correctly and try again".
    I tried running this command also "stsadm -o updatefarmcredentials -userlogin <domain\username> -password <newpassword>" but when it got executed it showed me "Access Denied".
    What should i do ??
    Thanks in advance.
    Regards, Anurag

    HI,
    right click on command icon and click run as administrator then use above stsadm commend to update credential. If still you face same issue then try with powershell as mention in below link: (make sure that you open sharepoint powershell as run as administrator)
    http://smartrider.wordpress.com/2010/07/15/powershell-script-to-create-web-application-and-site-collection-in-sharepoint-2010/
    let us know your result
    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

Maybe you are looking for