I am working on a team for a class, and we have written a very large amount of code. Luckily for us, we were diligent in adding javadoc annotations to everything, so we should be able to create the documentation very easily. For the class however, we are required to have all of our documentation on a wikispace page.
Some of the pages will be javadoc, some of them will be plain text. Is there an easy way to convert javadocs to wiki pages, or embed javadocs into wiki pages? Thanks!
I haven't tried this myself, but maybe doxygen(http://www.doxygen.nl/) in conjunction with this tool (https://code.google.com/p/doxy2wiki/) may be able to solve your problem.
Related
This is a duplicate of this question, which was written in 2010. Now that things may have changed in 2017, I think this is a great opportunity to re-ask the question.
What libraries are needed?
Using org.restlet.jee 2.3.10, I have noticed that there are several libraries which could support JSON. Here are some names from the Maven Repository:
org.restlet.ext.jackson
org.restlet.ext.json
org.restlet.lib.org.restlet.lib.org.json
org.restlet.lib.org.json
What is the current recommended / standard way of GET-ing and POST-ing JSON-formatted text?
It seems like: "org.restlet.JSON".
You can see the official tutorial here.
In the project I am working on I need to access information from the website explainxkcd.com which gives the explanation of specific xkcd comics. The information I am looking for would be the explanation of the comic as a string. Explainxkcd is a site that runs using mediawiki, software that forms a template for the "wiki" feel. Mediawiki has an api that allows you to extract information from their websites and I have gone to http://www.mediawiki.org/wiki/API:Main_page trying to figure out how to use their API for this particular wiki site but to no avail. It seems that you can replace the "index.php" in a URL with api.php to use the API but when I try this for http://explainxkcd.com/9/api.php it doesn't seem to work. I guess my URL is wrong but I don't see any information on how to find the specific URL to use for Explainxkcd.com
QUESTION:
How can I access information from a third party wikipedia page in a Java program? This can be through the mediawiki api or some other solution. If you know a good way to find the URL that can be used with mediawiki that would be preferred. Just looking for a nudge in the right direction here.
Thanks
Using the same method, s/index.php/api.php/, I get a different result: http://www.explainxkcd.com/wiki/api.php which seems to work. If a wiki is using pretty URLs (e.g. example.com/wiki/Main_Page), just click on edit, view source or history.
Yes, please use the API instead of screen-scraping. You can see a few existing Java libraries for that here.
how could I use ESAPI to check for unsafe input texts in web forms ? My application is built using struts 1.X, so I assume the validations should be added to Actions classes. Any samples / tutorials you recommend ? Thanks.
For something as specific as that there is not usually going to be great tutorials out.
Hopefully I am wrong about this, but I would have to suggest their wiki due to lack of good resources.
I was looking to find input validation for you... seems they don't even have that up themselves. I coudn't find any information on it either. The videos below might have it or I would email them if it provides no real good answer. They should be able to put you in the right direction... and if you do that do us all a favor and demand they update their wiki!
Email: jeff.williams%owasp.org#gtempaccount.com (Leader, owner)
Since that email doesn't look right though I would also check this one.
Email: kevin.w.wall#gmail.com (Owner, coder of crypto libs)
Their are these youtube video's that might help. They even mention that their are not a lot of good resources to teach you how to use ESAPI, but said they hope to fix that in these four videos.
http://www.youtube.com/watch?v=suphwAsb-To
http://www.youtube.com/watch?v=13O9RyjuB3o
http://www.youtube.com/watch?v=_B2kv2mSJhE
http://www.youtube.com/watch?v=mMW4fiUI5kQ
Hope it helped!
Validation of form fields normally is done in the ActionForm class. There are all input values available and all validations can be done there. A tutorial (one of many available) cna be found here Struts form validation and error handling. More can be found using google (struts validation).
I have been working with the ESAPI library for a few months now. The library cannot do too much to validate your input, since it cannot know what the input could be or should be. That is especially true when you factor in all the international characters that could be in legitimate user input.
We use the ESAPI library mostly for encoding server output. The purpose is to send user (or possible attacker) input back to the browser in such a way that it cannot be executed. Instead HTML or JavaScript interprets it as text only.
That is why both my validation and ESAPI's encoding of user input are important for security.
I need to read and write some data on .mdb Access file and over the web I found the Jackcess library that that does exactly that.
Unfortunately I could't find any documentation to use that. On the library website there are a couple of examples, but no real documentation. Can anyone tell me if there's some sort of documentation somewhere?
The javadoc is intended to be fairly explanatory. The primary classes would be Database and Table. The library is also heavily unit tested, so you can dig into the unit test code to see many examples. There isn't currently a great "getting started" document. It has been discussed before, but, unfortunately no one has picked up the ball on actually writing it. That said, the help forum is actively monitored.
UPDATE:
There is now a cookbook, which is the beginnings of a more comprehensive user-level documentation.
You can use jackcess-orm that use DAO pattern and POJO with annotations.
I'd like to create HTML documentation for a Java class library that includes
programming guide information - beyond just a class reference
code examples in the reference doc
collapsible regions
I want it to look well-styled. Something like this:
I think that Javadoc exposes a doclet API that allows other parties to provide doc generation integrated in Javadoc. Is there a doclet option that I can use (for free) that does something a little nicer than the standard javadoc output?
I tried googling for this but no luck.
Suggestions?
Addendum
I found doclet.com but I don't know how to evaluate the options. Recommendations?
In particular, XHtmlDoclet sounds like it wants to address these issues. Anyone used it? I can't get it to work. Also the example offered by the XHTML Doclet guys doesn't look any better than the docs generated from c.1998 javadoc .
Related:
Why does Javadoc generate non-compliant XHTML?
This question got me thinking (ok, Googling) and I stumbled on this set of taglets. Never tried it, but it looks pretty promising.
Perhaps you're thinking of Java doclet API:
http://www.oracle.com/technetwork/java/javase/documentation/index-jsp-135444.html
It appears that you're adding examples and some text. I think it's entirely possible with existing javadocs. The problem will be the content rather than the rendering.
Castor used doclet to ease its config burden. So did EJB 1.0. Take a look at those if you'd like.