IceFaces missing rime.css file - icefaces

we are using IceFaces 3. This has been a problem since IceFaces 2.1, we just are slowing down to the point where i can start to work on it. In our log files, we are getting thousands of these errors
May 14, 2011 9:29:43 AM com.sun.faces.application.resource.ResourceHandlerImpl logMissingResource
WARNING: JSF1064: Unable to find or serve resource, rime.css, from library, org.icefaces.component.skins.
ignore the date, currently the server's time is backdated for testing.
what exactly am i missing here? i can't find anything on google about this file missing and im not sure where to start.

try this in h:head
<link rel="stylesheet" type="text/css" href="./xmlhttp/css/rime/rime.css"/>
and this in h:body
<h:body styleClass="ice-skin-rime">
Update:
(http://jforum.icesoft.org/JForum/posts/list/20667.page): "With ICEfaces 3 you no longer need to have a reference to the CSS files in the head tag. This is now controlled with the context-param".
like this:
<context-param>
<param-name>org.icefaces.ace.theme</param-name>
<param-value>rime</param-value>
</context-param>
Also, download the posted test case and see if the style gets loaded.
And ice Documentation:http://www.icesoft.org/projects/ICEfaces/documentation.jsf

I have had similar kind of issue, use
<link rel="stylesheet" type="text/css" href="/xmlhttp/css/rime/rime.css"/>
instead of
<link rel="stylesheet" type="text/css" href="./xmlhttp/css/rime/rime.css"/>
make sure you are removing . in your href, now your rime.css file should be referenced, also make sure you have rime.css file in icefaces jars, you can see inside those jars using java decompiler

Converting from icefaces 1.8 to icefaces 3,
I have faced the same problem and solved it as below.
Refer to Icefaces-3.0.1-bin samples:
web.xml
<servlet>
<servlet-name>Resource Servlet</servlet-name>
<servlet-class>com.icesoft.faces.webapp.CompatResourceServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Resource Servlet</servlet-name>
<url-pattern>/xmlhttp/*</url-pattern>
</servlet-mapping>
That is all.

Related

The requested resource is not available error in Eclipse

Hi all I am working on Eclipse 6.0.36 and using tomcat server.I am having an error said "The requested resource is not available" error 404.I had seen other post on same question and this is the common error that many solution that I could find on google. But still cannot solve my problem.. I am also still new working on eclipse.If there any information that you need just ask me, before vote down.. there are so long codes that I need to show..
some says this might be caused by servlet command.My servlet,from web_bkup.xml files looks like this:
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SourceCodeServlet</servlet-name>
<url-pattern>*.source</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
surely there is lack of information that I give and you all can ask for it. But if there any solution that you all can shared.Hopefully can solve my error
Since you have only given little information, I try to answer under a few assumptions.
The 404 tells you that Tomcat could not find the resource e-system.jsp. I now assume that you have a project PM_Portal in Eclipse that you have successfully deployed to the Tomcat server, meaning there were no severe errors in the Tomcat log files which stopped the web application from starting. I also assume that PM_Portal is the root context of your application.
From that information, getting a 404 after successfull deployment means that there either is no JSP file e-system.jsp in the /WebContent folder of the Eclipse PM_Portal project or the Deployment Assembly configuration for you project lacks a mapping for the /WebContent folder. In order to check this, you can right-click on the project folder and choose Properties. Open the Deployment Assembly property and check that /WebContent is mapped to the root folder / of the target deployment.
Hope this is helpful.

tomcat eclipse java ee default package

I'm trying to set up a dynamic web app using Eclipse Juno and Tomcat 7. My problem is that i can only get my servlet to run if my file structure is
MyProject/Java Rescources/src/(default package)/MyServlet.java
I've read i should avoid using the default package (don't know why) but when i try to use a different package:
MyProject/Java Resources/src/myPackage/MyServlet.java
I get the error message:
HTTP Status 404 - /MyProject/MyServlet
The requested resource is not available
Its only a small test project so i can start a new workspace and create the project anew if necessary. I suppose i have to change a path somewhere but i don't know where or how.
I got it working using the following in web.xml
<servlet>
<servlet-name>QNumInput</servlet-name>
<servlet-class>myPackage.MyServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>QNumInput</servlet-name>
<url-pattern>/QNumInput/QNumReq.do</url-pattern>
</servlet-mapping>
The index.html file calls this with the tag:
<form name="getQNumForm"
action="http://localhost:8080/MyProject/QNumInput/QNumReq.do"
METHOD = "POST">
<B>Enter Question Number 1 to 200</B>
<INPUT TYPE="TEXT" NAME="qNumber">
<INPUT TYPE="SUBMIT" VALUE="Request Question Text">
</form>
It did not work at first so i cleaned the tomcat work directory by right clicking on the server (not sure if this is necessary) It still did not work so i gave up and exited Eclipse. This must have saved the new settings because when i fired up Eclipse again and tried it again it worked ok.
Thanks for the help.
DG
You will need to make sure your <servlet-mapping> and <servlet> elements in web.xml are correctly set.

gwt logs are not generated

Using gwt logs jar I am able to display logs on my console. But now I wanted to add logs in my olgs file from cient side, as we do using log4j on server side. So i reffered to http://code.google.com/p/gwt-log/wiki/GettingStarted this link but i dont see any client side logs getting generated in my log file.
Following is my gwt.xml file
<inherits name="com.allen_sauer.gwt.log.gwt-log-DEBUG" />
<set-property name="log_DivLogger" value="DISABLED" />
<!-- In gwt-log-3.0.3 or later -->
<inherits name="com.allen_sauer.gwt.log.gwt-log-RemoteLogger" />
<set-configuration-property name="log_pattern" value="%d [%t] %p - %m
%n" />
Following is my web.xml file
<servlet>
<servlet-name>gwt-log-remote-logger-servlet</servlet-name>
<servlet-class>com.allen_sauer.gwt.log.server.RemoteLoggerServiceImpl</servlet-class>
<!--
The `symbolMaps` parameter specifies the server directory
containing the GWT compiler symbol maps output, which is used
for stack trace deobfuscation
-->
<init-param>
<!-- This value assumes a GWT compile with '-deploy war/WEB-INF/deploy/' -->
<param-name>symbolMaps</param-name>
<!--
Modify the param-value based on your server environment. Some web servers
use your `war` directory as the 'current working dir', while other
vendors will do something different. You may use trial and error. Specify the
relative path you think should work, then check the server log after forwarding
the first client log message to the server. If the directory cannot be found,
gwt-log will report the full path which it tried.
-->
<param-value>WEB-INF/deploy/detectfiles/symbolMaps/</param-value>
</init-param>
<!--
Additional or alternate directories may be specified via additional parameter
which also begin with `symbolMaps`. This may be useful if you deploy to multiple
server environments which use different directory structures or have a different
notion of what the 'current working directory' is.
-->
<init-param>
<param-name>symbolMaps_2</param-name>
<param-value>WEB-INF/deploy/detectfiles/symbolMaps/</param-value>
</init-param>
<!-- Optionally enable CORS (http://www.w3.org/TR/cors/)
<init-param>
<param-name>Access-Control-Allow-Origin</param-name>
<param-value>http://your-applications-origin</param-value>
</init-param>
-->
</servlet>
<servlet-mapping>
<servlet-name>gwt-log-remote-logger-servlet</servlet-name>
<url-pattern>/com.renault.detectfiles/gwt-log</url-pattern>
</servlet-mapping>
I have added log on clinet side as follows
Log.debug("Hi this is a debug log");
First of all, make sure that you compile your GWT application with the additional parameter -deploy war/WEB-INF/deploy/.
Second, make sure that symbol maps exist in the directory
WEB-INF/deploy/detectfiles/symbolMaps/. I observed that symbolMaps go to the directory WEB-INF/deploy/<module-name>/symbolMaps/ when I compiled. Here, detectfiles does not look like your module name. Because, in the url-pattern, you have specified com.renault.detectfiles as the module name.
These might be the possible cause of not seeing the log.

Write a path to call a particular servlet.

I need a help with getting right path so that my request from a JSP page to a servlet works fine. Right now its giving me an error Servlet not found .. I am working in eclipse. My directory is like this ::
At the top level is my Project_Name 2_8_2012. Now inside JavaResources i have a Src folder inside which i have a package Mypackage inside which i have a TimeServlet.java and TimeManagement.java.
my JSP page is in WebContent/jsp/Page.jsp
Now from Page.jsp i send a request on input submit button click. Basically a form is submitted
<form id="timeform" name="timeformname" action="/2_8_2012/jsp/timeservlet" method="post">
which goes to my web.xml where i have this code ::
<servlet>
<servlet-name>Timeserv</servlet-name>
<servlet-class>
MyPackage.TimeServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Timeserv</servlet-name>
<url-pattern>/2_8_2012/jsp/timeservlet</url-pattern>
</servlet-mapping>
but i get the error servlet not found.
To open a page.jsp on my browser i go to link
http://localhost:8080/2_8_2012/jsp/Page.jsp.
and it opens fine.
How should i give a path so that my servlet is called up ? Thanks..
change the URL-PAttern to
/jsp/timeservlet and check

gwt - problem accessing servlet in inherited module

I'm trying to divide my app into modules and I'm stuck with this problem:
I have a widget MapServiceWidget in one module called "webvisualisation" that uses the RPC to get the data from MapService Rpc interface. I'm inheriting this module in another GWT module called "led" (I packed "webvis..." into jar with sources, added in module "led" deffinition). Then I try to create this widget in the second ("led") module and get message
"Problem accessing /led/mapservice reason NOT FOUND".
And sure it can't find it cause mapservice is defined in inherited "webvisualisation" module.
The question is why it's looking for this servler implementation in "led" module not in "webvisualisation" where it's defined? I checked all module definitions and web.xml files several times and consulted documentations, it seems ok.. but it's not. If my description is not clear I can post some config/source files.
This is web.xml for webvisualisation module
<!-- Servlets -->
<servlet>
<servlet-name>mapservice</servlet-name>
<servlet-class>pl.gmike.webvis.server.MapServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>mapservice</servlet-name>
<url-pattern>/webvisualisation/mapservice</url-pattern>
</servlet-mapping>
And for led it's just ordinary generated sample file
<!-- Servlets -->
<servlet>
<servlet-name>greetServlet</servlet-name>
<servlet-class>pl.led.server.GreetingServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>greetServlet</servlet-name>
<url-pattern>/led/greet</url-pattern>
</servlet-mapping>
Seems that you're bumping into a classpath problem. Maybe check that your webvisualisation.jar is in the WEB-INF/lib directory of your web application.
I got it working. I just added servlet and servlet mapping entries to "led" modules web.xml so it look like this now:
<!-- Servlets -->
<servlet>
<servlet-name>greetServlet</servlet-name>
<servlet-class>pl.led.server.GreetingServiceImpl</servlet-class>
</servlet>
<servlet>
<servlet-name>mapservice</servlet-name>
<servlet-class>pl.gmike.webvis.server.MapServiceImpl</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>greetServlet</servlet-name>
<url-pattern>/led/greet</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>mapservice</servlet-name>
<url-pattern>/led/mapservice</url-pattern>
</servlet-mapping>
As You can see the mapservice servlet is mapped here to /led/mapservice URL where GWT seems to look for it, unlike in original "webvisualisation" module web.xml where it was mapped to /wevisualisation/mapservice .
I'm not very satisfied with this solution, it works but it requires adding a servlet mapping in WebApps web.xml for every servlet in inherited module that I want to use or that is used somewhere in this inherited module.
Still I would like to know why servlet definitions and mappings from inherited modules are not included in WebApps web.xml during compilation/linking... I think it should work without such hacks, so there's something I'm doing wrong.