I have been trying to debug JSP files (with awful lots of Java code) using the following configuration:
<wls:jsp-descriptor>
<wls:keepgenerated>true</wls:keepgenerated>
<wls:precompile>false</wls:precompile>
<wls:debug>true</wls:debug>
<wls:verbose>true</wls:verbose>
<wls:print-nulls>false</wls:print-nulls>
</wls:jsp-descriptor>
But every time I set a breakpoint in the file I am unable to see the source of the JSP.
I am using Spring Toolsuite and Weblogic 11gR1 (10.3.6). Other than the same configuration for other applications, this is a brand new installation of both.
How can I configure Eclipse to search for the JSP files to debug?
You can precompile the complete war file with: weblogic.appc
or only JSPs with: weblogic.jspc
more details at:
http://devwebcl.blogspot.cl/2014/09/wls-precompile-earwar-ejbjsp.html
java weblogic.jspc -forceGeneration -keepgenerated -verboseJspc -d d:\tmp\export\ -classpath .;D:\proj\webapp-wl-v4\web\WEB-INF\classes;D:\proj\webapp-wl-v4\foo.jar;D:\proj\webapp-wl-v4\lib\bar.jar index.jsp
Related
How can I disable freemark logs in struts2 project?
I constantly get enter image description heretons of useless logs like this:
DEBUG 15729 [freemark] (): *************************
I'm using struts 2.5.2 and standard java logging and sysout in code(I'm not using log4j).
In my project I don't have any logging.properties file or struts.properties file.
Under project in Lib folder I am using following jars -
commons-beanutils-1.9.3.jar
commons-collections-3.2.2.jar
commons-digester-2.1.jar
commons-fileupload-1.4.jar
commons-io-2.6.jar
commons-lang-2.4.jar
commons-lang3-3.8.1.jar
commons-logging-1.2.jar
freemarker-2.3.28.jar
javassist-3.20.0-GA.jar
log4j-api-2.8.2jar
ognl-3.1.21.jar
struts2-core-2.5.20.jar
struts2-tiles-plugin-2.5.20.jar
As mentioned in the below link solution Disable Struts2 logs
I have tried to include the log4j.properties inside src folder with the same content. But still I am getting those logs.
I have developed a SpringBoot 2.1.3 WebApp with Thymeleaf 3. For quick testing purpose I create a fat jar with two SQL Procedure which automatically create the DB if it is not present and fill typological table if they are empty.
Now I put my .jar in a CentOS server and launch it by the command:
java -jar mywebapp.jar
All works perfectly but I find a bug in a form submit and I would like to examine the server (embedded) logs.
Which logging level I have to use in the below configuration inside the application.properties:
logging.level.org.apache.tomcat=?
logging.level.org.apache.catalina=?
And where I can find the log text file inside a Unix machine?
Thank you
First of all with embedded tomcat you have to enable log by adding to you application.properties
server.tomcat.accesslog.enabled=true
to specify base directory if you want to save log other then temp folder , also folder that will contain logs
server.tomcat.basedir=tomcat
server.tomcat.accesslog.directory=logs
you can also specify suffix and prefix for logs file
server.tomcat.accesslog.suffix=.log
server.tomcat.accesslog.prefix=access_log
for more properties see here list of common properties , search for tomcat and logging
Also adding logging level as mentioned by the PO in the comment add
logging.level.org.apache.tomcat=ALL
I have a smart GWT app example called AwesomesmartGWTUIProject from
javacodegeeks
Its package is com.javacodegeeks.smartgwt.appui
In eclipse when i try to run it as a web application I get the following error
In order for your application to run correctly, you will need to include these tags in your host page directly. In order to avoid this error, you will need to remove the script tags from the gwt.xml file, or add this property to the gwt.xml file: <set-configuration-property name='xsiframe.failIfScriptTag' value='FALSE'/>
[ERROR] shell failed in doSlowStartup method
Mar 31, 2014 10:07:41 PM com.google.appengine.tools.development.LocalResourceFileServlet doGet
WARNING: No file found for: /awesomesmartgwtuiproject/com.javacodegeek.smartgwt.appui.awesomesmartgwtuiproject.nocache.js
It simply doesn't display anything when I try to run it in my browser. Am new to smartGwt so am not so conversant with the configurations. Any ideas ?
Have you compiled your GWT project?
Is there nocache.js file generated in your project at correct location?
You have to read about Understanding the GWT Compiler.
Every thing is defined at above link including project structure, GWT compilation etc.
Use rename-to attribute in your module gwt.xml file.
Directly from the above link:
You may have noticed that one of the generated files is named after your module, followed by a .nocache.js suffix. This is the GWT bootstrap file. Similar to the output subdirectory war/, the name of this file is also controlled by the rename-to attribute in your module XML file.
I m new in Struts2. Creating a hello world program using struts. When I run it got first screen where i put my input but when click on submit button giving following error.
Source of this helloworld example: http://www.tutorialspoint.com/struts_2/index.htm
HTTP Status 404 - /HelloWorldStruts2/hello
type Status report
message /HelloWorldStruts2/hello
description The requested resource (/HelloWorldStruts2/hello) is not available.
Apache Tomcat/6.0.29
Suggest what is the issue?
Got the solution.
In index.jsp there was <form> tag. When I changed it to <s:form> its working fine.
Or change from
<form action="hello">
to
<form action="hello.action">
This is what worked for me, specific to the question. Tomcat 8 was used:
Make sure you have created the classes folder under WebContent\WEB-INF.
In that create the logging.properties file and add the following content to it. (It doesn't matter if the file jumps on its own to Java Resources > Libraries) :-
org.apache.catalina.core.ContainerBase.[Catalina].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].handlers = \ java.util.logging.ConsoleHandler
Then in the location of Tomcat's webapps folder delete your HelloWorldStruts2.war file.
Now follow the site's instructions to Export your project to a new HelloWorldStruts2.war file (remember to overwrite the existing .war file with the same name if it's there).
Again, deploy this file by copying it to your Tomcat directory's webapps folder.
In the browser, go to http://localhost:8080/HelloWorldStruts2/index.jsp again, though I'm not sure it will work for sure this time.
But this time, watch the Tomcat server application's verbose output. You will get some kind of exception like this (leave out Warnings for now):
30-Mar-2014 17:39:29.273 SEVERE [localhost-startStop-7] org.apache.catalina.core.StandardContext.filterStart Exception starting filter struts2 java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:213)
at org.apache.struts2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:102)
...
Seeing this, what I did immediately was copy the commons-lang3-x.y.z.jar to the WebContent\WEB-INF\lib folder, and then exported and deployed the project again.
This time, again the page wasn't showing, so I watched the logs and found out that Tomcat did not explicitly clear the contents of the webapps\HelloWorldStruts2 folder.
After deleting both HelloWorldStruts2 and HelloWorldStruts2.war and refreshing the index.jsp page in the browser, my project did work fine!
I am using Eclipse Indigo with runjettyrun plugin (latest). The webapp deploys successfully, but on non-trivial page I get a JSP custom tag compilation error.
I am getting the following JSP compilation error:
java.lang.IllegalStateException: STREAM
at org.eclipse.jetty.server.Response.getWriter(Response.java:683)
I want to look at the java file that got created from the Tag file. In the stacktrace, I can see that the Tag is being compiled to a file name:
xyz_Tag.java
I would like to view this java file. Any idea where I can find it?
you can instruct Jetty to keep generated java source files. There are many ways to configure this. Easiest way to do it is passing init parameter keepgenerated as true for org.apache.jasper.servlet.JspServlet in web.xml.
<init-param>
<param-name>keepgenerated</param-name>
<param-value>>true</param-value>
</init-param>
More details you can find in: http://wiki.eclipse.org/Jetty/Howto/Configure_JSP